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-18T23:19:56.662815+00:00 | 1,684,448,884,000 | 4c584b135acd5a84f4292d77323279410bb7c645 | 3 | {
"blob_id": "4c584b135acd5a84f4292d77323279410bb7c645",
"branch_name": "refs/heads/master",
"committer_date": 1684450955000,
"content_id": "c557cd031e54f0c66a7786a22c067ed1fc67bc39",
"detected_licenses": [
"MIT"
],
"directory_id": "6347824ced5368e43a1ee01ae817b9581996e999",
"extension": "py",
"fi... | 2.953125 | stackv2 |
"""
Regex notes:
Get recipe title
(?:^# (.*)\s+)
Get the img tag or whatever is between the title line and the next section
(?:^# .*\s*)(^(?:<.+>\s*?)*?)\s*(?:##[^#])
Get the overview section rows in a single group
(?:^## Overview\s+)(^(?:.*\s*?)*?)\s*(?:##[^#])
Get the entire ingredients sections, including blank... | 360 | 37.55 | 128 | 23 | 3,632 | python | [{"finding_id": "codeql_py/redos_769585867c3bc6a3_935fe75a", "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... | 5 | true | [
"CWE-1333",
"CWE-1333",
"CWE-1333",
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos",
"py/redos",
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<' and containing many repetitions of 'a><'.",
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ' '.",
"This part of the regular expression may cause... | [
112,
148,
173,
301,
321
] | [
null,
null,
null,
null,
null
] | [
44,
69,
53,
67,
72
] | [
46,
73,
55,
69,
74
] | |
2024-11-18T23:11:07.950758+00:00 | 1,626,728,074,000 | e6261e7a601d8a797ede15f07eb64ae4a19b52f8 | 2 | {
"blob_id": "e6261e7a601d8a797ede15f07eb64ae4a19b52f8",
"branch_name": "refs/heads/master",
"committer_date": 1626728074000,
"content_id": "59e507e273d0ee6db2f9142c79ba5c11f93ed076",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "17e1dc3cf392321906c4f073a51209cd48398d66",
"extension": "p... | 2.484375 | stackv2 | #!/usr/bin/env python
import logging
import jinja2
from .. import __application__
__author__ = "Giuseppe Chiesa"
__copyright__ = "Copyright 2017-2021, Giuseppe Chiesa"
__credits__ = ["Giuseppe Chiesa"]
__license__ = "BSD"
__maintainer__ = "Giuseppe Chiesa"
__email__ = "mail@giuseppechiesa.it"
__status__ = "Perpetua... | 56 | 30.18 | 103 | 15 | 429 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_55c9a19696384d49_8507b621", "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."
] | [
32
] | [
null
] | [
24
] | [
78
] | |
2024-11-19T01:21:39.518800+00:00 | 1,643,198,260,000 | cdb72ced4784ea3f394e46368e7d37d997bb52b1 | 3 | {
"blob_id": "cdb72ced4784ea3f394e46368e7d37d997bb52b1",
"branch_name": "refs/heads/master",
"committer_date": 1643198260000,
"content_id": "eb3bb43ff73c5a4254031b4f760ce91a5ef2dad1",
"detected_licenses": [
"MIT"
],
"directory_id": "4d6c87d239681c55d0119219c30296ed611ad5d4",
"extension": "py",
"fi... | 2.640625 | stackv2 | from flask import Flask, render_template, redirect, url_for, request, session
import hashlib, os
import connection
app = Flask(__name__)
app.secret_key = os.urandom(12)
# Go to login page
@app.route('/', methods=['GET', 'POST'])
def login():
if connection.logged_in():
return redirect(url_for('hello'))
... | 51 | 27.82 | 92 | 16 | 312 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_80fff2d014fad7ac_39187bf8", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
48
] | [
null
] | [
43
] | [
65
] | |
2024-11-19T01:21:51.538346+00:00 | 1,623,317,288,000 | e34650cb5a4c601852a8d6c5e3aa8bff3371088c | 3 | {
"blob_id": "e34650cb5a4c601852a8d6c5e3aa8bff3371088c",
"branch_name": "refs/heads/master",
"committer_date": 1623317288000,
"content_id": "72849b32e76e90c7d0032c462c72cd43f71d240e",
"detected_licenses": [
"MIT"
],
"directory_id": "c3ff2b78dd12c3c0be322609ee2779a028b703b5",
"extension": "py",
"fi... | 2.859375 | stackv2 | import re, string
import pandas as pd
from sklearn.model_selection import train_test_split
FN = '/Users/ibragim/Documents/ytsubs/ru-ted.txt'
class Preprocessor(object):
def __init__(self, cap=True):
self.pattern = re.compile('[^a-zA-ZА-Яа-я0-9,?.-:;★\s]+')
self.punc_set = {k:v for v,k in enumerat... | 95 | 25.93 | 111 | 16 | 727 | python | [{"finding_id": "codeql_py/overly-large-range_476bf311505900c8_c50f09c2", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[.... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[.\\/0-9:\\]."
] | [
10
] | [
null
] | [
55
] | [
58
] | |
2024-11-19T00:11:43.452333+00:00 | 1,626,193,780,000 | a4f16ebe274d4142a7caf867f9f58fa50aeae398 | 3 | {
"blob_id": "a4f16ebe274d4142a7caf867f9f58fa50aeae398",
"branch_name": "refs/heads/main",
"committer_date": 1626193780000,
"content_id": "9e10c9cf262a7ee47235b9ad9e9b44be9c9e0341",
"detected_licenses": [
"MIT"
],
"directory_id": "be0dc2267e762bd861daf7da9a9624caeedb215c",
"extension": "py",
"file... | 2.625 | stackv2 | """
File Name : arguments.py
Description :参数获取
Author : mxm
Created on : 2020/8/14
"""
import tornado.web
import tornado.ioloop
import tornado.httpserver
import tornado.options
from tornado.options import options, define
from tornado.web import RequestHandler, MissingArgumentErro... | 57 | 31.51 | 75 | 13 | 462 | python | [{"finding_id": "codeql_py/reflective-xss_f8aed006be192164_ea420221", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
47
] | [
null
] | [
20
] | [
23
] | |
2024-11-19T00:24:52.212892+00:00 | 1,608,925,680,000 | 9b13213a6c225f966fcea1b173471db1cf8b2bd3 | 3 | {
"blob_id": "9b13213a6c225f966fcea1b173471db1cf8b2bd3",
"branch_name": "refs/heads/master",
"committer_date": 1608925680000,
"content_id": "8963c45b41a9a51db5583198345d1646574b73c9",
"detected_licenses": [
"MIT"
],
"directory_id": "220abbf89beaefbfa165e29dfd43fc8b78adbeef",
"extension": "py",
"fi... | 2.9375 | stackv2 | # Module python pour la gestion des connections à distance via SSH
import paramiko
import os.path
# Module python pour la gestion du temps d'attente pendant que l'execution des commandes
import time
import sys
# Module python pour la recherche des messages d'erreurs que le Routeur pourra générer
import re
# Vérificati... | 116 | 38 | 116 | 16 | 1,054 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_1fda3d001f843cf2_1f22f593", "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."
] | [
63
] | [
null
] | [
9
] | [
70
] | |
2024-11-19T00:36:58.164107+00:00 | 1,427,210,754,000 | 667f56ed655814cb8c8a5f3fb0041b4c4847af7d | 2 | {
"blob_id": "667f56ed655814cb8c8a5f3fb0041b4c4847af7d",
"branch_name": "refs/heads/master",
"committer_date": 1427210754000,
"content_id": "c2298368d0730882e509996462ab25f8a7176fbd",
"detected_licenses": [
"MIT"
],
"directory_id": "f1431492a078ec082db4aeb159c1eccf3e40c67f",
"extension": "py",
"fi... | 2.328125 | stackv2 | import os, sys, socket, time, logging, random
import shlex, subprocess
import tempfile
from kazoo.client import KazooClient
from kazoo.exceptions import NodeExistsError
def createLocalScratchDir():
if 'FLAGS_task_data_dir' in os.environ:
working_dir = os.environ['FLAGS_task_data_dir']
if not os.path.exists(w... | 77 | 25.97 | 102 | 13 | 619 | python | [{"finding_id": "codeql_py/overly-permissive-file_5ac770666a136c54_32ddd7cb", "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 writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable."
] | [
15
] | [
null
] | [
5
] | [
32
] | |
2024-11-19T01:26:11.549336+00:00 | 1,607,659,155,000 | 2d4356d883005e0a17d004dd59e1b9e530d04152 | 3 | {
"blob_id": "2d4356d883005e0a17d004dd59e1b9e530d04152",
"branch_name": "refs/heads/master",
"committer_date": 1607659155000,
"content_id": "7a1cceb2efa86c1f106a57d50b3539309d730f5f",
"detected_licenses": [
"Unlicense"
],
"directory_id": "8df99d7750096b9c793aa2cca0736a8192ab1fa4",
"extension": "py",... | 3.03125 | stackv2 |
def main():
chenyang = VerificationCollection(salary = 20000, collectrate = 0.1, social = 0, special = 0, other = 0, legal = 0)
print(chenyang.collectrate)
print(chenyang.income)
print(chenyang.YearIncome)
print(chenyang.PersonalIncomeTax())
print(chenyang.Verificationtax())
print(chenyang.... | 114 | 26.19 | 119 | 14 | 884 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ba84b4e4843c5f16_eaa7184d", "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."
] | [
5
] | [
null
] | [
11
] | [
26
] | |
2024-11-19T01:26:11.656841+00:00 | 1,563,306,246,000 | 7ea5594ba40f8bcf22ff976d745fabc8a01237a7 | 3 | {
"blob_id": "7ea5594ba40f8bcf22ff976d745fabc8a01237a7",
"branch_name": "refs/heads/master",
"committer_date": 1563306246000,
"content_id": "77b6bd29b34478f455ade1e3293670a246fbc6ea",
"detected_licenses": [
"MIT"
],
"directory_id": "7b991c1c28a67ab6fde9c3c5c012e206e6dd6c6f",
"extension": "py",
"fi... | 2.921875 | stackv2 | from collections import Counter
import lxml
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
import re
import string
import html
import justext
from unidecode import unidecode
from lazynlp.utils import *
def parse_html(page):
""" Clean HTML tags for webpages that aren't Gutenberg books
"""
... | 194 | 28.41 | 86 | 17 | 1,368 | python | [{"finding_id": "codeql_py/bad-tag-filter_408e10d7b21ff35b_654e309d", "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."
] | [
37
] | [
null
] | [
33
] | [
60
] | |
2024-11-19T01:52:01.417279+00:00 | 1,545,366,363,000 | 92e333c775c25d3790849aadd31ebddff7d8de5e | 3 | {
"blob_id": "92e333c775c25d3790849aadd31ebddff7d8de5e",
"branch_name": "refs/heads/master",
"committer_date": 1545366363000,
"content_id": "16a5c1a4aeac5ac72755a7bae0211199f8fb6c82",
"detected_licenses": [
"MIT"
],
"directory_id": "27cdc335dae98d204e3e0f8db18803d4d2f89e24",
"extension": "py",
"fi... | 2.84375 | stackv2 | """
Simple Flask server to return predictions from trained densenet model
"""
from flask import Flask, request, redirect, flash
import torch
from torchvision.transforms.functional import to_tensor
from PIL import Image
from models import densenet121
app = Flask(__name__)
cp = torch.load('models/cv/checkpoint/best_mo... | 45 | 23.33 | 69 | 14 | 251 | python | [{"finding_id": "codeql_py/url-redirection_25488ab864fdb4c2_cee2388d", "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)."
] | [
37
] | [
null
] | [
29
] | [
40
] | |
2024-11-19T01:17:57.638932+00:00 | 1,592,220,935,000 | 7011d2b552720759576dbf8217d2d89079f7bf78 | 3 | {
"blob_id": "7011d2b552720759576dbf8217d2d89079f7bf78",
"branch_name": "refs/heads/master",
"committer_date": 1592220935000,
"content_id": "4e2d6b293ea348669d1ff09f69679848b27caeb9",
"detected_licenses": [
"MIT"
],
"directory_id": "97c53698a602d63afe71a28c085d3b26b301e83b",
"extension": "py",
"fi... | 2.578125 | stackv2 | from os.path import join, basename, getsize, isdir, isfile
from os import remove, chmod
import os
from shutil import rmtree, copyfile, move
import glob
import json
import sys
import ctypes
def run_as_admin(argv=None, debug=False):
"""
Helper function to run Python script with admin privileges
"""
shel... | 133 | 31.2 | 114 | 18 | 1,031 | python | [{"finding_id": "codeql_py/overly-permissive-file_055e24db2b14029d_94ff4be8", "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 writable.", "remediation": "", "location": ... | 2 | true | [
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable.",
"Overly permissive mask in chmod sets file to world writable."
] | [
102,
119
] | [
null,
null
] | [
21,
17
] | [
39,
37
] | |
2024-11-19T01:18:03.369780+00:00 | 1,552,541,454,000 | 84cb87e34ac24209e6272d111bc49e8f10207517 | 3 | {
"blob_id": "84cb87e34ac24209e6272d111bc49e8f10207517",
"branch_name": "refs/heads/master",
"committer_date": 1552541454000,
"content_id": "ef4780936fda3c57d86c862569849b25fdced6c5",
"detected_licenses": [
"MIT"
],
"directory_id": "4037229611d1d5d443290fb125a4253aa0c239f3",
"extension": "py",
"fi... | 3.265625 | stackv2 | # --------------
##File path for the file
file_path
#Code starts here
def read_file(path):
file= open(path,'r')
sentence= file.readline()
file.close()
return sentence
sample_message= read_file(file_path)
print(sample_message)
# --------------
#Code starts here
message_1= read_file(file_path_1)
... | 116 | 17.14 | 70 | 11 | 569 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_329b9abba38ef14d_9ed4dbb4", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-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 stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text.\nThis expression stores [sensitive data (secret)](3) as clear text.\nThis expression stores [sensitive data (secret)](4) as clear text.\nThis expression stores [sensitive data (sec... | [
110,
32,
50,
93,
114
] | [
null,
null,
null,
null,
null
] | [
13,
7,
7,
7,
7
] | [
23,
19,
19,
19,
17
] | |
2024-11-19T01:18:04.160549+00:00 | 1,577,177,931,000 | 7ed97ac25a3b8f9844b6a647304a53c665a76183 | 3 | {
"blob_id": "7ed97ac25a3b8f9844b6a647304a53c665a76183",
"branch_name": "refs/heads/master",
"committer_date": 1577177931000,
"content_id": "fe729caf63b44d337588f8d638cbddbf20072529",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "99c15685aaa1647d92c389b59571756c53f81288",
"extension": "py"... | 2.703125 | stackv2 | from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
from math import sin, cos, sqrt, atan2, radians
import socket
import json
import re
debug = 1
class Device:
def __init__(self, deviceId=0, deviceIp="", deviceType="normal", latitude=0.0, longitude=0.0):
self.__deviceId = deviceId
s... | 219 | 36.22 | 98 | 24 | 1,633 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9f9b0b625750dcaf_ce086adb", "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)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)]... | [
139
] | [
null
] | [
27
] | [
79
] | |
2024-11-19T00:15:30.666190+00:00 | 1,601,847,260,000 | e3b410a2de8a100173f8c7ed79e71275d6d5e201 | 3 | {
"blob_id": "e3b410a2de8a100173f8c7ed79e71275d6d5e201",
"branch_name": "refs/heads/master",
"committer_date": 1601847260000,
"content_id": "949540e2782e24deebf0eb5343718a408dc0fc44",
"detected_licenses": [
"MIT"
],
"directory_id": "925f6799954202b43f1f6a923d840725ebe508b4",
"extension": "py",
"fi... | 2.546875 | stackv2 | import paramiko
import xlsxwriter
import PySimpleGUI as sg
from pathlib import Path
import logging
from paramiko import AuthenticationException
logging.basicConfig(filename='.\\issues.log', level=logging.DEBUG)
logger = logging.getLogger()
sg.theme('SystemDefaultForReal')
class Gui:
"""Creates the GUI"""
... | 154 | 40.29 | 127 | 21 | 1,334 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_ab4cc3c42977b4c1_12010463", "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."
] | [
64
] | [
null
] | [
17
] | [
74
] | |
2024-11-19T00:15:32.278008+00:00 | 1,692,997,653,000 | 05b4586a64d295ddfcc88d8378d58ea9b05cd950 | 3 | {
"blob_id": "05b4586a64d295ddfcc88d8378d58ea9b05cd950",
"branch_name": "refs/heads/master",
"committer_date": 1692997653000,
"content_id": "b17d15596c12d36708c176e9777e6e8c87788e17",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c2457b9e41bd8670801bb56919b9f081e2c1b03f",
"extension": "py"... | 2.84375 | stackv2 | """
Cross Site Request Forgery Blueprint.
This module provides a Flask blueprint that implements protection against
request forgeries from other sites. Currently, it is only meant to be used with
an AJAX frontend, not with server-side rendered forms.
The module implements the following protecting measures against CSR... | 112 | 37.46 | 118 | 13 | 985 | python | [{"finding_id": "codeql_py/log-injection_de6087a52246314a_b2373599", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
94,
97
] | [
null,
null
] | [
61,
58
] | [
75,
70
] | |
2024-11-19T01:02:49.988909+00:00 | 1,691,659,438,000 | a80bdc2e190d11ff26f8ebc3a687393ffb3b6db3 | 3 | {
"blob_id": "a80bdc2e190d11ff26f8ebc3a687393ffb3b6db3",
"branch_name": "refs/heads/master",
"committer_date": 1691659438000,
"content_id": "ab717368b83e179202d699014ce4a68d2f0cba04",
"detected_licenses": [
"MIT"
],
"directory_id": "b48a1d5733d10c39a112698c2286ae1afb02f36a",
"extension": "py",
"fi... | 3.03125 | stackv2 | import phonenumbers
import re
from datetime import datetime
from decimal import Decimal
# Validators should return a function that takes the value as argument
# and return a tuple (value, error) with error being None if the user
# supplied data is correct
# Validators should also convert the data to the correct type
... | 199 | 27.86 | 122 | 15 | 1,366 | python | [{"finding_id": "codeql_py/redos_1647001e91d386c2_ced7dd0e", "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 repetitio... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitions of '\\\\013'."
] | [
119
] | [
null
] | [
18
] | [
93
] | |
2024-11-19T00:28:42.785888+00:00 | 1,543,874,699,000 | 1eb5967983f51046411c483ddbd903a77437f1c6 | 2 | {
"blob_id": "1eb5967983f51046411c483ddbd903a77437f1c6",
"branch_name": "refs/heads/master",
"committer_date": 1543874699000,
"content_id": "2084a1c6305a13c4231b9e3dd5bd5eafad832e23",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c034862a58f3847c65ccb4e7e8f3b58dfcca3273",
"extension": "py"... | 2.421875 | stackv2 | # imports for tornado
import tornado
from tornado import web, httpserver, ioloop
# imports for logging
import traceback
import os
from os import path
# imports for rich
import richlibrary
#imports for reading configuration file
import json
# Reading configuration file
def ServiceConfig(filename):
configPath = f... | 116 | 29.44 | 77 | 17 | 778 | python | [{"finding_id": "codeql_py/stack-trace-exposure_5efdad9c0dd2d1d9_784691bb", "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."
] | [
64
] | [
null
] | [
24
] | [
58
] | |
2024-11-19T00:53:43.816500+00:00 | 1,571,084,371,000 | 757e3f9b393b5267da45708c2bd7721f14e07476 | 3 | {
"blob_id": "757e3f9b393b5267da45708c2bd7721f14e07476",
"branch_name": "refs/heads/master",
"committer_date": 1571084371000,
"content_id": "b4017070592c4036ca9b8ccccaa9a9d7c67bb4bc",
"detected_licenses": [
"MIT"
],
"directory_id": "1689d97e1b11f4ec1f80c3636cb156e1deffe0a1",
"extension": "py",
"fi... | 2.578125 | stackv2 | from jira import JIRA
import pandas as pd
from pandas import ExcelWriter
from openpyxl import load_workbook
import configparser
path = "configuration.ini"
config = configparser.ConfigParser()
config.read(path)
result_slug = str(config.get("DEFAULT", "result_slug"))
data_path = str(config.get("DEFAULT", "data_path"))
... | 88 | 29.92 | 83 | 17 | 692 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_42ad11896fd82569_162a2908", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
30
] | [
null
] | [
7
] | [
15
] | |
2024-11-19T00:53:43.894622+00:00 | 1,367,493,166,000 | 74bf048cedd2999f3bd1c47878ac4e56aa46922c | 2 | {
"blob_id": "74bf048cedd2999f3bd1c47878ac4e56aa46922c",
"branch_name": "refs/heads/master",
"committer_date": 1367493166000,
"content_id": "70d6c2aa6066b7f8504b099f1ceb5d97fef8a478",
"detected_licenses": [
"MIT"
],
"directory_id": "d827da1395c03538e0acedfe6be53c22c94113ca",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
from gwtparse.GWTParser import GWTParser
from collections import defaultdict
from itertools import izip
from base64 import b64decode
from flask import Flask, render_template, request
from glob import iglob
from lxml import etree
import requests, re
app = Flask(__name__)
@app.route('/')
def list... | 73 | 31.86 | 90 | 17 | 660 | python | [{"finding_id": "codeql_py/xxe_eedc5b96d37b9bc7_0bd290b5", "tool_name": "codeql", "rule_id": "py/xxe", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "XML parsing depends on a [user-provided value](1) without guarding against external entity expansion.\nXML parsing depends on a [... | 4 | true | [
"CWE-611",
"CWE-215",
"CWE-022",
"CWE-295"
] | [
"py/xxe",
"py/flask-debug",
"py/path-injection",
"py/request-without-cert-validation"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"XML parsing depends on a [user-provided value](1) without guarding against external entity expansion.\nXML parsing depends on a [user-provided value](2) without guarding against external entity expansion.\nXML parsing depends on a [user-provided value](3) without guarding against external entity expansion.",
"A ... | [
38,
73,
38,
63
] | [
null,
null,
null,
null
] | [
28,
5,
28,
7
] | [
45,
24,
45,
87
] | |
2024-11-19T02:00:46.178336+00:00 | 1,572,263,215,000 | e40cde2f7db1d8de8f293be401a55a086039c070 | 3 | {
"blob_id": "e40cde2f7db1d8de8f293be401a55a086039c070",
"branch_name": "refs/heads/master",
"committer_date": 1572263215000,
"content_id": "0d3f686ca72b5563b2cc5e6529828fc931f4fcee",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "73185944d6e7ec558dd7da69d3f5edefa64c1c96",
"extension": "p... | 2.984375 | stackv2 | """
A very gentle beginning of Python Web Development
"""
from flask import (Flask,
make_response,
redirect,
abort)
# using __name__ to define a root of the service
app = Flask(__name__)
@app.route('/')
def index():
response = make_response("<h1>This do... | 43 | 22.35 | 72 | 10 | 255 | python | [{"finding_id": "codeql_py/reflective-xss_74ceea85044ecbba_47696619", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
24,
36
] | [
null,
null
] | [
12,
12
] | [
42,
40
] | |
2024-11-19T02:00:46.987168+00:00 | 1,649,049,376,000 | 2e15ee03b3e2112d46ab942e3dd7ca4e21e03fd7 | 3 | {
"blob_id": "2e15ee03b3e2112d46ab942e3dd7ca4e21e03fd7",
"branch_name": "refs/heads/master",
"committer_date": 1649049376000,
"content_id": "c081ca184d86dc708b9d03841e9e50595d76e64d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6a206ad9e6b9ef5c4e68805df7b2dd738433d496",
"extension": "py"... | 2.578125 | stackv2 | #!/usr/bin/env python3
"""
Flask app that walks through a given directory to index
ROM ZIPs and renders web pages using templates.
"""
import json
import os
from datetime import datetime
import arrow
from flask import Flask, jsonify, render_template
# pylint: disable=missing-docstring,invalid-name
app = Flask(__nam... | 168 | 27.34 | 85 | 23 | 1,070 | python | [{"finding_id": "codeql_py/reflective-xss_1fb9021028779c4f_bdaa5c75", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
105
] | [
null
] | [
16
] | [
76
] | |
2024-11-19T02:00:47.291286+00:00 | 1,617,024,567,000 | 604a0ae93ca2163f4585e0e02f0a70784d2139f7 | 3 | {
"blob_id": "604a0ae93ca2163f4585e0e02f0a70784d2139f7",
"branch_name": "refs/heads/master",
"committer_date": 1617024567000,
"content_id": "4ddbbd096cf98a1845960e9595cdd136eb037405",
"detected_licenses": [
"MIT"
],
"directory_id": "ade3d83071211244d8a3f2e8d3867334737e4fc9",
"extension": "py",
"fi... | 3 | stackv2 | """@package
This package enables the management usage for the database.
"""
from flask import jsonify
from src.models import EmployeeDataAccess, GuideDataAccess, ProjectDataAccess, Guide, TagDataAccess
from src.models.db import get_db
def manage(data):
"""
Modifies the database.
:param data: object holdi... | 108 | 30.38 | 111 | 21 | 704 | python | [{"finding_id": "codeql_py/stack-trace-exposure_228658c2ea7fa3d3_2ed5032f", "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."
] | [
62
] | [
null
] | [
32
] | [
69
] | |
2024-11-19T00:04:23.568515+00:00 | 1,596,126,640,000 | ce295a2c20c70bd63e082048bcc05dfff1abeb71 | 3 | {
"blob_id": "ce295a2c20c70bd63e082048bcc05dfff1abeb71",
"branch_name": "refs/heads/master",
"committer_date": 1596126640000,
"content_id": "ea25b782ac56fd1fd694e640afb8d97ee96a60ea",
"detected_licenses": [
"MIT"
],
"directory_id": "fb2ff187575b96f4143ba80009635bac8b191767",
"extension": "py",
"fi... | 2.625 | stackv2 | from typing import Tuple, Any
import math
import time
import json
import re
import sys
import os
import requests
from requests_toolbelt import MultipartEncoder
def _convert_size(bytes_size: int)-> str:
if bytes_size == 0:
return "0B"
name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
... | 101 | 40.56 | 148 | 19 | 1,062 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_c2b2a756b187cd2b_955727e0", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://uptobox.com](1) may be at an arbitrary positio... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [https://uptobox.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [https://uptobox.com](1) may be at an arbitrary position in the sanitized URL."
] | [
48,
67
] | [
null,
null
] | [
12,
12
] | [
50,
50
] | |
2024-11-19T00:27:19.094666+00:00 | 1,602,841,807,000 | 625fc16c94c3a349650de73d27e28d2451a87228 | 2 | {
"blob_id": "625fc16c94c3a349650de73d27e28d2451a87228",
"branch_name": "refs/heads/master",
"committer_date": 1602841807000,
"content_id": "c65c4abc321bce9090a364894a28fa3d36471d9c",
"detected_licenses": [
"MIT"
],
"directory_id": "52e63633b235540ac80bff723982f679006d746a",
"extension": "py",
"fi... | 2.453125 | stackv2 | import pandas as pd
from functools import partial
from flask_cors import CORS
from flask import request,render_template
import gdown
import flask
import io
import os
url = 'https://drive.google.com/a/greendeck.co/uc?id=19r_vn0vuvHpE-rJpFHvXHlMvxa8UOeom&export=download'
app = flask.Flask(__name__)
CORS(app)
class pre... | 178 | 38.31 | 138 | 19 | 1,789 | python | [{"finding_id": "codeql_py/code-injection_319dafef1bfee14c_9371e4ec", "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": "... | 2 | true | [
"CWE-094",
"CWE-215"
] | [
"py/code-injection",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This code execution depends on a [user-provided value](1).",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
169,
178
] | [
null,
null
] | [
34,
5
] | [
40,
49
] | |
2024-11-19T00:27:23.705380+00:00 | 1,656,044,422,000 | 0621dc2524ca1ec46c6ae2f7a2173e179a6c6dce | 3 | {
"blob_id": "0621dc2524ca1ec46c6ae2f7a2173e179a6c6dce",
"branch_name": "refs/heads/master",
"committer_date": 1656044422000,
"content_id": "673bb210f4cc6bbacba04103ddcca9c6d6986441",
"detected_licenses": [
"MIT"
],
"directory_id": "e67b1e2d9a478fea2c56cdc2e90bf44f407c7bac",
"extension": "py",
"fi... | 2.75 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Commandline interface
to control CsvImporter class"""
import csv
import json
import locale
import logging
from datetime import datetime, timedelta
import click
from dateutil.parser import parse
from influxdb import InfluxDBClient
from pytz import timezone
class CsvI... | 423 | 32.86 | 114 | 20 | 3,008 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f4c7c58ce91e34d1_e788be7d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text."
] | [
70
] | [
null
] | [
23
] | [
80
] | |
2024-11-19T00:27:25.008998+00:00 | 1,540,713,890,000 | 68225ca30f854496ed32d79e557629a404e209a6 | 3 | {
"blob_id": "68225ca30f854496ed32d79e557629a404e209a6",
"branch_name": "refs/heads/master",
"committer_date": 1540713890000,
"content_id": "13610a930a830697bc3b99386e3f8d145032d118",
"detected_licenses": [
"MIT"
],
"directory_id": "e600e1888b7451173b09c08658ce51d0f75f9e98",
"extension": "py",
"fi... | 2.671875 | stackv2 | import argparse
import numpy as np
import os
import pandas as pd
import progressbar
import re
import spacy
from config import Config
from console import log_info
from pathlib import Path
def read_csv(datafile):
dtypes = {"session_id": np.int32, "created_at": object, "sent_from": str, "sent_to": str, "content_typ... | 150 | 30.57 | 146 | 14 | 1,201 | python | [{"finding_id": "codeql_py/overly-large-range_ff9b1702da8dc9cc_a8ea78dd", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
82
] | [
null
] | [
71
] | [
74
] | |
2024-11-19T00:27:27.447690+00:00 | 1,535,772,104,000 | 1a0863f956d282c493536b4bb19101a08d821b79 | 2 | {
"blob_id": "1a0863f956d282c493536b4bb19101a08d821b79",
"branch_name": "refs/heads/master",
"committer_date": 1535772104000,
"content_id": "373bcf208114aa891f170de68ccc0a38e2e72a2a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "005354f5bfbd4835f5ed186efd7ee010c8521545",
"extension": "py"... | 2.390625 | stackv2 | import bz2
import os
import tarfile
from multiprocessing import Pool
import cv2 as cv
import dlib
from tqdm import tqdm
from config import img_size
from config import predictor_path
from utils import ensure_folder
def extract(filename):
print('Extracting {}...'.format(filename))
with tarfile.open(filename) ... | 94 | 28.35 | 100 | 14 | 709 | python | [{"finding_id": "codeql_py/tarslip_b049cec4b6851cf7_49bd12db", "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
] | [
9
] | [
12
] | |
2024-11-19T00:40:27.144352+00:00 | 1,566,267,623,000 | c565c8239a1b2ee247ae8b50fadf7dbd47ee73d5 | 2 | {
"blob_id": "c565c8239a1b2ee247ae8b50fadf7dbd47ee73d5",
"branch_name": "refs/heads/master",
"committer_date": 1566267623000,
"content_id": "90bb2bf93020eebc196832978ae6c019900d4b2d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e50875a3b803e94d2ba3fb56a912a40fb70bca58",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/env python3
"""
Author: Joseph Lin
Email : joseph.lin@aliyun.com
Social:
https://github.com/RDpWTeHM
https://blog.csdn.net/qq_29757283
Usage:
## manual for now ##
(web-serial) $ python3 handler_serial.py
"""
import os
import sys
# import serial # serialcom/serial 和 pyserial 命名冲突
from serial impo... | 92 | 26.45 | 78 | 22 | 591 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dae57a9d112497a9_72dac4d8", "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."
] | [
81
] | [
null
] | [
11
] | [
60
] | |
2024-11-19T01:06:09.605377+00:00 | 1,583,706,665,000 | 889425342922bb9854da57320523110be14341ce | 2 | {
"blob_id": "889425342922bb9854da57320523110be14341ce",
"branch_name": "refs/heads/master",
"committer_date": 1583706665000,
"content_id": "c0bff1b863bf5708f5a55a90bf240f97591f0258",
"detected_licenses": [
"MIT"
],
"directory_id": "d211bf8cddcfe3a5e288efee292be0d7eb23209a",
"extension": "py",
"fi... | 2.34375 | stackv2 | from django.shortcuts import get_object_or_404
from rest_framework import viewsets, status
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from core.models import Campaing
from campaing import serializers
... | 130 | 32.53 | 77 | 16 | 838 | python | [{"finding_id": "codeql_py/stack-trace-exposure_04e70c872b842563_fa6dd56c", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 4 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
45,
72,
89,
128
] | [
null,
null,
null,
null
] | [
21,
21,
21,
21
] | [
40,
40,
40,
40
] | |
2024-11-19T01:06:10.927056+00:00 | 1,522,923,745,000 | 8bd29db2aa7d8dcc89410c0279c3f77dc529a066 | 2 | {
"blob_id": "8bd29db2aa7d8dcc89410c0279c3f77dc529a066",
"branch_name": "refs/heads/master",
"committer_date": 1522923745000,
"content_id": "38332459e15963ffcb8d4208fa34dc5dde8ee94d",
"detected_licenses": [
"MIT"
],
"directory_id": "b9dd5d5940d1af96f56315347decfcdd8927132a",
"extension": "py",
"fi... | 2.34375 | stackv2 | from os import urandom
from binascii import hexlify
from hashlib import sha512
from flask_restful import Resource
from models.base import db
from models.user import User
from common.util import RedisDict
r = RedisDict()
class UserREST(Resource):
def get(self, username):
if len(username) > 60:
... | 68 | 31.06 | 99 | 24 | 556 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_8d8b60d86eed3d14_5ef23f28", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
51
] | [
null
] | [
22
] | [
56
] | |
2024-11-19T01:06:16.739421+00:00 | 1,603,548,945,000 | c0fd24a81e96cb4af9fb21ec1ac9a5f0746cfa42 | 3 | {
"blob_id": "c0fd24a81e96cb4af9fb21ec1ac9a5f0746cfa42",
"branch_name": "refs/heads/master",
"committer_date": 1603548945000,
"content_id": "4ae2e239c3c374d2aab01b31b376d2e9730fc3c1",
"detected_licenses": [
"MIT"
],
"directory_id": "dcf03e80c0970bc5c9deec6ca8bfebd3f471bdf7",
"extension": "py",
"fi... | 2.703125 | stackv2 | import asyncio
import youtube_dl
ydl_opts = {
'format': 'bestaudio/best',
'quiet': True
}
before_args = "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5"
loop = asyncio.get_event_loop()
async def get_youtube(url):
return await loop.run_in_executor(None, _get_youtube, url)
def _get_youtube(url... | 33 | 28.97 | 140 | 16 | 254 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_61b7a4ad0cfda447_f91bb7a8", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [youtube.com](1) may be at an arbitrary position in the... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [youtube.com](1) may be at an arbitrary position in the sanitized URL."
] | [
20
] | [
null
] | [
110
] | [
139
] | |
2024-11-19T01:06:19.088004+00:00 | 1,400,767,558,000 | 0fbd88391525a0820332278522226691b90287a8 | 3 | {
"blob_id": "0fbd88391525a0820332278522226691b90287a8",
"branch_name": "refs/heads/master",
"committer_date": 1400767558000,
"content_id": "ba353c623987d274e8fbc0361714692d881a21b7",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "38346ccf93e0c0d49a378b2532fe215669018829",
"extension": "p... | 2.578125 | stackv2 | """The dcm2nii module provides basic functions for dicom conversion
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
>>> os.chdir(datadir)
"""
fr... | 157 | 40.73 | 132 | 24 | 1,458 | python | [{"finding_id": "codeql_py/bad-tag-filter_57f92c435c35c785_004c7382", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat... | 2 | true | [
"CWE-116",
"CWE-116"
] | [
"py/bad-tag-filter",
"py/bad-tag-filter"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This regular expression does not match comments containing newlines.",
"This regular expression does not match comments containing newlines."
] | [
109,
110
] | [
null,
null
] | [
33,
38
] | [
42,
47
] | |
2024-11-19T01:17:16.339960+00:00 | 1,539,180,664,000 | 1127aafc3df6a9a5323e861755b6a1e00e8a0aaf | 3 | {
"blob_id": "1127aafc3df6a9a5323e861755b6a1e00e8a0aaf",
"branch_name": "refs/heads/master",
"committer_date": 1539180664000,
"content_id": "288730d9c49cc06732001269d6b10876d7c05157",
"detected_licenses": [
"MIT"
],
"directory_id": "57edaa7de01aa2e7190f8c45bb1b37a1bb133bfe",
"extension": "py",
"fi... | 2.5625 | stackv2 | #!/usr/bin/env python
################################################################################
# vim: tabstop=4:shiftwidth=4:expandtab:
# Copyright (c) 2017-2018 SIOS Technology Corp. All rights reserved.
################################################################################
"""
This is the generic cl... | 253 | 32.48 | 143 | 16 | 1,774 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6f81f2c68541131f_461e6d03", "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."
] | [
185
] | [
null
] | [
27
] | [
83
] | |
2024-11-19T01:17:34.572810+00:00 | 1,620,404,278,000 | f33cdd9e37f742df68ccad5b36167f5510b7413e | 3 | {
"blob_id": "f33cdd9e37f742df68ccad5b36167f5510b7413e",
"branch_name": "refs/heads/main",
"committer_date": 1620404278000,
"content_id": "8d236020235e2c63c7deab1bb56f5a39afe78796",
"detected_licenses": [
"MIT"
],
"directory_id": "dbc9ab40c50b564ec3caf9b9b6827af2800187f7",
"extension": "py",
"file... | 2.890625 | stackv2 | import csv
import logging
import math
import os
import requests
from bs4 import BeautifulSoup
base_url = "http://peyari.com/nameSearch?search_text=&gender="
logger = logging.getLogger(__name__)
def extract_pages(gender):
res = requests.get(f"{base_url}{gender}", allow_redirects=True)
content = res.content
... | 55 | 35 | 83 | 25 | 443 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6bee430c8a614ae9_fa025ffe", "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."
] | [
40
] | [
null
] | [
30
] | [
75
] | |
2024-11-19T01:15:17.233817+00:00 | 1,565,771,194,000 | 655e9389b9782d6fc32179635c41936ef241d467 | 3 | {
"blob_id": "655e9389b9782d6fc32179635c41936ef241d467",
"branch_name": "refs/heads/master",
"committer_date": 1565771194000,
"content_id": "63f9f32e4e0b138503ce2018f80b9a8c535cec3c",
"detected_licenses": [
"MIT"
],
"directory_id": "010307a68b81ebbf1a954e04b7a2c3ec60e84f88",
"extension": "py",
"fi... | 2.515625 | stackv2 | # -*- coding: utf-8 -*-
from flask import Flask, jsonify, request, Markup, abort, make_response
# import peewee
# import json
api = Flask(__name__)
@api.route('/')
def index():
html = '''
<form action="/iperf3test">
<p><label>iperf3 test: </label></p>
Test Name: <input type="text" name="TestNa... | 56 | 32.41 | 82 | 14 | 518 | python | [{"finding_id": "codeql_py/stack-trace-exposure_fbcf8c1de650db4e_8efe9054", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-079",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
37,
33,
35
] | [
null,
null,
null
] | [
16,
20,
20
] | [
22,
44,
52
] | |
2024-11-19T00:43:38.181467+00:00 | 1,622,625,078,000 | 673f6fb7030e36e5ea92b951759d9ea1d975e488 | 4 | {
"blob_id": "673f6fb7030e36e5ea92b951759d9ea1d975e488",
"branch_name": "refs/heads/master",
"committer_date": 1622625078000,
"content_id": "e258c75b1029be464df30b87da6dbef1921374a3",
"detected_licenses": [
"MIT"
],
"directory_id": "f117d31ece12b25afe7182e0546f63f49a1a88d2",
"extension": "py",
"fi... | 4.28125 | stackv2 | class Emp:
leaves = 10
def print_details(self):
return f"\nName is {self.name}. \nSallary is {self.salary} \nRole is {self.role}"
""" self is a convention for handle argument....Obj2 in function......print_details()"""
Obj1 = Emp()
Obj2 = Emp()
Obj1.name = "Andersen"
Obj1.salary = 50000
Obj1.role = ... | 20 | 22.6 | 89 | 10 | 140 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e7361daef3403960_f2fea26c", "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."
] | [
20
] | [
null
] | [
7
] | [
27
] | |
2024-11-19T00:43:52.277228+00:00 | 1,606,911,570,000 | ddbf46ab93c0de137cbd9a02962e899734acdc33 | 3 | {
"blob_id": "ddbf46ab93c0de137cbd9a02962e899734acdc33",
"branch_name": "refs/heads/main",
"committer_date": 1606911570000,
"content_id": "9f71fbc0155752fda26bdb31dd31960f3bd99a56",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d18bc1498b2941c117b3111646936fde3f9d95be",
"extension": "py",
... | 2.90625 | stackv2 | #!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# (C) Copyright 2018 Pavel Tisnovsky
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.o... | 109 | 26.78 | 72 | 11 | 704 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6decdf8639c20f8e_f7c6772c", "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."
] | [
24
] | [
null
] | [
19
] | [
25
] | |
2024-11-19T00:43:55.265086+00:00 | 1,614,708,782,000 | e8b8a26a73d31b2e8185426fa6f20d4883927ac9 | 3 | {
"blob_id": "e8b8a26a73d31b2e8185426fa6f20d4883927ac9",
"branch_name": "refs/heads/master",
"committer_date": 1614708782000,
"content_id": "763f4c1a8f527d0be3562addd464ab60f7df980e",
"detected_licenses": [
"MIT"
],
"directory_id": "c73f2043fba07dc5eac29e871fa9f4cde195230d",
"extension": "py",
"fi... | 2.515625 | stackv2 | import paramiko
import os
import subprocess
from utils.logger import Logger, LogLvl
_logger = Logger(LogLvl.LOG_DEBUG)
class LocalExecutor:
def __init__(self, program_name, program_path=""):
self.program_name = program_name
self.program_path = program_path
def exec_command(self, command: str)... | 36 | 31.83 | 91 | 16 | 271 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_1d59334da5d2248a_d9303697", "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."
] | [
27
] | [
null
] | [
9
] | [
74
] | |
2024-11-19T01:32:32.426826+00:00 | 1,693,462,627,000 | 1985ddb2be4aa798f3c0d74b7b0610cf6ae31cfc | 3 | {
"blob_id": "1985ddb2be4aa798f3c0d74b7b0610cf6ae31cfc",
"branch_name": "refs/heads/master",
"committer_date": 1693462627000,
"content_id": "3ef8894a6c702b1afcf44274bb3c198ff5f4fc0f",
"detected_licenses": [
"MIT"
],
"directory_id": "a60e0c7d28d9df874177029776b1c0606047dd1f",
"extension": "py",
"fi... | 2.8125 | stackv2 | """respirator is a support tool for 'breathe'. respirator will
generate .rst files with toctrees and doxygen generated doxumentation.
"""
import os
import re
import sys
from typing import List, Union
from pathlib import Path
from bs4 import BeautifulSoup as bs
from jinja2 import Environment, FileSystemLoader
class D... | 170 | 35.26 | 83 | 19 | 1,300 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_185059a8bf70de1c_ad192cfd", "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."
] | [
100
] | [
null
] | [
15
] | [
76
] | |
2024-11-19T01:43:44.853900+00:00 | 1,560,578,675,000 | d6a640446367e5296d2a3ce924d6124920446106 | 2 | {
"blob_id": "d6a640446367e5296d2a3ce924d6124920446106",
"branch_name": "refs/heads/master",
"committer_date": 1560578675000,
"content_id": "2bfafae7ca6053b0fbacadfcdbc7e8d775d8565e",
"detected_licenses": [
"MIT"
],
"directory_id": "bb1a60ebfa4126877ea63e2500e7753f4ac94bf1",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
# license removed for brevity
import rospy
import mavros
from geometry_msgs.msg import Twist
from sensor_msgs.msg import NavSatFix
import math
Kp=2.5
pub = rospy.Publisher('/Quad1/mavros/setpoint_velocity/cmd_vel_unstamped', Twist, queue_size=10)
#Twist vel_sent=NULL
#NavSatFix vel_sent=None
def c... | 68 | 21.06 | 96 | 12 | 470 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5ec87864d0954537_30b33286", "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."
] | [
18
] | [
null
] | [
8
] | [
16
] | |
2024-11-19T01:43:51.797042+00:00 | 1,486,580,849,000 | d51599f0e0ee5c25b6f1bfe2d7309fbb4933cd48 | 3 | {
"blob_id": "d51599f0e0ee5c25b6f1bfe2d7309fbb4933cd48",
"branch_name": "refs/heads/master",
"committer_date": 1486580849000,
"content_id": "fb890d268cc75833c39dd05a1e10b0d41fd9f477",
"detected_licenses": [
"MIT"
],
"directory_id": "37cbeeeb986e428440018749cc74199825ec4022",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/python3
import http.server
from urllib.parse import urlparse
import socketserver
from os import system;
webPage = open("/var/www/index.html", 'r')
resp = webPage.read();
webPage.close();
respReboot = "wifi configuration changed, rebooting"
def reconfigNetwork(ssid, password):
system("systemctl enable dhc... | 47 | 33.4 | 81 | 16 | 416 | python | [{"finding_id": "codeql_py/command-line-injection_bb8e4acb32ef25bf_f6889269", "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-078"
] | [
"py/command-line-injection",
"py/command-line-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"This command line depends on a [user-provided value](1)."
] | [
19,
20
] | [
null,
null
] | [
9,
9
] | [
78,
81
] | |
2024-11-19T01:43:51.922779+00:00 | 1,619,386,373,000 | 097aaf658801ce2b36334ee8497e3d31036febbe | 3 | {
"blob_id": "097aaf658801ce2b36334ee8497e3d31036febbe",
"branch_name": "refs/heads/main",
"committer_date": 1619386373000,
"content_id": "382a9ce6cae56307b16e25c25287571fde533ce4",
"detected_licenses": [
"MIT"
],
"directory_id": "7d07a288840cec0a672e7ec055e0d7a75a6aeee3",
"extension": "py",
"file... | 2.65625 | stackv2 | from app import app, utils
import urllib.request
from flask import request
import datetime
import simplejson as json
from time import sleep
import math
import time
# A route to return all of the available options at date.
# http://127.0.0.1:5000/api/v1/options?q=Si&date=2021-04-01
@app.route('/api/v1/options', methods... | 219 | 42.21 | 134 | 20 | 2,509 | python | [{"finding_id": "codeql_py/partial-ssrf_2b64a980e8f28bd6_c411ef2f", "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... | 4 | true | [
"CWE-918",
"CWE-918",
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"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).",
"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)."
] | [
73,
96,
112,
159
] | [
null,
null,
null,
null
] | [
31,
35,
31,
35
] | [
60,
64,
60,
64
] | |
2024-11-19T01:44:11.721768+00:00 | 1,616,347,648,000 | 2849b32edafaae4c50ec6e64701802bc33a96ee7 | 2 | {
"blob_id": "2849b32edafaae4c50ec6e64701802bc33a96ee7",
"branch_name": "refs/heads/master",
"committer_date": 1616347648000,
"content_id": "92de7a400e6c457934a9e8459d41226a6b9e0d91",
"detected_licenses": [
"MIT"
],
"directory_id": "b284a2d3fdc750b75cb1a5a66bb12822e8572c00",
"extension": "py",
"fi... | 2.328125 | stackv2 | import logging
from api.exceptions import TooManyMembersException
from api.models import Membership, Pool, Team
from api.permissions import IsStaffOrTargetUser
from api.serializers import (
DraftPickSerializer,
PoolSerializer,
PoolMemberSerializer,
UserSerializer,
)
from django.contrib.auth.models import User... | 199 | 31.48 | 86 | 15 | 1,364 | python | [{"finding_id": "codeql_py/log-injection_c6e8fb241d3c0374_3050ba1d", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
64,
117
] | [
null,
null
] | [
17,
17
] | [
56,
50
] | |
2024-11-19T00:59:31.389014+00:00 | 1,570,180,637,000 | 5e11fdf7e856daa37c16fc992e84ffccebc19646 | 2 | {
"blob_id": "5e11fdf7e856daa37c16fc992e84ffccebc19646",
"branch_name": "refs/heads/master",
"committer_date": 1570180637000,
"content_id": "ed1877589a446eb52d795f96b57a23d73a95123f",
"detected_licenses": [
"MIT"
],
"directory_id": "24f1118b6e186b85dfff14f157d746791ff9fb27",
"extension": "py",
"fi... | 2.46875 | stackv2 | from flask import render_template,redirect,request,url_for,flash
from flask_login import login_user,login_required,logout_user
from . import auth
from .. import db
from ..models import Writer
from .forms import RegistrationForm,LoginForm
from ..email import mail_message
from werkzeug.security import check_password_hash... | 57 | 31.35 | 133 | 17 | 381 | python | [{"finding_id": "codeql_py/url-redirection_d83b862e5ab66c13_084e6a56", "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)."
] | [
24
] | [
null
] | [
29
] | [
77
] | |
2024-11-19T00:59:31.459980+00:00 | 1,589,911,905,000 | ea0d5fef6b575df39ade151dc360af3517efc781 | 2 | {
"blob_id": "ea0d5fef6b575df39ade151dc360af3517efc781",
"branch_name": "refs/heads/master",
"committer_date": 1589911905000,
"content_id": "af8d8ce7a64b759e32575e91cb3f41c8ba03d300",
"detected_licenses": [
"MIT"
],
"directory_id": "294ec5c76aacf95dc5ea6fe7821e26ff18257e37",
"extension": "py",
"fi... | 2.34375 | stackv2 | from flask import Flask, render_template, request
from googlesearch import search
import requests
import bs4
from bs4 import BeautifulSoup
from chatbot import *
import pickle
from listoperations import *
from mapping import *
app = Flask(__name__)
@app.route("/")
def home():
return render_template("home.html")
@... | 26 | 23.58 | 91 | 12 | 143 | python | [{"finding_id": "codeql_py/stack-trace-exposure_0756a573d1d29c12_5486483f", "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
] | [
16
] | [
92
] | |
2024-11-19T00:59:37.221327+00:00 | 1,596,080,500,000 | d8ced906e208486ea843b8733c029f64fb8e6612 | 3 | {
"blob_id": "d8ced906e208486ea843b8733c029f64fb8e6612",
"branch_name": "refs/heads/master",
"committer_date": 1596080500000,
"content_id": "8c9eae23d4f610208ab92bd1437e058e29917976",
"detected_licenses": [
"MIT"
],
"directory_id": "91988b847b227c79385b141d4545de9042f3c0de",
"extension": "py",
"fi... | 2.796875 | stackv2 | import requests
from functools import partial
import pyproj
from shapely.ops import transform
from shapely.geometry import Point
def get_location(api, address, radius):
geocode_url = "https://maps.googleapis.com/maps/api/geocode/json?address={}".format(address)
geocode_url = geocode_url + "&key={}".format(api... | 64 | 36.02 | 96 | 18 | 597 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_aeae4e7a3bcfd484_4cf492a3", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
47,
47
] | [
null,
null
] | [
11,
16
] | [
14,
19
] | |
2024-11-19T01:21:41.011399+00:00 | 1,610,897,737,000 | b45c918619a89933896f00fee49e7a20a1e3f628 | 3 | {
"blob_id": "b45c918619a89933896f00fee49e7a20a1e3f628",
"branch_name": "refs/heads/master",
"committer_date": 1610897737000,
"content_id": "fbaad2fff8d8e841ff8313e940c77de0b7508792",
"detected_licenses": [
"MIT"
],
"directory_id": "f219cd3d94948f1f313575e506a8a1d75007c77f",
"extension": "py",
"fi... | 3.078125 | stackv2 | import socket
import hashlib
import base64
from Crypto.Cipher import AES
from Crypto import Random
IV = None # vector is global, we start with None
def generateVector():
global IV
if IV == None: # if it's the first time that we generate it then go ahead
IV = Random.new().read(AES.block_size) # we save it as byte... | 31 | 26.29 | 152 | 13 | 215 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_7f12d5f820022036_34967752", "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... | [
20
] | [
null
] | [
35
] | [
48
] | |
2024-11-19T01:21:45.176511+00:00 | 1,579,004,270,000 | b314e60e24b956b0d9bf4c126ab1273abfad53fb | 3 | {
"blob_id": "b314e60e24b956b0d9bf4c126ab1273abfad53fb",
"branch_name": "refs/heads/master",
"committer_date": 1579004270000,
"content_id": "33a5200890676714cb3f0f088d141c378b7adbba",
"detected_licenses": [
"MIT"
],
"directory_id": "e39411a21c76e7b707005965935ed607fd8360f6",
"extension": "py",
"fi... | 2.5625 | stackv2 | import requests
import urllib3
import csv
import os.path
import os
import re
from urllib.parse import urlparse
from urllib.parse import urljoin
urllib3.disable_warnings()
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
PAGE_DIR = os.path.join(os.path.dirname(__file__), 'page')
HEADERS = {
'ACCEPT-LANGU... | 76 | 38.84 | 148 | 19 | 751 | python | [{"finding_id": "codeql_py/request-without-cert-validation_263c18189c1e4336_7dd20540", "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)."
] | [
21,
39
] | [
null,
null
] | [
16,
20
] | [
68,
118
] | |
2024-11-19T01:33:50.131173+00:00 | 1,547,802,014,000 | adc05ae5229ab676659a1e778920320fff068e34 | 2 | {
"blob_id": "adc05ae5229ab676659a1e778920320fff068e34",
"branch_name": "refs/heads/master",
"committer_date": 1547802014000,
"content_id": "1bc97e3e7f7e73f6f2553f516ddabf595fc32258",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ce94caffe6c2ad5cd6d6480bb303dc6faed1fad2",
"extension": "py"... | 2.46875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests,sys,json
from requests.packages.urllib3.exceptions import InsecureRequestWarning
# 禁用安全请求警告
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
Corpid = "" # CorpID是企业号的标识
Secret = "" ... | 53 | 34.85 | 105 | 16 | 438 | python | [{"finding_id": "codeql_py/request-without-cert-validation_6f4ecb8e62792f63_53846c0e", "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)."
] | [
24,
41
] | [
null,
null
] | [
13,
13
] | [
59,
70
] | |
2024-11-19T02:10:25.122686+00:00 | 1,617,702,645,000 | 3cdb47b1ffe2044e5cba0bbdb512b4232390ca12 | 2 | {
"blob_id": "3cdb47b1ffe2044e5cba0bbdb512b4232390ca12",
"branch_name": "refs/heads/main",
"committer_date": 1617702645000,
"content_id": "1a07d738ccf036af185912710c6c9c1da8d24997",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "dd4cbaaa0874be84e632bbffe59ea054e6a5a783",
"extension": "py"... | 2.390625 | stackv2 | """An example service authenticating with the Hub.
This example service serves `/services/whoami/`,
authenticated with the Hub,
showing the user their own info.
"""
import json
import secrets
import os
from urllib.parse import urlparse
import binascii
import pluggy
from functools import partial
from tornado import we... | 274 | 32.37 | 95 | 18 | 1,970 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_d8bab9cf4f8158ba_ed408310", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-079"
] | [
"py/clear-text-storage-sensitive-data",
"py/jinja2/autoescape-false"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](1) as clear text.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
218,
33
] | [
null,
null
] | [
25,
13
] | [
36,
82
] | |
2024-11-19T02:10:28.492657+00:00 | 1,539,431,534,000 | ecc94597264d89a7f61ce8f7053e1e6994c6126c | 3 | {
"blob_id": "ecc94597264d89a7f61ce8f7053e1e6994c6126c",
"branch_name": "refs/heads/master",
"committer_date": 1539431534000,
"content_id": "9b3d3f364bf66b785a10f681aaba3dda5ddf8f03",
"detected_licenses": [
"MIT"
],
"directory_id": "527b2b398b260a6343a6c3e74ee75ec173d6e649",
"extension": "py",
"fi... | 3.453125 | stackv2 | import sys
import re
def password_check(password, rules_dict):
'''
Verify that any given password string complies
with the requirements defined in the dictionary
'''
str_len = len(password) >= rules_dict['length']
has_numbers = True
if rules_dict['must_have_numbers']:
has_numbe... | 35 | 29.06 | 78 | 13 | 237 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bdaed3ecebb68dff_aca5db17", "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."
] | [
33
] | [
null
] | [
15
] | [
60
] | |
2024-11-19T02:10:46.746676+00:00 | 1,678,727,733,000 | 0b40b7e43e698fae0516fb606318b76f718f0eac | 2 | {
"blob_id": "0b40b7e43e698fae0516fb606318b76f718f0eac",
"branch_name": "refs/heads/master",
"committer_date": 1678727733000,
"content_id": "e1f43b1bb9364868850f837032309c939ea18f9d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5d481e0023305445feff2a272efcdf2f4024f2a8",
"extension": "py"... | 2.453125 | stackv2 | """Main entry."""
import asyncio
import logging
import sys
from enum import IntEnum
try:
from . import SpaClient, SpaConnectionError, SpaControl, __version__
except ImportError:
from pybalboa import SpaClient, SpaConnectionError, SpaControl, __version__
def usage() -> None:
"""Print uage instructions."""... | 185 | 35.83 | 122 | 16 | 1,513 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3a6de1992cd11b09_28cc731f", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
32
] | [
null
] | [
19
] | [
52
] | |
2024-11-19T02:45:51.162915+00:00 | 1,618,392,685,000 | 00a47db0264ad8e0556a276285d75e664a48d7a6 | 3 | {
"blob_id": "00a47db0264ad8e0556a276285d75e664a48d7a6",
"branch_name": "refs/heads/main",
"committer_date": 1618392685000,
"content_id": "430754276539130777726d4c0e84012c466ff781",
"detected_licenses": [
"MIT"
],
"directory_id": "27883c429c561e300a6ae099659c8590379f6a90",
"extension": "py",
"file... | 3.203125 | stackv2 | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
# Imports
from flask import Flask # manage the app
from sqlalchemy import create_engine # used to detect if table exists
from flask_sqlalchemy import SQLAlchemy # manage the database
import click ... | 101 | 31.87 | 80 | 16 | 836 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0f63a8e064ae7d4c_b68f528d", "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."
] | [
74
] | [
null
] | [
17
] | [
56
] | |
2024-11-19T02:45:53.190769+00:00 | 1,474,509,005,000 | 5dd7e052f74c4940ba865991797eb939ad8852ad | 3 | {
"blob_id": "5dd7e052f74c4940ba865991797eb939ad8852ad",
"branch_name": "refs/heads/master",
"committer_date": 1474509005000,
"content_id": "053ce86dd6b99c48c63cc4d1f41d82e07722edfc",
"detected_licenses": [
"MIT"
],
"directory_id": "712aeccc3aaa0f73bb95778a8db8a1a297b25457",
"extension": "py",
"fi... | 2.65625 | stackv2 | #!/usr/bin/env python
import os
import shutil
import time
import argparse
import sys
# This script is designed to transfer data from the output on the laptop produced by MinKNOW to a server.
# This script will be required to be run from a computer that has access to both the laptop and the server.
# Hence it is possib... | 199 | 43.18 | 122 | 14 | 2,004 | python | [{"finding_id": "codeql_py/overly-permissive-file_f34c2fdfcf9b391a_49a61a30", "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."
] | [
143
] | [
null
] | [
null
] | [
29
] | |
2024-11-19T02:57:18.322814+00:00 | 1,625,847,662,000 | fe084aca8e7ee46701d4bebadbd75bf076e99b0b | 2 | {
"blob_id": "fe084aca8e7ee46701d4bebadbd75bf076e99b0b",
"branch_name": "refs/heads/master",
"committer_date": 1625847662000,
"content_id": "8cbc550cc2965256c55774346cb49ab030d3c264",
"detected_licenses": [
"MIT"
],
"directory_id": "ec94406327179a021e0d651a39fab2ed684273db",
"extension": "py",
"fi... | 2.40625 | stackv2 | import paramiko
import os
import pandas as pd
import datetime as datetime
__author__ = 'Trond Kristiansen'
__email__ = 'me (at) trondkristiansen.com'
__created__ = datetime.datetime(2014, 2, 11)
__modified__ = datetime.datetime(2014, 3, 17)
__version__ = "1.0.0"
__status__ = "Production"
"""Start EDIT"""
m... | 161 | 35.14 | 118 | 15 | 1,694 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_2b6136b7c57a62a7_9c17f0f9", "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."
] | [
51
] | [
null
] | [
null
] | [
58
] | |
2024-11-19T02:57:23.692610+00:00 | 1,629,344,472,000 | 14034d4b77c63c3094bdc82b6777fa56cca57d6b | 3 | {
"blob_id": "14034d4b77c63c3094bdc82b6777fa56cca57d6b",
"branch_name": "refs/heads/main",
"committer_date": 1629344472000,
"content_id": "20868d55d8239119c184d6ac6614f244ce10e437",
"detected_licenses": [
"MIT"
],
"directory_id": "3cdda4b4eb6f8661ecf6a9363756628a3922ae76",
"extension": "py",
"file... | 2.734375 | stackv2 | import datetime
import os
from io import BytesIO, StringIO
from logging import error
import pandas as pd
import psycopg2
import streamlit as st
from matplotlib import pyplot as plt
from pandas import DataFrame as df
from PIL import Image
# streamlit run /Users/apple/Documents/GitHub/SummerSession_2021/DogService.py
... | 212 | 24.93 | 110 | 14 | 1,447 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cfc8b3e77a6c71c3_cc7adce7", "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."
] | [
76
] | [
null
] | [
11
] | [
12
] | |
2024-11-19T03:12:06.696243+00:00 | 1,637,477,487,000 | 682fd2ee15051b895f816eee2ebcc9ac51bee674 | 3 | {
"blob_id": "682fd2ee15051b895f816eee2ebcc9ac51bee674",
"branch_name": "refs/heads/main",
"committer_date": 1637477487000,
"content_id": "29981519ce9e91ce58e17f4c5d38db6f3eb67cd1",
"detected_licenses": [
"MIT"
],
"directory_id": "5292b03998384c0d2bb5858058892d7e45c5365b",
"extension": "py",
"file... | 2.515625 | stackv2 | from flask import Flask, render_template, request
from subprocess import STDOUT, check_output
import os
app = Flask(__name__)
@app.route('/')
def index():
return open(__file__).read()
@app.route('/upload', methods=['GET', 'POST'])
def upload_file():
if request.method == 'GET':
return render_templat... | 33 | 22.91 | 85 | 16 | 185 | python | [{"finding_id": "codeql_py/command-line-injection_6d0a124fd9b487a1_17d14659", "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)."
] | [
28,
19
] | [
null,
null
] | [
19,
16
] | [
47,
40
] | |
2024-11-19T03:12:18.619509+00:00 | 1,592,760,344,000 | ca549d852c4c27541edf882ff7b4d54a68228931 | 2 | {
"blob_id": "ca549d852c4c27541edf882ff7b4d54a68228931",
"branch_name": "refs/heads/master",
"committer_date": 1592760344000,
"content_id": "afa14aacd143946c216afc179bc612c5b1ac5745",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "21b611787c1dc0bd17970547b1f6a10588a068ac",
"extension": "py"... | 2.5 | stackv2 | import os
from jinja2 import Environment, PackageLoader
class xml_fill:
def __init__(self, path, width, height, depth=3, database='Unknown', segmented=0):
environment = Environment(loader=PackageLoader('source', 'XML_template'), keep_trailing_newline=True)
self.annotation_template = environment.ge... | 39 | 34.1 | 109 | 15 | 291 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e807d4a97d842706_6f6576c6", "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."
] | [
7
] | [
null
] | [
23
] | [
110
] | |
2024-11-19T03:12:24.759132+00:00 | 1,525,525,460,000 | 9fb0b9292eab3f9f2a19a8a8a993759076ef5a71 | 4 | {
"blob_id": "9fb0b9292eab3f9f2a19a8a8a993759076ef5a71",
"branch_name": "refs/heads/master",
"committer_date": 1525525460000,
"content_id": "036163aea720a5757c6683b19a1ca28ab5099a2f",
"detected_licenses": [
"MIT"
],
"directory_id": "30c6b1c0948048d045ef083dbd0e263fbc67b7e5",
"extension": "py",
"fi... | 4.4375 | stackv2 | import datetime
from datetime import date
def print_header():
print('-------------------------------------')
print(' Compute Birthdays')
print('-------------------------------------')
print()
def capture_bday():
year = int(input('Enter the year you were born [YYYY]: '))
month = int(i... | 45 | 27.04 | 109 | 13 | 281 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_951b1809384120a7_d1af126c", "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."
] | [
30,
32
] | [
null,
null
] | [
15,
15
] | [
109,
104
] | |
2024-11-19T01:33:50.821998+00:00 | 1,609,918,886,000 | 7069932f22ee90b36ad63e1fe62df6620de1baa0 | 2 | {
"blob_id": "7069932f22ee90b36ad63e1fe62df6620de1baa0",
"branch_name": "refs/heads/master",
"committer_date": 1609918886000,
"content_id": "aea489a2df5c9ba3e6f3e041fec866b3920bda4d",
"detected_licenses": [
"MIT"
],
"directory_id": "38570f6e225b89d4f9bdce0a00dcc929ca101071",
"extension": "py",
"fi... | 2.34375 | stackv2 | # credits:
# https://github.com/pfnet-research/sngan_projection/blob/master/source/inception/inception_score_tf.py
# https://github.com/bioinf-jku/TTUR/blob/master/fid.py
# https://github.com/openai/improved-gan/pull/40/commits/0a09faccb45088695228bbf50435ee71e94eb2ce (bug fixing)
import os.path
import sys
import... | 168 | 37.7 | 112 | 18 | 1,705 | python | [{"finding_id": "codeql_py/tarslip_7d2577a5f1c134c7_1d045e5d", "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)."
] | [
136
] | [
null
] | [
5
] | [
35
] | |
2024-11-19T01:33:52.955440+00:00 | 1,637,068,406,000 | b17fcc5f28ed431c39ab16590ef5524f06cb8128 | 3 | {
"blob_id": "b17fcc5f28ed431c39ab16590ef5524f06cb8128",
"branch_name": "refs/heads/main",
"committer_date": 1637068406000,
"content_id": "29bcfb193bded355865267e313bf76b2a84beea3",
"detected_licenses": [
"MIT"
],
"directory_id": "8f9f802cdf1f4f386ee9055af5e0834e21431ae5",
"extension": "py",
"file... | 2.65625 | stackv2 | from io import BytesIO
import os
import img2pdf
import re
from os import walk
from os.path import join
import requests
from bs4 import BeautifulSoup
CURRENT = os.path.dirname(__file__)
class SlideShareDownloader:
"""SlideShare Downloader Class"""
def get_slide_info(self, url):
html = requests.get(ur... | 90 | 33.11 | 85 | 17 | 723 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c42d120879b905dd_8c610628", "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)."
] | [
49
] | [
null
] | [
19
] | [
56
] | |
2024-11-19T01:57:15.638209+00:00 | 1,574,185,760,000 | f033c7f45118df71608e3dcc4c8d62736b0cda1a | 3 | {
"blob_id": "f033c7f45118df71608e3dcc4c8d62736b0cda1a",
"branch_name": "refs/heads/master",
"committer_date": 1574185760000,
"content_id": "24a9d64c840e35cb6d4c922b62240ba389d59b9f",
"detected_licenses": [
"MIT"
],
"directory_id": "092701307c0c423efa4e974f7454f2f297ef5834",
"extension": "py",
"fi... | 3.359375 | stackv2 | import spacy
import re
nlp = spacy.load("en_core_web_sm")
def remove_pii_name(text: str, replacement: str = '--NAME--') -> str:
"""
Pass a string and return the text string with names removed
Parameters
----------
text : str
The text to replace names in
replacement : str
The t... | 166 | 26.55 | 91 | 12 | 1,196 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bc9c4e60194047ad_02b80782", "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."
] | [
155
] | [
null
] | [
7
] | [
36
] | |
2024-11-19T01:57:18.181000+00:00 | 1,591,815,089,000 | 4d7860bd07cea038bd1afb871379e7038ff7d128 | 2 | {
"blob_id": "4d7860bd07cea038bd1afb871379e7038ff7d128",
"branch_name": "refs/heads/master",
"committer_date": 1591815089000,
"content_id": "8864b5e4a69a414dbf119c5fc02e5e2b3312a4a0",
"detected_licenses": [
"MIT"
],
"directory_id": "1853b69e47ada5bb43412f63377789684ec33f5e",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import base64
import configparser
import getopt
import hashlib
import hmac
import json
import logging
import subprocess
import sys
import time
from os import path
from enum import Enum, unique
from urllib.parse import parse_qs, urlparse
from http.server import BaseHTTPRequ... | 288 | 39.76 | 154 | 25 | 2,428 | python | [{"finding_id": "codeql_py/insecure-default-protocol_6db552a620c9624f_e328f977", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 10 | true | [
"CWE-327",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/insecure-default-protocol",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used.",
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2).",
"This log entry depends on a [user-provided value](1).\nThis log entry dep... | [
275,
86,
94,
117,
152,
170,
201,
205,
207,
209
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
29,
29,
33,
33,
33,
33,
30,
38,
37,
33
] | [
121,
70,
86,
86,
86,
86,
71,
88,
86,
81
] | |
2024-11-19T01:57:31.051555+00:00 | 1,594,901,150,000 | 3cb39dea98e3c9c8b4bf67dde926ca26e60bb831 | 4 | {
"blob_id": "3cb39dea98e3c9c8b4bf67dde926ca26e60bb831",
"branch_name": "refs/heads/master",
"committer_date": 1594901150000,
"content_id": "dbf96501d0fe5561d48b7f7bf33a7a957306fedd",
"detected_licenses": [
"MIT"
],
"directory_id": "5bf14038d96b41de0e450663161c14119cb2e386",
"extension": "py",
"fi... | 3.71875 | stackv2 | import random
from typing import Any, List
def to_string(list_obj: List) -> str:
# convert a list to a string
return ''.join(list_obj)
def to_list(string_obj: str) -> List:
# convert a string to list
return list(string_obj)
def get_random_word() -> str:
# return a random shuffle of any word in... | 88 | 31.74 | 87 | 19 | 672 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_db23262fbd10f472_a84ad12d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text.\nThis expression logs [sensitive data (secret)](5) a... | [
60,
83,
87
] | [
null,
null,
null
] | [
7,
27,
23
] | [
52,
68,
63
] | |
2024-11-19T02:10:55.417921+00:00 | 1,426,554,323,000 | a4e7d108cbe7dc31ba0c82f60c049af6d3df26ee | 3 | {
"blob_id": "a4e7d108cbe7dc31ba0c82f60c049af6d3df26ee",
"branch_name": "refs/heads/master",
"committer_date": 1426554323000,
"content_id": "ffc911e7fe7445bc99d2277252b5a9034ddf49e2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "37fe6d43f4e3f87186b3008dac53e2f161ffd8ba",
"extension": "py"... | 2.8125 | stackv2 | import jinja2
from resu.template_engines import TemplateEngine
class Jinja2Engine(TemplateEngine):
'''
:class:`resu.template_engines.TemplateEngine` for Jinja2.
:var name: ``'jinja2'``
'''
name = 'jinja2'
def render(self, template, **kwargs):
'''
:arg template: A template.
... | 26 | 22.62 | 61 | 10 | 148 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_cb9fbd0ad2d4da71_964a9256", "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
] | [
26
] | [
51
] | |
2024-11-19T02:10:58.252908+00:00 | 1,635,171,600,000 | 09e1a8e6be990873d5866e4a105b6f54d7ee7a31 | 3 | {
"blob_id": "09e1a8e6be990873d5866e4a105b6f54d7ee7a31",
"branch_name": "refs/heads/master",
"committer_date": 1635171600000,
"content_id": "e5c6881938c2f30a194dc25e8167c9b0c5d64801",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "df0674665506e9756025d6e8f3364d2d7ff5376f",
"extension": "py",
... | 3.421875 | stackv2 | import requests
api_key = "Past Yous API KEY Here"
url= "https://api.openweathermap.org/data/2.5/weather?"
city_name = input("Enter city name : ")
full_url = url + "q=" + city_name + "&appid=" + api_key
print(full_url)
req = requests.get(full_url)
info = req.json()
if info["cod"] != "404":
x = info["main"] ... | 36 | 28.89 | 70 | 17 | 292 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_87ebea29ee6e874f_3b6f8dbf", "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."
] | [
8,
27
] | [
null,
33
] | [
7,
13
] | [
15,
54
] | |
2024-11-19T02:11:17.950842+00:00 | 1,582,558,480,000 | 21c1fd2b7c5d48f1dc176f3bff30822e9d4bc24b | 2 | {
"blob_id": "21c1fd2b7c5d48f1dc176f3bff30822e9d4bc24b",
"branch_name": "refs/heads/master",
"committer_date": 1582558480000,
"content_id": "f3470712ca7d7042e6b41b09a37b184c97776ac7",
"detected_licenses": [
"MIT"
],
"directory_id": "891b96d3257be3d60061db38da7a6ac6f3c0fef8",
"extension": "py",
"fi... | 2.453125 | stackv2 |
import json
import os
import tarfile
import pandas as pd
from sklearn.externals import joblib
from sklearn.metrics import classification_report, roc_auc_score, accuracy_score
if __name__=="__main__":
model_path = os.path.join('/opt/ml/processing/model', 'model.tar.gz')
print('Extracting model from path: {}'... | 38 | 36.76 | 93 | 11 | 319 | python | [{"finding_id": "codeql_py/tarslip_a54db4fae9354f4b_87c87958", "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)."
] | [
15
] | [
null
] | [
9
] | [
12
] | |
2024-11-19T02:11:33.146651+00:00 | 1,602,991,126,000 | 0f54f772dfee099bedf37f21c5da90fb177b4e60 | 3 | {
"blob_id": "0f54f772dfee099bedf37f21c5da90fb177b4e60",
"branch_name": "refs/heads/master",
"committer_date": 1602991126000,
"content_id": "110e9cbf1e0f00676c933574c8103ad146021418",
"detected_licenses": [
"MIT"
],
"directory_id": "9013f080670f25860c4d1f78f18369c3000ca51a",
"extension": "py",
"fi... | 2.59375 | stackv2 | from flask import request
from flask_api import FlaskAPI, status, exceptions
app = FlaskAPI(__name__)
users = {
0: 'Zeroberto',
1: 'Humberto',
2: 'Doisberto',
3: 'Tresberto'
}
@app.route('/users/', methods=['GET'])
def user_list():
return users
@app.route('/users/<int:key>/', methods=['GET'])... | 54 | 19.39 | 51 | 12 | 286 | python | [{"finding_id": "codeql_py/reflective-xss_01966aa0aaecf7fc_1d232d45", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
32,
42
] | [
null,
null
] | [
12,
12
] | [
41,
16
] | |
2024-11-19T02:11:49.788323+00:00 | 1,581,964,801,000 | fb13cf7c5bfbd127f6aeb57ccfec770c7db0cf8c | 3 | {
"blob_id": "fb13cf7c5bfbd127f6aeb57ccfec770c7db0cf8c",
"branch_name": "refs/heads/master",
"committer_date": 1581964801000,
"content_id": "f8881c1d5285be91b0712f0bf8b6b46ab75061b2",
"detected_licenses": [
"MIT"
],
"directory_id": "7cfc89f29cf0b9fb0d3ff00f9c0af1778a7f922f",
"extension": "py",
"fi... | 3.171875 | stackv2 | import logging
import re
from abc import ABC, abstractmethod
from typing import Tuple, List, Type
from datetime import datetime
logger = logging.getLogger(__name__)
class Value(ABC):
@abstractmethod
def parse(self, token: str, allowed_range: Tuple[int, int]) -> bool:
pass
@abstractmethod
de... | 152 | 29.96 | 100 | 16 | 1,113 | python | [{"finding_id": "codeql_py/redos_159b7beadcc035ae_b5e02242", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ','.", "remediati... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ','."
] | [
111
] | [
null
] | [
25
] | [
28
] | |
2024-11-19T02:33:00.606058+00:00 | 1,511,943,845,000 | b4418e3edae5c932b448560f6819c40c3b3b65fb | 3 | {
"blob_id": "b4418e3edae5c932b448560f6819c40c3b3b65fb",
"branch_name": "refs/heads/master",
"committer_date": 1511943845000,
"content_id": "a7a43748ac5e08033f9e9ff83d5cf54b238c9023",
"detected_licenses": [
"MIT"
],
"directory_id": "545208c36dad38b8a85cbac992ba685897baf6e5",
"extension": "py",
"fi... | 2.953125 | stackv2 | import socket
import os
class User :
online = {} #dictionary for online user
def __init__(self):
self.user = self.loadUser()
def loadUser(self):
dict = {}
with open('userlist.txt','r') as file:
for line in file : #add each line to dictionary
if line == '\n':
continue
username, password = lin... | 51 | 26.1 | 70 | 15 | 353 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_56879d276f80d327_6ff27aa9", "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."
] | [
41
] | [
null
] | [
15
] | [
22
] | |
2024-11-19T02:33:00.768522+00:00 | 1,554,474,211,000 | f67cab50e91911e376594f6c57ddda90f473980f | 3 | {
"blob_id": "f67cab50e91911e376594f6c57ddda90f473980f",
"branch_name": "refs/heads/master",
"committer_date": 1554474211000,
"content_id": "a79bfe9b10a0f10aef608102ad8fe6d23fd7ff25",
"detected_licenses": [
"MIT"
],
"directory_id": "132a6e82b32ec775e746eb14e59bc42bd259de05",
"extension": "py",
"fi... | 2.546875 | stackv2 | import logging
import jinja2
import os
import json
from networkconfgen import custom_filters
from networkconfgen.constants import ERROR_UNKNOWN, ERROR_INVALID_VLAN_RANGE, ERROR_INVALID_VALUE, ERROR_CODES
logger = logging.getLogger("networkconfgen")
class NetworkConfGenResult(object):
"""
Object, that represe... | 240 | 35.15 | 119 | 22 | 1,712 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_9cac1ebf2232c2d8_f25a8b81", "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."
] | [
130
] | [
142
] | [
33
] | [
10
] | |
2024-11-19T02:46:19.820238+00:00 | 1,634,051,290,000 | e9c9f6b8fa69cd5c30d8373b3d0541fe6a21d95f | 3 | {
"blob_id": "e9c9f6b8fa69cd5c30d8373b3d0541fe6a21d95f",
"branch_name": "refs/heads/main",
"committer_date": 1634051290000,
"content_id": "9eb556af85deb45879a9063b2898d5d038693b2e",
"detected_licenses": [
"MIT"
],
"directory_id": "776fe77feee3f41379c9f1a96ac1fbfd0b4b5a77",
"extension": "py",
"file... | 2.578125 | stackv2 | # Import required packages:
from flask import Flask, request, render_template, send_from_directory, redirect, send_file
import os
import test
import neuralStyleProcess
import cv2
app = Flask(__name__)
#do function that checks for uploaded file types (extensions).
#https://stackoverflow.com/questions/41105700/how-can... | 71 | 27.44 | 108 | 14 | 448 | python | [{"finding_id": "codeql_py/flask-debug_b58d842f57b15c65_c09fd197", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
69,
23
] | [
null,
null
] | [
4,
31
] | [
23,
70
] | |
2024-11-19T02:59:25.503878+00:00 | 1,465,825,813,000 | fbbffc89fa1d8943d78bbed67c8a6457ebad180e | 3 | {
"blob_id": "fbbffc89fa1d8943d78bbed67c8a6457ebad180e",
"branch_name": "refs/heads/master",
"committer_date": 1465825813000,
"content_id": "32e5f67bbe3408762c735de106ebb7c1ba810389",
"detected_licenses": [
"MIT"
],
"directory_id": "19af7baff8e89a141a546e17c2fbe060445e3d7e",
"extension": "py",
"fi... | 3.109375 | stackv2 | from collections import Counter
import re
import PyPDF2 as pdf
import sqlite3
import argparse
import os
class PDF_parser():
def __init__(self, pathname, database_name):
self.pathname = pathname
self.database_name = database_name
def __call__(self, list_filenames):
self.list_filenames = list_filenames
self.i... | 138 | 29.93 | 132 | 20 | 1,037 | python | [{"finding_id": "codeql_py/overly-large-range_ed130cbb416283e3_f78aca13", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
42
] | [
null
] | [
33
] | [
36
] | |
2024-11-19T02:59:47.813791+00:00 | 1,576,080,237,000 | 774476ec9bd00ae6b1c8ff6fcd8659e72439016c | 4 | {
"blob_id": "774476ec9bd00ae6b1c8ff6fcd8659e72439016c",
"branch_name": "refs/heads/master",
"committer_date": 1576080237000,
"content_id": "1d4b875777b85dc19d840f22c957df2c7b672f5f",
"detected_licenses": [
"MIT"
],
"directory_id": "4345e4023b0efbb0ee98f730518adb003e23600e",
"extension": "py",
"fi... | 3.78125 | stackv2 | # coding:utf-8
import functools
import time
print()
def print_with_date(sentence):
print(format_date(time.localtime(), "%Y-%m-%d %H:%M:%S"), sentence)
def format_date(date, date_format):
"""
日期格式说明
%y 两位数的年份
%Y 四位数的年份
%m 月份
%d 日期
%H 24小时制的小时数
%I 12小时制的小时数
%M 分钟
%S 秒
... | 112 | 16.26 | 72 | 11 | 709 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fe15bdd5562551cf_8c007d41", "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
] | [
37
] | [
43
] | |
2024-11-19T02:59:47.925428+00:00 | 1,611,445,533,000 | aaee9e9ec5d950c0ea9f7626d7b623785598418e | 4 | {
"blob_id": "aaee9e9ec5d950c0ea9f7626d7b623785598418e",
"branch_name": "refs/heads/master",
"committer_date": 1611445533000,
"content_id": "1e72f2bd914a32b3e221b1580ec70d22f8958b7e",
"detected_licenses": [
"MIT"
],
"directory_id": "8ed19ae9c6f3bebe30754ab944c1264fc7053d31",
"extension": "py",
"fi... | 4.0625 | stackv2 | from random import shuffle as random_shuffle
import secrets
def generate(length=16, uppercase=1, numbers=1, characters=1):
"""
Generates a random password of given length. Default length (16)
Arguments:
uppercase: Number of uppercase letters. Default (1)
numbers: Number of numbers.... | 78 | 27.46 | 90 | 12 | 620 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6d3da034ef4bee3d_958ac91a", "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."
] | [
78
] | [
null
] | [
36
] | [
38
] | |
2024-11-19T03:12:15.266039+00:00 | 1,427,384,376,000 | bca59b59fed5cb49e85f3c46e8c70ca1d2dab497 | 3 | {
"blob_id": "bca59b59fed5cb49e85f3c46e8c70ca1d2dab497",
"branch_name": "refs/heads/master",
"committer_date": 1427384376000,
"content_id": "a9daac99a04ec6371ef3ddc26374829f629e9b23",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bf4dc0dcdbe6760af970fdd691363d4ca2de47a0",
"extension": "py"... | 2.6875 | stackv2 | #ClientInfo.py
#definition of a class representing one connected client.
import os
import CONFIG
class ClientInfo():
def __init__(self, owner, name, prompt, client, ID, player_data_ID):
self.owner = owner
self.path = None
self.name = None
self.password = None
self.prompt = prompt
self.connection = clien... | 95 | 25.28 | 103 | 20 | 666 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c7fa0a2b1858e94b_d44cf883", "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."
] | [
41
] | [
null
] | [
12
] | [
37
] | |
2024-11-19T03:12:16.360583+00:00 | 1,581,784,452,000 | 189d3dab206a432916260fea516249bd521ddd55 | 3 | {
"blob_id": "189d3dab206a432916260fea516249bd521ddd55",
"branch_name": "refs/heads/master",
"committer_date": 1581784452000,
"content_id": "75609f9d14e369dab1448034d6b7919c20bc0e60",
"detected_licenses": [
"MIT"
],
"directory_id": "a8018614a06764297da095d17b520e42b69a4221",
"extension": "py",
"fi... | 2.953125 | stackv2 | import requests
import logging
import pydash
from json.decoder import JSONDecodeError
from time import sleep
class Simsms(object):
"""Class to use sim-sms api to receive virtual numbers"""
__slots__ = ('api_key', 'country', 'service')
available_services = (
'opt29',
'opt41',
)
av... | 92 | 30.43 | 92 | 16 | 662 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d5597f4a13485342_1eb9947d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
75,
86
] | [
null,
null
] | [
25,
33
] | [
37,
46
] | |
2024-11-19T03:12:16.633581+00:00 | 1,644,784,051,000 | f3c6555be2d9b56b3a5b79488c73b4c1c354e72f | 3 | {
"blob_id": "f3c6555be2d9b56b3a5b79488c73b4c1c354e72f",
"branch_name": "refs/heads/master",
"committer_date": 1644784051000,
"content_id": "e64b3f71817be9b5da8d882828f031d4d9739c44",
"detected_licenses": [
"MIT"
],
"directory_id": "1ec42de2506ce1765de1834dafd236ef06d5c11a",
"extension": "py",
"fi... | 3.015625 | stackv2 | from jinja2 import Template
# >>> template = Template('Hello {{ name }}!')
# >>> template.render(name='John Doe')
template = ''' <div class="col-md-4 col-sm-6 portfolio-item">
<div>
<img src="img/games/jigsaw_puzzles.png" class="img-responsive" alt="">
... | 162 | 31.57 | 161 | 11 | 1,309 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e2c161d10813ced4_9f1ec110", "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."
] | [
160
] | [
null
] | [
5
] | [
24
] | |
2024-11-19T01:27:03.830906+00:00 | 1,684,802,975,000 | 9ef48bdc15cf1e196b9a8656513289ca1ab431ab | 3 | {
"blob_id": "9ef48bdc15cf1e196b9a8656513289ca1ab431ab",
"branch_name": "refs/heads/master",
"committer_date": 1684802975000,
"content_id": "dd8cf84f16cf82f0b4b626a5b2ee24413ab9c735",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "656cfc199979426d9eac7f9be032f8ed9b416018",
"extension": "p... | 3.0625 | stackv2 | # precipexample.py
#
# David J. Lampert (djlampert@gmail.com)
#
# illustrates how to use the preprocessing tools to download hourly
# precipitation data (DSI-3240) from the NCDC online database.
from pyhspf.preprocessing import climateutils
import os, pickle, datetime
# bounding box of interest
bbox = -94, 41.3, ... | 118 | 30.91 | 80 | 14 | 1,059 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ee5c84372221e401_2d288b1d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
76,
77
] | [
null,
null
] | [
31,
31
] | [
47,
48
] | |
2024-11-19T01:37:39.943650+00:00 | 1,552,562,653,000 | 707d59e6e5c410a49a5bdbf47a0915f58da6b3c0 | 2 | {
"blob_id": "707d59e6e5c410a49a5bdbf47a0915f58da6b3c0",
"branch_name": "refs/heads/master",
"committer_date": 1552562653000,
"content_id": "baf0f71dfa8ad342c12a89c3b24f0f65fc1d7187",
"detected_licenses": [
"MIT"
],
"directory_id": "ee19e4b0bef51ca3f78af7bbb36ee1c76a0c205c",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import Flask, render_template, redirect, request, stream_with_context, Response
from werkzeug import secure_filename
import os
import SplitFile
__author__ = 'Shona Doran'
app = Flask(__name__)
#DEBUG MODE _ REMOVE LATER
#app.debug = True
#Add the path of the uploaded video
APP_ROOT = os.path.dirname(os.... | 48 | 22.17 | 90 | 11 | 271 | python | [{"finding_id": "codeql_py/path-injection_d3ca21309c1d3c7b_81a23929", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
34,
39
] | [
null,
null
] | [
9,
12
] | [
20,
23
] | |
2024-11-19T01:38:02.233278+00:00 | 1,690,987,497,000 | 08a71a937574c8315723cd9cc71c45e36ea8b6e0 | 3 | {
"blob_id": "08a71a937574c8315723cd9cc71c45e36ea8b6e0",
"branch_name": "refs/heads/main",
"committer_date": 1690987497000,
"content_id": "121e6a2ed5d9beaec186ea288632c50a927e90ab",
"detected_licenses": [
"MIT"
],
"directory_id": "560e1fd724d7704b9882cf98a31ab392dc9ed9e6",
"extension": "py",
"file... | 2.609375 | stackv2 | import functools
import logging
import os
from typing import Optional
import flask as f
import flask.views
import flask_login
import werkzeug
from ..buildinfo import BUILD_INFO
log = logging.getLogger(__name__)
VERSION_STRING_FOOTER = f"{BUILD_INFO.commit[:9]}"
def authorize_or_terminate(func):
@functools.wr... | 185 | 36.59 | 83 | 15 | 1,517 | python | [{"finding_id": "codeql_py/log-injection_38756869beb793c5_62b8bc9d", "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)."
] | [
67
] | [
null
] | [
48
] | [
51
] | |
2024-11-19T01:38:08.286874+00:00 | 1,543,210,596,000 | c62aa53e44a2533086f6c2d7b30bf93dc8f806fa | 5 | {
"blob_id": "c62aa53e44a2533086f6c2d7b30bf93dc8f806fa",
"branch_name": "refs/heads/master",
"committer_date": 1543210596000,
"content_id": "3b4ebe4126148f9e7215633e8f849cf764602ca0",
"detected_licenses": [
"MIT"
],
"directory_id": "6b14d9a64a578239e5612e6098320b61b45c08d9",
"extension": "py",
"fi... | 4.6875 | stackv2 | # checking attributes in classes
# Using setattr()
class Employee:
def __init__(self,name,salary):
self.name=name
self.salary=salary
def disp(self):
print('Name: ',self.name)
print('Salary',self.salary)
emp=Employee('Sasuke',25000)
emp.disp()
print(getattr(emp,'name')) # return... | 18 | 31.22 | 90 | 10 | 144 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_caab6fc19608b3a6_ad17c8e1", "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."
] | [
9
] | [
null
] | [
24
] | [
35
] | |
2024-11-19T01:38:14.591804+00:00 | 1,599,806,757,000 | f9c9f09148a9da52c42f304832cfac70c6fdb86b | 3 | {
"blob_id": "f9c9f09148a9da52c42f304832cfac70c6fdb86b",
"branch_name": "refs/heads/master",
"committer_date": 1599806757000,
"content_id": "db8b0e4de5c74d02e18b8b81a6bbc8969aa0b9bd",
"detected_licenses": [
"MIT"
],
"directory_id": "1f1d706b7116b38b227887eb8dc23255713a8c8d",
"extension": "py",
"fi... | 2.515625 | stackv2 | import csv
from datetime import datetime
from chut import console_script
from jinja2 import Template
TEMPLATE = '''
{{ r.date }} {{ r.amount }}€ {{r.kind}} {{ r.type }}{{ r.status }}
{{ r.description }}
{{ r.comment or '' }}
'''
types = {
'Teeshirt': 'Goodies',
'FraisPubli': 'Goodies',
'Aliment... | 134 | 26.82 | 72 | 18 | 979 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_feb34e01291db81f_9cff3d45", "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."
] | [
111
] | [
null
] | [
16
] | [
34
] | |
2024-11-19T01:38:19.228643+00:00 | 1,596,001,058,000 | 6194f84c29a45536daa7401b0f99e7aa9bc1bfb0 | 3 | {
"blob_id": "6194f84c29a45536daa7401b0f99e7aa9bc1bfb0",
"branch_name": "refs/heads/master",
"committer_date": 1596001058000,
"content_id": "b203b074039a49a25a57ae27223f25db217f1166",
"detected_licenses": [
"MIT"
],
"directory_id": "6303a902f361411f7d390a05406fc53650373eec",
"extension": "py",
"fi... | 2.546875 | stackv2 | # -*- coding: utf-8 -*-
"""
This is the base class of youtube_insight crawler.
It sets up a client to interact with API and an opener to send request from.
"""
import time, datetime, random, json, re, urllib
from http.cookiejar import CookieJar
from googleapiclient import discovery
# from googletrans import Translator... | 169 | 37.62 | 151 | 19 | 1,562 | python | [{"finding_id": "codeql_py/overly-large-range_8237c0c233bc0939_50261acf", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "remediatio... | 4 | true | [
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range",
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.",
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.",
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.",
"Suspicious character range ... | [
162,
162,
162,
162
] | [
null,
null,
null,
null
] | [
38,
41,
44,
53
] | [
42,
45,
48,
57
] | |
2024-11-19T01:38:35.086826+00:00 | 1,610,366,623,000 | 1f3eab997149eb034723417aed2b9a530d7c1027 | 3 | {
"blob_id": "1f3eab997149eb034723417aed2b9a530d7c1027",
"branch_name": "refs/heads/main",
"committer_date": 1610366623000,
"content_id": "52d86231b556364afacc5ab67f57572e5eba3326",
"detected_licenses": [
"MIT"
],
"directory_id": "676b6a3377b0cbdfe037c23e728bbebd0bb3a33e",
"extension": "py",
"file... | 2.921875 | stackv2 | import networkx as nx
import torch
import dgl
import matplotlib.pyplot as plt
from geopy.geocoders import Nominatim
import osmnx as ox
import shapely
import pandas as pd
import pandana as pdna
from shapely import geometry
from descartes.patch import PolygonPatch
from shapely.geometry import LineString
# http://... | 222 | 29.98 | 135 | 13 | 2,394 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_62eb09d036f60c8f_b606a05e", "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."
] | [
24
] | [
null
] | [
11
] | [
14
] | |
2024-11-19T01:39:03.109220+00:00 | 1,512,419,942,000 | 85ce0d288e1cef820b64bcf5ef6cf15f6555a379 | 2 | {
"blob_id": "85ce0d288e1cef820b64bcf5ef6cf15f6555a379",
"branch_name": "refs/heads/master",
"committer_date": 1512419942000,
"content_id": "72bb74fb8186704bfc04f9afa1ed9c7ddc881fee",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3c18f24614f40111f1528d5502ee0d5c78ac3bb2",
"extension": "py"... | 2.40625 | stackv2 | # -*- coding:utf-8 -*-
import numpy as np
import cv2
from imutils import face_utils
import imutils
import dlib
import uuid
from . import utils
from project.wide_resnet import WideResNet
import face_recognition
import os
FACE_SCALE = 1.2
class face:
# face detection
def face_detection(self,image):
detector... | 301 | 33.04 | 123 | 15 | 2,845 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3cfddb65d58853d1_0e00b30f", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
213,
221
] | [
null,
null
] | [
15,
15
] | [
38,
21
] | |
2024-11-19T01:39:05.800315+00:00 | 1,534,831,206,000 | c29b5eae12e2d6d6435bfbe0575df5c6d7f849d8 | 2 | {
"blob_id": "c29b5eae12e2d6d6435bfbe0575df5c6d7f849d8",
"branch_name": "refs/heads/master",
"committer_date": 1534831206000,
"content_id": "0e8c5b79bf0edfe34377aea30cc62e98f4ecc3b6",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "a94ac2b70216101d21182db22072ec005343d41a",
"extension": "p... | 2.453125 | stackv2 | #!/usr/bin/env python3
import os, datetime, json, collections
from jinja2 import Environment, FileSystemLoader, Template
filepath = os.path.dirname(os.path.abspath(__file__))
with open('papers.json') as data:
d = json.load(data, object_pairs_hook=collections.OrderedDict)
#d = json.load(data)
html = ""
... | 20 | 36.85 | 141 | 17 | 175 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_156c61b3641303e4_225618b4", "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."
] | [
17,
20
] | [
null,
null
] | [
17,
19
] | [
63,
65
] | |
2024-11-19T01:52:04.270788+00:00 | 1,609,601,490,000 | b0e0462037758986d621122f13864946eb7af406 | 3 | {
"blob_id": "b0e0462037758986d621122f13864946eb7af406",
"branch_name": "refs/heads/main",
"committer_date": 1609601490000,
"content_id": "e86f5df3b54228acd3a8e8b09556ffce6378a177",
"detected_licenses": [
"MIT"
],
"directory_id": "d5054c9dfffdc8252c3a91f26173abc9fe98d892",
"extension": "py",
"file... | 2.828125 | stackv2 | #!/usr/bin/env python3
import hashlib
import random
import time
import uuid
import getpass
import requests
PUBLIC_KEY = "a2ffa5c9be07488bbb04a3a47d3c5f6a"
def sha1(x: str):
return hashlib.sha1(x.encode()).hexdigest()
def get_mac_address():
as_hex = f"{uuid.getnode():012x}"
return ":".join(as_hex[i : i +... | 86 | 30.98 | 119 | 15 | 686 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2b0f874a658d685b_94b8eade", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-327"
] | [
"py/clear-text-logging-sensitive-data",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA1) that is... | [
80,
13
] | [
null,
null
] | [
11,
25
] | [
56,
35
] | |
2024-11-19T02:04:26.155313+00:00 | 1,527,506,027,000 | 3673d039f6b51a5bfac1c21aa25c96d005fc58e5 | 2 | {
"blob_id": "3673d039f6b51a5bfac1c21aa25c96d005fc58e5",
"branch_name": "refs/heads/master",
"committer_date": 1527506027000,
"content_id": "b805f64a085ee6e5f3eaf0796018ffe7e413307d",
"detected_licenses": [
"MIT"
],
"directory_id": "bba57f1c54bef15cc1577e8cb2f3559b903ef66f",
"extension": "py",
"fi... | 2.46875 | stackv2 | import colours
class IRCQueuedCommands:
def __init__(self,queue):
self.queue = queue
def raw(self,message,wait):
for c in ("\r","\n"):
message = message.replace(c, "")
if not message.startswith("PONG"):
print("sending raw: {}".format(message))
self.queue.put(('{}\r\n'.format(message).encode('UTF-8'),w... | 86 | 24.99 | 98 | 16 | 631 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c810416e3e283493_09079d6d", "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."
] | [
11
] | [
null
] | [
10
] | [
43
] | |
2024-11-19T02:04:46.333701+00:00 | 1,597,714,914,000 | 4c58189438983d651192463e01e1f9bc95e9e2ca | 2 | {
"blob_id": "4c58189438983d651192463e01e1f9bc95e9e2ca",
"branch_name": "refs/heads/master",
"committer_date": 1597714914000,
"content_id": "a279113a212867e8fb72e3fe4adad990dc355fc9",
"detected_licenses": [
"MIT"
],
"directory_id": "f392fc07fa6854679283488a244cf500c707b1fe",
"extension": "py",
"fi... | 2.5 | stackv2 | import re
import os
import time
import subprocess
import json
import argparse
from concurrent.futures import ProcessPoolExecutor
class SecretsScanner(object):
SOURCE_ROOT_DIRECTORY = '<<Enter root folder of our source code here?>>'
PATTERN_FILE = '<<Enter location of pattern_file.json here>>'
def __i... | 200 | 44.09 | 115 | 26 | 1,927 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7d78c442b8bdeb74_9c12d54a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text.\nThis expression logs [sensitive data (secret)](5) a... | [
117
] | [
118
] | [
27
] | [
76
] | |
2024-11-19T02:04:46.882555+00:00 | 1,585,731,048,000 | c2880761c35451f28a3166089376cc3ddb5d7378 | 3 | {
"blob_id": "c2880761c35451f28a3166089376cc3ddb5d7378",
"branch_name": "refs/heads/master",
"committer_date": 1585731048000,
"content_id": "210ca6e72208fa3778fa096c5da2520d7ff6808e",
"detected_licenses": [
"MIT"
],
"directory_id": "e9dd28c2e55e495b9fccf6df61b12bb78232ae70",
"extension": "py",
"fi... | 2.9375 | stackv2 | '''
Install:
pip install flask
Run with python CLI:
python flask_mock_service.py
Notes:
- Method is default as GET
'''
import os
# import ipdb
from flask import Flask, request, send_file, render_template
import json
from time import sleep
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello,... | 126 | 32.96 | 153 | 14 | 1,170 | python | [{"finding_id": "codeql_py/stack-trace-exposure_636b00f4dd7b92b4_97b0e8bd", "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.", "... | 8 | true | [
"CWE-209",
"CWE-215",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-022"
] | [
"py/stack-trace-exposure",
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting v... | [
115,
120,
42,
53,
67,
73,
99,
113
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
16,
null,
16,
12,
16,
12,
12,
26
] | [
22,
49,
70,
56,
104,
119,
89,
30
] | |
2024-11-19T02:04:55.888289+00:00 | 1,691,949,795,000 | b82c51f084f062da85d576361db283ea5eb2432c | 3 | {
"blob_id": "b82c51f084f062da85d576361db283ea5eb2432c",
"branch_name": "refs/heads/master",
"committer_date": 1691949795000,
"content_id": "ae4f350a89f7b61660b8d8357a38a4ad58ae1df6",
"detected_licenses": [
"MIT"
],
"directory_id": "7189d679445839e5e888d05a2cbb41476b61e7c7",
"extension": "py",
"fi... | 3.046875 | stackv2 | import time
import xlrd
from addax.data_structures.graph import Graph
from addax.data_structures.enumeration import CalculateAscendingEnumerationIndex
from addax.utilities.dataIO import ReadGraph, WriteGraph
def ConstructGraphsFromTimelapsedXLSX():
"""
Construct a set of graphs from the timelapsed xlsx fi... | 239 | 42.11 | 141 | 20 | 2,270 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_29cf4e2ecaec4d5e_4feba14c", "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."
] | [
236
] | [
null
] | [
16
] | [
95
] | |
2024-11-19T02:04:58.403536+00:00 | 1,607,328,297,000 | 974951d6d06e9763d6572fec970dee9b4a1beebb | 3 | {
"blob_id": "974951d6d06e9763d6572fec970dee9b4a1beebb",
"branch_name": "refs/heads/master",
"committer_date": 1607328297000,
"content_id": "b5aecd99548aa089d953a26aed5c5b3025bfe6f6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0add7953d3e3ce2df9e8265102be39b758579753",
"extension": "py"... | 2.5625 | stackv2 | # -*- coding:utf-8 -*-
import paramiko
import logging
import time
import sys
import os
sys.dont_write_bytecode = True
class SSHConnection(object):
'''
classdocs
'''
'''
#!!=====================================================================
# 过 程 名: __init__
# 函数说明:SSHConnection的... | 153 | 35.7 | 105 | 18 | 1,375 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_0a29a64467115407_bf5e7265", "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."
] | [
75
] | [
null
] | [
21
] | [
87
] | |
2024-11-19T02:28:18.147567+00:00 | 1,686,686,417,000 | a0bcd66e480e6c791434f1f1440d65ed57335da1 | 3 | {
"blob_id": "a0bcd66e480e6c791434f1f1440d65ed57335da1",
"branch_name": "refs/heads/master",
"committer_date": 1686686417000,
"content_id": "b0ec893dea8ff2a8f7fcc2e6d82b364bdce803cd",
"detected_licenses": [
"MIT"
],
"directory_id": "f80ef3a3cf859b13e8af8433af549b6b1043bf6e",
"extension": "py",
"fi... | 2.9375 | stackv2 | import sys
import Cocoa
import Quartz
# Return the generic RGB color space. This is a 'get' function and the caller
# should not release the returned value unless the caller retains it first.
# Usually callers of this routine will immediately use the returned colorspace
# with CoreGraphics so they typically do not ne... | 222 | 37.22 | 88 | 15 | 2,031 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c0ca0c02741eccdc_8b7340b8", "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."
] | [
114
] | [
null
] | [
15
] | [
57
] | |
2024-11-19T02:28:23.672964+00:00 | 1,674,601,419,000 | 3974f5b31b2a81857a3aa57f3f9838bace1a3075 | 2 | {
"blob_id": "3974f5b31b2a81857a3aa57f3f9838bace1a3075",
"branch_name": "refs/heads/master",
"committer_date": 1674601419000,
"content_id": "7da2290117aab554f434e18e9419db0743b64fea",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "34fee03896cc144e3b8813b035c274b372ddb540",
"extension": "py"... | 2.390625 | stackv2 | #
# -*- coding: utf-8 -*-
#
# Copyright 2015-2022 NETCAT (www.netcat.pl)
#
# 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 ... | 110 | 29.09 | 96 | 17 | 1,093 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2743dd0f25c87edc_617406d1", "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."
] | [
92
] | [
null
] | [
11
] | [
15
] | |
2024-11-19T02:28:42.080115+00:00 | 1,574,446,546,000 | 1a37847aac4b09d58e7e4ffb989fd82bf8722b8c | 4 | {
"blob_id": "1a37847aac4b09d58e7e4ffb989fd82bf8722b8c",
"branch_name": "refs/heads/master",
"committer_date": 1574446546000,
"content_id": "68a127ec1e851d41821a60e68b866371ea29bced",
"detected_licenses": [
"MIT"
],
"directory_id": "e71623e0063910351195a52d6a67b8bc053d88fa",
"extension": "py",
"fi... | 3.9375 | stackv2 | # Python program to find current
# weather details of any city
# using openweathermap api
# import required modules
import requests, json
# Enter your API key here
api_key = "6300a0b115c3a9675191e8d97f030e29"
# base_url variable to store url
base_url = "http://api.openweathermap.org/data/2.5/weather?"
# Give... | 72 | 23.82 | 65 | 16 | 500 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0ff691715e516a51_5d28f72a", "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."
] | [
62
] | [
69
] | [
8
] | [
30
] | |
2024-11-19T02:36:53.705819+00:00 | 1,551,794,655,000 | db3e6407be7ddb59142976524d6963d08e860a7c | 3 | {
"blob_id": "db3e6407be7ddb59142976524d6963d08e860a7c",
"branch_name": "refs/heads/master",
"committer_date": 1551794655000,
"content_id": "e0b55af13a641dcde51ac4cb5db31e70ff0c5f85",
"detected_licenses": [
"MIT"
],
"directory_id": "25c349dcf75117ce26108e35322c266448dc7203",
"extension": "py",
"fi... | 2.859375 | stackv2 | # -*- coding: utf-8 -*-
"""
@author: Jatin Goel
File for performing operations on a resource.
This file consists of a class: **WindowsResource**, which can connect to the remote
Windows Machine, using PowerShell Remoting.
The instance of this class can be used to perform various operations on a machine, like,
... | 490 | 33 | 125 | 18 | 3,210 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_d170fe35975b43b3_bbd9b9b0", "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."
] | [
178
] | [
null
] | [
13
] | [
76
] | |
2024-11-19T02:37:04.683213+00:00 | 1,623,076,590,000 | 0bcece6e5f04ce9810dd557f4b768df712a6c150 | 2 | {
"blob_id": "0bcece6e5f04ce9810dd557f4b768df712a6c150",
"branch_name": "refs/heads/main",
"committer_date": 1623076590000,
"content_id": "697e4cb52fc1196a0797aaa8e5b9e81596caf624",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6f6b16daa0e2d699461dc29cda02356958713b0e",
"extension": "py",
... | 2.40625 | stackv2 | import artifactory
import os
import requests
import subprocess
import tarfile
import tempfile
def ensure_helm_binary(f: callable):
def wrapper(helm_client: 'HelmClient', *args, **kwargs):
helm_client._get_helm_binary_stream()
return f(helm_client, *args, **kwargs)
return wrapper
def test_helm... | 127 | 44.02 | 132 | 19 | 1,297 | python | [{"finding_id": "codeql_py/overly-permissive-file_c539537c69984676_9cec9183", "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 group readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to group readable."
] | [
45
] | [
null
] | [
21
] | [
49
] | |
2024-11-19T02:37:16.801052+00:00 | 1,621,135,485,000 | ed9cad07125c64b3fff97f3c9490c1d1665b4d67 | 2 | {
"blob_id": "ed9cad07125c64b3fff97f3c9490c1d1665b4d67",
"branch_name": "refs/heads/main",
"committer_date": 1621135485000,
"content_id": "7aa05491fbee8ea45950783f68dff92d7b0e9845",
"detected_licenses": [
"MIT"
],
"directory_id": "a39f6cfa40c062be897bc9852f2c3b62102d613b",
"extension": "py",
"file... | 2.4375 | stackv2 | import flask
from flask import request, render_template, redirect
import json
app = flask.Flask(__name__)
@app.route("/sign-up", methods=["GET","POST"])
def sign_up():
if request.method == "POST":
req = request.form
missing = list()
for k, v in req.items():
if v == "":
... | 54 | 26.89 | 72 | 16 | 344 | python | [{"finding_id": "codeql_py/flask-debug_9de60d498b815805_77728532", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-601"
] | [
"py/flask-debug",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
54,
27
] | [
null,
null
] | [
5,
25
] | [
24,
65
] | |
2024-11-19T02:37:18.531538+00:00 | 1,601,905,471,000 | 6e3e90726f004dfbf7ff8994e23516e6f8096094 | 3 | {
"blob_id": "6e3e90726f004dfbf7ff8994e23516e6f8096094",
"branch_name": "refs/heads/master",
"committer_date": 1601905471000,
"content_id": "536a10b0ef5a8a3f48fed2a11ac76e9dd7cff5a0",
"detected_licenses": [
"MIT"
],
"directory_id": "98c84385301dae9167247167b9490e7bc1d7ea53",
"extension": "py",
"fi... | 2.5625 | stackv2 | from flask import jsonify
from flask_restx import Namespace, Resource, fields
import requests
api = Namespace('transports', description='')
@api.route('/')
class CitiesTransportsList(Resource):
@api.doc('list_transports')
def get(self):
"""Fetch all cities transports"""
response = requests.g... | 80 | 30.89 | 77 | 24 | 490 | python | [{"finding_id": "codeql_py/partial-ssrf_39def5a7f4d9351b_2c3c0db6", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
46
] | [
null
] | [
20
] | [
37
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.