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-18T20:10:10.174673+00:00 | 1,611,215,019,000 | 392ddf7ef0649b11fed8abea3fbdba442741585c | 2 | {
"blob_id": "392ddf7ef0649b11fed8abea3fbdba442741585c",
"branch_name": "refs/heads/master",
"committer_date": 1611215019000,
"content_id": "8c6267255d59b9e0ba64ac0aa8f117eae4951a02",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "eda27b76407976410d2064ba034165ff39aee282",
"extension": "py"... | 2.484375 | stackv2 | """
K.Srinivas, 6-Apr-2018
Project: HRMS-Support
Description: HRMS contains many "lists" used for restricting various values. These include Department, Manager_Info, Project, and so on.
Currently, entries are being added directly into the DB by the admins. A simple UI for these tables will will allow HR and other non-... | 117 | 43.74 | 142 | 17 | 1,278 | python | [{"finding_id": "codeql_py/code-injection_4364920cf1ec3c75_44053add", "tool_name": "codeql", "rule_id": "py/code-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This code execution depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "... | 1 | true | [
"CWE-094"
] | [
"py/code-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This code execution depends on a [user-provided value](1)."
] | [
103
] | [
null
] | [
18
] | [
23
] | |
2024-11-18T20:23:28.939214+00:00 | 1,467,050,662,000 | 206f8ba646bfc6a3dab5045da546128a06ef7d6e | 2 | {
"blob_id": "206f8ba646bfc6a3dab5045da546128a06ef7d6e",
"branch_name": "refs/heads/master",
"committer_date": 1467050662000,
"content_id": "b1ac57ad8261e4088c4b2a3ea62f8d4e6999242d",
"detected_licenses": [
"MIT"
],
"directory_id": "176cc6c12f22b472359f6edf3b54fb9788b07259",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/local/bin/python
# Thor is a simple monitoring notification service
# Basic Imports
import simplejson as json
import os
import sqlite3
import requests
from termcolor import colored
from flask import Flask, g, request, render_template
# Flask Setup
app = Flask(__name__)
app.config.from_object(__name__)
app.con... | 235 | 27.93 | 84 | 20 | 1,561 | python | [{"finding_id": "codeql_py/stack-trace-exposure_2715893fb630db5f_43def533", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.\n[S... | 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.\n[Stack trace information](2) 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.\n[Stack trace information](2) flo... | [
223,
228,
230,
232
] | [
null,
null,
null,
null
] | [
16,
16,
16,
16
] | [
48,
45,
47,
47
] | |
2024-11-18T20:23:29.153460+00:00 | 1,422,196,507,000 | 687cf6743e2da86195edfc3c112831e1f5e81a28 | 4 | {
"blob_id": "687cf6743e2da86195edfc3c112831e1f5e81a28",
"branch_name": "refs/heads/master",
"committer_date": 1422196507000,
"content_id": "c7c90321a338d1fadad33b6bd65167cae5057650",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "45a4962fffedb79cc3f1f9a3a852ec4d944b27ad",
"extension": "py",
... | 3.765625 | stackv2 | ''' Modified from http://inventwithpython.com/hangman.py
* Changed names to follow PEP 8; this includes the fact that
variable local to a function should be in all lowercase
- strive to seek that no line is longer than 80 characters
* Extracted common part of images into separate string
* Used prompt argument for ... | 149 | 30.08 | 80 | 16 | 1,067 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_04c5e2edf4212dae_3778d47c", "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)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](... | [
71,
136,
147
] | [
null,
137,
null
] | [
15,
19,
19
] | [
21,
80,
61
] | |
2024-11-18T20:49:19.969163+00:00 | 1,623,840,404,000 | 5da8dff13d6c14b2fce2183916302d0c9397f540 | 2 | {
"blob_id": "5da8dff13d6c14b2fce2183916302d0c9397f540",
"branch_name": "refs/heads/master",
"committer_date": 1623840404000,
"content_id": "6babfa6039c1e4b55fc74d026f0e3934e1540e49",
"detected_licenses": [
"MIT"
],
"directory_id": "e95624b1895e599468ebfa8626e4e391275dde28",
"extension": "py",
"fi... | 2.453125 | stackv2 | import subprocess, json, boto3, uuid, sys, time, paramiko, pipes
from datetime import datetime
from distutils.util import strtobool
#################################################
# Utils
#################################################
def getCurrentEpochTime():
return int((datetime.utcnow() - datetime(1970, 1... | 433 | 34.99 | 170 | 25 | 3,637 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_cc7d96aa657e857e_8fcba0d8", "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."
] | [
394
] | [
null
] | [
5
] | [
68
] | |
2024-11-18T20:49:24.410445+00:00 | 1,687,966,257,000 | d2bda15eb2a665067e8d1a1e63faa2b99020f1c7 | 3 | {
"blob_id": "d2bda15eb2a665067e8d1a1e63faa2b99020f1c7",
"branch_name": "refs/heads/main",
"committer_date": 1687966257000,
"content_id": "47d0c94ec3d34449cd459776b3e5c7b57b1bce2d",
"detected_licenses": [
"MIT"
],
"directory_id": "e3d8e233bf4c13050af9a78222db9abfce97630b",
"extension": "py",
"file... | 2.546875 | stackv2 | from tuber.models import *
import tuber.config
from types import SimpleNamespace
import multiprocessing
import itertools
import datetime
import time
class AntiRequestException(Exception):
pass
class MatchingError(Exception):
pass
class HashNS(SimpleNamespace):
def __hash__(self):
return self.i... | 330 | 33.05 | 146 | 20 | 2,530 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b53be2aa3314d43c_42fb6c04", "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."
] | [
76
] | [
null
] | [
23
] | [
71
] | |
2024-11-18T20:49:31.787009+00:00 | 1,613,024,624,000 | 3548f4adc5f285c241c6ed00c6e6bf0ef59f80c7 | 3 | {
"blob_id": "3548f4adc5f285c241c6ed00c6e6bf0ef59f80c7",
"branch_name": "refs/heads/main",
"committer_date": 1613024624000,
"content_id": "05599b22ee3ceaae174955eaac9a16949c7ce5d3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "aa79c9564eb9cf46df0960c2b2fc1cd6cead74fe",
"extension": "py",
... | 2.609375 | stackv2 | #!/usr/bin/python3
# coding=utf-8
#######################################################
# File : brute.py #
# Author : Rizal F #
# Github : https://github.com/Rizal-XD #
# Facebook : https://www.facebook.com/AKUN.KERTAS... | 186 | 37.62 | 150 | 19 | 1,808 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_41d66b3589bf3a4d_3557ebff", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [www.facebook.com](1) may be at an arbitrary position i... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [www.facebook.com](1) may be at an arbitrary position in the sanitized URL."
] | [
183
] | [
null
] | [
18
] | [
53
] | |
2024-11-18T20:50:27.758247+00:00 | 1,624,569,608,000 | 5d97d8a849f8d62ee378fc1970354a3a9fad665f | 3 | {
"blob_id": "5d97d8a849f8d62ee378fc1970354a3a9fad665f",
"branch_name": "refs/heads/main",
"committer_date": 1624569608000,
"content_id": "d464ba35286430c56a10f1bfb894d5bfde0a2e16",
"detected_licenses": [
"MIT"
],
"directory_id": "50b993f1bb528994246476aec71ed804d0c98129",
"extension": "py",
"file... | 2.546875 | stackv2 | from data import DATABASE_FILE, TABLES, BASE_URL
import sqlite3
import jinja2
import requests
import gzip
import io
import csv
from pathlib import Path
schema_template_loader = jinja2.FileSystemLoader('data/templates/schema')
schema_template_env = jinja2.Environment(loader=schema_template_loader)
data_access_template_... | 265 | 41.31 | 133 | 21 | 2,305 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_262f2f09b3c92b17_b491c2eb", "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."
] | [
11,
13
] | [
null,
null
] | [
23,
28
] | [
72,
82
] | |
2024-11-18T20:50:31.741696+00:00 | 1,559,481,653,000 | 694d36af4d5539ad08fc449147f22882a451c909 | 3 | {
"blob_id": "694d36af4d5539ad08fc449147f22882a451c909",
"branch_name": "refs/heads/master",
"committer_date": 1559481653000,
"content_id": "cfe4413d9b69b6786ec3c4c3e9457d0ec26246a9",
"detected_licenses": [
"MIT"
],
"directory_id": "b24dd9e7588f919047d1563a80cba02c080491c0",
"extension": "py",
"fi... | 3.0625 | stackv2 | import xlwings as xw
import requests
from aruba import Config, switch
def vlans(data):
"""Enumera las VLANs del switch"""
# Obtengo el workbook, las coordenadas y la dirección IP del servidor API
wb, row, col, api_host = splitExcel(data)
# Y ahora, obtengo los datos del switch
with switch.sessio... | 52 | 36.67 | 105 | 16 | 525 | python | [{"finding_id": "codeql_py/request-without-cert-validation_8e0a452d2e42ed9f_700a2393", "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)."
] | [
14
] | [
null
] | [
17
] | [
98
] | |
2024-11-18T20:50:45.586032+00:00 | 1,589,042,754,000 | 941d0f815a7d7589e6dda645bc2634837eb58dfc | 2 | {
"blob_id": "941d0f815a7d7589e6dda645bc2634837eb58dfc",
"branch_name": "refs/heads/master",
"committer_date": 1589042754000,
"content_id": "454d634ba1271872982246d2fcf6867da6622975",
"detected_licenses": [
"MIT"
],
"directory_id": "e89538c8d1265b545c4cf3fad1aea565139f81c2",
"extension": "py",
"fi... | 2.328125 | stackv2 | import time
import subprocess
import os
from django.http import HttpResponse
from django.utils import simplejson
from PIL import Image
from fileupload.models import Picture
import thirdparty.ccv_dropbox as ccvdb
from log import logger
""" OLD CODE. REMOVE LATER
def run_executable(list, fi):
try:
fi.wri... | 168 | 29.99 | 123 | 18 | 1,193 | python | [{"finding_id": "codeql_py/overly-permissive-file_5a9f21bd1575f803_97edc4ee", "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."
] | [
72
] | [
null
] | [
9
] | [
34
] | |
2024-11-18T20:51:16.179991+00:00 | 1,372,499,170,000 | 725ffd9c3c46ee3daa59e6689f12907daa57df4a | 3 | {
"blob_id": "725ffd9c3c46ee3daa59e6689f12907daa57df4a",
"branch_name": "refs/heads/master",
"committer_date": 1372499170000,
"content_id": "9b4e3db6438da5c13384717a5dc6bce50a034145",
"detected_licenses": [
"MIT"
],
"directory_id": "514214473160c74e4e16899c52668d97b00e029b",
"extension": "py",
"fi... | 2.90625 | stackv2 | import os
import logging
logger = logging.getLogger(__name__)
class DropboxTokenStorage:
def load(self):
pass
def save(self, token):
pass
def remove(self):
pass
class FileStorage(DropboxTokenStorage):
def __init__(self, tokenfile):
self.TOKEN_FILE = tokenfile
d... | 54 | 27.11 | 83 | 15 | 326 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_3bceeb2d8dae99b0_b4bcb1cf", "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.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text."
] | [
41
] | [
null
] | [
30
] | [
53
] | |
2024-11-18T21:13:46.780965+00:00 | 1,561,291,282,000 | a0e7bf948a6ee016fe37a573e27809920316d02b | 2 | {
"blob_id": "a0e7bf948a6ee016fe37a573e27809920316d02b",
"branch_name": "refs/heads/master",
"committer_date": 1561291282000,
"content_id": "bed2672cdce8ac8a74832b8944ab69446061d782",
"detected_licenses": [
"MIT"
],
"directory_id": "d97fea523d41713d5ba01939d9cd2cc6f8d48c52",
"extension": "py",
"fi... | 2.3125 | stackv2 | """
Client application using Kivy.
"""
__author__ = 'Tiziano Bettio'
__license__ = 'MIT'
__version__ = '0.1'
__copyright__ = """Copyright (c) 2019 Tiziano Bettio
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
i... | 197 | 31.03 | 80 | 17 | 1,483 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_b15dc654a6c0cca4_87ffe1bc", "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 (SHA3512) that is i... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA3512) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
110
] | [
null
] | [
19
] | [
38
] | |
2024-11-18T21:13:54.793802+00:00 | 1,598,945,864,000 | 386cb7c330c8920598f2a84a42fb1c5d9226e41b | 3 | {
"blob_id": "386cb7c330c8920598f2a84a42fb1c5d9226e41b",
"branch_name": "refs/heads/master",
"committer_date": 1598945864000,
"content_id": "b977b2eccacb8f74bb41e3953b7efdc879029e5f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c2cfd6f41f0a2713340bd15286175950fbe619fc",
"extension": "py"... | 2.875 | stackv2 | import os
import subprocess
class View:
def __init__(self, error_message=None):
self.__error_message = error_message
@property
def error_message(self):
return self.__error_message
@error_message.setter
def error_message(self, value):
self.__error_message = value
def ... | 217 | 46.69 | 136 | 27 | 2,614 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8a628e0c35bf0de7_29d67b3f", "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."
] | [
85
] | [
null
] | [
15
] | [
61
] | |
2024-11-18T21:14:02.750768+00:00 | 1,518,455,670,000 | 3bf28a476ed91be4fbeb3acb3cb635a55bb5f06c | 3 | {
"blob_id": "3bf28a476ed91be4fbeb3acb3cb635a55bb5f06c",
"branch_name": "refs/heads/master",
"committer_date": 1518455670000,
"content_id": "e0b57dda50d1d4b5a84a5fbe7577876f8c35dd9d",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "1a4665edc197ba63d094aca8258e63f8b077a8b2",
"extension": "p... | 2.734375 | stackv2 | from anytree import Node, LevelOrderGroupIter
import argparse
from distutils import spawn
from subprocess import call
from os import path, listdir
import logging
from pathos.multiprocessing import ProcessingPool as Pool
from pathos.multiprocessing import cpu_count
import atexit
logging.basicConfig(level=logging.INFO)... | 229 | 39.46 | 139 | 15 | 1,954 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c0b3bbde7a18a56c_81142d6f", "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.\nThis expression logs [sensitive data (password)](4) as clear text."
] | [
184
] | [
null
] | [
21
] | [
92
] | |
2024-11-18T21:14:06.882820+00:00 | 1,662,566,907,000 | bcd05e83f78d9921babc1fbdd696070b2f06779a | 2 | {
"blob_id": "bcd05e83f78d9921babc1fbdd696070b2f06779a",
"branch_name": "refs/heads/master",
"committer_date": 1662566907000,
"content_id": "ec8cb6e5b391386a4aa3ec3d1e87c8c25f9b992d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "72e5f702d377653df67bdb4400c10121b7528e7d",
"extension": "py"... | 2.46875 | stackv2 | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 216 | 31.4 | 84 | 18 | 1,663 | python | [{"finding_id": "codeql_py/stack-trace-exposure_148acaa04be72ffc_58d3b22d", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-215"
] | [
"py/stack-trace-exposure",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
112,
216
] | [
null,
null
] | [
17,
5
] | [
48,
80
] | |
2024-11-18T21:14:19.119531+00:00 | 1,605,991,208,000 | 3045b82f5eb4e2b26ffd9d587544d10ac2c291f1 | 3 | {
"blob_id": "3045b82f5eb4e2b26ffd9d587544d10ac2c291f1",
"branch_name": "refs/heads/main",
"committer_date": 1605991208000,
"content_id": "0c64aa4d44b26ce240aae88fe9ff36b6cd26070e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "672ed50dcf2234edde343680cc590e69d275e493",
"extension": "py"... | 2.765625 | stackv2 | # coding=utf-8
""" Export tools for visualization, reporting and re-usability.
"""
import os
from jinja2 import Template
HERE = os.path.abspath(__file__)
def _template_path(template):
return os.path.join(HERE, '..', 'evaluation', 'templates', template)
def render_simple(results, template):
return Template(... | 50 | 23.58 | 72 | 12 | 265 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4da023e7ba9e4cbb_20678ad0", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
15,
42
] | [
null,
null
] | [
12,
16
] | [
46,
34
] | |
2024-11-18T21:14:19.226153+00:00 | 1,604,937,277,000 | 96dfb791bd645179b38d620ef2cedf6ab25ac2c4 | 3 | {
"blob_id": "96dfb791bd645179b38d620ef2cedf6ab25ac2c4",
"branch_name": "refs/heads/master",
"committer_date": 1604937277000,
"content_id": "bba4e12b45cae9d604dfe1a271ae780d21a1f307",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d72a5df05c3d86c7f5c81776b5fac199ca6b9af0",
"extension": "py"... | 2.59375 | stackv2 | import sys
import os
import json
import requests
def refresh_token(hostname, current_info, credentials_file):
global oauth_token
url = "{0}/SASLogon/oauth/token".format(hostname)
headers = {
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "application/json"
}
data = ... | 63 | 35.11 | 98 | 14 | 492 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e2b9dd007a838707_f3fad688", "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)."
] | [
19,
55
] | [
null,
56
] | [
16,
16
] | [
87,
99
] | |
2024-11-18T20:10:31.882527+00:00 | 1,541,538,152,000 | a07d8a80e248f58001ff7474520520fd01e512ac | 2 | {
"blob_id": "a07d8a80e248f58001ff7474520520fd01e512ac",
"branch_name": "refs/heads/master",
"committer_date": 1541538152000,
"content_id": "4e16c171ccb2c539b10222849a3aa31c55ed883e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "610fce0bb2a5aa441c5f76ce5f430c92936b4389",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# clamavmirror.py
# Copyright (C) 2015 Andrew Colin Kissa <andrew@topdog.za.net>
# vim: ai ts=4 sts=4 et sw=4
"""ClamAV Signature Mirroring Tool
Why
---
The existing clamdownloader.pl script does not have any error
correction it simply bails out if a downloaded file is n... | 442 | 29.37 | 79 | 19 | 3,321 | python | [{"finding_id": "codeql_py/overly-permissive-file_a51a4968719b8b90_50aac853", "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."
] | [
153
] | [
null
] | [
5
] | [
26
] | |
2024-11-18T20:10:32.213675+00:00 | 1,546,085,665,000 | cfa613a20d19c6985e23f26a089776bf9e4e34ef | 4 | {
"blob_id": "cfa613a20d19c6985e23f26a089776bf9e4e34ef",
"branch_name": "refs/heads/master",
"committer_date": 1546085665000,
"content_id": "7539fd391f5a1445aebda3962d09e9f90474057b",
"detected_licenses": [
"MIT"
],
"directory_id": "b4c16d9139acc1c896126ba29cdb8b28b578bea9",
"extension": "py",
"fi... | 3.515625 | stackv2 | import tarfile
import zipfile
from tempfile import TemporaryDirectory
import os.path as path
def convert_file(tar_name):
"""Converts one tar file of the name tar_name into zip file with the same
basename. The function returns a string 'OK' on success or string describing
conversion problem in case of a fai... | 48 | 40.58 | 80 | 15 | 457 | python | [{"finding_id": "codeql_py/tarslip_9fad7f52ba65f7cc_bbf859d0", "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)."
] | [
20
] | [
null
] | [
9
] | [
14
] | |
2024-11-18T20:10:33.455723+00:00 | 1,584,334,848,000 | 2bab49c8baa96dd2a6e06f9eb63873b411cdfdb4 | 2 | {
"blob_id": "2bab49c8baa96dd2a6e06f9eb63873b411cdfdb4",
"branch_name": "refs/heads/master",
"committer_date": 1584334848000,
"content_id": "52a63215361627d03ece7933c83773b8242fa358",
"detected_licenses": [
"MIT"
],
"directory_id": "147697fa3eb861c9db509415af7c31a2f6da315c",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
import hashlib
import time
import datetime
from urllib.parse import quote
from optionaldict import optionaldict
from wechatpy.utils import to_binary
from wechatpy.client.api.base import BaseWeChatAPI
class WeChatCustomService(BaseWeChatAPI):
def add_account(self, account, nickname, pass... | 236 | 27.25 | 79 | 15 | 1,932 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a2a92e7ee526e417_2c3ef0b7", "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... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally exp... | [
27,
49
] | [
null,
null
] | [
32,
32
] | [
40,
40
] | |
2024-11-18T20:10:38.003224+00:00 | 1,688,547,538,000 | c33b4a3ca739dc4d7b41f04adca76032b7812402 | 2 | {
"blob_id": "c33b4a3ca739dc4d7b41f04adca76032b7812402",
"branch_name": "refs/heads/main",
"committer_date": 1688547538000,
"content_id": "f728932cfd05a38ce13cd0f02d1d1cbcffbc59f2",
"detected_licenses": [
"MIT"
],
"directory_id": "735aa6cf5c1bbe85bd2984248457c55718614a6e",
"extension": "py",
"file... | 2.5 | stackv2 | import re, bs4
import json
from project.server.main.parsers.strings import get_clean_text, get_orcid, get_doi
# doi 10.1155
def parse_hindawi(soup, doi):
res = {"doi": doi}
res.update(parse_authors(soup))
res.update(parse_abstract(soup))
res.update(parse_references(soup))
return res
def parse_aut... | 173 | 29.84 | 97 | 21 | 1,280 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_8bedcae66d2e0a44_73eb350f", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [doi.org](1) may be at an arbitrary position in the san... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [doi.org](1) may be at an arbitrary position in the sanitized URL."
] | [
158
] | [
null
] | [
24
] | [
65
] | |
2024-11-18T20:10:42.245599+00:00 | 1,387,818,721,000 | 617d2580603b4d0b5dbaa4879acae692ff708712 | 3 | {
"blob_id": "617d2580603b4d0b5dbaa4879acae692ff708712",
"branch_name": "refs/heads/master",
"committer_date": 1387818721000,
"content_id": "08f85da5981955c56eed2232939799a84cf690da",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "70bba25c641945a10110d254b965ab935c8e30e9",
"extension": "p... | 2.71875 | stackv2 | """
The API blueprint.
We expose:
* CRUD for datasets::
GET /dataset -> list all the datasets
GET /dataset/<id> -> get the specific dataset
POST /dataset -> create a new dataset
PUT /dataset/<id> -> update a dataset
DELETE /dataset/<id> -> delete a dataset
GET /dataset/<id>/resources ->... | 156 | 23.83 | 74 | 11 | 922 | python | [{"finding_id": "codeql_py/reflective-xss_ecaf04ea54214453_39e42ede", "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)."
] | [
120,
130
] | [
null,
null
] | [
12,
12
] | [
52,
50
] | |
2024-11-18T20:10:48.736882+00:00 | 1,455,615,343,000 | f8c945315684929bb51ce3d4ae20b20d3979e56a | 2 | {
"blob_id": "f8c945315684929bb51ce3d4ae20b20d3979e56a",
"branch_name": "refs/heads/master",
"committer_date": 1455615343000,
"content_id": "624a03cd410bd1c65c7cf59f48ed8727bef513ae",
"detected_licenses": [
"MIT"
],
"directory_id": "af50c2b669562d9384d084417fb0352ce87c2423",
"extension": "py",
"fi... | 2.484375 | stackv2 | import datetime, os
import urllib, urllib2, base64
import xml.etree.ElementTree as ET
class CampusNetDrop():
def __init__(self):
# self.dirname, self.filename = os.path.split(os.path.abspath(__file__))
self.dirname="."
self.log = None
self.dl = None
def setLogTable(self,logTable):
self.log = logTable
se... | 237 | 30.47 | 126 | 28 | 2,046 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_543e0656fb455fdd_ca8d931d", "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."
] | [
50
] | [
null
] | [
14
] | [
29
] | |
2024-11-18T20:10:59.970022+00:00 | 1,513,932,763,000 | 9e799569ff814740f90a03fcee94ace72f9f3721 | 3 | {
"blob_id": "9e799569ff814740f90a03fcee94ace72f9f3721",
"branch_name": "refs/heads/master",
"committer_date": 1513932763000,
"content_id": "9b76a41cc366dd7f28a1ad5991236d8bce618909",
"detected_licenses": [
"MIT"
],
"directory_id": "30692dbd9621f1f61a2cac063ba2b9cd1d571a55",
"extension": "py",
"fi... | 2.984375 | stackv2 | # encoding=utf-8
import time
import base64
import socket
import hashlib
import threading
import json
import rsa
import MyQR.myqr as qr
class User(object):
def __init__(self):
self.username = 'test1234'
self.passwd = 'Abcd@1234'
self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
... | 121 | 27.02 | 87 | 18 | 878 | python | [{"finding_id": "codeql_py/weak-crypto-key_9753106f1b9b3a60_d1149cff", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [512](1) bits, which is below 2048 and considered breakable.", "remediation": "", ... | 2 | true | [
"CWE-326",
"CWE-327"
] | [
"py/weak-crypto-key",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Creation of an RSA key uses [512](1) bits, which is below 2048 and considered breakable.",
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (id)](2) is used in a hashing algorith... | [
44,
60
] | [
null,
null
] | [
27,
29
] | [
43,
31
] | |
2024-11-18T20:48:09.088236+00:00 | 1,556,045,388,000 | ae08b1ea0529e732649eabb7390d604a68578e1a | 3 | {
"blob_id": "ae08b1ea0529e732649eabb7390d604a68578e1a",
"branch_name": "refs/heads/master",
"committer_date": 1556045388000,
"content_id": "bc33fca10eb7264b5022800e52f8d502d82d4393",
"detected_licenses": [
"MIT"
],
"directory_id": "c56955265b2fe0c5b6c554317aaf2e135038ca5a",
"extension": "py",
"fi... | 2.703125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 14 18:18:33 2018
Reads a base64 image file and returns output as json using Google Vision
Submits the request to Vision using curl downloaded from https://curl.haxx.se/windows/
see https://cloud.google.com/vision/docs/using-curl
example call:
curl -v -s -H "Content-Type:... | 157 | 24.89 | 165 | 15 | 1,060 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f7df093d38951296_93cfdbe9", "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."
] | [
38
] | [
null
] | [
11
] | [
17
] | |
2024-11-18T20:48:29.002575+00:00 | 1,584,498,071,000 | c39c41b35d67143ef3ecb5a1c1dc5dbc4b7ed1e0 | 2 | {
"blob_id": "c39c41b35d67143ef3ecb5a1c1dc5dbc4b7ed1e0",
"branch_name": "refs/heads/master",
"committer_date": 1584498071000,
"content_id": "bed8ff5d2e935b8731305da6f447c91bf176f755",
"detected_licenses": [
"MIT"
],
"directory_id": "5b8bcae34a16438b315030f1fa3c7841918f2135",
"extension": "py",
"fi... | 2.46875 | stackv2 | # NoseTestGenerator.py - Creates nose tests for a model API
import os
from jinja2 import Environment, Template, FileSystemLoader
from smoacks.sconfig import sconfig
from smoacks.AppObject import scr_objects
class NoseTestGenerator:
def __init__(self, app_object):
self._app_object = app_object
self.... | 91 | 50.74 | 137 | 26 | 994 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ee42ff241edf755b_cc0f3604", "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."
] | [
83
] | [
85
] | [
15
] | [
10
] | |
2024-11-18T20:48:31.601935+00:00 | 1,542,269,582,000 | 45820554c561cc7774c66bccc7d0aac6eece1b9e | 3 | {
"blob_id": "45820554c561cc7774c66bccc7d0aac6eece1b9e",
"branch_name": "refs/heads/master",
"committer_date": 1542269582000,
"content_id": "8d1aeca79fbc267c581f9e2964c27fcafcef2dde",
"detected_licenses": [
"MIT"
],
"directory_id": "1d588c6effa8c83e97d651f561a3f3eee6e76af8",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/python
import os.path
import json
import datetime
from pathlib import Path
from app.config import Config
from app.db import DB
from flask import Flask, render_template, request
class Weatherman:
config = Config()
db = DB()
def __init__(self, port=80):
self.port = port
def init(sel... | 86 | 26.36 | 80 | 20 | 492 | python | [{"finding_id": "codeql_py/flask-debug_119495657c15e3b2_b1bbd987", "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)."
] | [
81,
75
] | [
null,
null
] | [
13,
31
] | [
48,
52
] | |
2024-11-18T20:48:33.743100+00:00 | 1,607,958,106,000 | 9ffa48ec0e09a7bc70298399aa0e6d5fbcf5a4ea | 2 | {
"blob_id": "9ffa48ec0e09a7bc70298399aa0e6d5fbcf5a4ea",
"branch_name": "refs/heads/master",
"committer_date": 1607958106000,
"content_id": "ae0c2549f25d18de394ab67f36393a8ba3156089",
"detected_licenses": [
"MIT"
],
"directory_id": "ed20352ee1e92bb220340ba47dd81e74e7818f0a",
"extension": "py",
"fi... | 2.421875 | stackv2 | import argparse
import sys
from subprocess import Popen, PIPE
from time import time
import os
import fileinput
import json
import urllib2
import config
import meme_util
def run_tomtom(meme, outdir, central=True, th=0.05, minovlp=1, evalue=False):
args = [
config.tomtom,
'-oc', outdir,
'-png',
'-min-overlap',... | 109 | 24.46 | 88 | 14 | 815 | python | [{"finding_id": "codeql_py/overly-permissive-file_c0cfb013cf97a917_be5d7487", "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": ... | 4 | true | [
"CWE-732",
"CWE-732",
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file",
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable."
] | [
32,
34,
50,
85
] | [
null,
null,
null,
null
] | [
4,
4,
2,
2
] | [
42,
42,
27,
30
] | |
2024-11-18T21:11:27.541947+00:00 | 1,524,753,740,000 | 012c6c43849385fa53c75cd682548ed2e07703fa | 3 | {
"blob_id": "012c6c43849385fa53c75cd682548ed2e07703fa",
"branch_name": "refs/heads/master",
"committer_date": 1524753740000,
"content_id": "7b163d47e35541d1b9d353816aeff247469e0b52",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2842ae9fa800b3b8feef4a0e3d9a019d733ce993",
"extension": "p... | 2.953125 | stackv2 | from urllib.parse import urlparse
import logging
import os
import requests
import tarfile
import urllib.request
import zipfile
import random
import torch
from tqdm import tqdm
from torchnlp.text_encoders import PADDING_INDEX
logger = logging.getLogger(__name__)
def sampler_to_iterator(dataset, sampler):
""" ... | 342 | 31.92 | 105 | 18 | 2,549 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_43d8c320202b0ff3_0b53be2a", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [drive.google.com](1) may be at an arbitrary position i... | 2 | true | [
"CWE-020",
"CWE-022"
] | [
"py/incomplete-url-substring-sanitization",
"py/tarslip"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [drive.google.com](1) may be at an arbitrary position in the sanitized URL.",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
264,
294
] | [
null,
null
] | [
8,
13
] | [
38,
16
] | |
2024-11-18T21:11:43.999725+00:00 | 1,597,812,658,000 | 989a35e29c38c38af5327bf6578ad32841963678 | 3 | {
"blob_id": "989a35e29c38c38af5327bf6578ad32841963678",
"branch_name": "refs/heads/master",
"committer_date": 1597812658000,
"content_id": "ba260745a44f5d67b0d6da4d4579c888b2131fd7",
"detected_licenses": [
"MIT"
],
"directory_id": "6e00dfe7a8298e1e4b16e104a1fadb624f3c7157",
"extension": "py",
"fi... | 2.671875 | stackv2 | from django.db import models
from django.core.validators import MinLengthValidator, MaxLengthValidator, EmailValidator, MinValueValidator, MaxValueValidator
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin
from datetime import datetime
# Create your models here.
# Manager
clas... | 262 | 23.72 | 127 | 14 | 1,382 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d8efa8e543d0cea4_c0b5065b", "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."
] | [
45
] | [
null
] | [
15
] | [
23
] | |
2024-11-18T21:11:44.909682+00:00 | 1,675,070,046,000 | df873a83156fc105f34704dbdc68d6a46fc04f0f | 2 | {
"blob_id": "df873a83156fc105f34704dbdc68d6a46fc04f0f",
"branch_name": "refs/heads/master",
"committer_date": 1675070046000,
"content_id": "649cb93d458b2831e7499826edd81891dc83c75d",
"detected_licenses": [
"MIT"
],
"directory_id": "ed40567ed87c9e1213006be5d824345f99510cca",
"extension": "py",
"fi... | 2.484375 | stackv2 | from flask import Flask, render_template, flash, request, redirect, url_for, Markup
from wtforms import Form, TextAreaField, StringField
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager, login_user
login_manager = LoginManager()
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = ... | 94 | 28.64 | 92 | 15 | 554 | python | [{"finding_id": "codeql_py/url-redirection_a27fd0dd5da1e180_30921df3", "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)."
] | [
87
] | [
null
] | [
25
] | [
76
] | |
2024-11-18T21:26:03.548323+00:00 | 1,555,401,733,000 | 8492ed81817f3cc1ba89bc4032413ef9fc3c5e09 | 3 | {
"blob_id": "8492ed81817f3cc1ba89bc4032413ef9fc3c5e09",
"branch_name": "refs/heads/master",
"committer_date": 1555401733000,
"content_id": "f35875db1e30ab2dda03160907da1abc55d813b3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bddbd82f57d24b171594b307fd9aaf91c97a6766",
"extension": "py"... | 3.109375 | stackv2 | # coding: utf-8
"""
Object render library.
Since in theory every substate can be written in a different way,
at the end it should return just a YAML structure.
"""
import os
from abc import ABCMeta, abstractmethod
import jinja2
import sugar.lib.exceptions
class BaseRenderer(metaclass=ABCMeta):
"""
Basic rend... | 86 | 22 | 116 | 12 | 455 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_68c549cf4c5252c1_15fdfd0f", "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."
] | [
56
] | [
null
] | [
16
] | [
37
] | |
2024-11-18T21:51:46.863687+00:00 | 1,503,843,122,000 | eb25d3b4636209fdfe6a2740b877de3b22838c36 | 3 | {
"blob_id": "eb25d3b4636209fdfe6a2740b877de3b22838c36",
"branch_name": "refs/heads/master",
"committer_date": 1503843122000,
"content_id": "0b53b671a169494fdcfccb0d7d8cba35416aaab6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "aaffd5267cf055d91b75c4c7e5f3e060cb42a3e2",
"extension": "py"... | 3.21875 | stackv2 | from FileManagement.interface_filehandler import *
# Brendan
import pickle
import os
import sys
import math
# kate
import re
from datetime import *
# Kris Little design
class FileHandler(IFileHandler):
def __init__(self):
self.valid = True
# Kris
def load_file(self, file):
# put error han... | 227 | 32.68 | 111 | 21 | 1,704 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f42c4f1b3cc310fb_e73b40ff", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
59,
62,
74
] | [
null,
null,
null
] | [
19,
23,
15
] | [
28,
29,
21
] | |
2024-11-18T21:52:16.224477+00:00 | 1,557,923,809,000 | d9217e25991f978a5842ff2b3334a464352c7f6e | 3 | {
"blob_id": "d9217e25991f978a5842ff2b3334a464352c7f6e",
"branch_name": "refs/heads/master",
"committer_date": 1557923809000,
"content_id": "d5e808af1d2717655d71578731704dc97a8c6189",
"detected_licenses": [
"MIT"
],
"directory_id": "5505259502f5a218117e8bb3a52c0a922abeb924",
"extension": "py",
"fi... | 2.65625 | stackv2 | # Pezhman Shafigh
# PORT KNOKING daily secret generator Python
from datetime import datetime, date, timedelta
Salt=456
SaltPort=30
MainPort=10000
time = datetime.now()
ymd = (str(time)[:10])
year = int(ymd[:4])
month = int(ymd[5:7])
day = int(ymd[8:10])
if day < 15:
newPassword = (year - day - month + Salt)
else... | 24 | 23.58 | 91 | 11 | 211 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d9aa2964b0d2e1e3_976396fa", "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."
] | [
23
] | [
null
] | [
7
] | [
18
] | |
2024-11-18T21:52:22.674588+00:00 | 1,693,420,850,000 | a31e2d59db1716516ad2128cc3e44904d375203c | 2 | {
"blob_id": "a31e2d59db1716516ad2128cc3e44904d375203c",
"branch_name": "refs/heads/master",
"committer_date": 1693420850000,
"content_id": "9b3d2227e5f073ac8f17d92db45d2f52d8203690",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1a6af3dae05e649f7106b4c487dc48b7bf2ee06d",
"extension": "py"... | 2.34375 | stackv2 | import requests
from bs4 import BeautifulSoup
import os
import re
def get_mt_samples(medical_speciality="", path = ".", n = None):
"""
Download Transcribed Medical Transcription Sample Reports and Examples from
'www.mtsamples.com'.
## Parameters
Medical_Speciality: str
One of the followin... | 107 | 32.98 | 147 | 16 | 925 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_aeaf62f498847b1a_a1a47e7e", "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."
] | [
107
] | [
null
] | [
11
] | [
100
] | |
2024-11-18T21:52:30.782765+00:00 | 1,591,185,167,000 | 5201dfe0974191f59500e5632ae53caa071d918d | 3 | {
"blob_id": "5201dfe0974191f59500e5632ae53caa071d918d",
"branch_name": "refs/heads/master",
"committer_date": 1591185167000,
"content_id": "da43eb35c037e65d1e5a83ad74f472541d5bb2e0",
"detected_licenses": [
"MIT"
],
"directory_id": "528678a3bbfadd0624b199dc77cf1e8afb950115",
"extension": "py",
"fi... | 2.921875 | stackv2 | # -*- coding: utf-8 -*-
"""Example Google style docstrings.
This module demonstrates documentation as specified by the `Google Python
Style Guide`_. Docstrings may extend over multiple lines. Sections are created
with a section header and a colon followed by a block of indented text.
Example:
Examples can be give... | 115 | 34.28 | 152 | 14 | 840 | python | [{"finding_id": "codeql_py/request-without-cert-validation_bc42d07fcfb2088b_e776a68f", "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)."
] | [
110,
113
] | [
null,
null
] | [
16,
20
] | [
76,
81
] | |
2024-11-18T21:52:35.620854+00:00 | 1,398,832,649,000 | eef95a3fb4ec441fe4d21653256cbdaccbba6a11 | 2 | {
"blob_id": "eef95a3fb4ec441fe4d21653256cbdaccbba6a11",
"branch_name": "refs/heads/master",
"committer_date": 1398832649000,
"content_id": "9929d166341fb731a84fdfe4c6bcce3c41f4767d",
"detected_licenses": [
"MIT"
],
"directory_id": "a1276f718efc4b147cf9086a3b31cc1ce1402716",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
import urllib
import requests
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
class RefreshWork:
def __init__(self, proxies=None):
self.login_url = "http://3g.51job.com/my/login.php"
self.refresh_url = "http://3g.51job.com/my/refreshresume.php"
s... | 102 | 36.22 | 129 | 14 | 914 | python | [{"finding_id": "codeql_py/request-without-cert-validation_71019ed2b95e79ad_18c6ac4e", "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)."
] | [
62
] | [
null
] | [
23
] | [
119
] | |
2024-11-18T20:31:25.551908+00:00 | 1,476,846,779,000 | d455276a2a34328933df1dcd61c9b8cd3896c878 | 3 | {
"blob_id": "d455276a2a34328933df1dcd61c9b8cd3896c878",
"branch_name": "refs/heads/master",
"committer_date": 1476846785000,
"content_id": "20e8dc0d19f25eb7bd0d3fbbc599f6898a0b48c4",
"detected_licenses": [
"MIT"
],
"directory_id": "a72060cda2ee5bf5d62ea085577906c31fc4dc53",
"extension": "py",
"fi... | 2.515625 | stackv2 | import urllib
import re
import email
import wave
src = urllib.urlopen('http://butter:fly@www.pythonchallenge.com/pc/hex/bin.html').read()
text = re.compile('<!--((?:[^-]+|-[^-]|--[^>])*)-->').findall(src)[0]
msg = email.message_from_string(text[1:])
for index, part in enumerate(msg.walk()):
if part.get_content_type... | 26 | 27.23 | 88 | 12 | 227 | python | [{"finding_id": "codeql_py/redos_f05072358b640a1b_bc3e7556", "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 repetit... | 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 ','."
] | [
7
] | [
null
] | [
28
] | [
33
] | |
2024-11-18T21:10:27.151703+00:00 | 1,618,990,822,000 | b319c87a0a89c822c56ca08cfa03a9bedee16917 | 3 | {
"blob_id": "b319c87a0a89c822c56ca08cfa03a9bedee16917",
"branch_name": "refs/heads/master",
"committer_date": 1618990822000,
"content_id": "f64596993d49c4906c2e29732698ca3db6f900ce",
"detected_licenses": [
"MIT"
],
"directory_id": "ddd56847ad5ddf41d7358eb549abe28674c2dee0",
"extension": "py",
"fi... | 2.84375 | stackv2 | #!/usr/bin/python3
import os
import sys
import json
import unicodedata
import re
import textwrap
import pytz
from urllib.request import urlopen
from jinja2 import Template
from datetime import datetime
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
DIR = os.path.dirname(os.path.abspath(__file__))
... | 165 | 27.12 | 78 | 12 | 1,121 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_8b770cbdbdfe817b_be0b6342", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
61
] | [
null
] | [
16
] | [
34
] | |
2024-11-18T21:10:47.895546+00:00 | 1,527,653,312,000 | 35b2757a04f00b19dcf7947e99ca1fc624748ae3 | 3 | {
"blob_id": "35b2757a04f00b19dcf7947e99ca1fc624748ae3",
"branch_name": "refs/heads/master",
"committer_date": 1527653312000,
"content_id": "3d6eeb416d69beca29485005aa12dfd47b9de9c6",
"detected_licenses": [
"MIT"
],
"directory_id": "0564bb18c7c3e0363f016b1d244d8f131ce6d643",
"extension": "py",
"fi... | 2.59375 | stackv2 | import time
from time import sleep
import os
from flask import Flask, request, redirect
import logging
from smtplib import SMTP
from string import Template
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
import email
from email.mime.applicati... | 160 | 26.53 | 118 | 14 | 1,033 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f2d9cb4ab3fd4116_a9af84c7", "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... | 4 | true | [
"CWE-312",
"CWE-215",
"CWE-117",
"CWE-117"
] | [
"py/clear-text-logging-sensitive-data",
"py/flask-debug",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This log entry depends on a [user-provided value](1)."... | [
39,
159,
144,
147
] | [
null,
null,
null,
null
] | [
22,
5,
22,
26
] | [
66,
40,
74,
31
] | |
2024-11-18T21:23:32.011436+00:00 | 1,618,765,720,000 | 88ac40e7b1e1db9a7c088951447c0f7290946248 | 3 | {
"blob_id": "88ac40e7b1e1db9a7c088951447c0f7290946248",
"branch_name": "refs/heads/master",
"committer_date": 1618765720000,
"content_id": "99130b9fb8bbea246880b2c5e15dffe9e6e06205",
"detected_licenses": [
"MIT"
],
"directory_id": "4b70c708e1180980d29409029b9bd93d1b915753",
"extension": "py",
"fi... | 2.546875 | stackv2 | from paktmonitor import login_manager
import pymongo
import hashlib
class User:
database = pymongo.MongoClient()['paktmonitor']['users']
def __init__(self, username, session_id, password):
self.username = username
self.session_uuid = session_id
self.password = password
@staticmetho... | 44 | 28.75 | 77 | 20 | 258 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_4872e0194c036d2d_8c483e22", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational... | [
21,
34
] | [
null,
null
] | [
42,
48
] | [
59,
65
] | |
2024-11-18T21:23:38.023871+00:00 | 1,398,439,910,000 | dd3b6f20645868e23f02aaa14110a13639f026b9 | 3 | {
"blob_id": "dd3b6f20645868e23f02aaa14110a13639f026b9",
"branch_name": "refs/heads/master",
"committer_date": 1398439910000,
"content_id": "56e08c362fac8cad3f8cefb76a7828dde8a4ac0c",
"detected_licenses": [
"MIT"
],
"directory_id": "2d338ed33cb62b1a876d33c9daee7e0819c2fa28",
"extension": "py",
"fi... | 2.640625 | stackv2 | # encoding: utf8
import argparse
from Queue import Queue
import re
import socket
import sys
import threading
from time import sleep
from os import getpid
# ext. dependencies
from OpenSSL import SSL
def verify_cb(conn, cert, errnum, depth, ok):
return ok
class BindException(Exception):
'''Thrown when we can... | 373 | 27.61 | 113 | 22 | 2,439 | python | [{"finding_id": "codeql_py/insecure-protocol_3fdfd0390fba2eb7_af7c5b04", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version SSLv2 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol ve... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version SSLv2 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version SSLv3 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version TLSv1 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to SSL.Context](1)."
] | [
66
] | [
null
] | [
38
] | [
41
] | |
2024-11-18T21:23:51.013181+00:00 | 1,589,187,357,000 | 3ce020860aaae8e509c2604f3522f90152550110 | 3 | {
"blob_id": "3ce020860aaae8e509c2604f3522f90152550110",
"branch_name": "refs/heads/master",
"committer_date": 1589187357000,
"content_id": "e6af9c78faa9545b3b5201a307df487d3d7a7b48",
"detected_licenses": [
"BSD-4-Clause"
],
"directory_id": "9d1cc14b7690d3b6cfff89ddce5d86296310466d",
"extension": "p... | 2.65625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
joke_api /api/jokes blueprint
"""
import json
import logging
import sqlite3
import random
from flask import (
Blueprint, Response, request
)
from .db import get_db
from .api_shared import return_result, get_category_id_by_name
BP = Blueprint('api_jokes', __name__... | 301 | 28.04 | 78 | 18 | 1,985 | python | [{"finding_id": "codeql_py/log-injection_7de57a9a02586f92_e7c3d56b", "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... | 7 | true | [
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depen... | [
68,
78,
100,
163,
177,
198,
220
] | [
null,
null,
null,
null,
null,
null,
null
] | [
45,
45,
46,
39,
36,
36,
36
] | [
52,
54,
53,
46,
63,
43,
43
] | |
2024-11-18T21:23:56.610179+00:00 | 1,603,441,035,000 | d5cb1bf421cb495d396f1baa68b9f10fb9742ba0 | 2 | {
"blob_id": "d5cb1bf421cb495d396f1baa68b9f10fb9742ba0",
"branch_name": "refs/heads/master",
"committer_date": 1603441035000,
"content_id": "f5d09b70c2332a44c68a54fb845db0d105197b5c",
"detected_licenses": [
"MIT"
],
"directory_id": "e91a3413aed142b41abed662b5a2a6f02fc88962",
"extension": "py",
"fi... | 2.421875 | stackv2 | from django.shortcuts import render,redirect
from django.core.paginator import Paginator
from .models import Movies,Review,Profile,ProfileLikedMovie,ProfileDislikedMovie
from .forms import ReviewForm,UserForm
from django.views.generic import DetailView,ListView
from django.views import View
from django.urls import reve... | 239 | 44.55 | 147 | 15 | 2,348 | python | [{"finding_id": "codeql_py/url-redirection_5494a5b0c5e94e54_3326610d", "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)."
] | [
47
] | [
null
] | [
29
] | [
53
] | |
2024-11-18T21:37:17.805519+00:00 | 1,528,838,743,000 | 345d4524e25651b73aec72cafaccab0c5911c8f8 | 3 | {
"blob_id": "345d4524e25651b73aec72cafaccab0c5911c8f8",
"branch_name": "refs/heads/master",
"committer_date": 1528838743000,
"content_id": "9ab17f90eb97d1ba3ab68fe9f4200550ea1c22dc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "93fe5a40d48b0fea92b0e6a6b4dd297e15c6816b",
"extension": "py"... | 2.625 | stackv2 | import jinja2
TEMPLATES_PATH = ['catnado_docgen', 'templates']
# "singleton"
env_instance = None
def _jinja_finalize(output):
""" Provide a finalize function for Jinja that suppresses the output of `None`
Returns:
`output` or empty string (but not None)
"""
return output if output else ''
def get_j... | 52 | 22.19 | 80 | 14 | 274 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_13f034e0475a3454_af585b81", "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."
] | [
30
] | [
33
] | [
20
] | [
6
] | |
2024-11-18T21:58:59.640651+00:00 | 1,690,915,105,000 | 9e639ae88b02e04d5f923cac83b191b37de7cb27 | 3 | {
"blob_id": "9e639ae88b02e04d5f923cac83b191b37de7cb27",
"branch_name": "refs/heads/master",
"committer_date": 1690915105000,
"content_id": "b28fa526b222476bfd09eb60d65beba4d37e56df",
"detected_licenses": [
"MIT"
],
"directory_id": "69409f1579023ef560d812866f89faff70b867aa",
"extension": "py",
"fi... | 2.84375 | stackv2 | """
Development of Further Patterns of Enterprise Application Architecture
https://martinfowler.com/eaaDev/
https://martinfowler.com/eaaDev/EventSourcing.html
"""
import re
from mobify.source import MultiChapterSource, MobifySource
class MartinFowlerSource(MultiChapterSource):
BASE = 'https://martinfowler.com/e... | 51 | 24.45 | 74 | 13 | 302 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_c3a6b44d03a6021b_63003a5e", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [martinfowler.com](1) may be at an arbitrary position i... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [martinfowler.com](1) may be at an arbitrary position in the sanitized URL."
] | [
17
] | [
null
] | [
16
] | [
41
] | |
2024-11-18T21:59:20.870015+00:00 | 1,626,796,116,000 | 2a20c2107817423a9ff4176c2715470b601cf86d | 3 | {
"blob_id": "2a20c2107817423a9ff4176c2715470b601cf86d",
"branch_name": "refs/heads/main",
"committer_date": 1626796116000,
"content_id": "dd00eea9fade3286767c68158d93f6d7f5c0a28b",
"detected_licenses": [
"MIT"
],
"directory_id": "a803fd6a1f6359ca6716536853855beb329b2692",
"extension": "py",
"file... | 2.6875 | stackv2 | import socket
import subprocess
import ipaddress
import sqlite3
import paramiko
import time
import os
import re
# имя БД
db_name = "desc.db"
# пользователь для подключения по ssh
usr = 'someuser'
# пароль для подключения по ssh
pwd = open('pwd.txt', 'r').read()
# порт для подключения по ssh
port = 22
def ssh_comm... | 68 | 19.74 | 77 | 14 | 408 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_27b9131bd1c8c5bb_6847445c", "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
] | [
2
] | [
62
] | |
2024-11-18T22:24:00.644698+00:00 | 1,627,456,773,000 | f62ac728ea033c9dd54044e9ee35160ebd321633 | 3 | {
"blob_id": "f62ac728ea033c9dd54044e9ee35160ebd321633",
"branch_name": "refs/heads/main",
"committer_date": 1627456773000,
"content_id": "a0e5a87695e5a02f7f8c1b9f81e678038bd1f089",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "bbd2072136097e07ada9dcacfeee54b809ca0578",
"extension": "py",
"... | 3.25 | stackv2 | #!/usr/bin/env python3
import json
class JsonSerializable(object):
def toJson(self):
return json.dumps(self.__dict__)
def __repr__(self):
return self.toJson()
def __init__(self, data):
self.__dict__ = json.loads(data)
class Secret(JsonSerializable):
_name=None
_username=None
_password=None
... | 73 | 21.78 | 121 | 13 | 408 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_996e1b8a4d1d90ce_96259b8b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
68,
73
] | [
null,
null
] | [
7,
7
] | [
13,
13
] | |
2024-11-18T22:24:08.415041+00:00 | 1,684,850,378,000 | f39790d551c8ee9d35b09025b51791a2de26a748 | 3 | {
"blob_id": "f39790d551c8ee9d35b09025b51791a2de26a748",
"branch_name": "refs/heads/master",
"committer_date": 1684850378000,
"content_id": "eadf7e554ca89cfb71fde035350b6bcfa1f7e294",
"detected_licenses": [
"MIT"
],
"directory_id": "064c1b5b8116e940dd33d3a53f5d337e0673aa36",
"extension": "py",
"fi... | 2.546875 | stackv2 | from builtins import str, range
import random
import re
from sqlalchemy import desc, func
from .db import db
from .model import WordEntry, User
from .talker_exceptions import UserNotFoundException, UserHasntSpoken
# for each possible next word sampled from the crowd
# generate PERSONALITY_WEIGHT entries from the act... | 90 | 31.27 | 94 | 18 | 717 | python | [{"finding_id": "codeql_py/overly-large-range_90e53c6218d0b578_901aa7a3", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 2 | true | [
"CWE-020",
"CWE-1333"
] | [
"py/overly-large-range",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].",
"This part of the regular expression may cause exponential backtracking on strings starting with '<http://' and containing many repetitions of '('."
] | [
77,
77
] | [
null,
null
] | [
43,
24
] | [
46,
91
] | |
2024-11-18T22:24:20.363721+00:00 | 1,652,447,824,000 | becc33859b6225da6a02b4611c8c98665524b429 | 2 | {
"blob_id": "becc33859b6225da6a02b4611c8c98665524b429",
"branch_name": "refs/heads/master",
"committer_date": 1652447824000,
"content_id": "1f8bb445dacd4288a855a76fe7c10e3398eb5b1f",
"detected_licenses": [
"MIT"
],
"directory_id": "6b201605227f11880c1d32c9cad300f6e29ff4ae",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import email
import imaplib
import urllib
import requests
import time
import os
from os.path import expanduser
from time import gmtime, strftime
HOME = expanduser("~")
logtime = time.strftime('%d.%m.%Y - %H:%M:%S')
logmessage = logti... | 114 | 37.76 | 117 | 30 | 927 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_600c8c92d376c93c_1f7da71a", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [www.noip.com](1) may be at an arbitrary position in th... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [www.noip.com](1) may be at an arbitrary position in the sanitized URL."
] | [
89
] | [
null
] | [
52
] | [
74
] | |
2024-11-18T22:36:19.328198+00:00 | 1,557,039,417,000 | 113721be48c912d290711535cec6788a5e2d95bf | 3 | {
"blob_id": "113721be48c912d290711535cec6788a5e2d95bf",
"branch_name": "refs/heads/master",
"committer_date": 1557039417000,
"content_id": "1af6c8898c17fd553a7fc03273357ea9166b5c7b",
"detected_licenses": [
"MIT"
],
"directory_id": "c64bb7a6d3bafe5140e7bc04ae49366182601d0e",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import io
import base64
from flask import render_template
from flask import make_response
app = Flask(__name__)
@app.route('/test')
def plot():
x = list(range(1,100))
print(x)
y = [ i*2 fo... | 35 | 19 | 58 | 11 | 176 | python | [{"finding_id": "codeql_py/reflective-xss_526166f9f26d4059_62beed84", "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)."
] | [
32
] | [
null
] | [
12
] | [
59
] | |
2024-11-18T22:36:35.502124+00:00 | 1,624,809,635,000 | ec3eb086902d9013f6dd59ca6aa3a4fcc79165ba | 3 | {
"blob_id": "ec3eb086902d9013f6dd59ca6aa3a4fcc79165ba",
"branch_name": "refs/heads/main",
"committer_date": 1624809635000,
"content_id": "7a8186f4f0db8dea7d9341524cc76105c030cba0",
"detected_licenses": [
"MIT"
],
"directory_id": "2bc21de1b3204c677d2912f24a82ba473d90bcf1",
"extension": "py",
"file... | 2.875 | stackv2 | import json
import tkinter as tk
import os
from helpers import clear_screen
def render_login(screen: tk.Tk, on_success):
def on_click():
if login(username.get(), password.get()):
on_success(screen)
else:
tk.Label(screen, text="Invalid username or password", foreground="Red"... | 70 | 33 | 119 | 17 | 545 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f28a009f17d86bc0_ba80be92", "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."
] | [
39
] | [
null
] | [
20
] | [
64
] | |
2024-11-18T22:36:41.469910+00:00 | 1,684,067,102,000 | 012d43ac935da4bb243db4e997244bb199f05539 | 2 | {
"blob_id": "012d43ac935da4bb243db4e997244bb199f05539",
"branch_name": "refs/heads/master",
"committer_date": 1684067102000,
"content_id": "cbbcb58ea03b14571bf7038e0703110e1cc1211c",
"detected_licenses": [
"Unlicense"
],
"directory_id": "feea7915c7991693b2e66ad63d1cc427188193de",
"extension": "py",... | 2.40625 | stackv2 | __author__ = 'zheng'
import re
script = re.compile(r'<script.*?</script>', re.M | re.DOTALL)
def remove_adsense():
import urllib
url = "http://google-dictionary.so8848.com/meaning?word=maps"
f = urllib.urlopen(url)
content = f.read()
matches = script.finditer(content)
remove_list = []
fo... | 36 | 23.53 | 83 | 13 | 242 | python | [{"finding_id": "codeql_py/bad-tag-filter_610d3141a893013f_c002b5a0", "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."
] | [
5
] | [
null
] | [
23
] | [
42
] | |
2024-11-18T22:36:45.036613+00:00 | 1,646,803,299,000 | d659f00ca1c4476d65ff1eedd93eca40ede1ea95 | 3 | {
"blob_id": "d659f00ca1c4476d65ff1eedd93eca40ede1ea95",
"branch_name": "refs/heads/master",
"committer_date": 1646803299000,
"content_id": "3e5c7f81119928cdd9a95d278fd5e8fde481e3fa",
"detected_licenses": [
"MIT"
],
"directory_id": "8d166cbcf0f8a670791a58c72bfff6291506ec1e",
"extension": "py",
"fi... | 3.015625 | stackv2 | def hujambo():
print('''
##################################################
# Tool : url_opener #
# Version : 1.2 #
# Runs on : Windows #
# Source : https://github.com/pr2h/ #
# Coded with Python 3 ... | 231 | 34.74 | 151 | 22 | 1,854 | python | [{"finding_id": "codeql_py/request-without-cert-validation_565f6465ce2060dc_c2df660f", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
18
] | [
null
] | [
20
] | [
53
] | |
2024-11-18T20:23:27.860519+00:00 | 1,606,501,452,000 | 8569ebcc4f93fc1787aa0710750470c86d79fd71 | 3 | {
"blob_id": "8569ebcc4f93fc1787aa0710750470c86d79fd71",
"branch_name": "refs/heads/main",
"committer_date": 1606501452000,
"content_id": "9de869f32fbe3dddd60949f9555ffa80b0d73c06",
"detected_licenses": [
"MIT"
],
"directory_id": "e34b5fefe20e480b7f8716c53252ea262667d76a",
"extension": "py",
"file... | 2.71875 | stackv2 | '''
books_script.py will hit the google books API to collate the data necessary
to build some basic metrics about various searches
author: jowens
'''
import sys
import requests
import argparse
from dateutil.parser import parse
from datetime import date
from terminal_table import Table
from ansi_colours import AnsiCo... | 228 | 34.32 | 159 | 19 | 1,798 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0af5eed6a313ce64_4f52c22a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 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.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
43,
179,
214
] | [
null,
null,
null
] | [
22,
27,
11
] | [
44,
51,
59
] | |
2024-11-18T20:23:40.689315+00:00 | 1,524,144,658,000 | 82ed5abcacc51fd67d1c835aab270573cebc57c0 | 3 | {
"blob_id": "82ed5abcacc51fd67d1c835aab270573cebc57c0",
"branch_name": "refs/heads/master",
"committer_date": 1524144658000,
"content_id": "7982ed1a5573faa04dc80a131bc1ffc56eebc680",
"detected_licenses": [
"MIT"
],
"directory_id": "d0762e15949449ff1c927beab54b1be578c70e85",
"extension": "py",
"fi... | 3.0625 | stackv2 | """
:author: Josh Hills
Define the public entryway to the
microservice architecture.
"""
import flask
import shared.messaging
import shared.database
# Global fields
app = flask.Flask(__name__)
messaging = shared.messaging.RabbitMQMessaging()
database = shared.database.Couchbase()
# API
@app.route("/scrape/product/<... | 52 | 20.52 | 84 | 10 | 254 | python | [{"finding_id": "codeql_py/reflective-xss_bb25cdd36785006e_3e658e42", "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)."
] | [
46
] | [
null
] | [
18
] | [
30
] | |
2024-11-18T21:22:15.422716+00:00 | 1,322,752,491,000 | 00e83630371ed50693afe78fba4d750944cd60e6 | 3 | {
"blob_id": "00e83630371ed50693afe78fba4d750944cd60e6",
"branch_name": "refs/heads/master",
"committer_date": 1322752491000,
"content_id": "83928d617fb4de24ad9af40a246467f676fee340",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f6312080ec39f5d76a36db8a5be8e6afb2301178",
"extension": "p... | 2.859375 | stackv2 | #!/usr/bin/python
'''
Copyright (c) 2011, Peter Hajas
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of cond... | 117 | 38.88 | 113 | 13 | 1,010 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_6be907253c3251e4_c1c752e8", "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."
] | [
88
] | [
null
] | [
26
] | [
38
] | |
2024-11-18T21:22:35.806176+00:00 | 1,528,801,437,000 | 28aebf1d49c5644f8e270f6ad4decd483844198d | 2 | {
"blob_id": "28aebf1d49c5644f8e270f6ad4decd483844198d",
"branch_name": "refs/heads/master",
"committer_date": 1528801437000,
"content_id": "587c360a3561dfd061e8463e08aaa2260df6dc2f",
"detected_licenses": [
"MIT"
],
"directory_id": "8c5d2ef66f1cd1477150509911005c6339792b1a",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/local/bin/python3
from flask import Flask, render_template, send_from_directory, request
import sys
import json
import requests
# cvpr
lstat = 0b0000
rstat = 0b0000
# Prepare maze details
with open('maze.json', 'r') as f:
maze = json.load(f)
f.close()
# Cardinal views
cardinals = ["n", "e", "s",... | 249 | 22.45 | 87 | 17 | 1,940 | python | [{"finding_id": "codeql_py/reflective-xss_dbb3a91129648de5_6f5cc391", "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)."
] | [
191,
216
] | [
null,
null
] | [
12,
12
] | [
54,
54
] | |
2024-11-18T21:22:42.050612+00:00 | 1,630,540,441,000 | 30668be4c3ceb829094066a7f57cfe6441979232 | 3 | {
"blob_id": "30668be4c3ceb829094066a7f57cfe6441979232",
"branch_name": "refs/heads/main",
"committer_date": 1630540441000,
"content_id": "d983525c971fae2ee1020d4b69f972184b36c70f",
"detected_licenses": [
"MIT"
],
"directory_id": "ce4b74556dbe1705a445b3bc9d9fd9e9715f0312",
"extension": "py",
"file... | 2.65625 | stackv2 | from flask import Flask, jsonify
import mysql.connector as mysql
servico = Flask(__name__)
IS_ALIVE = "yes"
DEBUG = True
TAMANHO_PAGINA = 8
MYSQL_SERVER = "10.0.0.117"
MYSQL_USER = "root"
MYSQL_PASS = "m4rc4s"
MYSQL_BANCO = "marcas"
def get_conexao_bd():
conexao = mysql.connect(
host=MYSQL_SERVER, port... | 104 | 26.89 | 109 | 17 | 735 | python | [{"finding_id": "codeql_py/stack-trace-exposure_5c8a23cda0329e01_cb454036", "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.", "... | 5 | true | [
"CWE-209",
"CWE-215",
"CWE-089",
"CWE-089",
"CWE-089"
] | [
"py/stack-trace-exposure",
"py/flask-debug",
"py/sql-injection",
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"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.",
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-prov... | [
77,
100,
49,
69,
89
] | [
null,
104,
52,
70,
null
] | [
35,
5,
20,
13,
24
] | [
75,
6,
94,
78,
77
] | |
2024-11-18T21:23:07.243243+00:00 | 1,690,370,066,000 | fd8eef27aacf327c609848744b1cdd1747307124 | 2 | {
"blob_id": "fd8eef27aacf327c609848744b1cdd1747307124",
"branch_name": "refs/heads/master",
"committer_date": 1690370066000,
"content_id": "ab53bc000114e977b9392097752bcdb6f3eb9607",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ed3d3df8477daa6241c5bd64bf7e6063f53b5d34",
"extension": "p... | 2.34375 | stackv2 | """
This script is used to download the public planck data
To run it: python get_planck_data.py global.dict
It will download maps, likelihood masks and beams of planck
"""
import numpy as np
from pspy import pspy_utils, so_dict
import sys
import wget
import tarfile
import astropy.io.fits as fits
d = so_dict.so_dict()... | 115 | 37.93 | 142 | 17 | 1,329 | python | [{"finding_id": "codeql_py/tarslip_7f22594c8bf62690_90768de0", "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)."
] | [
64
] | [
null
] | [
5
] | [
7
] | |
2024-11-18T21:23:20.508878+00:00 | 1,590,640,022,000 | 28bf2675ca12bfc8487131a4af1a5a6bfca91046 | 3 | {
"blob_id": "28bf2675ca12bfc8487131a4af1a5a6bfca91046",
"branch_name": "refs/heads/master",
"committer_date": 1590640022000,
"content_id": "512bd5c8e4327b08b4721ab89e877b7d91e2ae4e",
"detected_licenses": [
"MIT"
],
"directory_id": "d719251110fd0dcbdaa9f1e4f992ed275b5c2e33",
"extension": "py",
"fi... | 2.71875 | stackv2 | import hashlib
import requests
import json
import base64
from Crypto.Cipher import DES3
class Flutterwave(object):
"""this is the getKey function that generates an encryption Key for you by passing your Secret Key as a parameter"""
def __init__(self, public_key, secret_key, live=True):
self.public_ke... | 114 | 30.98 | 120 | 16 | 833 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_5d26fafaaae2642d_0bb96fbf", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptograph... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES3](2) is broken or weak, and should not be used.",
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](2) is used in a hashing algorithm (MD5) that is in... | [
41,
21
] | [
null,
null
] | [
38,
41
] | [
58,
67
] | |
2024-11-18T21:51:03.870463+00:00 | 1,603,847,688,000 | 55a9bcea6940d027f1f6be40efe6aa2fcf22ad33 | 2 | {
"blob_id": "55a9bcea6940d027f1f6be40efe6aa2fcf22ad33",
"branch_name": "refs/heads/master",
"committer_date": 1603847688000,
"content_id": "5ed3307c1026bf92171562bf94dd600f6756f600",
"detected_licenses": [
"MIT"
],
"directory_id": "13c224c95640ac9677f0716dfce9718e8af9a949",
"extension": "py",
"fi... | 2.375 | stackv2 | from flask import Blueprint, render_template, session
#from . import db
from database_connection.dbconn import DBConn, DBUser
from app import app as auth
#auth_blueprint = Blueprint('auth', __name__)
'''
Exists but maybe keep for now
'''
#@auth.route('/login')
#def login():
# return render_template('login.html')
... | 95 | 32.84 | 112 | 13 | 707 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0d52427034839793_77d7956e", "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."
] | [
43
] | [
null
] | [
84
] | [
112
] | |
2024-11-18T21:51:20.138898+00:00 | 1,679,303,974,000 | 8e47610f69042afd28066712333557ac979abb91 | 3 | {
"blob_id": "8e47610f69042afd28066712333557ac979abb91",
"branch_name": "refs/heads/main",
"committer_date": 1679303974000,
"content_id": "e668b73a046a743f45fc353f7064566eda34c61b",
"detected_licenses": [
"MIT"
],
"directory_id": "573cbdcd9591b7fe20dd949d57293109160b7934",
"extension": "py",
"file... | 2.734375 | stackv2 | #!/usr/bin/env python
import base64
import functools
from collections import defaultdict
from pathlib import Path
from pprint import pprint
import sys
import click
import yaml
from auth0.v3.management import Auth0
from environs import Env
from jinja2 import Environment
env = Env()
env.read_env() # read .env file, if... | 162 | 30.84 | 141 | 18 | 1,116 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_50e2d70f7ef08802_7139f655", "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."
] | [
17
] | [
null
] | [
13
] | [
26
] | |
2024-11-18T21:51:42.306569+00:00 | 1,488,285,703,000 | 7e343332cd8f7bea3142df01aa5e198db2efe9f9 | 2 | {
"blob_id": "7e343332cd8f7bea3142df01aa5e198db2efe9f9",
"branch_name": "refs/heads/master",
"committer_date": 1488285703000,
"content_id": "df18f91cd7ae50b8d5df6edcba9f7459a288a40f",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7abd27e532ce0c355626873148e3040bae34bf03",
"extension": "p... | 2.5 | stackv2 | """Helper script to generate methods from xml spec."""
import os
from datetime import datetime
from xml.etree import ElementTree
from collections import OrderedDict
def load_spec(filename):
tree = ElementTree.parse(filename)
methods = get_methods(tree)
error_classes = get_error_classes(tree)
return me... | 141 | 33.53 | 100 | 21 | 1,057 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_8e5d2aaa80f121f4_15334825", "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."
] | [
121
] | [
null
] | [
11
] | [
67
] | |
2024-11-18T21:51:44.218590+00:00 | 1,670,290,533,000 | 9ab1cdbcaebeb5fb89671809a25092cbf360c396 | 4 | {
"blob_id": "9ab1cdbcaebeb5fb89671809a25092cbf360c396",
"branch_name": "refs/heads/master",
"committer_date": 1670290533000,
"content_id": "bfa32ad17f8e8dad31d11c45fbe0466ebdd9ef80",
"detected_licenses": [
"MIT"
],
"directory_id": "38fca7b44d98174c964a8dd1f7ad60d7937a160e",
"extension": "py",
"fi... | 4.0625 | stackv2 |
"""
This week, we created a Python class that makes it easy to calculate the MD5 hash of a file.
True, Python's "hashlib" provides this functionality, but requires that we load the library,
open the file, and do other actions that aren't hard, but are a bit annoying.
With our DirFileHash object, we can tell Python the... | 87 | 48.38 | 103 | 16 | 1,020 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5d3554f1ad45d9af_c2ff8e05", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
87
] | [
null
] | [
7
] | [
18
] | |
2024-11-18T22:02:39.788829+00:00 | 1,529,496,402,000 | 711bcf03b9fbeeffd029f2ee7dd181e7dd598d8b | 3 | {
"blob_id": "711bcf03b9fbeeffd029f2ee7dd181e7dd598d8b",
"branch_name": "refs/heads/master",
"committer_date": 1529496402000,
"content_id": "ee17fd69f4b2e86306e8162521e207392795adf6",
"detected_licenses": [
"MIT"
],
"directory_id": "f5bbebdf25cd1cc211c4781ccf0eb14b065c9de6",
"extension": "py",
"fi... | 2.828125 | stackv2 | import urllib.request, json
from .models import Source, Article
#Getting api key
api_key = None
#Getting the news base url
base_source_url = None
base_article_url = None
def configure_request(app):
global api_key, base_article_url, base_source_url
api_key = app.config['NEWS_API_KEY']
base_source_url = a... | 108 | 30.43 | 108 | 12 | 689 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_21860cd0e37a7bfb_4847e50a", "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."
] | [
23
] | [
null
] | [
11
] | [
25
] | |
2024-11-18T22:16:40.232046+00:00 | 1,572,801,467,000 | b4a694a998f1000eb426bfb137b026f398ffa18b | 3 | {
"blob_id": "b4a694a998f1000eb426bfb137b026f398ffa18b",
"branch_name": "refs/heads/master",
"committer_date": 1572801467000,
"content_id": "290c7fe14ce53fe17eb4bcc78ccc20fa373b43f9",
"detected_licenses": [
"MIT"
],
"directory_id": "0355aeae33a98bd9a1c4ce8e480b1ba377c0e229",
"extension": "py",
"fi... | 2.625 | stackv2 | from flask import Flask, jsonify, request
import mysql.connector
db = mysql.connector.connect(
host='localhost',
user='root',
passwd='root',
database='authors'
)
app = Flask('author-service')
@app.route('/', methods=['GET'])
def index():
cursor = db.cursor(dictionary=True)
cursor.execute('SELECT * FROM a... | 35 | 25.77 | 129 | 11 | 227 | python | [{"finding_id": "codeql_py/sql-injection_93b10cb34729e024_fbe516cb", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 2 | true | [
"CWE-089",
"CWE-089"
] | [
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1)."
] | [
23,
32
] | [
null,
null
] | [
18,
18
] | [
54,
23
] | |
2024-11-18T22:27:40.338058+00:00 | 1,634,234,585,000 | 78d5f68db8cb702007c2ac1d08e893484c4e40c3 | 3 | {
"blob_id": "78d5f68db8cb702007c2ac1d08e893484c4e40c3",
"branch_name": "refs/heads/main",
"committer_date": 1634234585000,
"content_id": "3ad1b25fbf4fea78325bae1da888f738ba757e47",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "465e03e5a4eaa4b5d536cdd82785c7a2629f5079",
"extension": "py",
... | 2.671875 | stackv2 | from flask import Flask, request, make_response
import requests
from socket import *
import json
app = Flask(__name__)
def query_ip(as_ip, as_port, query_info, TTL=10):
serverName = as_ip
serverPort = int(as_port)
clientSocket = socket(AF_INET, SOCK_DGRAM)
clientSocket.settimeout(TTL)
message = qu... | 51 | 28.08 | 69 | 12 | 400 | python | [{"finding_id": "codeql_py/flask-debug_88ac62c941a0c0e5_72afc78e", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-079",
"CWE-918"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/partial-ssrf"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
49,
46,
43
] | [
51,
null,
null
] | [
null,
12,
20
] | [
20,
30,
37
] | |
2024-11-18T22:27:45.660115+00:00 | 1,634,538,329,000 | 11fed3b07136f5d2867c752da5bdfb7532711cdf | 3 | {
"blob_id": "11fed3b07136f5d2867c752da5bdfb7532711cdf",
"branch_name": "refs/heads/master",
"committer_date": 1634538329000,
"content_id": "fbb73079010eb25d6a3f8c8a9005393e93fea3a1",
"detected_licenses": [
"MIT"
],
"directory_id": "869016f22cf6ca2cbcacd5ee7a809813807f9bdf",
"extension": "py",
"fi... | 2.609375 | stackv2 | import requests
from urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
from ..settings import default_ticker, default_namespace
class API:
"""
Set of methods to get data from API.
"""
# TODO: introduce 'from' & 'to' for dates.
api_url = "http://185.63.191.70:5000"
def... | 190 | 29.54 | 104 | 17 | 1,422 | python | [{"finding_id": "codeql_py/request-without-cert-validation_b832d7872a8a5b03_c07c3885", "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)."
] | [
51
] | [
null
] | [
17
] | [
99
] | |
2024-11-18T22:44:20.903605+00:00 | 1,559,676,782,000 | 825f386c2d09f21ff272ac45da689039e28b6a03 | 2 | {
"blob_id": "825f386c2d09f21ff272ac45da689039e28b6a03",
"branch_name": "refs/heads/master",
"committer_date": 1559676782000,
"content_id": "9ab35f027e1c66037890d103631385eee0939efe",
"detected_licenses": [
"MIT"
],
"directory_id": "1dcb1ef87dd69cfd0d0644ae80167a0bc7206fc2",
"extension": "py",
"fi... | 2.390625 | stackv2 | from iota import Iota
from iota import TryteString, Address
from iota import ProposedTransaction, Tag
from iota.crypto.kerl import Kerl
from iota import Transaction
import json
import rsa
from rsa import PublicKey
import base64
from pyblake2 import blake2b
from cryptography.fernet import Fernet
class emi:
d... | 202 | 32.49 | 99 | 20 | 1,500 | python | [{"finding_id": "codeql_py/weak-crypto-key_0e2b941249b2b3b9_85e43bae", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable.", "remediation": "",... | 1 | true | [
"CWE-326"
] | [
"py/weak-crypto-key"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable."
] | [
29
] | [
null
] | [
29
] | [
46
] | |
2024-11-18T20:36:58.922753+00:00 | 1,684,815,541,000 | a0e91ec5cb45384f5902bacf8dc21beaea44f4ad | 3 | {
"blob_id": "a0e91ec5cb45384f5902bacf8dc21beaea44f4ad",
"branch_name": "refs/heads/master",
"committer_date": 1684815541000,
"content_id": "1b7ad893a770fbe2ff11956d8570c92e14494a95",
"detected_licenses": [
"MIT"
],
"directory_id": "5fe64769a590e266e02e0fa5faa86f98049f42b8",
"extension": "py",
"fi... | 3.0625 | stackv2 | #! python3
# random_overwatch.py - pick a random hero, gamemode, role, show info about a hero or play a quiz (singleplayer and multiplayer) among other things
import json
import requests
import random
import os
import platform
from PIL import Image
import webbrowser
from load_json import load_json_files, get_images
... | 427 | 37.7 | 169 | 25 | 3,760 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d935ae7bc95b432a_4d62c047", "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."
] | [
62
] | [
null
] | [
15
] | [
74
] | |
2024-11-18T21:00:08.449150+00:00 | 1,381,088,554,000 | c24fadd777713e2c1553f627a990a0f23ac361c0 | 2 | {
"blob_id": "c24fadd777713e2c1553f627a990a0f23ac361c0",
"branch_name": "refs/heads/master",
"committer_date": 1381088554000,
"content_id": "acbb28cc60f658282733c180d3e683753949de49",
"detected_licenses": [
"MIT"
],
"directory_id": "5ac987ec5b98f2cd708e21f114d861341f67e809",
"extension": "py",
"fi... | 2.4375 | stackv2 | import sys, getopt
import time
import struct
import os
system = os.name
if system != 'nt':
if os.getuid() != 0:
print "Please re-run with sudo"
raw_input("Press enter to continue...")
sys.exit()
try:
import serial.tools
except ImportError, e:
print "Attempting to download and install pyserial..."
impor... | 164 | 24.23 | 143 | 18 | 1,198 | python | [{"finding_id": "codeql_py/tarslip_724d0f6eed6e86ea_12e31e4e", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).\nThis file extraction depends on a [potentially un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).\nThis file extraction depends on a [potentially untrusted source](1)."
] | [
55
] | [
null
] | [
3
] | [
6
] | |
2024-11-18T21:00:57.467777+00:00 | 1,515,983,992,000 | be6fe0ad71f4a70bee9a4230548b7922e927d2a0 | 2 | {
"blob_id": "be6fe0ad71f4a70bee9a4230548b7922e927d2a0",
"branch_name": "refs/heads/master",
"committer_date": 1515983992000,
"content_id": "663ae42f357cd373b42e752faceb71fbd65801ba",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c3790c9bbaec633c780259aa830c0d907ea73ec0",
"extension": "py"... | 2.359375 | stackv2 | #!/usr/bin/python
import os
import cgi
import L298N_car3
import ConfigParser
import json
import requests
import urllib
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
from os import curdir, sep
from requests.exceptions import ConnectionError, ReadTimeout
from urllib import quote
PORT_NUMBER = 8080
#Thi... | 170 | 31.59 | 104 | 17 | 1,198 | python | [{"finding_id": "codeql_py/path-injection_23f21df64154d62e_af02b1b5", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
58
] | [
null
] | [
26
] | [
50
] | |
2024-11-18T21:01:22.308887+00:00 | 1,601,403,754,000 | 2ee1dd10a3f65ce58f64a5097429c4b6ced1b5a4 | 3 | {
"blob_id": "2ee1dd10a3f65ce58f64a5097429c4b6ced1b5a4",
"branch_name": "refs/heads/master",
"committer_date": 1601403754000,
"content_id": "cd8ef9c5802171db086bcd27a548e7bd52800809",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ca6221dde2e33e0225dda270574718bbf0761286",
"extension": "py"... | 3.34375 | stackv2 | # Session 10 Assignment - Tuple and Named Tuple
# Author: Sujit Kumar Ojha
# email : sujit.ojha@gmail.com
from collections import namedtuple, Counter
from functools import reduce
from faker import Faker
from datetime import datetime,timedelta
from time import perf_counter
import random
# Loading an Faker object
fake... | 196 | 39.83 | 154 | 18 | 2,116 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4d627c1c388ea384_99f25876", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (priva... | [
86,
94
] | [
null,
null
] | [
11,
11
] | [
154,
154
] | |
2024-11-18T21:01:31.471235+00:00 | 1,669,488,981,000 | 9bec401442b75400dd4bf52aa20c91df88929e37 | 3 | {
"blob_id": "9bec401442b75400dd4bf52aa20c91df88929e37",
"branch_name": "refs/heads/main",
"committer_date": 1669488981000,
"content_id": "8e977cd163ec74d26e34a5f2b1b6cb79dc93d804",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "380face90c8169eeca9e61af566ab1ba7590c05b",
"extension": "py",
... | 3.03125 | stackv2 | # -*- coding: utf-8 -*-
"""When you gaze into the abyss, the abyss gazes also into you.
>>> comment_leader.match(' echo "string"')
>>> comment_leader.match(' " Woot') is not None
True
>>> comment_leader.match('"') is not None
True
>>> comment_leader.sub('', '" foo')
'foo'
>>> comment_leader.sub('', '"bar')
'bar'
>>... | 383 | 27.08 | 80 | 10 | 3,405 | python | [{"finding_id": "codeql_py/redos_800f62af56329302_4336e3b3", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with 'A' and containing many repetition... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with 'A' and containing many repetitions of 'A'."
] | [
284
] | [
null
] | [
44
] | [
58
] | |
2024-11-18T21:51:19.612012+00:00 | 1,615,517,706,000 | e5e461cfca4fd89181b230d7c3ce80b2f87c453d | 3 | {
"blob_id": "e5e461cfca4fd89181b230d7c3ce80b2f87c453d",
"branch_name": "refs/heads/master",
"committer_date": 1615517706000,
"content_id": "202fede8264ba21fc5d523862422cca327b57731",
"detected_licenses": [
"MIT"
],
"directory_id": "f0a54fa8580357d129f6701a107fe02d063e0ea7",
"extension": "py",
"fi... | 2.765625 | stackv2 | # -*- coding:utf-8 -*-
import re
import json
import requests
"""
目标APP:陌陌
目标url:APP分享链接或web网页端
爬取思路:
1. 通过APP里的分享获取视频url,获取其feedid
2. 对https://m.immomo.com/inc/microvideo/share/profiles发送post请求,获取json数据
"""
class MoMo(object):
def __init__(self, url):
self.url = url
self.session = request... | 81 | 35.38 | 144 | 19 | 901 | python | [{"finding_id": "codeql_py/overly-large-range_750b8fc2d9eb99d9_c382a9a8", "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\\\\[\\\\\\\\]^_\\]."
] | [
29
] | [
null
] | [
62
] | [
65
] | |
2024-11-18T21:51:33.683860+00:00 | 1,476,023,478,000 | 6466a3c8cbb73cd50a2552b29869d3ab18bb3e0d | 3 | {
"blob_id": "6466a3c8cbb73cd50a2552b29869d3ab18bb3e0d",
"branch_name": "refs/heads/master",
"committer_date": 1476023478000,
"content_id": "eb83a3770375f199dc8a9d68263b5be69cef1182",
"detected_licenses": [
"MIT"
],
"directory_id": "1aeb0023e01d2a04e31f09559d2e98e02b2a97db",
"extension": "py",
"fi... | 2.78125 | stackv2 | import os, sys, stat
import argparse
def createFile(permission, path):
# print int(permission, 8)
# print path
file = os.open(path, os.O_CREAT, int(permission, 8))
os.close(file)
return
def writeToPath(path):
s = raw_input()
file = os.open(path, os.O_RDWR | os.O_CREAT, 00755)
os.write(file, s)
os.close(file... | 38 | 18.08 | 53 | 10 | 206 | python | [{"finding_id": "codeql_py/overly-permissive-file_6dac883052978500_1306a000", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world readable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world readable."
] | [
14
] | [
null
] | [
9
] | [
53
] | |
2024-11-18T22:00:17.941592+00:00 | 1,581,058,146,000 | 17447437d62ee8706f66a7cde609618d774f87af | 3 | {
"blob_id": "17447437d62ee8706f66a7cde609618d774f87af",
"branch_name": "refs/heads/master",
"committer_date": 1581058146000,
"content_id": "b7ad35bdd92c167f4c5c4058ae2f66cbcc4876b1",
"detected_licenses": [
"MIT"
],
"directory_id": "f5afb1fd6ad534572ddaaf82274cdc7e53d1550b",
"extension": "py",
"fi... | 2.71875 | stackv2 | import math
import os
from datetime import datetime
from pathlib import Path
from shutil import copyfile
from jinja2 import Environment, PackageLoader
from markdown2 import markdown
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy_paginator import Paginator
PAGE_SIZE = 50
O... | 167 | 53.49 | 153 | 29 | 2,125 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d1464a5fc1076c3b_9c2dd9b8", "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."
] | [
152
] | [
null
] | [
7
] | [
60
] | |
2024-11-18T22:26:16.427811+00:00 | 1,607,585,310,000 | bedd22ba949f60bc2ca09668dea1d73d9cdd4de4 | 2 | {
"blob_id": "bedd22ba949f60bc2ca09668dea1d73d9cdd4de4",
"branch_name": "refs/heads/main",
"committer_date": 1607585310000,
"content_id": "988419a97f9ef0f0d4653aa1ddcb25c6f781b106",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d4f206a371e17153e9469a474ae50de8b7ce22be",
"extension": "py",
... | 2.34375 | stackv2 | import json
import requests
import base64
from django.views import View
from django.http import JsonResponse
from .models import Exporter, Release, Category
from my_settings import TOKEN
api_url='https://api.github.com/repos/'
headers={'Authorization':TOKEN}
class RepositoryView(View):
def get_repo(self, repo_... | 139 | 37.75 | 85 | 20 | 1,027 | python | [{"finding_id": "codeql_py/stack-trace-exposure_ba961380a7bec7f4_68122dc7", "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-918",
"CWE-918",
"CWE-918"
] | [
"py/stack-trace-exposure",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"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]... | [
139,
21,
25,
27
] | [
null,
null,
null,
null
] | [
33,
28,
28,
28
] | [
51,
71,
73,
74
] | |
2024-11-18T22:26:26.060677+00:00 | 1,461,688,654,000 | aa0a7bb5d02a3ce48c48e955cb042fc799a4f967 | 2 | {
"blob_id": "aa0a7bb5d02a3ce48c48e955cb042fc799a4f967",
"branch_name": "refs/heads/master",
"committer_date": 1461688654000,
"content_id": "a2ffd881f72ed169b68b65594d27123226d3472b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "0408c8f178c0b52c62ba6b32e30e178091001a37",
"extension": "p... | 2.46875 | stackv2 | #!/usr/bin/env python
"""
To get quick feedback this implements an automatically reloading web server
to be run locally.
Reloading functionality is taken from the fabulous
`Werkzeug WSGI toolkit <http://www.pocoo.org/projects/werkzeug/#werkzeug>`
"""
import logging
import mimetypes
import os
import subprocess
import s... | 162 | 34.03 | 77 | 18 | 1,287 | python | [{"finding_id": "codeql_py/http-response-splitting_1a8928faa2b4f849_73aaeb9e", "tool_name": "codeql", "rule_id": "py/http-response-splitting", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This HTTP header is constructed from a [user-provided value](1).", "remediation": "", "lo... | 3 | true | [
"CWE-113",
"CWE-022",
"CWE-022"
] | [
"py/http-response-splitting",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This HTTP header is constructed from a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
129,
128,
130
] | [
null,
null,
null
] | [
49,
27,
42
] | [
54,
29,
44
] | |
2024-11-18T20:39:49.500191+00:00 | 1,632,396,234,000 | 6c7c787c7ceeab622c6d62d8e78405bf1d9a5f1d | 2 | {
"blob_id": "6c7c787c7ceeab622c6d62d8e78405bf1d9a5f1d",
"branch_name": "refs/heads/main",
"committer_date": 1632396234000,
"content_id": "9fed0c722a08be86d6a01fa62f16486c09ac19fa",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8e698e892372ab8fb0132ecd64208d81cf860262",
"extension": "py",
... | 2.40625 | stackv2 | from __future__ import print_function
from PIL import Image
import os
import os.path
import numpy as np
import sys
if sys.version_info[0] == 2:
import cPickle as pickle
else:
import pickle
import random
import torch
import torch.utils.data as data
from .utils import download_url, check_integrity
from .utils im... | 274 | 38.59 | 148 | 19 | 2,964 | python | [{"finding_id": "codeql_py/tarslip_d657aee6ad150bf2_6c572768", "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)."
] | [
174
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T20:40:04.565867+00:00 | 1,590,930,240,000 | 1ad951f3a7286ddad93b9864e58f5a6dda77412f | 4 | {
"blob_id": "1ad951f3a7286ddad93b9864e58f5a6dda77412f",
"branch_name": "refs/heads/master",
"committer_date": 1590930240000,
"content_id": "91793a67d2edf3bba5fe700742ef77dbd670a93b",
"detected_licenses": [
"MIT"
],
"directory_id": "0b5fe7e08e0091145595f9026d8cb5d50d9e516b",
"extension": "py",
"fi... | 4.25 | stackv2 | # --------------
##File path for the file
file_path
print(file_path)
def read_file(path):
# Opens the file associated with the 'path' in the read-only mode ('r') and store it in a variable file
file = open(path, "r")
# Reads the content(first line) of the file and stores it in a variable called 'sentence... | 199 | 25.8 | 160 | 12 | 1,373 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_3854f486fd33a44d_a9b38d1a", "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... | 7 | true | [
"CWE-312",
"CWE-312",
"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",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"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... | [
184,
43,
80,
117,
160,
174,
194
] | [
null,
null,
null,
null,
null,
null,
null
] | [
21,
7,
7,
7,
7,
7,
7
] | [
31,
67,
52,
67,
62,
20,
17
] | |
2024-11-18T20:52:17.274129+00:00 | 1,675,068,831,000 | 899e3f1dc8034f4721e76bf26202a1308e4e38dd | 2 | {
"blob_id": "899e3f1dc8034f4721e76bf26202a1308e4e38dd",
"branch_name": "refs/heads/master",
"committer_date": 1675068831000,
"content_id": "82021f75307887ec8223d5e2c24de171d9872262",
"detected_licenses": [
"MIT"
],
"directory_id": "7af12aece3e55316da5e31f5441e7bbad7f9ea3c",
"extension": "py",
"fi... | 2.5 | stackv2 | # Running QGIS Scripts as scheduled tasks
# https://github.com/GeospatialPython/Learn/raw/master/Mississippi.zip
import urllib
import datetime
import pytz
import tarfile
import sys
import os
import time
import schedule
# Tell Python where you will get processing from
sys.path.append('/Applications/QGIS.app/Contents/... | 96 | 26.62 | 82 | 13 | 711 | python | [{"finding_id": "codeql_py/tarslip_8947e8acde348acb_44bcd830", "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)."
] | [
54
] | [
null
] | [
13
] | [
18
] | |
2024-11-18T20:52:19.149968+00:00 | 1,466,497,250,000 | b4407244bdf459f219766ecc0c21b59f8c8f8645 | 3 | {
"blob_id": "b4407244bdf459f219766ecc0c21b59f8c8f8645",
"branch_name": "refs/heads/master",
"committer_date": 1466497589000,
"content_id": "e488dabd3f225a70857aa2e9be0f1b32c46b36ec",
"detected_licenses": [
"MIT"
],
"directory_id": "b1d65a2383d38b30ce5f8c9531159001176d322a",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=C0103,W0621
"""
Train a text generating LSTM on Slovenian poems and prose
- first train a few epochs on Slovenian poetry and prose (to learn basics of the language) (from <http://lit.ijs.si/>)
- afterwards train at least additional epochs on target texts ... | 208 | 33.6 | 156 | 15 | 1,897 | python | [{"finding_id": "codeql_py/overly-large-range_0c81f87cba90e68c_3447f9f9", "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 overlaps with A-Z in ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with 0-9 in the same character class, and overlaps with A-Z in the same character class, and overlaps with a-z in the same character class."
] | [
50
] | [
null
] | [
63
] | [
66
] | |
2024-11-18T21:08:08.794138+00:00 | 1,621,173,267,000 | 3a82f6ddf86e632bbeba5689fbd00bb064e15626 | 3 | {
"blob_id": "3a82f6ddf86e632bbeba5689fbd00bb064e15626",
"branch_name": "refs/heads/main",
"committer_date": 1621173267000,
"content_id": "4f3db8499a36c8648df75439e9e242e3c08d510d",
"detected_licenses": [
"MIT"
],
"directory_id": "c9a307a1130f3c5ab13acee1d4d3975a13cc8feb",
"extension": "py",
"file... | 2.578125 | stackv2 | """
多平台同步创建新用户账户
"""
import requests
import json
import base64
from bs4 import BeautifulSoup
import datetime
from hashlib import md5
from core.config import settings
class MultiCreate:
def __init__(self, username, email, password, real_name):
self.username = username
self.email = email
se... | 102 | 35.4 | 115 | 22 | 889 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_5a0aa62c044fe679_10496cd3", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
60
] | [
null
] | [
29
] | [
46
] | |
2024-11-18T21:08:10.973185+00:00 | 1,681,463,275,000 | 81eaf794d3a2a01d0ccb7f2980f20c59f44d8833 | 3 | {
"blob_id": "81eaf794d3a2a01d0ccb7f2980f20c59f44d8833",
"branch_name": "refs/heads/master",
"committer_date": 1681463275000,
"content_id": "61c703a487034bbecb5a9dfaca746d93a88b3113",
"detected_licenses": [
"MIT"
],
"directory_id": "d91bdfd43477aa363474053e2903e638b9d9ce57",
"extension": "py",
"fi... | 2.5625 | stackv2 | import errno
import os
import random
import socket
import ssl
import sys
from itertools import chain
from queue import Empty, Full, LifoQueue
from basepy.exceptions import ConnectionError
import threading
import time
def threading_spawn(func, *args, **kwargs):
t = threading.Thread(target=func, args=args, kwargs=... | 404 | 33.22 | 79 | 18 | 2,758 | python | [{"finding_id": "codeql_py/insecure-default-protocol_51575f54a0fdcdd6_d082739f", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
145
] | [
149
] | [
28
] | [
67
] | |
2024-11-18T21:08:12.649274+00:00 | 1,462,076,095,000 | f1518c0f25f07a66616657249583bf426c31fdba | 2 | {
"blob_id": "f1518c0f25f07a66616657249583bf426c31fdba",
"branch_name": "refs/heads/master",
"committer_date": 1462076095000,
"content_id": "8ef90a77c1a7b69c09792f940bca2cc3770534d6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "07b750301cf187f22cd64a1d1c950431018dce52",
"extension": "py"... | 2.40625 | stackv2 | #!/bin/env python
# -*- coding: utf-8 -*-
import tornado.ioloop
import tornado.web
import json
import requests
verify_token = 'XXXX'
token = 'XXX'
def getCookpadLinks(keyword, link_count=3):
searchurl=urljoin("http://cookpad.com/search/", keyword)
sock=urllib.urlopen(searchurl)
htmlSource=sock.read()
... | 52 | 31.62 | 79 | 15 | 406 | python | [{"finding_id": "codeql_py/reflective-xss_9b03889b22260a32_eaccb747", "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)."
] | [
32
] | [
null
] | [
24
] | [
62
] | |
2024-11-18T21:08:14.475107+00:00 | 1,590,153,252,000 | e32f8a92c193a9c1ed951872d524bfce03924cb1 | 2 | {
"blob_id": "e32f8a92c193a9c1ed951872d524bfce03924cb1",
"branch_name": "refs/heads/master",
"committer_date": 1590153252000,
"content_id": "b3fd83b4aca86ad5dbbf04bddc62d006a13f26fc",
"detected_licenses": [
"MIT"
],
"directory_id": "d45ef0f8190ca1e35e44805c363dd01b0d2cc65a",
"extension": "py",
"fi... | 2.328125 | stackv2 | from typing import Dict
import json
from ..models import Recipe, StepToBeAdded, IngredientsOfStep, IngredientToBeAdded, StepsOfRecipe, Author
from django.http import HttpResponseRedirect, JsonResponse, HttpResponse
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render, get_object_or_4... | 99 | 34.02 | 105 | 20 | 754 | python | [{"finding_id": "codeql_py/stack-trace-exposure_aa79ecc9999d3585_03375a8f", "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."
] | [
94
] | [
null
] | [
16
] | [
43
] | |
2024-11-18T21:08:26.065461+00:00 | 1,489,096,207,000 | 8125f9fc124cfc2cbf24b4021eb350562f9e650d | 3 | {
"blob_id": "8125f9fc124cfc2cbf24b4021eb350562f9e650d",
"branch_name": "refs/heads/master",
"committer_date": 1489096207000,
"content_id": "18b2f40077ddecb36c3fe7eb4c76781d9a65dca4",
"detected_licenses": [
"MIT"
],
"directory_id": "44a910952c8daf66584cabae39dfaf556668aac2",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask
from flask import jsonify
import requests as r
import json
# import distance
from sklearn.feature_extraction.text import CountVectorizer
from scipy.spatial.distance import jaccard
app = Flask(__name__)
api_key = 'DEMO_KEY'
cache_dict = {}
@app.route("/compare/<param_food_name>", methods=['GE... | 147 | 37.26 | 146 | 19 | 1,384 | python | [{"finding_id": "codeql_py/flask-debug_5fe759ff84af6a78_a3bb2e7c", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-918"
] | [
"py/flask-debug",
"py/full-ssrf"
] | [
"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.",
"The full URL of this request depends on a [user-provided value](1)."
] | [
147,
71
] | [
null,
null
] | [
5,
12
] | [
24,
46
] | |
2024-11-18T21:31:53.103580+00:00 | 1,499,844,808,000 | 51dbfae1579fb317f71ea34b1a4c19e9f2a88355 | 3 | {
"blob_id": "51dbfae1579fb317f71ea34b1a4c19e9f2a88355",
"branch_name": "refs/heads/master",
"committer_date": 1499844808000,
"content_id": "188ab31bc01acb6bcde3ec91f53af7b21451eb80",
"detected_licenses": [
"MIT"
],
"directory_id": "bddec548bb5cdd0cafa3e9f7c9b435fc45488764",
"extension": "py",
"fi... | 3.03125 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from base64 import b64encode, b64decode
RC4_Key = "octopuslink!"
def gen_random_bytes(k):
i = 0
j = 0
while True:
i = (i + 1) % 256
j = (j + k[i]) % 256
k[i], k[j] = k[j], k[i]
yield k[(k[i] + k[j]) % 256]
def rc4_crypt(data, ke... | 84 | 23.07 | 102 | 17 | 632 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e8b3240ef647dcc5_45180d97", "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."
] | [
82,
84
] | [
null,
null
] | [
11,
11
] | [
12,
12
] | |
2024-11-18T21:31:55.935273+00:00 | 1,634,969,663,000 | ed8f31004d71c2af812159c615248c505befc937 | 3 | {
"blob_id": "ed8f31004d71c2af812159c615248c505befc937",
"branch_name": "refs/heads/master",
"committer_date": 1634969663000,
"content_id": "765cba5aea4afd9bb376951a4b5dc4cbe1348477",
"detected_licenses": [
"MIT"
],
"directory_id": "a6307afe0aaef78446298feb381d3bbd97b15c75",
"extension": "py",
"fi... | 2.53125 | stackv2 | from flask import Flask, jsonify, request
from flask_cors import CORS
import numpy as np
from tensorflow.keras.models import load_model
from tensorflow.keras.initializers import he_normal
from sklearn import preprocessing
import joblib
import pandas as pd
import math
import json
import time
import requests
app = Flas... | 76 | 34.11 | 107 | 18 | 671 | python | [{"finding_id": "codeql_py/stack-trace-exposure_2589d0edc54e8c6a_1f5af760", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-215"
] | [
"py/stack-trace-exposure",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
45,
76
] | [
null,
null
] | [
16,
5
] | [
21,
24
] | |
2024-11-18T21:32:02.378339+00:00 | 1,531,506,416,000 | 02373b0ed4c8d5af2cf625d420c44ce97b424035 | 3 | {
"blob_id": "02373b0ed4c8d5af2cf625d420c44ce97b424035",
"branch_name": "refs/heads/master",
"committer_date": 1531506416000,
"content_id": "d76336dd5b32033f974214b4cbbcf3db95cbafdc",
"detected_licenses": [
"MIT"
],
"directory_id": "163c0b378dbc09e73442630283ec7994817965cd",
"extension": "py",
"fi... | 2.59375 | stackv2 | import pandas
import datetime
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import bs4
import os
import requests
class TimedGuviDownload(object):
"""
A class to ... | 64 | 33.05 | 100 | 17 | 524 | python | [{"finding_id": "codeql_py/request-without-cert-validation_3fd8fcdd1ef8a92d_57a7926b", "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)."
] | [
54
] | [
null
] | [
22
] | [
56
] | |
2024-11-18T21:32:21.207898+00:00 | 1,560,464,617,000 | b9e2ed24bd45f646589c1c99a424a6c3a6af162e | 3 | {
"blob_id": "b9e2ed24bd45f646589c1c99a424a6c3a6af162e",
"branch_name": "refs/heads/master",
"committer_date": 1560464617000,
"content_id": "00f7066bd4f036a588fc586ab5bffa9b9dbcc8d6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5a94468d0e81c2c85bcca8a37cfc5c3363eb9b85",
"extension": "py"... | 2.828125 | stackv2 | # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
... | 35 | 37.74 | 100 | 8 | 352 | python | [{"finding_id": "codeql_py/insecure-default-protocol_37743b8f442e98e0_5f3f8799", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
34
] | [
null
] | [
16
] | [
101
] | |
2024-11-18T21:32:49.478047+00:00 | 1,493,811,237,000 | 8c1999c749c0caa7bfe3dfca8aa816e69e3302d0 | 3 | {
"blob_id": "8c1999c749c0caa7bfe3dfca8aa816e69e3302d0",
"branch_name": "refs/heads/master",
"committer_date": 1493811237000,
"content_id": "5c558f4e76c763e300ae01663b975be0000b04a6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "fa01d75dda27a0e6c7ee27c7af4fcf4eb344192e",
"extension": "p... | 2.84375 | stackv2 | """
tcxweather
"""
import os
import pickle
import json
from datetime import datetime, timedelta # unused time, date
import requests
# from python_weather import tcxparser
import numpy as np
# import stravalib
from pytz import timezone
class TcxRide:
"""
Class to obtain data from tcx file and aditional param... | 413 | 35.79 | 100 | 22 | 3,367 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_afa0105231407f9e_b6459588", "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."
] | [
291
] | [
null
] | [
32
] | [
36
] | |
2024-11-18T21:49:28.453452+00:00 | 1,617,879,113,000 | 1418321d9b59ad13a2982f0749dfefddf9dedcd0 | 3 | {
"blob_id": "1418321d9b59ad13a2982f0749dfefddf9dedcd0",
"branch_name": "refs/heads/master",
"committer_date": 1617879113000,
"content_id": "8a97ecd6203448f9ffe04d45324c20630b414b56",
"detected_licenses": [
"MIT"
],
"directory_id": "4c8367f4654e9280cc71b1f29d09bc5211395e9b",
"extension": "py",
"fi... | 2.75 | stackv2 | import dateutil
import pandas as pd
import datetime
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
import numpy as np
import pickle
from collections import defaultdict
class Availability:
def __init__(self, available=None, start_time=None):
if isinstance(available, Availability):... | 329 | 42.19 | 165 | 19 | 3,295 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_429b0a28e3257d68_9f4cc6d8", "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."
] | [
186
] | [
null
] | [
19
] | [
60
] | |
2024-11-18T20:31:36.067094+00:00 | 1,628,103,882,000 | 4e1e81e49672c9d1aaad631cb728f21569df1f85 | 3 | {
"blob_id": "4e1e81e49672c9d1aaad631cb728f21569df1f85",
"branch_name": "refs/heads/master",
"committer_date": 1628103882000,
"content_id": "c50ed6ab24a2012fe10dfa40939e4035571b6559",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "6c24104740d7e12eab155c5a1b83ce57fe253e10",
"exten... | 2.546875 | stackv2 | # This code is modified from https://github.com/facebookresearch/low-shot-shrink-hallucinate
import torch
from PIL import Image
import numpy as np
import torchvision.transforms as transforms
from . import additional_transforms as add_transforms
from abc import abstractmethod
import os
import glob
from torchvision.dat... | 271 | 33.84 | 123 | 18 | 2,222 | python | [{"finding_id": "codeql_py/tarslip_d3cb35629cfd73df_82323aba", "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)."
] | [
101
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T20:53:41.323579+00:00 | 1,606,924,436,000 | 6c4e54894dd533b2c31f3d1fbd0065333b8a7851 | 3 | {
"blob_id": "6c4e54894dd533b2c31f3d1fbd0065333b8a7851",
"branch_name": "refs/heads/master",
"committer_date": 1606924436000,
"content_id": "f7baf5a49205867f2bdda8b4d86482b4fccd5b9a",
"detected_licenses": [
"MIT"
],
"directory_id": "4b9c63fb48b6939ee19fc2d5bd74e3b326d351d9",
"extension": "py",
"fi... | 2.640625 | stackv2 | import os
import secrets
from PIL import Image
from flask import render_template, url_for, flash, redirect, request
from calendarapp.forms import LoginForm, RegistrationForm, EventForm
from calendarapp import app, db, bcrypt
from calendarapp.models import User, Event
from flask_login import login_user, current_user, lo... | 225 | 26.11 | 140 | 23 | 1,667 | python | [{"finding_id": "codeql_py/url-redirection_45eb5e7509fb13cb_ff0c60ff", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 2 | true | [
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
150,
216
] | [
null,
null
] | [
29,
29
] | [
38,
38
] | |
2024-11-18T21:10:29.126447+00:00 | 1,679,828,216,000 | 6d3fc12b9c6d8fecadb00db58e23401900018900 | 2 | {
"blob_id": "6d3fc12b9c6d8fecadb00db58e23401900018900",
"branch_name": "refs/heads/master",
"committer_date": 1679828216000,
"content_id": "81b363eb1e8a0a29b88f42728efadcd5953cd984",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b68e125bec75091516e50a3e0271619415017ce3",
"extension": "py"... | 2.484375 | stackv2 | #!/usr/bin/env python
#
# Author: Thamme Gowda [tg (at) isi (dot) edu]
# Created: 5/13/20
import io
import gzip
import tarfile
import zipfile
from dataclasses import dataclass
import portalocker
import gzip
import bz2
import lzma
from mtdata import log, Defaults
import shutil
from datetime import datetime
from pathli... | 254 | 32.39 | 109 | 23 | 1,940 | python | [{"finding_id": "codeql_py/tarslip_f5362ca64a7274a5_1b721fb7", "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)."
] | [
230
] | [
null
] | [
25
] | [
28
] | |
2024-11-18T21:10:30.887760+00:00 | 1,558,753,487,000 | cb80ad365dd53824e9c2f52d34f0b6f68211f3cc | 3 | {
"blob_id": "cb80ad365dd53824e9c2f52d34f0b6f68211f3cc",
"branch_name": "refs/heads/master",
"committer_date": 1558753487000,
"content_id": "49f264be7ed03b8b8d68aacbdb4907909876965e",
"detected_licenses": [
"MIT"
],
"directory_id": "8c7af51123f3eada37f06a17d8b079d34709f04b",
"extension": "py",
"fi... | 2.859375 | stackv2 |
from __future__ import print_function
from __future__ import division
import time
import fcntl
import os
import atexit
class DI_Mutex(object):
def __init__(self, name, loop_time = 0.0001):
""" Initialize """
self.Filename = "/run/lock/DI_Mutex_" + name
self.LoopTime = loop_time
... | 56 | 24.18 | 73 | 15 | 313 | python | [{"finding_id": "codeql_py/overly-permissive-file_89bba48fd450b0c3_f056cd02", "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."
] | [
24
] | [
null
] | [
17
] | [
47
] | |
2024-11-18T21:11:10.451995+00:00 | 1,329,519,404,000 | 0599a5685a410a876d96838cc61c5bbd81578ec3 | 3 | {
"blob_id": "0599a5685a410a876d96838cc61c5bbd81578ec3",
"branch_name": "refs/heads/master",
"committer_date": 1329923131000,
"content_id": "27f5289f966068966a4ae77c86d41a87a9475c67",
"detected_licenses": [
"MIT"
],
"directory_id": "b805cdce37ce7eff9f6041bdf69d4a7c12ba55fb",
"extension": "py",
"fi... | 3.046875 | stackv2 | import hashlib
import random
import pymongo.objectid
from regularity.core.validation import StringField, Validator
from base import APIBase, validate
from fields import ObjectIdField
MIN_PASSWORD_LENGTH = 6
N_SALT_CHARS = 16
class UserAlreadyExists(Exception):
'''An error for creating a user with an email that ... | 126 | 26.92 | 78 | 14 | 746 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_1295a862966dc395_517dea88", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally e... | [
32
] | [
null
] | [
35
] | [
61
] | |
2024-11-18T21:46:33.644520+00:00 | 1,693,348,322,000 | f04d569526c646ced6eeea452844c657f211f0c7 | 2 | {
"blob_id": "f04d569526c646ced6eeea452844c657f211f0c7",
"branch_name": "refs/heads/master",
"committer_date": 1693348322000,
"content_id": "12758de75f8e4aed38c0875a4b44d32250cae4ec",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5ef6c8d47864f471e26b9902d61f8c687e941f05",
"extension": "py"... | 2.484375 | stackv2 | # Metaparser
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import Any, Or, Optional
# ==============================
# Schema for 'show environment'
# ==============================
class ShowEnvironmentSchema(MetaParser):
''' Schema for "show environment" '''
# These are the ke... | 292 | 34.21 | 149 | 17 | 2,524 | python | [{"finding_id": "codeql_py/redos_be1411cb0f6a4f5e_e8dd7730", "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 '0aV'.", "remedia... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '0aV'.",
"This part of the regular expression may cause exponential backtracking on strings starting with 'aVSupply: ' and containing many repetitions of '0'."
] | [
123,
123
] | [
null,
null
] | [
38,
95
] | [
44,
101
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.