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:58:13.927468+00:00 | 1,493,219,767,000 | f78daab793df8aa58f94bb9ecbd20a3f19f029cc | 2 | {
"blob_id": "f78daab793df8aa58f94bb9ecbd20a3f19f029cc",
"branch_name": "refs/heads/master",
"committer_date": 1493219767000,
"content_id": "c228b3e94a54c842c30be72dccdf2cf7ae99b12f",
"detected_licenses": [
"MIT"
],
"directory_id": "7dc80db4eb6019d81dc164762fee997cf090f306",
"extension": "py",
"fi... | 2.328125 | stackv2 | # The MIT License (MIT)
#Copyright (c) 2016 - 2017 Alberto Sanchez de la Cruz
#Permission is hereby granted, free of charge, to any person obtaining a copy of
#this software and associated documentation files (the "Software"), to deal in
#the Software without restriction, including without limitation the rights to
#u... | 249 | 27.84 | 146 | 17 | 1,963 | python | [{"finding_id": "codeql_py/partial-ssrf_c9df3cfcbbb86256_70367709", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 4 | true | [
"CWE-918",
"CWE-918",
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
36,
46,
56,
66
] | [
null,
null,
null,
null
] | [
3,
3,
3,
3
] | [
66,
96,
100,
66
] | |
2024-11-18T20:58:35.199482+00:00 | 1,504,208,016,000 | cb8f04ed961eb5522216fce1d69ea6c5d83dfbf4 | 2 | {
"blob_id": "cb8f04ed961eb5522216fce1d69ea6c5d83dfbf4",
"branch_name": "refs/heads/master",
"committer_date": 1504208016000,
"content_id": "ed13bdc4d8678df01946a1e9f814c4699df96bb6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3933d93aac50ce26ba536d14684b85ded4afdcf9",
"extension": "p... | 2.390625 | stackv2 | import argparse
import collections
import json
import logging
import os
import pathlib
import re
import sys
import textwrap
import errorhandler
import jinja2
import pandas
import requests
import requests_cache
import yaml
from manubot.manuscript import (
datetime_now,
get_citation_strings,
get_manuscript_... | 325 | 35.31 | 100 | 15 | 2,550 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bca9cf5c0068b764_1fd927e6", "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."
] | [
263
] | [
268
] | [
25
] | [
6
] | |
2024-11-18T21:11:03.102518+00:00 | 1,591,307,272,000 | d182e1b10a78dd9145f23d82d61d4f09ba2ff60b | 3 | {
"blob_id": "d182e1b10a78dd9145f23d82d61d4f09ba2ff60b",
"branch_name": "refs/heads/master",
"committer_date": 1591307272000,
"content_id": "3b2981ea983291ae870083344364836d9d37ceb2",
"detected_licenses": [
"MIT"
],
"directory_id": "92f2a164bd6f5eec31e51cca23396351e3ef8af2",
"extension": "py",
"fi... | 3.15625 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of XLSX to Odoo import
# Copyright 2020 David Todd <dtodd@oceantech.com>
# License: MIT License, refer to `license.md` for more information
"""
Provides the Record class, which is a close
representation of an Odoo Record for the purposes
of importing li... | 68 | 33.41 | 71 | 16 | 515 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_7c35ae5f8bb8c3ab_517abdb3", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [dell.com](1) may be at an arbitrary position in the sa... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [dell.com](1) may be at an arbitrary position in the sanitized URL."
] | [
36
] | [
null
] | [
12
] | [
37
] | |
2024-11-18T21:11:13.547608+00:00 | 1,568,042,549,000 | ec30fc1bd280bc4c243a32d92328eaf92720c9f1 | 3 | {
"blob_id": "ec30fc1bd280bc4c243a32d92328eaf92720c9f1",
"branch_name": "refs/heads/master",
"committer_date": 1568042549000,
"content_id": "0a510a294914851ed487136d0c8cdb9b233e2bec",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c143829fb36f843912b1484c5626617b9fa06c30",
"extension": "py"... | 2.875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""pubmed_twitter_bot.py : a twitter bot searching for the latest articles
on a given subjet on PubMed and publishing on twitter."""
__author__ = "Maxime Borry"
__license__ = "BEERWARE"
import time
import datetime
import argparse
def _get_args():
'''This function p... | 282 | 30.78 | 109 | 20 | 2,165 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_50ef060cbcb233d3_acaefe95", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text."
] | [
272
] | [
null
] | [
23
] | [
36
] | |
2024-11-18T19:03:18.066348+00:00 | 1,482,279,717,000 | 4cbc959ef623a5175cba6cdf71e24906e740ded7 | 2 | {
"blob_id": "4cbc959ef623a5175cba6cdf71e24906e740ded7",
"branch_name": "refs/heads/master",
"committer_date": 1482279717000,
"content_id": "9e0431750fe289ce863779eb70ab7578eb6cab66",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2cf63ed2c340e67223d57d867507e68d88a11091",
"extension": "p... | 2.484375 | stackv2 | import sys
import os
import re
# request-dists is the folder in our plugin
sys.path.append(os.path.dirname(__file__))
import sublime
import sublime_plugin
from git import Repo
class GitSummaryCommand(sublime_plugin.TextCommand):
def message_fix(self, orig_mess):
orig_mess = orig_mess.replace('\n',"<br>"... | 74 | 31.62 | 109 | 21 | 584 | python | [{"finding_id": "codeql_py/overly-large-range_8ef107942d3be730_253bce6e", "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\\\\[\\\\\\\\]^_\\]."
] | [
16
] | [
null
] | [
60
] | [
63
] | |
2024-11-18T19:03:39.119490+00:00 | 1,424,909,589,000 | f7f6c02417714742f8603a2ddad033a20afce1c7 | 2 | {
"blob_id": "f7f6c02417714742f8603a2ddad033a20afce1c7",
"branch_name": "refs/heads/master",
"committer_date": 1424909589000,
"content_id": "5125c32252c5e3aa57fbebab8e144c814a016d22",
"detected_licenses": [
"MIT"
],
"directory_id": "b22831a11ea76e808c2dade8a7c90e83976b81f5",
"extension": "py",
"fi... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
import os
from flask import render_template, redirect, url_for, request
from entrenamiento.utils import random_text
from entrenamiento.models.arquero import Arquero
from entrenamiento.views.base import UserRequiredView
from entrenamiento.views.usuarios.form import ArqueroForm
from entrenamient... | 79 | 42.65 | 88 | 19 | 791 | python | [{"finding_id": "codeql_py/path-injection_5a917f873643062c_b791ece3", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
67,
69
] | [
null,
null
] | [
43,
34
] | [
85,
76
] | |
2024-11-18T19:28:37.091668+00:00 | 1,544,813,697,000 | 94cb57d97fc2d10a529609998d101a3da10a8351 | 3 | {
"blob_id": "94cb57d97fc2d10a529609998d101a3da10a8351",
"branch_name": "refs/heads/master",
"committer_date": 1544813697000,
"content_id": "28202a5d515398028d6cfb648894b8a7832d9e26",
"detected_licenses": [
"MIT"
],
"directory_id": "761b6dca34fac47feab8d608f0454e8c22a36869",
"extension": "py",
"fi... | 2.546875 | stackv2 | import requests
import json
goal_seconds = 4 * 60 * 60
max_distance = 30 * 60 #max 30 Minuten Abweichung
app_id ="nAX0YLEqe9rDAffuvS9L"
app_code="O_9Z4uw6cbqaUNKCrWvAlg"
route_url = "https://image.maps.api.here.com/mia/1.6/route"
def route_to_image(route):
# legs = route['response']['route'][0]['leg']
# ... | 126 | 24.99 | 170 | 15 | 1,043 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d251c69d454c1e2d_2e8161c6", "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."
] | [
19
] | [
null
] | [
11
] | [
16
] | |
2024-11-18T19:28:39.044142+00:00 | 1,455,100,051,000 | e917ef02c85eea36c9c02924dd2a8e8f768570a0 | 3 | {
"blob_id": "e917ef02c85eea36c9c02924dd2a8e8f768570a0",
"branch_name": "refs/heads/master",
"committer_date": 1455100051000,
"content_id": "6f0cf42aa39c59d0fc12d9a549b6119c544695ac",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1b85620ba4dfc0ecac322c4f24940da81b4b5506",
"extension": "py"... | 2.84375 | stackv2 | #!/usr/bin/python
#
# == Synopsis
#
# Script to get cluster data from elasticsearch
# through the ES API.
#
# Because I work with multiple scripts to push data
# into Carbon, I insert the data into a separate
# Carbon database (elasticsearch.cluster)
#
# === Workflow
# This script grabs JSON from your elasticsearch
# c... | 118 | 25.75 | 83 | 17 | 854 | python | [{"finding_id": "codeql_py/request-without-cert-validation_6bb653f3e4172a61_6c5ca0b7", "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)."
] | [
60
] | [
null
] | [
16
] | [
70
] | |
2024-11-18T19:28:49.160781+00:00 | 1,492,494,346,000 | 48fa4fc52fea10a240756358a9e80ae446c2b9f8 | 3 | {
"blob_id": "48fa4fc52fea10a240756358a9e80ae446c2b9f8",
"branch_name": "refs/heads/master",
"committer_date": 1492494346000,
"content_id": "f352a049e4d62e0630570b2d4d1cb11321aa17b0",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "dd1dec30aa87126f6ef523282384c9db6a3fd2d0",
"extension": "p... | 2.859375 | stackv2 | # -*- coding: utf-8 -*
"""
Handlebars
"""
__docformat__ = 'restructuredtext en'
import re
HB_TAG_RE = re.compile(r'{{\s*(\w+)\s+(.*?)\s*}}', re.M | re.U | re.DOTALL)
FUN_ARGS_RE = re.compile(r"""(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^"'\s]+)+""", re.M | re.U)
HB_COMMENT_RE = re.compile(r'{{!(?:--)?\s*(.+)}}', re.U)
ES... | 64 | 32.8 | 99 | 14 | 541 | python | [{"finding_id": "codeql_py/redos_ca9a750c252fff53_c96d4e00", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitio... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitions of '\\\\!'.",
"This part of the regular expression may cause exponential backtracking on strings starting with ''' and containing many repetitions of '\\\\&'."
] | [
11,
11
] | [
null,
null
] | [
34,
50
] | [
47,
63
] | |
2024-11-18T19:29:03.107968+00:00 | 1,631,878,823,000 | 3f3c97373466cd5bfdb1e7069b807c566090ad33 | 3 | {
"blob_id": "3f3c97373466cd5bfdb1e7069b807c566090ad33",
"branch_name": "refs/heads/master",
"committer_date": 1631878823000,
"content_id": "2c46843c19d64c113b4733c6b459ee68877f7e35",
"detected_licenses": [
"MIT"
],
"directory_id": "dafe0294d07537c2757ff9e9b5ccf559d76b61d3",
"extension": "py",
"fi... | 2.9375 | stackv2 | import sys
import platform
import os
import hashlib
import re
from colorama import Fore, Style, Back
import itertools
import time
HASH_LIST = (
"md4",
"md5",
"sha1",
"sha256",
"sha512"
)
CHAR_SET = (
"NUM",
"NUM_SPECIAL",
"ALPHA_CAPS",
"ALPHA_LOWER",
"ALPHA_CAPS_LOWER",
"AL... | 194 | 34.58 | 126 | 18 | 2,173 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c694a53c0e0abf35_aa78c42d", "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."
] | [
103
] | [
null
] | [
15
] | [
73
] | |
2024-11-18T19:29:03.978839+00:00 | 1,632,404,771,000 | f194ba571c1b8d1e6969713e51cabbade2db1b99 | 3 | {
"blob_id": "f194ba571c1b8d1e6969713e51cabbade2db1b99",
"branch_name": "refs/heads/master",
"committer_date": 1632404771000,
"content_id": "920218dabfe1c156cdeccbce0613b5be56fb8fc5",
"detected_licenses": [
"MIT"
],
"directory_id": "8e917590a410c56beca1698ad9b630c5623059b6",
"extension": "py",
"fi... | 2.625 | stackv2 | """
Created on December 1 2018
@author: Philippe Delandmeter
Function creating the unbeach velocity for the CMEMS data (A-grid)
"""
import xarray as xr
import numpy as np
data_dir = '/Volumes/oceanparcels/input_data/CMEMS/GLOBAL_REANALYSIS_PHY_001_030/'
datasetM = xr.open_dataset(data_dir + 'mercatorglorys12v1_gl12_... | 76 | 39.45 | 109 | 16 | 1,120 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_99556d7317135509_39b08ef6", "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... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (p... | [
53,
56,
59,
62
] | [
54,
57,
60,
63
] | [
23,
23,
23,
23
] | [
65,
65,
65,
65
] | |
2024-11-18T19:39:48.605365+00:00 | 1,584,498,071,000 | c050c5d2369ccbd7261b53614297fc9b330496eb | 2 | {
"blob_id": "c050c5d2369ccbd7261b53614297fc9b330496eb",
"branch_name": "refs/heads/master",
"committer_date": 1584498071000,
"content_id": "d20dd20e5627e0962a57a2033b206749dcd12615",
"detected_licenses": [
"MIT"
],
"directory_id": "5b8bcae34a16438b315030f1fa3c7841918f2135",
"extension": "py",
"fi... | 2.4375 | stackv2 | # ServerGenerator.py - Creates an object implementing a Connexion API
import os
from jinja2 import Environment, Template, FileSystemLoader
from smoacks.sconfig import sconfig
class ServerGenerator:
def __init__(self, app_objects):
self._app_objects = app_objects
def get_import(self, app_object):
... | 93 | 47.35 | 99 | 22 | 996 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d4a10f12098912f6_6164d043", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
58
] | [
60
] | [
15
] | [
10
] | |
2024-11-18T19:39:54.160493+00:00 | 1,583,727,336,000 | d8070d32623a631e5d9b9c4cf43d38cac3e227ee | 3 | {
"blob_id": "d8070d32623a631e5d9b9c4cf43d38cac3e227ee",
"branch_name": "refs/heads/master",
"committer_date": 1583727336000,
"content_id": "01930e81743c1e336e56d4bb1c86f1aca826976d",
"detected_licenses": [
"MIT"
],
"directory_id": "c5df07813a31298b36d6d203ffe09bcd597f58cd",
"extension": "py",
"fi... | 2.90625 | stackv2 | #!/usr/bin/env python
#===============================================================================
# title :NowPlaying.py
# description :This script will create a NowPlaying.txt file that contains
# the info for the song that is currently being played via VLC
# author :Tiphe... | 177 | 35.07 | 118 | 21 | 1,438 | python | [{"finding_id": "codeql_py/request-without-cert-validation_0fba2e7fe2b0a6e3_2f6916a1", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
49
] | [
null
] | [
13
] | [
77
] | |
2024-11-18T19:39:56.798309+00:00 | 1,629,983,820,000 | d6b9c94d8ce69ad15578ad43b63be095dbf44a6a | 3 | {
"blob_id": "d6b9c94d8ce69ad15578ad43b63be095dbf44a6a",
"branch_name": "refs/heads/main",
"committer_date": 1629983820000,
"content_id": "9d46a9b3f1e758d8bb08e2c31449643585d7d39f",
"detected_licenses": [
"MIT"
],
"directory_id": "261a5bc3dc7ecec683722fbe43fb6ff17c8a7fef",
"extension": "py",
"file... | 3.25 | stackv2 | # Multi-Threaded ZIP files bruteforce tool
# calfcrusher@inventati.org
# Usage: ./ZipBrute.py -f file.zip -d wordlist.txt
import optparse
import threading
import zipfile
import time
import pyfiglet
import os
import psutil
def extractzip(zipfilepath, password, startedtime):
"""Extract zip file"""
try:
... | 68 | 29.56 | 91 | 16 | 483 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6789ed487ec479db_d1e837d0", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
20
] | [
null
] | [
19
] | [
54
] | |
2024-11-18T20:18:30.084132+00:00 | 1,636,682,020,000 | 74a03907345896112444f64d323727a483ca224c | 2 | {
"blob_id": "74a03907345896112444f64d323727a483ca224c",
"branch_name": "refs/heads/main",
"committer_date": 1636684588000,
"content_id": "eca14ed580b306075a9dcdf40269324f874fcc86",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "379d5fa4c5a0e7f7b99852bed77f3ddcbc7868e2",
"extension": "py",
... | 2.359375 | stackv2 | # -*- coding: utf-8 -*-
import logging
import time
from functools import wraps
from flask import request
from flask_restful import Api as restful_Api
from flask_restful.utils import unpack
from sqlalchemy.util import NoneType
from block.api.exceptions import APIException, BadParameter
from werkzeug.exceptions import B... | 76 | 33.25 | 117 | 23 | 573 | python | [{"finding_id": "codeql_py/log-injection_327aa52ed7d40a30_eb68d26b", "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... | 3 | true | [
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"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)."
] | [
21,
21,
21
] | [
null,
null,
null
] | [
55,
68,
90
] | [
66,
88,
102
] | |
2024-11-18T20:18:45.943261+00:00 | 1,620,175,885,000 | 3b67bc8561fec0beeac37f62b2334428747fbe2d | 2 | {
"blob_id": "3b67bc8561fec0beeac37f62b2334428747fbe2d",
"branch_name": "refs/heads/master",
"committer_date": 1620175885000,
"content_id": "41903b497c58bf9e7fe0e2a546a618173f68845f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5dcc553de0245ac430b8b479d1aaba643239a2c9",
"extension": "py"... | 2.4375 | stackv2 | import re
import urllib3
import datetime
import time
import os
import sys
from dotenv import load_dotenv
from db.DBConnection import DBConnection
from entities.Entities import Configuracao, Carteira, CotacaoTempoReal, Monitoramento, Acao, AcessoAPI
class BuscaCotacoes:
api_key = None
time_sleep = None
dbC... | 119 | 45 | 121 | 22 | 1,221 | python | [{"finding_id": "codeql_py/overly-large-range_be4ac6d540a5df87_ed8be491", "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.", "remediation": "", "loc... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with 0-9 in the same character class."
] | [
106
] | [
null
] | [
39
] | [
42
] | |
2024-11-18T20:29:57.674405+00:00 | 1,419,042,165,000 | 76dae8b49b61c7b33bbe7d3827f54d2ca72d2101 | 3 | {
"blob_id": "76dae8b49b61c7b33bbe7d3827f54d2ca72d2101",
"branch_name": "refs/heads/master",
"committer_date": 1419042165000,
"content_id": "e76ff63c92571a465a0fc8f9e693acf33cbd3ea2",
"detected_licenses": [
"MIT"
],
"directory_id": "9b288bb1e8b492c3afd49eb52314e512b5609c65",
"extension": "py",
"fi... | 3.0625 | stackv2 | import hashlib, uuid, re
def generate_random_salt():
return uuid.uuid4().hex
def salted_hash(value, salt):
return hashlib.sha512(value + salt).hexdigest()
def is_valid_email(email):
# RE taken from http://www.regular-expressions.info/email.html
valid_email = re.compile("\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.... | 60 | 28.6 | 78 | 13 | 426 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_367a43605f544214_92fcfdc7", "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... | [
7
] | [
null
] | [
27
] | [
39
] | |
2024-11-18T20:29:59.168155+00:00 | 1,583,509,746,000 | a4a545115dde3481c7340ba61b1f84ce01bb02a3 | 3 | {
"blob_id": "a4a545115dde3481c7340ba61b1f84ce01bb02a3",
"branch_name": "refs/heads/master",
"committer_date": 1583509746000,
"content_id": "69139b2ee50b7e492a3520ffe99369e29420d5a7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6518dc5952101d7182919411e3c3f00142ceca70",
"extension": "py"... | 2.90625 | stackv2 | #!/usr/bin/python
import hmac, base64, struct, hashlib, time, json, os
def get_hotp_token(secret, intervals_no):
"""This is where the magic happens."""
key = base64.b32decode(normalize(secret), True) # True is to fold lower into uppercase
msg = struct.pack(">Q", intervals_no)
h = bytearray(hmac.new(key, msg, hash... | 45 | 28.16 | 87 | 17 | 396 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_910a8b8622094b65_23a83b52", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
41
] | [
null
] | [
9
] | [
53
] | |
2024-11-18T20:51:20.818210+00:00 | 1,521,371,380,000 | 6009ef73f4c08ba44080c2e9244be78af941f184 | 2 | {
"blob_id": "6009ef73f4c08ba44080c2e9244be78af941f184",
"branch_name": "refs/heads/master",
"committer_date": 1521371380000,
"content_id": "ef10e5a8e8991d25afd385839458360684bc8c5a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "879e9f1d5ef7a48a33dc7851c7ebf8bddf8cfc2b",
"extension": "p... | 2.375 | stackv2 | import typing # noqa
import jinja2
from apistar import exceptions
from apistar.interfaces import Router, StaticFiles, Template, Templates
from apistar.types import Settings
class Jinja2Template(Template):
def __init__(self, template: jinja2.Template) -> None:
self._template = template
def render(s... | 52 | 32.98 | 89 | 19 | 379 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2557fffbdd3f6b7e_748582c8", "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."
] | [
41
] | [
null
] | [
15
] | [
48
] | |
2024-11-18T20:51:25.255442+00:00 | 1,602,587,863,000 | 2f4a75420a5550e3567da2f84c9c2b9ea9f833c4 | 3 | {
"blob_id": "2f4a75420a5550e3567da2f84c9c2b9ea9f833c4",
"branch_name": "refs/heads/master",
"committer_date": 1602587863000,
"content_id": "55fdcc7e99151cfab5d4f053827f2e9480d2020b",
"detected_licenses": [
"MIT"
],
"directory_id": "99b4ce674833286309a8bc3c8cb9e0dfba9caf64",
"extension": "py",
"fi... | 2.59375 | stackv2 | import yaml
import csv
import getpass
from netmiko import ConnectHandler
import re
import logging
from jinja2 import Environment, FileSystemLoader
from time import sleep
from time import strftime
import os
logging.basicConfig(filename="aruba-setupper.log", level=logging.INFO,
format="%(asctime)s - ... | 280 | 36.14 | 112 | 21 | 2,492 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d75958c73dc51177_52a46587", "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."
] | [
91
] | [
null
] | [
11
] | [
53
] | |
2024-11-18T19:07:20.123090+00:00 | 1,576,489,490,000 | b04042457107761587d912999d066ce203df073d | 3 | {
"blob_id": "b04042457107761587d912999d066ce203df073d",
"branch_name": "refs/heads/master",
"committer_date": 1576489490000,
"content_id": "eedf4254712dbe6cb018987bf0dfec062fae54c4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0e81a6c270b8568f62eb0dc3299bbc56a41a5852",
"extension": "py"... | 2.515625 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@version: v1.0
@author: Evan
@time: 2019/12/11 14:17
"""
import tornado.web
import tornado.ioloop
import os
"""
异步服务器端处理方式1
"""
class IndexHandler(tornado.web.RequestHandler):
def get(self, filename):
BaseDir = os.path.join(os.getcwd(), 'static', 'images... | 44 | 17.68 | 63 | 13 | 234 | python | [{"finding_id": "codeql_py/path-injection_e3d9d8c334e0d119_e6d5482c", "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)."
] | [
24
] | [
null
] | [
19
] | [
23
] | |
2024-11-18T19:07:42.308029+00:00 | 1,523,302,585,000 | 7fe63b11fbcb2b1663aa36ba4f0dea0e7ffa6139 | 2 | {
"blob_id": "7fe63b11fbcb2b1663aa36ba4f0dea0e7ffa6139",
"branch_name": "refs/heads/master",
"committer_date": 1523302585000,
"content_id": "3516c97f0b2772f9150f8637ec78281e99b2effe",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ed451166513a3c7591cc48636b412ec87ea2e349",
"extension": "py"... | 2.40625 | stackv2 |
"""
simple test code, only for internal testing
how to run:
in miniconda: conda install flask
$export Geoserver_Pass = ???
$export FLASK_APP=server-debug.py
$export FLASK_DEBUG=1
$python35 -m flask run
run sh script with . runflask.sh
http://localhost... | 107 | 21.4 | 61 | 12 | 612 | python | [{"finding_id": "codeql_py/reflective-xss_7e6ffe8b08ed9a4a_9ee516ea", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
64,
100
] | [
null,
null
] | [
16,
16
] | [
54,
54
] | |
2024-11-18T19:07:46.162558+00:00 | 1,450,467,051,000 | 45747befae325df5e81b7958b3539d8a4880c712 | 2 | {
"blob_id": "45747befae325df5e81b7958b3539d8a4880c712",
"branch_name": "refs/heads/master",
"committer_date": 1450467051000,
"content_id": "856dea314ee338d763705d22cfc76cb70a12ca70",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bf374502e72f304db5d3f8aa8c41b44225c2e5a7",
"extension": "py"... | 2.3125 | stackv2 | """Python implementation of the Watson Robotics SDK"""
# -*- coding: utf-8 -*-
# This class implements core robotics services provided by Watson
#
# IBM Confidential
# OCO Source Materials
#
# 5727-I17
# (C) Copyright IBM Corp. 2001, 2015 All Rights Reserved.
#
# The source code for this program is not published or oth... | 144 | 39.94 | 136 | 21 | 1,344 | python | [{"finding_id": "codeql_py/request-without-cert-validation_92a08c4b23b3a617_b8a783f5", "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)."
] | [
82
] | [
null
] | [
16
] | [
115
] | |
2024-11-18T19:07:46.725148+00:00 | 1,673,545,932,000 | ad85439a10303232efbef4ba04b5bc186045d942 | 4 | {
"blob_id": "ad85439a10303232efbef4ba04b5bc186045d942",
"branch_name": "refs/heads/master",
"committer_date": 1673545932000,
"content_id": "db769900115d59f6d02d4a2809236037606c3b05",
"detected_licenses": [
"MIT"
],
"directory_id": "ab91a2ae9eb37bc9a21c85643bcf596de74c55b5",
"extension": "py",
"fi... | 3.84375 | stackv2 | """Create a passphase in the style of xkcd 'correct horse battery staple'"""
import sys
import random
from . import wordlist
def correct_horse_battery_staple(words, word_count):
"""Return n cryptographically "strong" shorter words from the standard list
without repeats as suggested in https://xkcd.com/936/
... | 46 | 30.33 | 86 | 14 | 359 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_aba48840dd5e8261_1b01d6e6", "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."
] | [
42
] | [
null
] | [
11
] | [
59
] | |
2024-11-18T19:07:48.986792+00:00 | 1,559,370,082,000 | 1f292c1c4acb8b031b3df9023a6e7109a7cba144 | 3 | {
"blob_id": "1f292c1c4acb8b031b3df9023a6e7109a7cba144",
"branch_name": "refs/heads/master",
"committer_date": 1559370082000,
"content_id": "1bfac1ca4180e2ea1cb5947ac9b24d2447d7018e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7b3f41424c9cfa0e34470065d2e4185b0cfa8530",
"extension": "py"... | 2.546875 | stackv2 | import re
import os
import sys
import json
import time
import pickle
import random
import requests
import traceback
import url_normalize
from multiprocessing import Pool
from multiprocessing import Queue
from multiprocessing import Process
# Disable insecure warning
from requests.packages.urllib3.exceptions import Inse... | 427 | 33.76 | 155 | 18 | 3,210 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c8553ee8201b5509_96948cce", "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)."
] | [
360
] | [
null
] | [
23
] | [
99
] | |
2024-11-18T19:07:50.427965+00:00 | 1,562,134,821,000 | 39824b37987905a8a7764e3ed89174ef786c021d | 3 | {
"blob_id": "39824b37987905a8a7764e3ed89174ef786c021d",
"branch_name": "refs/heads/master",
"committer_date": 1562134821000,
"content_id": "b9c1f4e4117cd345ed32983f4d2ccadcbc768cf7",
"detected_licenses": [
"MIT"
],
"directory_id": "a4f6dd17e28c61554cb1de5f96087fc0d0c23ea1",
"extension": "py",
"fi... | 2.515625 | stackv2 | from logs import logDecorator as lD
import jsonref, pprint
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
sns.set(style="dark")
sns.set_palette(sns.diverging_palette(240, 120, l=60, n=3, center="dark"))
from scipy import stats
from scipy.stats import... | 112 | 30.84 | 143 | 24 | 925 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b61194b5ae958264_0420536b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
85,
106
] | [
null,
null
] | [
24,
24
] | [
105,
143
] | |
2024-11-18T19:08:01.814150+00:00 | 1,624,521,479,000 | 0b2ef152eebed2f42e224452266eefd865f0d98c | 3 | {
"blob_id": "0b2ef152eebed2f42e224452266eefd865f0d98c",
"branch_name": "refs/heads/main",
"committer_date": 1624521479000,
"content_id": "c448f60cdc21be7b9649dc26db96ad10a1684893",
"detected_licenses": [
"MIT"
],
"directory_id": "f1f9f7e6d296723c1e65a502f7eb05c5f130eb16",
"extension": "py",
"file... | 2.546875 | stackv2 | import logging
import sys
import pickle
from typing import List, Union
import click
import pandas as pd
import uvicorn
from fastapi import FastAPI, Depends, HTTPException
from pydantic import BaseModel, conlist
from src.enities.app_params import read_app_params, AppParams
from src.features.build_features import Custo... | 89 | 27.33 | 101 | 13 | 560 | python | [{"finding_id": "codeql_py/log-injection_1c169da4d01b4821_e74f5b44", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
73
] | [
null
] | [
17
] | [
46
] | |
2024-11-18T19:18:24.650484+00:00 | 1,545,395,946,000 | 80f0dd970ad8ecad7542e837de5d42f393b1fc3f | 2 | {
"blob_id": "80f0dd970ad8ecad7542e837de5d42f393b1fc3f",
"branch_name": "refs/heads/master",
"committer_date": 1545395946000,
"content_id": "1ad19c46b3e67aa8773520f2eac33dc8a211c055",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "69acf7e0adebdffdbfbcf4f70fc742472f4b2fe7",
"extension": "py"... | 2.390625 | stackv2 | #CITS3002 Final Project - Python Testing Server
#Jesse Wyatt (20756971)
#Joshua Ng (20163079)
#Hoang Tuan Anh (21749914)
import ssl
import socket
import http.server
import http.cookies
import socketserver
import cgi
import datetime
import uuid
import binascii
import hashlib
HOSTNAME = "QuestionServer.CITS3002"
QHOST ... | 359 | 38.32 | 126 | 28 | 3,079 | python | [{"finding_id": "codeql_py/insecure-protocol_4ccc421eecbf4c7a_37035a8d", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/insecure-protocol",
"py/insecure-default-protocol"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.create_default_context](1).",
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."... | [
326,
349
] | [
null,
352
] | [
13,
25
] | [
21,
58
] | |
2024-11-18T19:18:46.235132+00:00 | 1,618,912,971,000 | 9ee4b0b65b98347446207010a1b91ff08a432394 | 3 | {
"blob_id": "9ee4b0b65b98347446207010a1b91ff08a432394",
"branch_name": "refs/heads/master",
"committer_date": 1618912971000,
"content_id": "a936f519b8a34f0cbfdab04b1e3eb13f1e996e6e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f6f3dc45ce6d49e648781fd506e6ef38a040299d",
"extension": "p... | 2.578125 | stackv2 | """A very basic Flask app to allow browsing the records of an Odoo server."""
import os
from xmlrpc.client import Fault, ServerProxy
from flask import Flask, redirect, render_template, request, url_for
from flask_caching import SimpleCache
app = Flask(__name__)
cache = SimpleCache(default_timeout=1)
SERVER = os.get... | 222 | 29.13 | 97 | 15 | 1,578 | python | [{"finding_id": "codeql_py/log-injection_1ed9a50904761944_2af0964a", "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).\nThis log entry depends on a [user-provided value](2)... | 6 | true | [
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2).\nThis log entry depends on a [user-provided value](3).\nThis log entry depends on a [user-provided value](4).\nThis log entry depends on a [user-provided value](5).\nThis log entry depends on a [user-provid... | [
38,
40,
105,
135,
155,
171
] | [
null,
null,
null,
null,
null,
null
] | [
26,
22,
22,
22,
22,
22
] | [
63,
52,
27,
37,
37,
27
] | |
2024-11-18T19:18:50.016023+00:00 | 1,566,639,328,000 | b72db0cbe50f435aed540d1ea7bebd0a6de9777d | 3 | {
"blob_id": "b72db0cbe50f435aed540d1ea7bebd0a6de9777d",
"branch_name": "refs/heads/master",
"committer_date": 1566639328000,
"content_id": "083c92e660bead2e5d215027aff5b008430a3e98",
"detected_licenses": [
"MIT"
],
"directory_id": "c2315daeb5cd508dcc45f880257a4c4eb0fd9c90",
"extension": "py",
"fi... | 2.6875 | stackv2 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
from tkinter import *
from tkinter.filedialog import askopenfilename
from tkinter import messagebox
import boto3
import os
import sys
import threading
import configparser
class ProgressPercentage(object):
def __init__(self, filename):
self._filename = filename
... | 189 | 36.86 | 119 | 22 | 2,106 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c39b1780d9901c84_6b63a3b0", "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... | 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.\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)](2) as clear text."
] | [
53,
102
] | [
59,
null
] | [
11,
30
] | [
39,
51
] | |
2024-11-18T19:18:53.390265+00:00 | 1,535,753,802,000 | 1ec23b396e1160818ba437745bbbe552f2c8773c | 3 | {
"blob_id": "1ec23b396e1160818ba437745bbbe552f2c8773c",
"branch_name": "refs/heads/master",
"committer_date": 1535753802000,
"content_id": "eb1b1e1f18ec0a951cb8f2c61fef32309b519f37",
"detected_licenses": [
"MIT"
],
"directory_id": "20a2170e8d82b7fca361cd86516a28aa27713663",
"extension": "py",
"fi... | 2.765625 | stackv2 | import argparse
import json
from pprint import pprint
import requests
from munch import Munch
import card_util
import constants
from models import Props, ServerCard
def main():
"""Handle command line arguments"""
# parse command line args
arg_parser = argparse.ArgumentParser()
arg_parser.add_argumen... | 53 | 23.49 | 89 | 12 | 292 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_888e5b394381ab79_37e00133", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
41,
49
] | [
null,
null
] | [
11,
15
] | [
24,
41
] | |
2024-11-18T19:19:15.550618+00:00 | 1,622,227,299,000 | b263210e7e326460847be207e8d33f3b08aee21d | 3 | {
"blob_id": "b263210e7e326460847be207e8d33f3b08aee21d",
"branch_name": "refs/heads/main",
"committer_date": 1622227299000,
"content_id": "c864c19067fc98fd67db31d0efaa21d8f2cbae4f",
"detected_licenses": [
"MIT"
],
"directory_id": "2cac2e109fa5c61f58e04911f5c637b85abea8b8",
"extension": "py",
"file... | 2.578125 | stackv2 | import requests
import os
import random
import string
import json
chars = string.ascii_letters + string.digits + '!@#$%^&*()'
random.seed = (os.urandom(1024))
url = 'http://craigslist.pottsfam.com/index872dijasydu2iuad27aysdu2yytaus6d2ajsdhasdasd2.php'
names = json.loads(open('names.json').read())
for name in names... | 25 | 26.6 | 93 | 11 | 213 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b8b7e98eedec34bc_52231264", "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."
] | [
25
] | [
null
] | [
9
] | [
69
] | |
2024-11-18T19:29:42.060953+00:00 | 1,605,695,917,000 | c4c2e580b049ac78644f47577e5c1736875400b3 | 2 | {
"blob_id": "c4c2e580b049ac78644f47577e5c1736875400b3",
"branch_name": "refs/heads/master",
"committer_date": 1605695917000,
"content_id": "c788384a1b2123cb1137b56cd87fcd2073e36ec6",
"detected_licenses": [
"MIT"
],
"directory_id": "5c5a4cf029365d69f988fb3eee30c6e35343275a",
"extension": "py",
"fi... | 2.3125 | stackv2 |
import network, socket
from Maix import GPIO
from fpioa_manager import fm
from board import board_info
import time
WIFI_SSID = "webduino.io"
WIFI_PASSWD = "webduino"
# IO map for ESP32 on Maixduino
fm.register(25,fm.fpioa.GPIOHS10)#cs
fm.register(8,fm.fpioa.GPIOHS11)#rst
fm.register(9,fm.fpioa.GPIOHS12)#rdy
fm.reg... | 83 | 23.01 | 159 | 15 | 650 | python | [{"finding_id": "codeql_py/insecure-default-protocol_4e3279a5c48a0daa_f48cd2f4", "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."
] | [
68
] | [
null
] | [
19
] | [
59
] | |
2024-11-18T19:29:44.203582+00:00 | 1,552,598,300,000 | 02faa1a199b53d55bfec68a293358a695727f60c | 3 | {
"blob_id": "02faa1a199b53d55bfec68a293358a695727f60c",
"branch_name": "refs/heads/master",
"committer_date": 1552598300000,
"content_id": "4161c5a8234527ba3492d8554124e0bd92ac7d19",
"detected_licenses": [
"MIT"
],
"directory_id": "8b4d84fcf32c03783dcaca0dd470dc60ed829282",
"extension": "py",
"fi... | 3.171875 | stackv2 | #! /usr/bin/env python3
# Project Chap. 7
# Phone number and email address extractor
import re
import pyperclip
phoneRegex = re.compile(r'''(
(\d{3}|\(\d{3}\))? #area code
(\s|-|\.)? #seperator
(\d{3}) #first three digits
(\s|-|\.) #seperator
(\d{4}) ... | 42 | 27.02 | 58 | 11 | 352 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ad8965b843d69b8d_aa4bd6f0", "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."
] | [
40
] | [
null
] | [
11
] | [
29
] | |
2024-11-18T19:29:49.783961+00:00 | 1,462,047,547,000 | 7c86aa0fa84cfa8f5dd390a3e3e75b5311996de0 | 3 | {
"blob_id": "7c86aa0fa84cfa8f5dd390a3e3e75b5311996de0",
"branch_name": "refs/heads/master",
"committer_date": 1462047547000,
"content_id": "5da84e9213844393cc67332801991e309955bb4b",
"detected_licenses": [
"MIT"
],
"directory_id": "bd544a5c03b384da4a9245f9db5d569778161a41",
"extension": "py",
"fi... | 2.859375 | stackv2 | #!/usr/bin/env python
import ssl
try:
from urllib2 import Request, urlopen
from urllib import quote
except ImportError:
from urllib.request import Request, urlopen
from urllib.parse import quote
URI = "https://dyn.dns.he.net/nic/update?hostname={hostname}&password={key}"
def run_update(hostname, key... | 35 | 29.06 | 92 | 11 | 259 | python | [{"finding_id": "codeql_py/insecure-protocol_6a963ec1699eb8b6_64377df5", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1).", "remediation": "", "lo... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)."
] | [
20
] | [
null
] | [
15
] | [
49
] | |
2024-11-18T19:44:13.399485+00:00 | 1,597,239,453,000 | ec93522803c723794cc5abdf45ba7203a9452cd7 | 2 | {
"blob_id": "ec93522803c723794cc5abdf45ba7203a9452cd7",
"branch_name": "refs/heads/master",
"committer_date": 1597239453000,
"content_id": "9b165d0c589f9761ad5a88a4a740717e585c579e",
"detected_licenses": [
"MIT"
],
"directory_id": "aff089990371e43dc7758cd2154c3646363b8ab1",
"extension": "py",
"fi... | 2.453125 | stackv2 | import os
import requests
import time
from pymongo import MongoClient, errors
from src.spider import ArticleSpider
class WechatSpider:
def __init__(self, nickname, token, cookie, pass_ticket, appmsg_token, key, uin):
self.nickname = nickname
self.token = token
self.cookie = cookie
... | 111 | 34.96 | 119 | 18 | 848 | python | [{"finding_id": "codeql_py/request-without-cert-validation_0c1c7d8ef6546cae_76ebdbe1", "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)."
] | [
61,
80
] | [
null,
null
] | [
24,
16
] | [
92,
84
] | |
2024-11-18T19:44:16.632828+00:00 | 1,690,664,607,000 | 08468d6b8084eeaff44953f8c76523b3b21bf5d2 | 2 | {
"blob_id": "08468d6b8084eeaff44953f8c76523b3b21bf5d2",
"branch_name": "refs/heads/master",
"committer_date": 1690664607000,
"content_id": "aef318345b54e9acf3cbf1a99fca8e0ca402541d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "29d9a947fc954e5d182cb2d8292f96c0d27cdde0",
"extension": "py"... | 2.484375 | stackv2 | #(C) Copyright Syd Logan 2020-2021
#(C) Copyright Thousand Smiles Foundation 2020-2021
#
#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 req... | 176 | 32.24 | 128 | 15 | 1,521 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_2c1568934a751a7e_dd8ba8dc", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
146,
148
] | [
null,
null
] | [
17,
15
] | [
29,
40
] | |
2024-11-18T19:44:25.102865+00:00 | 1,623,259,106,000 | 8da331b8aaba46d048a35d87e37e23eece1f8eb0 | 3 | {
"blob_id": "8da331b8aaba46d048a35d87e37e23eece1f8eb0",
"branch_name": "refs/heads/master",
"committer_date": 1623259106000,
"content_id": "eb481b5383eba309de019ef2685d0e17cbcccdff",
"detected_licenses": [
"MIT"
],
"directory_id": "f817a899dd6f624c42eece56f250af1e8bfa0ff9",
"extension": "py",
"fi... | 2.671875 | stackv2 | import sys
import logging
import json
import math
import csv
import re
import os
from decimal import Decimal
import pickle
import webbrowser
from datetime import datetime
import steam.webauth as wa
from bs4 import BeautifulSoup
from jinja2 import Template
# Logging configuration
logging.basicConfig(
stream=sys.std... | 163 | 36.45 | 131 | 19 | 1,344 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_082cdc00bad775ce_d66cf2b6", "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."
] | [
136
] | [
null
] | [
24
] | [
54
] | |
2024-11-18T19:44:28.100278+00:00 | 1,580,474,846,000 | 2d320f8255c87ad9db7ef290c7a80e25c36ab258 | 2 | {
"blob_id": "2d320f8255c87ad9db7ef290c7a80e25c36ab258",
"branch_name": "refs/heads/master",
"committer_date": 1580474850000,
"content_id": "f105a3bb3c964e163ec0bab6b8ec7b278688be87",
"detected_licenses": [
"MIT"
],
"directory_id": "b0277a6278406bbd9824304ca7705dbf4eec9253",
"extension": "py",
"fi... | 2.40625 | stackv2 | # coding=utf-8
from flask import Flask, request, render_template
import requests, json, os
app = Flask(__name__)
# ENVIRONMENT VARIABLE
APP_URL = os.environ['APP_URL']
SLACK_URL = os.environ['SLACK_URL']
CLIENT_ID = os.environ['CLIENT_ID']
CLIENT_SECRET = os.environ['CLIENT_SECRET']
# GLOBAL VARIABLE
SCOPE = 'read_s... | 120 | 28.24 | 161 | 14 | 887 | python | [{"finding_id": "codeql_py/reflective-xss_774e00864e73e757_fcc251dd", "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-117"
] | [
"py/reflective-xss",
"py/log-injection"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
115,
64
] | [
null,
null
] | [
12,
42
] | [
42,
54
] | |
2024-11-18T19:44:31.069861+00:00 | 1,515,927,695,000 | e72ba5f4e0d325be13df37a1ba214182b18cad83 | 3 | {
"blob_id": "e72ba5f4e0d325be13df37a1ba214182b18cad83",
"branch_name": "refs/heads/master",
"committer_date": 1515927695000,
"content_id": "6c7d2e38d648abf1fc612bb3e12f0f557c26e7a2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9de6af18dd40f61bac6dfbebd2ecdb7bc1adf2a2",
"extension": "py"... | 2.65625 | stackv2 | """
Module that implements SSH client.
"""
import socket
from contextlib import contextmanager
from paramiko import SSHClient, AutoAddPolicy, AuthenticationException, \
SSHException
from twindb_backup import LOG
from twindb_backup.ssh.exceptions import SshClientException
class SshClient(object):
"""
SSH... | 110 | 32.69 | 76 | 19 | 748 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_b8b7f2cf72160305_f6b1ded6", "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."
] | [
47
] | [
null
] | [
9
] | [
59
] | |
2024-11-18T19:58:25.884855+00:00 | 1,619,386,373,000 | 68037f72b658709fb43d2c1f53aa7942d86621a3 | 3 | {
"blob_id": "68037f72b658709fb43d2c1f53aa7942d86621a3",
"branch_name": "refs/heads/main",
"committer_date": 1619386373000,
"content_id": "9b5169004b8cb4d04770e4328c09182e380ba89f",
"detected_licenses": [
"MIT"
],
"directory_id": "7d07a288840cec0a672e7ec055e0d7a75a6aeee3",
"extension": "py",
"file... | 2.578125 | stackv2 | from app import app, utils
import urllib.request
from flask import request
import datetime
import simplejson as json
from time import sleep
# A route to return all of the available futures at date.
# http://127.0.0.1:5000/api/v1/futures?date=2021-04-01&q=Si
@app.route('/api/v1/futures', methods=['GET'])
def api_future... | 121 | 38.81 | 114 | 16 | 1,357 | python | [{"finding_id": "codeql_py/partial-ssrf_3643948d259c3d52_bf8f8b46", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
70
] | [
null
] | [
31
] | [
60
] | |
2024-11-18T20:10:14.110704+00:00 | 1,588,877,412,000 | 66e73faf78bb21e5e69e4885456e5ed00a6d152d | 3 | {
"blob_id": "66e73faf78bb21e5e69e4885456e5ed00a6d152d",
"branch_name": "refs/heads/master",
"committer_date": 1588877412000,
"content_id": "0d525f98973b472378e37a223be285e2b3cf1b2a",
"detected_licenses": [
"MIT"
],
"directory_id": "51598cbf3e1132aff927a94d5ab2ca0e50f1e4d9",
"extension": "py",
"fi... | 3.015625 | stackv2 | import requests
import io
import pandas as pd
import matplotlib.pyplot as plt
import urllib3
urllib3.disable_warnings()
class VirginiaData:
@staticmethod
def get_vdh_data():
endpoint = 'https://www.vdh.virginia.gov/content/uploads/sites/182/2020/03/VDH-COVID-19-PublicUseDataset-Cases.csv'
res... | 43 | 34.44 | 123 | 16 | 367 | python | [{"finding_id": "codeql_py/request-without-cert-validation_bddf40f407c8050a_0cc11428", "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
] | [
20
] | [
56
] | |
2024-11-18T20:10:30.003913+00:00 | 1,629,144,219,000 | 6a37568f57035eed3638ffe07a222f7249926db8 | 2 | {
"blob_id": "6a37568f57035eed3638ffe07a222f7249926db8",
"branch_name": "refs/heads/master",
"committer_date": 1629144219000,
"content_id": "86985f13913b486f36d521b61f6762f7e1392cd9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "90375f78bc54cce017f06f340491c6efcd5dba8b",
"extension": "py"... | 2.453125 | stackv2 | import logging
import re
import shutil
import tarfile
from concurrent.futures.thread import ThreadPoolExecutor
from pathlib import Path
from typing import Dict, Optional, Sequence, Tuple, Union
from tqdm.auto import tqdm
from lhotse import validate_recordings_and_supervisions
from lhotse.audio import Recording, Recor... | 185 | 41.34 | 142 | 19 | 1,803 | python | [{"finding_id": "codeql_py/tarslip_2ea24a68d93ab97f_5c2d9704", "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)."
] | [
69
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T20:23:15.476810+00:00 | 1,545,452,759,000 | 5c0f6efb1af97016c704ac3a716383b638eeafed | 4 | {
"blob_id": "5c0f6efb1af97016c704ac3a716383b638eeafed",
"branch_name": "refs/heads/master",
"committer_date": 1545452759000,
"content_id": "cbc65bf6ded588b965a97a92c6af179f8c0cb9b6",
"detected_licenses": [
"MIT"
],
"directory_id": "fe0aedba140110f75fdf51f19ef69a3a4670b517",
"extension": "py",
"fi... | 3.515625 | stackv2 | import hashlib
import time
# 在Python3以后,字符串和bytes类型彻底分开了。字符串是以字符为单位进行处理的,bytes类型是以字节为单位处理的。
# bytes数据类型在所有的操作和使用甚至内置方法上和字符串数据类型基本一样,也是不可变的序列对象。
# bytes对象只负责以二进制字节序列的形式记录所需记录的对象,至于该对象到底表示什么(比如到底是什么字符)则由相应的编码格式解码所决定。
# Python3中,bytes通常用于网络数据传输、二进制图片和文件的保存等等。可以通过调用bytes()生成bytes实例,其值形式为 b'xxxxx',其中 'xxxxx' 为一至多个转义的十六进制字符... | 37 | 31.24 | 105 | 12 | 504 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e508dc63dc7d4b22_1e384a64", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
25
] | [
null
] | [
25
] | [
58
] | |
2024-11-18T20:23:17.910834+00:00 | 1,636,619,723,000 | 2e7efa10a566c062ab18b328affa144d1ef3d1ec | 3 | {
"blob_id": "2e7efa10a566c062ab18b328affa144d1ef3d1ec",
"branch_name": "refs/heads/master",
"committer_date": 1636619723000,
"content_id": "cba60ef29ca81142d8bfa10846f53a8eadfaa6ef",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9e4464764d2eea35e01496933ec24ddf9b62b90c",
"extension": "py"... | 2.640625 | stackv2 | #!/usr/bin/env python3
from pathlib import Path
from jinja2 import Template
import os
import argparse
import json
import copy
severities = {'High': 'HIGH', 'Medium': 'MEDIUM', 'Low': 'LOW', 'Info': 'INFO'}
colors = {'High': '#C00', 'Medium': '#C60', 'Low': '#CC0', 'Info': '#00C'}
template_dict = {}
platforms = []
de... | 160 | 39.79 | 117 | 20 | 1,492 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_08f07857f4be1eb1_65c951a2", "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."
] | [
136,
151
] | [
null,
null
] | [
30,
26
] | [
55,
51
] | |
2024-11-18T20:23:25.541803+00:00 | 1,608,645,242,000 | fb81bdb873be6e9adb8a55aac4a6de1fee009de6 | 3 | {
"blob_id": "fb81bdb873be6e9adb8a55aac4a6de1fee009de6",
"branch_name": "refs/heads/master",
"committer_date": 1608645242000,
"content_id": "0ab334df873748ff8cc69fadd68405728ad1ff18",
"detected_licenses": [
"MIT"
],
"directory_id": "8941c8ca788b1a45bfad23ca26ebfa357c13f09b",
"extension": "py",
"fi... | 2.953125 | stackv2 | from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "Миссия Колонизация Марса"
@app.route('/index')
def index1():
return "на Марсе будут яблони цвести!"
@app.route('/results/<nickname>/<int:level>/<float:rating>', methods=['GET'])
def bootstrap(nickname, level, rating):
... | 73 | 37.12 | 106 | 9 | 692 | python | [{"finding_id": "codeql_py/reflective-xss_042eca3b48d2d3d1_f8d1f7d2", "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).\nCross-site scripting vulnerability d... | 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).\nCross-site scripting vulnerability due to a [user-provided value](2).\nCross-site scripting vulnerability due to a [user-provided value](3).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
18,
48
] | [
44,
62
] | [
12,
12
] | [
27,
54
] | |
2024-11-18T20:23:33.388699+00:00 | 1,583,849,458,000 | 89a319fd291fc103751a2c3b042b0596b5c5a69e | 3 | {
"blob_id": "89a319fd291fc103751a2c3b042b0596b5c5a69e",
"branch_name": "refs/heads/master",
"committer_date": 1583849458000,
"content_id": "0c8de4289ecf7ade61065003d6c38b325ce8e2c8",
"detected_licenses": [
"MIT"
],
"directory_id": "aea97ceca32017841f1d778c778d8a5bb62082e8",
"extension": "py",
"fi... | 2.625 | stackv2 | import json
import logging
import os
import falcon
import requests
from weather import get_weather
TOKEN = os.environ['TELEGRAM_BOT_TOKEN']
BASE_URL = 'https://api.telegram.org/bot' + TOKEN + '/'
class GetMeResource(object):
def on_get(self, req, resp):
result = requests.get(BASE_URL + 'getMe')
... | 109 | 32.82 | 79 | 18 | 751 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8925f9919489ff15_7f86bbde", "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
] | [
26
] | [
72
] | |
2024-11-18T20:50:36.415399+00:00 | 1,641,958,082,000 | fba573c5b05e3d3b6dd5118a20365a08206668f2 | 3 | {
"blob_id": "fba573c5b05e3d3b6dd5118a20365a08206668f2",
"branch_name": "refs/heads/master",
"committer_date": 1641958082000,
"content_id": "2343cefad29b79669d36f836bebe64a759e65e2c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "db06628bfb8bd4880f40d0eafe9e2aa0a2222102",
"extension": "p... | 2.546875 | stackv2 | #!/opt/local/bin/python
import cgi
import re
import datetime
import pytz
import os
def textbox(label, var, value, note):
default = ''
if (len(value) > 0):
default = str(value)
print("<LABEL for=\""+label+"\">"+label+": </LABEL>")
print(" <INPUT type=\"text\" name=\""+var+"\" value=\""+default... | 431 | 28.93 | 134 | 13 | 3,798 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_450ac6b70a6d7ec6_41d22a8e", "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... | [
14,
392
] | [
null,
null
] | [
11,
15
] | [
75,
28
] | |
2024-11-18T20:50:41.925630+00:00 | 1,622,859,915,000 | 84544fc09961fc71673d7283bc953c8788a99ac5 | 3 | {
"blob_id": "84544fc09961fc71673d7283bc953c8788a99ac5",
"branch_name": "refs/heads/main",
"committer_date": 1622859915000,
"content_id": "803e1d6a6c2dd408754d39dbddbdb93e9ca43499",
"detected_licenses": [
"MIT"
],
"directory_id": "81e50c5143641f7daee900b627af3e9d96311f29",
"extension": "py",
"file... | 2.734375 | stackv2 | from flask import Flask
application = Flask(__name__)
@application.route('/')
def index():
return """
<h1>AWS-Lambda-Flask-Example</h1>
<p>HI, I'M IML!</p>
"""
@application.route("/add/<int:a>/<int:b>")
def add_api(a, b):
return {"msg": "success", "result": a + b}, 200
if __name__ == '__main__':
applicati... | 20 | 15.95 | 48 | 10 | 103 | python | [{"finding_id": "codeql_py/flask-debug_6ea641cfb1f5e529_cdb52825", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"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.",
"Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2)."
] | [
20,
16
] | [
null,
null
] | [
2,
9
] | [
29,
49
] | |
2024-11-18T20:50:51.203580+00:00 | 1,631,889,285,000 | 1c878a5c7c6b70a68bf1d4ad967e78cdfc7b1565 | 2 | {
"blob_id": "1c878a5c7c6b70a68bf1d4ad967e78cdfc7b1565",
"branch_name": "refs/heads/main",
"committer_date": 1631889285000,
"content_id": "a2095b09a49e621b51b04b52cfde4dabfe3d8b5d",
"detected_licenses": [
"MIT"
],
"directory_id": "05bc06860856d73fe1e9475fc394044911a14438",
"extension": "py",
"file... | 2.359375 | stackv2 | import os
from flask import Flask, request
import random
import requests
app = Flask(__name__)
BASE_URL = os.getenv('BASE_URL', 'http://localhost')
@app.route('/gas/mattermost', methods=['POST'])
def prompt_gas():
prompt = request.form.get('text')
return {
"response_type": "in_channel",
"us... | 73 | 28.29 | 81 | 19 | 414 | python | [{"finding_id": "codeql_py/reflective-xss_d0a1db81e41f9c6f_ca480b62", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
15,
60,
67
] | [
50,
65,
72
] | [
12,
16,
16
] | [
6,
10,
10
] | |
2024-11-18T20:50:52.718130+00:00 | 1,577,688,231,000 | 253240af77eb8ff4f0ebdc5988aba8c2b86e48e2 | 2 | {
"blob_id": "253240af77eb8ff4f0ebdc5988aba8c2b86e48e2",
"branch_name": "refs/heads/master",
"committer_date": 1577688231000,
"content_id": "9a5d3678bfeeabfad16b8b33842e2aafceb05f43",
"detected_licenses": [
"MIT"
],
"directory_id": "80fd3356558586577aef61b45d5729e673e5cb77",
"extension": "py",
"fi... | 2.453125 | stackv2 | import praw
import praw.exceptions
import re
import itertools
import sys
import os
# READ THIS TO RUN
# This was written with python3
# to run, do python3 nanodelinkbot.py <args>
# args must either comments or submissions
# the arg will be what it monitors for
# can also use printcomments to print out the comments
# t... | 338 | 32.03 | 113 | 16 | 2,878 | python | [{"finding_id": "codeql_py/overly-large-range_2323814c4e52d566_100ccc21", "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\\\\[\\\\\\\\]^_\\]."
] | [
58
] | [
null
] | [
45
] | [
48
] | |
2024-11-18T20:50:53.917862+00:00 | 1,446,193,895,000 | 35acfb767c236aeaec1068aa4c6d26b7410146b2 | 3 | {
"blob_id": "35acfb767c236aeaec1068aa4c6d26b7410146b2",
"branch_name": "refs/heads/master",
"committer_date": 1446193895000,
"content_id": "27d67ecc90b5cfaceee92c4fe6e34718ce993380",
"detected_licenses": [
"MIT"
],
"directory_id": "b9ee8db28b0765a0803b1071b8724695a40d493c",
"extension": "py",
"fi... | 3 | stackv2 | ## python shell script for generating documentation for Ansible roles
import click, yaml, glob
from jinja2 import Template
## usage and help instructions
help_template = """
## Preparing your role for documentation.
* Basic meta's are populated from meta/main:galaxy_info
* Optional variables are populated from `de... | 129 | 23.81 | 106 | 19 | 745 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b285bc3ea36ee7c3_8fb7e244", "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."
] | [
123
] | [
null
] | [
16
] | [
41
] | |
2024-11-18T20:51:26.434032+00:00 | 1,668,621,805,000 | ac274c4358a45a26cf398efbf91ca2986b335d2e | 3 | {
"blob_id": "ac274c4358a45a26cf398efbf91ca2986b335d2e",
"branch_name": "refs/heads/main",
"committer_date": 1668621805000,
"content_id": "3d44e7c80339e67431f07fc45320bd0a9954a90b",
"detected_licenses": [
"MIT"
],
"directory_id": "625618bf3b5a1d5f3a6cf980078e5dff2c6bb3f4",
"extension": "py",
"file... | 3.046875 | stackv2 | import re
import pandas as pd
from collections import Counter
from typing import Callable
def group_vars(df: pd.DataFrame) -> "list[str]":
groupings = df.grouper.groupings
group_cols = [ping.name for ping in groupings]
return group_cols
def reconstruct_tibble(
input_: pd.DataFrame,
output: pd.... | 110 | 26.69 | 90 | 15 | 695 | python | [{"finding_id": "codeql_py/redos_42b429b7472abe01_8b3879c1", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '__' and containing many repetitio... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '__' and containing many repetitions of '_____'."
] | [
56
] | [
null
] | [
23
] | [
25
] | |
2024-11-18T21:13:58.130087+00:00 | 1,534,565,973,000 | 363711345e95f094d0f7d55eb0aa6d3615ade015 | 3 | {
"blob_id": "363711345e95f094d0f7d55eb0aa6d3615ade015",
"branch_name": "refs/heads/master",
"committer_date": 1534565973000,
"content_id": "43dfd14addc93c9f471b95005a4ffe4d8546aecc",
"detected_licenses": [
"MIT"
],
"directory_id": "121237e19d6082d6a7d967cea2e48918a85e3c58",
"extension": "py",
"fi... | 2.921875 | stackv2 | from flask import Flask, render_template, request
import socket
import sys
app = Flask(__name__)
@app.route("/")
def index():
return render_template('form.html')
@app.route('/', methods=['POST'])
def form_data():
ip_domain = request.form['firstname']
port = request.form['lastname']
if(port == ""):
return """... | 95 | 25.17 | 67 | 17 | 654 | python | [{"finding_id": "codeql_py/reflective-xss_49516ccaa6691c60_f226b5e0", "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)."
] | [
42
] | [
45
] | [
9
] | [
41
] | |
2024-11-18T21:14:05.751354+00:00 | 1,645,025,540,000 | f7d3f55f16ecaeb1e2a090ac734a2391e835ee1b | 3 | {
"blob_id": "f7d3f55f16ecaeb1e2a090ac734a2391e835ee1b",
"branch_name": "refs/heads/master",
"committer_date": 1645025540000,
"content_id": "ef2bb6840f45726215421bf54f2323133521a1d2",
"detected_licenses": [
"MIT"
],
"directory_id": "18a18446f44c35ca661128077de2d03d11f1335a",
"extension": "py",
"fi... | 2.671875 | stackv2 | import logging
import os
from suppliers.us_phonenumber_supplier import USPhoneNumberSupplier
class PhonenumberSupplier:
def __init__(self, settings, user_agent_instance, proxy_instance, colors, mask):
self.logger = logging.getLogger(__name__)
self.region = settings.region
self.colors = co... | 35 | 40.49 | 138 | 19 | 307 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7b9b51a16fe6120a_4fc809a0", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text."
] | [
31
] | [
null
] | [
25
] | [
58
] | |
2024-11-18T21:14:33.467525+00:00 | 1,552,709,451,000 | 01ada12c00dd57d335893074bc0edf800dfd483c | 3 | {
"blob_id": "01ada12c00dd57d335893074bc0edf800dfd483c",
"branch_name": "refs/heads/master",
"committer_date": 1552709451000,
"content_id": "a07aa0de5a9340e5e59ef007ded77f995b5f5cd9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f5c001b92480eaa8718385a442fa70f2d67d8b25",
"extension": "py"... | 2.84375 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 6 16:03:28 2019
@author: GU389021
"""
from sklearn.ensemble import RandomForestClassifier
from eli5.sklearn import PermutationImportance
import eli5
from sklearn.preprocessing import normalize
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.metrics im... | 134 | 33.78 | 108 | 18 | 1,276 | python | [{"finding_id": "codeql_py/overly-large-range_da60eafe6e82a75b_96c54d91", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
79
] | [
null
] | [
27
] | [
30
] | |
2024-11-18T21:14:33.886565+00:00 | 1,692,299,640,000 | bedd936eac6cfe0bfbf71e88d4f14e9b03b1664a | 2 | {
"blob_id": "bedd936eac6cfe0bfbf71e88d4f14e9b03b1664a",
"branch_name": "refs/heads/master",
"committer_date": 1692299640000,
"content_id": "95334b9634ac643c21a17d89e41aad39ef274e73",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4fbea8a2f9d9320b49b311be94b5cc16c13c885c",
"extension": "py"... | 2.453125 | stackv2 | # Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 81 | 27.78 | 74 | 15 | 519 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_04578b0ec8742b80_1955240f", "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."
] | [
57
] | [
61
] | [
11
] | [
6
] | |
2024-11-18T20:10:32.116721+00:00 | 1,571,581,840,000 | 845bece664337d93a59c042ffc13843adf14f8e9 | 3 | {
"blob_id": "845bece664337d93a59c042ffc13843adf14f8e9",
"branch_name": "refs/heads/master",
"committer_date": 1571581840000,
"content_id": "b9171382179c7e91c95397c7745e95425f3ca179",
"detected_licenses": [
"MIT"
],
"directory_id": "8d445c91a2d8893374d6c943f34b00309d728122",
"extension": "py",
"fi... | 3.359375 | stackv2 | # AES 256 encryption/decryption using pycrypto library
import base64
import hashlib
from Crypto.Cipher import AES
from Crypto import Random
class aes(object):
"""docstring for aes"""
def __init__(self, key):
self.key = hashlib.sha256(key.encode("utf-8")).digest()
self.BLOCK_SIZE = 16
s... | 41 | 30.66 | 127 | 19 | 342 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_6ddb959e3516cd96_93a20d67", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
28
] | [
null
] | [
38
] | [
62
] | |
2024-11-18T20:10:35.115444+00:00 | 1,409,777,933,000 | aca419578d38775a2b3f8e6b7e37bfe8ca9d7afd | 3 | {
"blob_id": "aca419578d38775a2b3f8e6b7e37bfe8ca9d7afd",
"branch_name": "refs/heads/master",
"committer_date": 1409777933000,
"content_id": "1b2cbe96f65cf43e5ca8c4901388e8b5fad9e1ff",
"detected_licenses": [
"MIT",
"BSD-3-Clause",
"Python-2.0",
"BSD-2-Clause"
],
"directory_id": "3569dffb117... | 2.546875 | stackv2 | # /usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
myip
created by hgschmidt on 03.12.12, 21:53 CET
Copyright (c) 2012 otype
"""
import logging
import tornado.ioloop
import tornado.web
import tornado.options
import tornado.httpserver
from tornado import web
# LOGGING PARAMETERS
#
#
LOG_FORMAT =... | 103 | 23.25 | 99 | 19 | 615 | python | [{"finding_id": "codeql_py/log-injection_e642b2dfa415fd2e_3ee3460b", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
55
] | [
null
] | [
21
] | [
33
] | |
2024-11-18T20:10:39.641056+00:00 | 1,625,160,965,000 | 6b51f71551f397e55a35e6fcc7ea8c37419789fa | 3 | {
"blob_id": "6b51f71551f397e55a35e6fcc7ea8c37419789fa",
"branch_name": "refs/heads/master",
"committer_date": 1625160965000,
"content_id": "fd9f501b976ccc065617179dd3fa4be9e73db76d",
"detected_licenses": [
"MIT"
],
"directory_id": "2a7edf6063fd5c4f1372ffaf2bffc5339ccab74e",
"extension": "py",
"fi... | 2.546875 | stackv2 | from __future__ import print_function
import os.path
import pickle
import pyttsx3
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import os
import playsound
from gtts import gTTS
import datetime
import pytz
import spac... | 297 | 33.29 | 122 | 23 | 2,442 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_673d79ec966abf0f_5cd72e75", "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."
] | [
289
] | [
292
] | [
15
] | [
39
] | |
2024-11-18T20:10:50.145947+00:00 | 1,612,055,999,000 | 0a2b5bf25e3f4aaac055635cd1686c9ce9168b09 | 3 | {
"blob_id": "0a2b5bf25e3f4aaac055635cd1686c9ce9168b09",
"branch_name": "refs/heads/master",
"committer_date": 1612055999000,
"content_id": "f824a435de480594f1e5a9c417bc58e0cd9442d7",
"detected_licenses": [
"MIT"
],
"directory_id": "d08e0ffc6d687174ab6a6414b086a607d636419a",
"extension": "py",
"fi... | 2.75 | stackv2 | import pandas as pd
import string
import spacy
import random
import seaborn as sns
import numpy as np
import re
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix, accuracy_score
base_treinamento = pd.read_csv('Train50.csv', delimiter = ';')
sns.countplot(base_treinamento['sentiment'], label ... | 142 | 31.54 | 151 | 13 | 1,293 | python | [{"finding_id": "codeql_py/overly-large-range_38533ff6f78b0dd1_2b9aa6c3", "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 is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
27
] | [
null
] | [
33
] | [
36
] | |
2024-11-18T20:10:54.481748+00:00 | 1,588,242,818,000 | e379086f5cc4467f402cb549ddd1cc1b9802b016 | 3 | {
"blob_id": "e379086f5cc4467f402cb549ddd1cc1b9802b016",
"branch_name": "refs/heads/master",
"committer_date": 1588242818000,
"content_id": "a3bd851c968290bc48c67033d20b93841e21e423",
"detected_licenses": [
"MIT"
],
"directory_id": "d8f038ac4981e04e630296cb6bf861c176b64829",
"extension": "py",
"fi... | 2.734375 | stackv2 | """
This script is used to create task-library items,
that can be pushed to pc if ip and creds are passed to the script.
This script takes script .sh, .es as input
files only (.sh for shell scripts & .es for escripts).
Please pass file name as first argument.
"""
import os
import sys
import json
import ntpath
script... | 85 | 24.61 | 76 | 16 | 562 | python | [{"finding_id": "codeql_py/request-without-cert-validation_ed8bc92eb29ea6bb_71fb4267", "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)."
] | [
67
] | [
74
] | [
16
] | [
14
] | |
2024-11-18T20:10:58.854724+00:00 | 1,555,297,934,000 | 259e1f3efb165a42188fb105e0979abcec677f99 | 2 | {
"blob_id": "259e1f3efb165a42188fb105e0979abcec677f99",
"branch_name": "refs/heads/master",
"committer_date": 1555297934000,
"content_id": "ff1b88c15ce4b4c3400694c06f245205fd7bf0c4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "57dc098b417321804ff17ca3a1792153c9cc0fae",
"extension": "py"... | 2.46875 | stackv2 | # user_agent
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/')
def index():
print(request.headers) # headers信息
print('=====================')
print(request.url) #http://127.0.0.1:5000/
user_agent = request.headers.get('User_Agent')
return 'user_agent is %s' ... | 16 | 22.31 | 50 | 10 | 104 | python | [{"finding_id": "codeql_py/reflective-xss_4d1fecae5f228856_d3dc6bef", "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)."
] | [
13
] | [
null
] | [
12
] | [
42
] | |
2024-11-18T20:10:59.470241+00:00 | 1,618,221,808,000 | 382a8fab4cd799716be49766c44291e231ce24e3 | 2 | {
"blob_id": "382a8fab4cd799716be49766c44291e231ce24e3",
"branch_name": "refs/heads/master",
"committer_date": 1618221808000,
"content_id": "30ea8137b1514e5979cba852341fbb2ac08509ac",
"detected_licenses": [
"MIT"
],
"directory_id": "760f5bdb715e00d1f6246166e6d38c76a71170a7",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python3
from configparser import RawConfigParser
from argparse import ArgumentParser
from requests import get
import sys
import os.path
import urllib.request, urllib.parse, urllib.error
import logging
__version__ = '0.2'
def set_log_level(args_level):
if args_level is None:
args_level = ... | 282 | 38.48 | 132 | 23 | 2,417 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_20e0705d8ed2dcd0_c379b835", "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... | 9 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"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.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive dat... | [
60,
76,
92,
95,
114,
117,
137,
140,
143
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
23,
23,
27,
27,
35,
35,
35,
35,
35
] | [
81,
81,
66,
66,
74,
74,
87,
88,
86
] | |
2024-11-18T21:11:39.041401+00:00 | 1,624,247,135,000 | bcf5db1f0b6c39ccb53d02c370e5258ba1d3b80c | 3 | {
"blob_id": "bcf5db1f0b6c39ccb53d02c370e5258ba1d3b80c",
"branch_name": "refs/heads/master",
"committer_date": 1624247135000,
"content_id": "d181e18fe397f888eb206b19027b1e1f0d979f2c",
"detected_licenses": [
"MIT"
],
"directory_id": "7a0f78930ed6c72ac57a41d548ed2bc37ee351d4",
"extension": "py",
"fi... | 2.609375 | stackv2 | import logging
from flask import request, abort, Blueprint
from nb_processor_service import NBService
from invalid_nb_error import InvalidNotebookError
from no_content_nb_error import NoContentNotebookError
nb_controller_blue_print = Blueprint("nb_processor_controller", __name__)
@nb_controller_blue_print.route('/... | 39 | 31.41 | 89 | 11 | 270 | python | [{"finding_id": "codeql_py/log-injection_7edbd42f04da266d_f6adfc5c", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
22
] | [
null
] | [
55
] | [
72
] | |
2024-11-18T21:11:43.839692+00:00 | 1,610,938,008,000 | 98d6fab4075e614c9dfe0b9a84de3b0104b9d2f8 | 3 | {
"blob_id": "98d6fab4075e614c9dfe0b9a84de3b0104b9d2f8",
"branch_name": "refs/heads/main",
"committer_date": 1610938008000,
"content_id": "48439342add542c3629c5de0c4708d2eae3391e6",
"detected_licenses": [
"MIT"
],
"directory_id": "f4862d7aba8327ab063121ca0c8824d95d1b853a",
"extension": "py",
"file... | 2.734375 | stackv2 | import numpy as np
import pandas as pd
from sklearn.preprocessing import OneHotEncoder
import networkx as nx
#load data
data = pd.read_pickle('data\processed_data.csv')
# Province dictionary to index dataset
prov_dict ={'Newfoundland and Labrador': 10,
'Prince Edward Island': 11,
'Nova Scotia... | 282 | 38.49 | 80 | 19 | 2,857 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7c4fc2f0170b9879_c7774f73", "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."
] | [
140
] | [
null
] | [
15
] | [
26
] | |
2024-11-18T21:25:46.999260+00:00 | 1,556,085,125,000 | 8b7c0fedba59191ad72e3d15c3a862974bab53c5 | 3 | {
"blob_id": "8b7c0fedba59191ad72e3d15c3a862974bab53c5",
"branch_name": "refs/heads/master",
"committer_date": 1556085125000,
"content_id": "315bd883d5c66cd719bd477e001a0c29eb99b130",
"detected_licenses": [
"MIT"
],
"directory_id": "8d96d546f777bd5d4ac2acffa0fffc60754df50e",
"extension": "py",
"fi... | 2.765625 | stackv2 | # -*- coding: utf-8 -*-
import os
import datetime
from bson.objectid import ObjectId
from flask import request
from flask_api import FlaskAPI
from flask_cors import CORS
from flask_pymongo import PyMongo
from pymongo import ReturnDocument
app = FlaskAPI(__name__)
app.config['MONGO_URI'] = os.environ.get(
'MONGO_UR... | 108 | 25.92 | 76 | 13 | 716 | python | [{"finding_id": "codeql_py/reflective-xss_b1fcddbbda1ba7f4_468ffdd6", "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)."
] | [
58,
79
] | [
null,
null
] | [
12,
12
] | [
20,
19
] | |
2024-11-18T21:52:08.071577+00:00 | 1,613,492,120,000 | c14a8d49e080460df5337c5f7dab8c6fd728107f | 2 | {
"blob_id": "c14a8d49e080460df5337c5f7dab8c6fd728107f",
"branch_name": "refs/heads/master",
"committer_date": 1613492120000,
"content_id": "832fa4bbccc27a190a1cc1b181e22470e05e185a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "14ec2c1c925acd607c3cb508a96cf83309aee577",
"extension": "py"... | 2.375 | stackv2 | from elasticsearch import Elasticsearch
import ujson as json
from tqdm import tqdm
import re
class Elastic:
def __init__(self, server):
self.es = Elasticsearch(hosts=[server])
def create_index(self, index_config, input_path, index_name='idx'):
batch_size = 100000
delete_index = True
... | 124 | 40.75 | 109 | 26 | 1,040 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_9712e1e07c8ad59d_f41fdffb", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://dbpedia.org/](1) may be at an arbitrary positio... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [http://dbpedia.org/](1) may be at an arbitrary position in the sanitized URL."
] | [
22
] | [
null
] | [
20
] | [
48
] | |
2024-11-18T21:52:09.530872+00:00 | 1,577,374,603,000 | ee7604a2738d3526c0d0c926e3d20c17846e575d | 3 | {
"blob_id": "ee7604a2738d3526c0d0c926e3d20c17846e575d",
"branch_name": "refs/heads/master",
"committer_date": 1577374603000,
"content_id": "7f9023f51d6bdc5c9f8f37a61320315b67cdb184",
"detected_licenses": [
"MIT"
],
"directory_id": "d329db2f0e5220075f7035dd77a64c80bac053d7",
"extension": "py",
"fi... | 3.0625 | stackv2 | import sys
# import libraries
import nltk
nltk.download(['punkt', 'wordnet', 'averaged_perceptron_tagger'])
import re
import numpy as np
import pandas as pd
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from sqlalchemy import create_engine
from sklearn.model_selection import GridSearch... | 183 | 28.72 | 112 | 15 | 1,271 | python | [{"finding_id": "codeql_py/overly-large-range_82d8d115499b576c_b39427bb", "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\\\\[\\\\\\\\]^_\\]."
] | [
59
] | [
null
] | [
44
] | [
47
] | |
2024-11-18T21:00:03.720335+00:00 | 1,462,141,121,000 | f2e60050169bdf68b871543f04ba8c9f2c58e98d | 3 | {
"blob_id": "f2e60050169bdf68b871543f04ba8c9f2c58e98d",
"branch_name": "refs/heads/master",
"committer_date": 1462141121000,
"content_id": "081045f7bd1cb85f52e5f9124dc4a81986e73e85",
"detected_licenses": [
"MIT"
],
"directory_id": "cf1a394ff57fe3339d8a8e7b99c1809d7f1e278b",
"extension": "py",
"fi... | 2.6875 | stackv2 | #!/usr/bin/env python
'''
Author: Andrew Scott
Date: 4/26/2016
'''
import hashlib
import os, sys, time
import multiprocessing
from random import shuffle
import itertools
import argparse
# Constants
##------------------------------------------------------------------------------------------
CORE_COUNT = multiproce... | 417 | 30.43 | 155 | 22 | 3,152 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_fe506bb247ec38b9_6e157da0", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text."
] | [
199
] | [
null
] | [
14
] | [
63
] | |
2024-11-18T21:10:29.911942+00:00 | 1,691,779,097,000 | 67e34f48bb9541c7c0214600d4ab461561c10f6e | 2 | {
"blob_id": "67e34f48bb9541c7c0214600d4ab461561c10f6e",
"branch_name": "refs/heads/master",
"committer_date": 1691779097000,
"content_id": "2c4d2c1f9bc24467c8711770d7222b0b9e92b344",
"detected_licenses": [
"MIT"
],
"directory_id": "bc371b9238956bc00cc33654b1d68651c6edf371",
"extension": "py",
"fi... | 2.359375 | stackv2 | from flask import Flask, request, jsonify, render_template_string
import redis
import requests
import re
import json
import sys
app = Flask(__name__)
@app.route('/getid/<username>')
def getid(username):
red = redis.Redis(host="redis_users")
return red.get(username).decode()
@app.route('/useraction', methods... | 77 | 32.64 | 74 | 24 | 618 | python | [{"finding_id": "codeql_py/template-injection_38e5dea459a35bba_760248d3", "tool_name": "codeql", "rule_id": "py/template-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This template construction depends on a [user-provided value](1).", "remediation": "", "location": ... | 2 | true | [
"CWE-074",
"CWE-079"
] | [
"py/template-injection",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This template construction depends on a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
74,
74
] | [
null,
null
] | [
35,
12
] | [
58,
70
] | |
2024-11-18T21:10:31.333001+00:00 | 1,456,848,132,000 | 47756d5e355859a6f49d41d2439fcdd0eca6f83d | 3 | {
"blob_id": "47756d5e355859a6f49d41d2439fcdd0eca6f83d",
"branch_name": "refs/heads/master",
"committer_date": 1456848132000,
"content_id": "1ce1ebf859dddfb700cf72f4ef973fe35f127caf",
"detected_licenses": [
"MIT"
],
"directory_id": "e4f0026d1e50213b1b73c47e29e4c304d15785da",
"extension": "py",
"fi... | 2.703125 | stackv2 | # coding:utf-8
import sys
import os
import json
import requests
import urllib
apikey = os.environ.get("GOOGLE_API_KEY")
TIMEOUT = 30
def stt_google_wav(filename):
q = {"output": "json", "lang": "ja-JP", "key": apikey}
url = "http://www.google.com/speech-api/v2/recognize?%s" % (urllib.parse.urlencode(q))
... | 51 | 21.88 | 90 | 16 | 286 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_aaede696ca01e217_2085b278", "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."
] | [
51
] | [
null
] | [
11
] | [
38
] | |
2024-11-18T21:10:37.887998+00:00 | 1,580,062,301,000 | e5d1dd8db66a5a540e62a3e6517b6a3f9c02925d | 3 | {
"blob_id": "e5d1dd8db66a5a540e62a3e6517b6a3f9c02925d",
"branch_name": "refs/heads/master",
"committer_date": 1580062301000,
"content_id": "375f68086ccbd09bda5540fd09366a6bbbfddc33",
"detected_licenses": [
"MIT"
],
"directory_id": "b11a745531976cdddc67b5f5782a1d4764e4b851",
"extension": "py",
"fi... | 2.65625 | stackv2 | from chuda import Command, Parameter, Option
from pathlib import Path
from bullet import Bullet, YesNo
from shutil import rmtree, copy
from ..core.exceptions import InvalidBlueprint
from ..core.context_builder import ContextBuilder
from ..core.hooks_runner import HooksRunner
from ..core.blueprint_manager import Bluepri... | 119 | 35.63 | 114 | 19 | 880 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_342121486383437e_1cf177df", "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."
] | [
94
] | [
null
] | [
15
] | [
86
] | |
2024-11-18T21:10:39.739721+00:00 | 1,665,101,070,000 | 8f249f1dc890d4d2bc1edfd8958b1a5be9083e04 | 2 | {
"blob_id": "8f249f1dc890d4d2bc1edfd8958b1a5be9083e04",
"branch_name": "refs/heads/master",
"committer_date": 1665101070000,
"content_id": "de77bfbe29eeb5ff39617446a3cfc8658f5fa13a",
"detected_licenses": [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
],
"directory_id": "db78f2d86f9b95185f69b2005f427de... | 2.5 | stackv2 | """
This script is used to set up credentials for some services in the
CI environment. For instance, it can fetch WandB API tokens and write
the WandB configuration file so test scripts can use the service.
"""
import json
import os
import sys
from pathlib import Path
import boto3
AWS_WANDB_SECRET_ARN = (
"arn:aw... | 77 | 30.9 | 87 | 16 | 688 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c28b487f7eaf65bc_1bd8702d", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text."
] | [
27,
33
] | [
null,
null
] | [
18,
18
] | [
87,
49
] | |
2024-11-18T21:23:31.942290+00:00 | 1,613,427,872,000 | fcb40c907a31e33a551b5adab52d4e0325857727 | 3 | {
"blob_id": "fcb40c907a31e33a551b5adab52d4e0325857727",
"branch_name": "refs/heads/main",
"committer_date": 1613427872000,
"content_id": "e3bf31b0f5b693cd97f7081d8454a9398e087f09",
"detected_licenses": [
"MIT"
],
"directory_id": "2dd6f27ae7f10f7d86ef57f5fe739c484a60b5da",
"extension": "py",
"file... | 3.03125 | stackv2 | from flask import render_template, request, redirect, url_for, flash, session, jsonify
from flask import current_app as app
from datetime import datetime
import pytz
from .database.dao import UserDao, DeviceDao, DeviceOccupancyDao
from .helper.helper import calculate_max_people, is_not_logged_in
user_dao = UserDao()... | 193 | 31.39 | 118 | 16 | 1,373 | python | [{"finding_id": "codeql_py/url-redirection_18aacf20111351fb_4ede1845", "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)."
] | [
49
] | [
null
] | [
29
] | [
38
] | |
2024-11-18T21:23:40.534226+00:00 | 1,683,478,818,000 | ee5338b5ac0daab790a7367e7836fc09b93cbb2e | 2 | {
"blob_id": "ee5338b5ac0daab790a7367e7836fc09b93cbb2e",
"branch_name": "refs/heads/master",
"committer_date": 1683478818000,
"content_id": "19fe23f831fe8261aa972903cb3ec2ce33d2343c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e2ca3205bb5240a1e4c87de0bdb13faa70241f16",
"extension": "py"... | 2.40625 | stackv2 | """
"""
import os
from jinja2 import Template, Environment, FileSystemLoader
from nspawn.base.machine import MachineResult
def this_dir():
return os.path.dirname(os.path.abspath(__file__))
def this_enviro() -> Environment:
return Environment(loader=FileSystemLoader(this_dir()), trim_blocks=True)
def this... | 34 | 22.85 | 77 | 12 | 171 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_285bd4efefaa69dc_0a2d8344", "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."
] | [
14,
24
] | [
null,
null
] | [
12,
16
] | [
78,
48
] | |
2024-11-18T21:23:42.789433+00:00 | 1,553,537,923,000 | 6551f6ed806554d6fe86b367c42d3e0550397e8c | 2 | {
"blob_id": "6551f6ed806554d6fe86b367c42d3e0550397e8c",
"branch_name": "refs/heads/master",
"committer_date": 1553537923000,
"content_id": "a18a1f7b708c4876980f0eed7add556f5119740d",
"detected_licenses": [
"MIT"
],
"directory_id": "5181cc81f45b66a3e382560decc47bb23099e59d",
"extension": "py",
"fi... | 2.4375 | stackv2 | """
Convenience methods for executing programs
"""
import logging
import os
import subprocess # nosec
import sys
import time
from runez.base import decode
from runez.convert import flattened, represented_args, SHELL, short
from runez.system import abort, is_dryrun
LOG = logging.getLogger(__name__)
DEV_FOLDERS = ("... | 190 | 27.29 | 99 | 16 | 1,357 | python | [{"finding_id": "codeql_py/overly-permissive-file_d77003c3f0b36800_8ad76a6c", "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."
] | [
93
] | [
null
] | [
9
] | [
30
] | |
2024-11-18T21:23:43.671316+00:00 | 1,510,661,664,000 | d50e2750c843826d2818075b67ddfa40f5f7838a | 2 | {
"blob_id": "d50e2750c843826d2818075b67ddfa40f5f7838a",
"branch_name": "refs/heads/master",
"committer_date": 1510661664000,
"content_id": "07c7ac9dc73c88d7bc7906d9f80a43c4a45b4172",
"detected_licenses": [
"MIT"
],
"directory_id": "0966cbea28e6315d8d87f1bc3677d2bd33077092",
"extension": "py",
"fi... | 2.421875 | stackv2 | from cloudant import Cloudant
from flask import Flask, render_template, request, jsonify
import atexit
import cf_deployment_tracker
import os
import json
import psycopg2
def sq(inString):
return chr(39)+inString+chr(39)
# Emit Bluemix deployment event
cf_deployment_tracker.track()
app = Flask(__name__)
db_name = ... | 111 | 27.43 | 169 | 17 | 868 | python | [{"finding_id": "codeql_py/flask-debug_164cef20b6764b51_1dfd89f5", "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-089"
] | [
"py/flask-debug",
"py/sql-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 SQL query depends on a [user-provided value](1)."
] | [
111,
94
] | [
null,
null
] | [
5,
17
] | [
51,
24
] | |
2024-11-18T21:24:03.182822+00:00 | 1,669,983,054,000 | d3efcdcb7b84df085673eb741e78bdd62728c431 | 2 | {
"blob_id": "d3efcdcb7b84df085673eb741e78bdd62728c431",
"branch_name": "refs/heads/master",
"committer_date": 1669983054000,
"content_id": "be43cb7a9bb4777477eb4fff1955512ff6e7e987",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "56731673c481f872b61f86e9c8c07bb9b0548c94",
"extension": "p... | 2.328125 | stackv2 | import typing
from flask import Flask, Request, Response, jsonify
from jinja2 import Template
from .base import Apiman as _Apiman
class Apiman(_Apiman):
"""Flask extension
>>> app = Flask(__name__)
>>> apiman = Apiman(
... template="./examples/docs/dog_template.yml"
... )
>>> apiman.ini... | 138 | 36 | 94 | 24 | 1,046 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_a4578d36955f05c5_eb87b9ad", "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."
] | [
39,
49
] | [
null,
null
] | [
28,
26
] | [
72,
68
] | |
2024-11-18T21:59:01.936108+00:00 | 1,693,497,978,000 | 6e80f8793ba9c5d211f3c95a7aff65240ae102a4 | 2 | {
"blob_id": "6e80f8793ba9c5d211f3c95a7aff65240ae102a4",
"branch_name": "refs/heads/master",
"committer_date": 1693497978000,
"content_id": "53c37b38650b1f4f492b1e82480f40e12de18607",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f926b3e6ce2716d6360013c2e8cecb2b1fcc6b16",
"extension": "py"... | 2.3125 | stackv2 | """
Module defines clone feature
"""
import hashlib
from contextlib import contextmanager
from multiprocessing import Process
from typing import Union
from twindb_backup import INTERVALS, LOG, MBSTREAM_BINARY, XBSTREAM_BINARY
from twindb_backup.configuration import TwinDBBackupConfig
from twindb_backup.destination.ssh... | 341 | 32.86 | 105 | 18 | 2,796 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_18210dc5b16ae813_9ec20af8", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
320
] | [
null
] | [
24
] | [
53
] | |
2024-11-18T21:59:07.076636+00:00 | 1,545,893,614,000 | babe939ed0d616e2d07d8b217bbdf928cfde1205 | 3 | {
"blob_id": "babe939ed0d616e2d07d8b217bbdf928cfde1205",
"branch_name": "refs/heads/master",
"committer_date": 1545893614000,
"content_id": "ac50087889cfb394b47895a6b09669ea1df3280d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ea63a873703f6419d1122cf18171646fbc084a6c",
"extension": "py"... | 2.578125 | stackv2 | import argparse
import datetime
import json
import logging
import requests
import urllib3
from tabulate import tabulate
import config
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
logging.basicConfig(
level=logging.INFO,
format='[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - '... | 111 | 43.2 | 130 | 22 | 1,096 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9a98dbfaf1d72ac1_c5242933", "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)."
] | [
56
] | [
null
] | [
24
] | [
114
] | |
2024-11-18T21:59:11.836764+00:00 | 1,540,670,245,000 | f6e1ae3f71d5d588dfd47840fbec25c061121763 | 3 | {
"blob_id": "f6e1ae3f71d5d588dfd47840fbec25c061121763",
"branch_name": "refs/heads/master",
"committer_date": 1540670245000,
"content_id": "b72f401b39f49520f506b10ced9f3e9616691a01",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1ba572cc3528c0f3d2d5d8249cd7d9928c6318a7",
"extension": "py"... | 2.625 | stackv2 | # coding: utf-8
'''
Setup and configuration launch modes for easier installation.
'''
import os
import pip
import json
import shutil
import tempfile
from subprocess import Popen, PIPE
from ..utils import trying
from .. import __home__
from .api import launcher
@launcher('init',
description="Install canvas's depend... | 131 | 26.95 | 128 | 20 | 935 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_732d3fc8b3152c97_737c7b32", "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."
] | [
118
] | [
130
] | [
8
] | [
4
] | |
2024-11-18T21:59:19.038037+00:00 | 1,520,213,482,000 | 0ed3024d68d33f956247b68ec50cf06fecdbb250 | 2 | {
"blob_id": "0ed3024d68d33f956247b68ec50cf06fecdbb250",
"branch_name": "refs/heads/master",
"committer_date": 1520213482000,
"content_id": "2b1373866a763db45d8b5fe074eaf72f9d0db652",
"detected_licenses": [
"MIT"
],
"directory_id": "f1a3f9b6f651c0a60b06623faa9a7ecf84c05af1",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2017/11/4 上午9:26
# @Author : fanqiang
# @Site :
# @File : spider.py
# @Software: PyCharm
import hashlib
import pathlib
import re
import subprocess
import time
from datetime import datetime
import requests
from PIL import Image, ImageEnhance
from pret... | 235 | 34.57 | 120 | 17 | 2,163 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_53854aab786bb72f_cccb8150", "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... | [
54
] | [
null
] | [
15
] | [
39
] | |
2024-11-18T22:11:39.551671+00:00 | 1,511,453,078,000 | 0e470526ebcc33c436177108bbc56ca93cbd9f01 | 3 | {
"blob_id": "0e470526ebcc33c436177108bbc56ca93cbd9f01",
"branch_name": "refs/heads/master",
"committer_date": 1511453078000,
"content_id": "d4aa7bc8e2e61109761e0fa49f46b79be78c7059",
"detected_licenses": [
"MIT"
],
"directory_id": "54b867b0413a3379b6500f4ddfc2e799002f5d79",
"extension": "py",
"fi... | 2.75 | stackv2 | #!/usr/bin/env python3
import os, sys
from argparse import ArgumentParser, FileType
from yaml import safe_load as load
from jinja2 import Template
def main():
parser = ArgumentParser()
parser.add_argument('input', type=FileType('r'))
parser.add_argument('output', nargs='?', type=FileType('w'), default=sys.stdou... | 27 | 22.44 | 82 | 12 | 154 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e4b6027691c62c86_03150461", "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."
] | [
19
] | [
null
] | [
14
] | [
42
] | |
2024-11-18T22:11:51.534623+00:00 | 1,541,736,278,000 | 22230262a1cba18e7d51a5e47300ababdd72d01d | 3 | {
"blob_id": "22230262a1cba18e7d51a5e47300ababdd72d01d",
"branch_name": "refs/heads/master",
"committer_date": 1541736278000,
"content_id": "6f5f15a469203afc80a526405b14a05618637500",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "53705eb05b83771bde3a61d7d80deed4e3bc6bdd",
"extension": "py"... | 2.828125 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import logging as log
import re
def get_html(url):
try:
response = requests.get(url, timeout=30)
response.raise_for_status()
response.encoding = 'utf-8'
return response.text
except:
... | 59 | 30.31 | 75 | 17 | 491 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_ccecbda7954bd976_25f284a0", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This string, which is used as a regular expression [here](1), has an unescaped '.' befor... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This string, which is used as a regular expression [here](1), has an unescaped '.' before 'luoxia.com/zetian/', so it might match more hosts than expected."
] | [
53
] | [
null
] | [
23
] | [
60
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.