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-18T22:39:27.527233+00:00 | 1,592,989,001,000 | 896b2b532c9c56d493fe27788ee6931681c76b28 | 3 | {
"blob_id": "896b2b532c9c56d493fe27788ee6931681c76b28",
"branch_name": "refs/heads/master",
"committer_date": 1592989001000,
"content_id": "f7f280483ffaf8a232b1b13cefd82bf0fba202a9",
"detected_licenses": [
"MIT"
],
"directory_id": "6fd64f27d6f440f713f1bfafae8558fafd5ec8c9",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/usr/bin/env python3
"""httpresplog - HTTP response time logging.
Similar to https://github.com/sii/httpresptime except it logs to a database,
and a lot of options have been stripped out.
THIS IS THE WORK OF JUST A FEW HOURS, it needs a lot of polishing and
cleaning, but it works. The goal was speed of development ... | 295 | 28.55 | 127 | 14 | 2,210 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c0c87a7f61b93c2e_679e6805", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
117,
131,
137
] | [
null,
null,
null
] | [
12,
9,
13
] | [
82,
66,
82
] | |
2024-11-18T22:14:51.689487+00:00 | 1,609,720,971,000 | 91bfaf2b40f181a08529fcf7c64f47da33048b81 | 4 | {
"blob_id": "91bfaf2b40f181a08529fcf7c64f47da33048b81",
"branch_name": "refs/heads/main",
"committer_date": 1609720971000,
"content_id": "c82f77f6aca14bf136ea119e31a2c155d1130740",
"detected_licenses": [
"MIT"
],
"directory_id": "41d23de79d8fd85d31955d9fac0b5228ffca2a29",
"extension": "py",
"file... | 3.8125 | stackv2 | #!/usr/bin/env python3
'''
password file
<pos1-pos2 policy> <letter>: <passwd>
1-3 a: abcde
1-3 b: cdefg
2-9 c: ccccccccc
pos1 and pos2 are the positions (indexed at 1) in the passwd that contain <letter>. Exactly one must match for the passwd to pass.
The first entry passes.
The second entry fails.
The third entry f... | 43 | 23.44 | 130 | 11 | 331 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2106016451966ae3_0ad4e482", "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."
] | [
40,
42
] | [
null,
null
] | [
9,
7
] | [
101,
56
] | |
2024-11-18T22:14:56.464542+00:00 | 1,481,494,069,000 | 45706a5902cf5d1f02c4366db1ee1bff314ed7c8 | 3 | {
"blob_id": "45706a5902cf5d1f02c4366db1ee1bff314ed7c8",
"branch_name": "refs/heads/master",
"committer_date": 1481494069000,
"content_id": "4b8ec5ba380349e56ca41200d13c27e2c24078df",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "435a169d776cd7c8f45879a7a6ca0466bd1bc959",
"extension": "py"... | 2.546875 | stackv2 | import codecs
import re
import simplejson as json
import sys
class JBLDecodeError(Exception):
def __init__(self, arg):
self.error_element = arg
def load(fd):
"""Deserialize ``fd`` (a ``.read()``-supporting file-like object
containing a template) to a Python object."""
tmpl = _read(fd)
re... | 154 | 26.71 | 78 | 15 | 1,149 | python | [{"finding_id": "codeql_py/overly-large-range_36410297336d5713_d30c5ba9", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
110
] | [
null
] | [
62
] | [
65
] | |
2024-11-18T22:15:02.937459+00:00 | 1,625,046,156,000 | 703416c0d94610ef2f4a7df7e7feaf5948817c34 | 2 | {
"blob_id": "703416c0d94610ef2f4a7df7e7feaf5948817c34",
"branch_name": "refs/heads/master",
"committer_date": 1625046156000,
"content_id": "4ea1e85616212750d083d4cb0189a11b612341d2",
"detected_licenses": [
"Unlicense"
],
"directory_id": "5daa91c6982ba5f0196930003952597a5562bbf6",
"extension": "py",... | 2.3125 | stackv2 | import os
import asyncio
import json
from aiohttp import web
import settings
from game import Game
import Snake
async def handle(request):
ALLOWED_FILES = ["index.html", "style.css"]
name = request.match_info.get('name', 'index.html')
if name in ALLOWED_FILES:
try:
with open(name, 'rb... | 88 | 24.12 | 80 | 18 | 490 | python | [{"finding_id": "codeql_py/path-injection_25dfe7a75a4200dd_dfdd9b5c", "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)."
] | [
16
] | [
null
] | [
23
] | [
27
] | |
2024-11-18T22:55:36.525020+00:00 | 1,560,051,108,000 | 041181d7dcd42db188a965566b16826b8aa6dcc2 | 3 | {
"blob_id": "041181d7dcd42db188a965566b16826b8aa6dcc2",
"branch_name": "refs/heads/master",
"committer_date": 1560051108000,
"content_id": "ebf8045f244b6bb5ce8555b91b38e5e9cf6b30ce",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f21d4b75f98fc85b1e0e80cf0254bd777ce95e1a",
"extension": "py"... | 3 | stackv2 | #!/usr/bin/env python
# coding=utf-8
import re
import bleach
def check_string(text, pattern):
"""
检查字符串是否符合指定规则
:param text: 需要检查的字符串
:param pattern: 正式表达式,如:'^[a-zA-Z]+$'
:return: 含有指定字符时返回真,否则为假
"""
match = re.search(pattern, text)
if match:
return True
else:
ret... | 203 | 23.67 | 124 | 14 | 1,771 | python | [{"finding_id": "codeql_py/bad-tag-filter_450f2d93ea9ff19a_615f214b", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match script end tags like </script\\t\\n bar>.", "remediation": "", "location"... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match script end tags like </script\\t\\n bar>."
] | [
100
] | [
null
] | [
27
] | [
66
] | |
2024-11-18T22:55:38.169705+00:00 | 1,581,607,667,000 | a51384a13c2a39b3b5edf6539fffe804d23ade49 | 3 | {
"blob_id": "a51384a13c2a39b3b5edf6539fffe804d23ade49",
"branch_name": "refs/heads/master",
"committer_date": 1581607667000,
"content_id": "178dc9527617ec14efeb68e0424a6a697c0615c7",
"detected_licenses": [
"MIT"
],
"directory_id": "e26f5324ada0f1e1ee6716d92dc5c1c6bb80b422",
"extension": "py",
"fi... | 2.734375 | stackv2 | from Crypto.Cipher import AES
from binascii import b2a_hex, a2b_hex
import config
import table_content
def DES_add_to_16(text: str) -> bytes:
if len(text.encode('utf-8')) % 16:
add = 16 - (len(text.encode('utf-8')) % 16)
else:
add = 0
text = text + ('\0' * add)
return text.encode('utf-... | 118 | 33.05 | 107 | 17 | 1,034 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_e1183232d8343d56_dc0caf45", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
21,
29
] | [
null,
null
] | [
19,
18
] | [
40,
48
] | |
2024-11-18T22:55:40.988572+00:00 | 1,616,191,685,000 | a64b6c431f30e6b556fcab623331b11094902390 | 2 | {
"blob_id": "a64b6c431f30e6b556fcab623331b11094902390",
"branch_name": "refs/heads/master",
"committer_date": 1616195818000,
"content_id": "680e2c5d35c69178a4a242b379d935f3000b4410",
"detected_licenses": [
"MIT"
],
"directory_id": "0cc671d74aeb123dc3507ea19455ceeebe9d2874",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python3
import argparse
import html
import logging
import os
import re
import sys
from lib import hybris_argparse_helper
from lib import hybris_requests_helper
from lib import logging_helper
from lib import requests_helper
from lib import shell_helper
# TODO: add --threads parameter with 1 as a defaul... | 117 | 46.5 | 120 | 14 | 1,377 | python | [{"finding_id": "codeql_py/redos_38b44c4b54c16ce6_bd90d0fc", "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 '<!-- result --><pre>' and contain... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<!-- result --><pre>' and containing many repetitions of '\\n'."
] | [
99
] | [
null
] | [
64
] | [
74
] | |
2024-11-18T22:55:41.398992+00:00 | 1,623,772,574,000 | 2fb8a8243d8dfc16ba3185db81f1d9fbd45878ec | 4 | {
"blob_id": "2fb8a8243d8dfc16ba3185db81f1d9fbd45878ec",
"branch_name": "refs/heads/main",
"committer_date": 1623772574000,
"content_id": "fbbda0c519c8e1302a179bc00f1c106df3ec4c6b",
"detected_licenses": [
"MIT"
],
"directory_id": "081e0928e4f3130a71427425f82638973a76c5b8",
"extension": "py",
"file... | 3.5625 | stackv2 | import requests
city = "london"
# this will provide a sample data of the city used in the variable
urlx = "https://samples.openweathermap.org/data/2.5/weather?q="+city+"&appid=b6907d289e10d714a6e88b30761fae22"
# Send the request to the URL using GET method
req = requests.get(url = urlx)
output = req.json()
# Parse th... | 18 | 36.56 | 121 | 12 | 190 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1f8c621fe850971e_7b295465", "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."
] | [
18
] | [
null
] | [
7
] | [
121
] | |
2024-11-18T23:24:02.749074+00:00 | 1,602,666,171,000 | f47cffc666b1d61e57c4bb928f5710549baa2196 | 3 | {
"blob_id": "f47cffc666b1d61e57c4bb928f5710549baa2196",
"branch_name": "refs/heads/master",
"committer_date": 1602666171000,
"content_id": "ab65bd0e63cfd6c2c6485a3727cc418dba17c45e",
"detected_licenses": [
"MIT"
],
"directory_id": "7c3b2bd547bc1335b73513b181be01782308dfb8",
"extension": "py",
"fi... | 2.78125 | stackv2 | import hashlib, hmac, struct
from Crypto import Random
from Crypto.Cipher import PKCS1_OAEP, AES
from Crypto.Hash import SHA
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from pysteamkit.steam_base import UniverseKeys
BS = 16
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
... | 63 | 24.3 | 63 | 15 | 460 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_61c287b60bfb3c18_8a1aa718", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 3 | true | [
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[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."
] | [
41,
50,
57
] | [
null,
null,
null
] | [
16,
18,
24
] | [
31,
41,
37
] | |
2024-11-18T23:55:46.671364+00:00 | 1,571,223,966,000 | 0aaf16a3d0473250072e762ae5143128ca7c1a85 | 3 | {
"blob_id": "0aaf16a3d0473250072e762ae5143128ca7c1a85",
"branch_name": "refs/heads/master",
"committer_date": 1571223966000,
"content_id": "0a0b1247dfb6a6da0f511a0dda4714346df4c94e",
"detected_licenses": [
"MIT"
],
"directory_id": "407c4f907bf78ffadabd619cdb72527ac3c46d6b",
"extension": "py",
"fi... | 2.734375 | stackv2 | # This is simply a script I used to quickly test the desired interactions
# between the PC and the Switch. It is NOT useful for most people!
#
# There will be a few differences between this and the actual implementation used by Tinfoil
# due to the API differences documented here http://pycurl.io/docs/latest/unimpleme... | 152 | 33.84 | 168 | 16 | 1,209 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e5e9a41fb535293c_f1429e4b", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2)."
] | [
20,
67,
91
] | [
null,
null,
null
] | [
9,
9,
9
] | [
48,
48,
48
] | |
2024-11-18T23:55:46.725112+00:00 | 1,576,671,347,000 | 5a6015f33632b97d3e4374a9cd01d32310769ebf | 3 | {
"blob_id": "5a6015f33632b97d3e4374a9cd01d32310769ebf",
"branch_name": "refs/heads/master",
"committer_date": 1576671347000,
"content_id": "4c219bb1587badb0531eaef8ef00a9f2e6aa287f",
"detected_licenses": [
"MIT"
],
"directory_id": "5afdc0bf443e8963c472f6fe313df815c0e0b79f",
"extension": "py",
"fi... | 3 | stackv2 | """
Fast Map
Create local perceptron models for defined dataset.
Track and retrain models.
Route requests for inference, maintaining models in cache.
"""
import sqlite3
from .perceptron import Perceptron
from .geohash import decode, encode
import numpy as np
from math import ceil
import pickle
import logging
mm_log... | 192 | 30.37 | 94 | 15 | 1,398 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_eb66b09149fbc191_02d76125", "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."
] | [
147
] | [
148
] | [
20
] | [
54
] | |
2024-11-19T00:07:18.400781+00:00 | 1,551,723,879,000 | bb18613e1c546e242146748b34e7286aa7c7e01a | 3 | {
"blob_id": "bb18613e1c546e242146748b34e7286aa7c7e01a",
"branch_name": "refs/heads/master",
"committer_date": 1551723879000,
"content_id": "2a530c406f08cafa0e7e9fb0a61f59c9a3f353fa",
"detected_licenses": [
"MIT"
],
"directory_id": "26c793240d32125c8d3b5b95af654186a517046f",
"extension": "py",
"fi... | 2.640625 | stackv2 | # Pdfplumber is used for graphical pdf extraction, like we can use table lines
# to separate table and then get our text in structured format
import pdfplumber
import requests
from bs4 import BeautifulSoup
from pathlib import Path
import os.path
# Table settings for pdf extraction
table_settings = {
"vertical_... | 106 | 35.67 | 140 | 18 | 900 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d7dce4b333b73c5a_11614d95", "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)."
] | [
82,
104
] | [
null,
null
] | [
9,
13
] | [
104,
44
] | |
2024-11-19T00:45:04.729619+00:00 | 1,433,415,239,000 | a68ecb2027d37af117a29ca140a79ab499afa38f | 2 | {
"blob_id": "a68ecb2027d37af117a29ca140a79ab499afa38f",
"branch_name": "refs/heads/master",
"committer_date": 1433415239000,
"content_id": "fabb6a55ee0300f5b15e23972af6a4a201bd894d",
"detected_licenses": [
"MIT"
],
"directory_id": "d59e0730cbbbf2e6ade3fda5291ca7c05538f083",
"extension": "py",
"fi... | 2.359375 | stackv2 | from django.shortcuts import render
from django.views.generic.base import TemplateView
from django.contrib.auth import authenticate, login, logout
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth.models import User
from core.auth_be import RestBackend
from django.shortcuts import ren... | 192 | 39.64 | 159 | 19 | 1,694 | python | [{"finding_id": "codeql_py/partial-ssrf_80f45e2f34cd10d2_44755c0e", "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... | 3 | true | [
"CWE-918",
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"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)."
] | [
114,
144,
181
] | [
null,
null,
null
] | [
20,
20,
20
] | [
58,
58,
58
] | |
2024-11-18T23:28:37.222437+00:00 | 1,623,593,639,000 | f9eca6869daeadc3b730768d2c6993856aa77ed0 | 2 | {
"blob_id": "f9eca6869daeadc3b730768d2c6993856aa77ed0",
"branch_name": "refs/heads/main",
"committer_date": 1623593639000,
"content_id": "17f349c9441d12363a4bb962584b5f93b2436a08",
"detected_licenses": [
"MIT"
],
"directory_id": "1e302b35dc090244c70fc9c0a43d1d22de3c0b5d",
"extension": "py",
"file... | 2.40625 | stackv2 | # install ws4py
# pip install ws4py
# easy_install ws4py
from ws4py.client.threadedclient import WebSocketClient
import sys
import hashlib
from hashlib import sha1
import hmac
import base64
import json, time, threading
base_url = "ws://wsapi.xfyun.cn/v1/aiui"
app_id = "5d2f27d2"
api_key = "a605c4712faefae730cc84b62c0... | 66 | 28.58 | 164 | 17 | 572 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_f75c1c838faaf737_ccc5311f", "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."
] | [
59
] | [
null
] | [
32
] | [
59
] | |
2024-11-18T23:28:42.510763+00:00 | 1,476,078,376,000 | df5f4ebbdc9ddad1e50dba9065bd2c4186d5cbc3 | 3 | {
"blob_id": "df5f4ebbdc9ddad1e50dba9065bd2c4186d5cbc3",
"branch_name": "refs/heads/master",
"committer_date": 1476078376000,
"content_id": "c90cf91441882ecf8613e72a59803f1374156cc4",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bc46440bb740258007a95cfd858930a0426207cb",
"extension": "p... | 2.828125 | stackv2 | """
======================================================
Out-of-core classification of text documents
======================================================
This is an example showing how scikit-learn can be used for classification
using an out-of-core approach.
Out-of-core learning means that we can learn from dat... | 307 | 33.7 | 79 | 16 | 2,436 | python | [{"finding_id": "codeql_py/tarslip_98dfd0b21d5e500a_668fd696", "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)."
] | [
180
] | [
null
] | [
9
] | [
14
] | |
2024-11-18T23:39:39.440267+00:00 | 1,558,878,449,000 | 72570b9cc453534b3099818fd09efb997bdf4e75 | 2 | {
"blob_id": "72570b9cc453534b3099818fd09efb997bdf4e75",
"branch_name": "refs/heads/master",
"committer_date": 1558878449000,
"content_id": "d6d54c8cc818cf05be2a37e6a1705b780c78e323",
"detected_licenses": [
"MIT"
],
"directory_id": "174b1e7227faab8e83841a4c3329fc8b812af774",
"extension": "py",
"fi... | 2.484375 | stackv2 | import json
import time
from rauth import OAuth1Service, OAuth2Service
from flask import current_app, url_for, request, redirect
from bs4 import BeautifulSoup as bs
class OAuthSignIn(object): # below class inherits from this one
providers = None
def __init__(self, provider_name):
self.provider_name =... | 94 | 33.44 | 90 | 15 | 688 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bb47b393230fb115_6e82ea6c", "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."
] | [
75
] | [
null
] | [
15
] | [
28
] | |
2024-11-19T00:05:01.729435+00:00 | 1,474,719,713,000 | 5a4414894f77c55c67d0edefeb85a8560267c43a | 3 | {
"blob_id": "5a4414894f77c55c67d0edefeb85a8560267c43a",
"branch_name": "refs/heads/master",
"committer_date": 1474719713000,
"content_id": "d2e03fb0623452bf528ae5b838b74609f797bf7f",
"detected_licenses": [
"MIT"
],
"directory_id": "488d20f174980615998d539c4b91df626c34ea60",
"extension": "py",
"fi... | 3.015625 | stackv2 | #!/usr/bin/python
#
#--------------------------------------------------------------------------------------------------
#
# Author- Prakhar Pratyush
# Desc- Python script to mark multiple locations on the Google Map.
#
#-------------------------------------------------------------------------------------------------... | 62 | 28.48 | 104 | 14 | 366 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_76f1a87b75214ac3_13d62ca2", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
51
] | [
null
] | [
15
] | [
29
] | |
2024-11-19T01:11:19.859101+00:00 | 1,503,593,471,000 | 3b2ad6706bb16c7003cd25ee07d5a2b5555cbea4 | 3 | {
"blob_id": "3b2ad6706bb16c7003cd25ee07d5a2b5555cbea4",
"branch_name": "refs/heads/master",
"committer_date": 1503593471000,
"content_id": "ae3686629479da87382506f49adc26492add7a8e",
"detected_licenses": [
"MIT"
],
"directory_id": "efe77801e984cd70dc280d3a96d96c3caf2a177f",
"extension": "py",
"fi... | 2.6875 | stackv2 | #!/usr/bin/env python
from urllib.request import urlopen, Request
from w3lib.encoding import html_to_unicode
# from jinja2 import Template
from pydepta.depta import Depta
from lxml import etree
from flask import Flask, request
app = Flask(__name__)
def transpose(xss):
"""
transpose a list of lists
>>> ... | 118 | 21.49 | 78 | 19 | 705 | python | [{"finding_id": "codeql_py/full-ssrf_a6c9ccdef6293e1d_5cb12502", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 1 | true | [
"CWE-918"
] | [
"py/full-ssrf"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1)."
] | [
24
] | [
28
] | [
20
] | [
7
] | |
2024-11-19T01:11:24.972563+00:00 | 1,628,391,390,000 | fb7bb1796d88570ef7ae235aad656f0678ccd00f | 2 | {
"blob_id": "fb7bb1796d88570ef7ae235aad656f0678ccd00f",
"branch_name": "refs/heads/main",
"committer_date": 1628391390000,
"content_id": "82d1e6f757c7e77a72478c7b0a1fab17d3875a38",
"detected_licenses": [
"MIT"
],
"directory_id": "a177951774238181f4240d623b61f505ccb27626",
"extension": "py",
"file... | 2.359375 | stackv2 | import os, time, random
import requests, json
import winsound
import pyautogui
import keyboard
import pyperclip
requests.packages.urllib3.disable_warnings()
def parseCode(inputList):
codeList = []
for line in inputList:
findPos = line.find("LOL")
if findPos != -1:
code = line[findPos:findPos+13]
codeList.a... | 161 | 32.66 | 114 | 16 | 1,868 | python | [{"finding_id": "codeql_py/request-without-cert-validation_7466c5ca049c60df_bdf69a1b", "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)."
] | [
31
] | [
null
] | [
8
] | [
79
] | |
2024-11-19T01:11:29.363708+00:00 | 1,631,937,410,000 | 70b2f7dfaf8c459060e3ba31b463dd51db5f2bfa | 3 | {
"blob_id": "70b2f7dfaf8c459060e3ba31b463dd51db5f2bfa",
"branch_name": "refs/heads/main",
"committer_date": 1631937410000,
"content_id": "20038e2a84875f4beff5d350ba222386c6d98a89",
"detected_licenses": [
"MIT"
],
"directory_id": "72690298f2514d099a877f6169d1d52c57e84476",
"extension": "py",
"file... | 2.515625 | stackv2 |
from __future__ import print_function
import datetime
import os
import sys
sys.path.append(".") #Import varaibles in run from AQ_Plot_server directory
sys.path.append(sys.path[0][0:sys.path[0].find("AQ_Plot_server")]) #Import varaiblesif run from home directory
import variables as V
import glob
import time
import... | 110 | 30.35 | 123 | 16 | 966 | python | [{"finding_id": "codeql_py/flask-debug_eb8b483406cb2053_1dde6dd1", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 4 | true | [
"CWE-215",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
110,
42,
86,
92
] | [
null,
null,
null,
null
] | [
5,
14,
27,
18
] | [
43,
22,
35,
26
] | |
2024-11-19T01:11:41.583105+00:00 | 1,693,173,074,000 | 5d879919dcfe401f76b8c7cd56bdf36522ed1048 | 3 | {
"blob_id": "5d879919dcfe401f76b8c7cd56bdf36522ed1048",
"branch_name": "refs/heads/master",
"committer_date": 1693173136000,
"content_id": "e259b70e03ebf0740f3c8499d21571cf4580b1e6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2481cde6506743565dff2b405a2396daf208ab3e",
"extension": "py"... | 2.734375 | stackv2 | #!/usr/bin/env python3
import logging
import os
import random
import re
import string
import subprocess
def generete_password(length=40):
return ''.join(random.choices(list(string.ascii_letters + string.digits), k=length))
def create_logger():
logger = logging.getLogger(__name__)
logger.setLevel(loggin... | 112 | 29.43 | 88 | 15 | 768 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c3c29c677838a5df_233361ea", "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."... | 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 (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text."
] | [
75,
83
] | [
null,
null
] | [
18,
17
] | [
27,
39
] | |
2024-11-18T23:48:19.925540+00:00 | 1,615,454,407,000 | 3f6ce8cc5a75af4efe11595756397f695b4bc82c | 3 | {
"blob_id": "3f6ce8cc5a75af4efe11595756397f695b4bc82c",
"branch_name": "refs/heads/master",
"committer_date": 1615454407000,
"content_id": "745458d5a09fed0774523797e68dde3a88858fa4",
"detected_licenses": [
"MIT"
],
"directory_id": "3136ed1d465d81e70d4a1f9294c63c7930b5a54e",
"extension": "py",
"fi... | 2.734375 | stackv2 | """
Identify TEM images from scientific articles using chemdataextractor
@author : Ed Beard
"""
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from chemdataextractor import Document
import urllib
import multiprocessing as mp
import os
import csv
import io
i... | 207 | 32.17 | 102 | 21 | 1,433 | python | [{"finding_id": "codeql_py/tarslip_1c17141f84cd668d_0079492c", "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... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
59,
66
] | [
null,
null
] | [
17,
17
] | [
24,
24
] | |
2024-11-19T00:29:34.663052+00:00 | 1,614,105,293,000 | 7d049ee40342fbdf9785ba961ce9b4458a7456fb | 2 | {
"blob_id": "7d049ee40342fbdf9785ba961ce9b4458a7456fb",
"branch_name": "refs/heads/main",
"committer_date": 1614105293000,
"content_id": "9143d66870a49eb68b844dff29360405a7c090d1",
"detected_licenses": [
"MIT"
],
"directory_id": "ba0806511d5517c9949ea920261c0a7cfebf6075",
"extension": "py",
"file... | 2.3125 | stackv2 | from flask import render_template, redirect, request, url_for, flash
from flask_login import login_user, logout_user, login_required, \
current_user
from werkzeug.utils import secure_filename
import os
from . import auth
from .. import db
from ..models import User, Image
from .forms import LoginForm, MenuForm, Uplo... | 76 | 34.76 | 74 | 18 | 573 | python | [{"finding_id": "codeql_py/url-redirection_4880a0a54764b38f_bb68a170", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 2 | true | [
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
52,
58
] | [
null,
null
] | [
29,
29
] | [
40,
40
] | |
2024-11-19T00:44:08.806470+00:00 | 1,632,258,324,000 | e8d70fb64e299e68f9d30684e08514d197058399 | 3 | {
"blob_id": "e8d70fb64e299e68f9d30684e08514d197058399",
"branch_name": "refs/heads/main",
"committer_date": 1632258324000,
"content_id": "952806872d4f9d6d204d9d101681a70a5edf255a",
"detected_licenses": [
"MIT"
],
"directory_id": "9b21ed762e368ca06344eb92c0a589f78b5bd44b",
"extension": "py",
"file... | 3.15625 | stackv2 | #!/Users/jeff/.pyenv/shims/python
import os
from flask import Flask, request
app = Flask(__name__)
def check_dir(directory):
if os.path.isdir(directory):
if directory.endswith('/'):
pass
else:
directory += '/'
return directory
@app.route('/')
def home():
display_str = '<h1>Home page for solution.py. Vi... | 67 | 26.84 | 78 | 14 | 508 | python | [{"finding_id": "codeql_py/flask-debug_4c39e8e41d017cc0_4ab00739", "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.", ... | 8 | true | [
"CWE-215",
"CWE-079",
"CWE-079",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This path depends on a [user-provided value]... | [
64,
44,
59,
9,
34,
35,
37,
53
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
2,
9,
9,
19,
19,
26,
22,
19
] | [
32,
15,
15,
28,
28,
35,
31,
28
] | |
2024-11-19T00:44:11.694645+00:00 | 1,602,944,465,000 | 6f1a76cd655331d124daec612d5d0004d7e3c076 | 3 | {
"blob_id": "6f1a76cd655331d124daec612d5d0004d7e3c076",
"branch_name": "refs/heads/master",
"committer_date": 1602944465000,
"content_id": "95cc83ec38068bea8ccd5132acf4600c4236840c",
"detected_licenses": [
"MIT"
],
"directory_id": "b208daa0508f023a46afa2e865a0e2624e9f43fa",
"extension": "py",
"fi... | 2.59375 | stackv2 |
import psycopg2
import pytz
class Structure:
def __init__(self, name, primary_keys, column_dic):
self.name = name
self.column_dic = {}
self.column_dic['id'] = 'serial'
self.column_dic.update(column_dic)
columns = list(column_dic.keys())
self.columns = columns
... | 284 | 30.36 | 130 | 24 | 1,838 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_13d2732ff3a7ccf7_531cc4ab", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
57
] | [
null
] | [
40
] | [
49
] | |
2024-11-18T23:05:37.937916+00:00 | 1,622,291,466,000 | b264b86292d900c552f95fbafceefb5aa9458e35 | 3 | {
"blob_id": "b264b86292d900c552f95fbafceefb5aa9458e35",
"branch_name": "refs/heads/main",
"committer_date": 1622291466000,
"content_id": "6aec371c31ae2bd98983411d28dfb9b62f0f96ad",
"detected_licenses": [
"MIT"
],
"directory_id": "3b564c4a37bb70cffea1415717685ea70c26b49a",
"extension": "py",
"file... | 2.890625 | stackv2 | """
PyLofi
Plays lofi from lofi lifestreams.
"""
import webbrowser
import os
import random
import re
import _thread as thread
os.environ["PATH"] = os.path.dirname(__file__) + os.pathsep + os.environ["PATH"]
import pyglet
import youtube_dl
import mpv
class Youtube:
"""
Extract links from the youtube.md file... | 230 | 24.84 | 98 | 20 | 1,424 | python | [{"finding_id": "codeql_py/overly-large-range_3798361192b67a55_55f8a987", "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\\\\[\\\\\\\\]^_\\]."
] | [
43
] | [
null
] | [
49
] | [
52
] | |
2024-11-18T23:19:48.245978+00:00 | 1,444,414,759,000 | 885db4b665327a1a3d8c8cf7d9edb70d716b1657 | 2 | {
"blob_id": "885db4b665327a1a3d8c8cf7d9edb70d716b1657",
"branch_name": "refs/heads/master",
"committer_date": 1444414781000,
"content_id": "f0c79fb8974a57c92ef6b32886bf84c21d4d200a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "573cbd5978d9d3936b7d680e07a373e0878803ed",
"extension": "py"... | 2.375 | stackv2 | #!/usr/bin/env python
import argparse
import json
import os
import sys
from jinja2 import Environment, PackageLoader
from subprocess import call
from urllib2 import urlopen, Request, HTTPError
def post_comment(repo, pr, token, comment):
try:
url = ''.join(['https://api.github.com/repos/', repo, '/issues/', str(... | 84 | 38.13 | 119 | 17 | 815 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b6f15e0e80a3525c_7f65444f", "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."
] | [
67
] | [
null
] | [
9
] | [
69
] | |
2024-11-18T23:20:09.420579+00:00 | 1,547,839,544,000 | b22db49c99c218b8a759cbe805ca9d446710d5df | 2 | {
"blob_id": "b22db49c99c218b8a759cbe805ca9d446710d5df",
"branch_name": "refs/heads/master",
"committer_date": 1547839544000,
"content_id": "13839bf06f407ef315667c7ac6663b0a546f8464",
"detected_licenses": [
"MIT"
],
"directory_id": "bdf855584a5e1c70edf5e04d2eecdc45bae87c8c",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
email_tool automate sending emails through gmail
copyright: 2015, (c) sproutsocial.com
author: Nicholas Flink <nicholas@sproutsocial.com>
"""
import argparse
import boto
import email
import logging
import pprint
import requests
import smtplib
import sys
import util... | 224 | 45.47 | 175 | 16 | 2,156 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c28257027d5caca1_dfc228ad", "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."
] | [
130
] | [
null
] | [
60
] | [
69
] | |
2024-11-18T23:11:09.833647+00:00 | 1,547,981,807,000 | e3213eba732898e88135ca26d805ccbaf8289395 | 2 | {
"blob_id": "e3213eba732898e88135ca26d805ccbaf8289395",
"branch_name": "refs/heads/master",
"committer_date": 1547981807000,
"content_id": "247f320bcb7d250abeefe647e2635db806386e79",
"detected_licenses": [
"MIT"
],
"directory_id": "d58d684b67befe41bf245322ab7abd26d56ea0ee",
"extension": "py",
"fi... | 2.328125 | stackv2 | from multiprocessing import Process
from queue import Queue
from flask import Flask, request, Response
import socket
hostname = '0.0.0.0'
port = 9014
app = Flask(__name__)
@app.route('/calc', methods=['GET', 'POST'])
def calculaPreu():
print("request form : ")
print(request.form.get("size"))
data = req... | 22 | 19.41 | 44 | 11 | 120 | python | [{"finding_id": "codeql_py/reflective-xss_686305e64870d55a_9dd53e1d", "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)."
] | [
19
] | [
null
] | [
12
] | [
22
] | |
2024-11-18T23:11:13.931024+00:00 | 1,547,662,001,000 | 5256492fe3caf8ad632ec948ed4f96f3c9413101 | 3 | {
"blob_id": "5256492fe3caf8ad632ec948ed4f96f3c9413101",
"branch_name": "refs/heads/master",
"committer_date": 1547662001000,
"content_id": "58bfab4cbd4e221c5f430a8b2c86c855e03b9532",
"detected_licenses": [
"MIT"
],
"directory_id": "deffe868d05cacd0b855150b7dd94e5ca0594a4e",
"extension": "py",
"fi... | 2.53125 | stackv2 |
import os
import urllib
import urllib.request
from xml.dom.minidom import parse, parseString
from io import BytesIO
import tkinter as tk
from PIL import Image, ImageTk
#import requests
from xml.etree import ElementTree
class CoverLoader():
def __init__(self, config):
self.config = config
# create co... | 152 | 36.06 | 137 | 19 | 1,369 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b97cb71575c79b9b_e273ac72", "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."
] | [
98
] | [
null
] | [
13
] | [
40
] | |
2024-11-19T01:21:39.743239+00:00 | 1,532,102,736,000 | 6e80fc1b884d23d86866192e49fa8c395feb4c02 | 3 | {
"blob_id": "6e80fc1b884d23d86866192e49fa8c395feb4c02",
"branch_name": "refs/heads/master",
"committer_date": 1532102736000,
"content_id": "31632552cded51d745e73cc277ad72d29d1375ec",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4859e4a60695382f10d8ba1cfd5bb7ba92201345",
"extension": "py"... | 2.578125 | stackv2 | #!/usr/bin/python3.6
import requests
from os.path import expanduser
import yaml
import json
import sys
from datetime import datetime, timedelta
# Email dependencies
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
def create_bigtime_session(user, password):
"""
... | 197 | 33.64 | 123 | 21 | 1,542 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_45c8626374028549_0544b0f3", "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."
] | [
41,
176
] | [
null,
null
] | [
34,
11
] | [
41,
17
] | |
2024-11-19T01:21:40.045982+00:00 | 1,440,382,626,000 | 4db098344908b76e1aea3080d47766df49668b68 | 3 | {
"blob_id": "4db098344908b76e1aea3080d47766df49668b68",
"branch_name": "refs/heads/master",
"committer_date": 1440382626000,
"content_id": "b9d516d807983e390e943d4bf53bf5d06d2ec84f",
"detected_licenses": [
"MIT"
],
"directory_id": "2d230dc3d6452588db034ffcfb760f7245662c74",
"extension": "py",
"fi... | 3.203125 | stackv2 | """
OpenSSL compatible aes file io (source: http://stackoverflow.com/a/16761459)
# usage:
import encryptedio
with open(in_filename, 'rb') as in_file, open(out_filename, 'wb') as out_file:
encryptedio.encrypt(in_file, out_file, password)
with open(in_filename, 'rb') as in_file, open(out_filename, 'wb') as out_file:... | 70 | 32.57 | 79 | 16 | 632 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_b6d81b1b00110d54_651a967c", "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... | [
34
] | [
null
] | [
19
] | [
40
] | |
2024-11-19T00:11:32.799869+00:00 | 1,611,560,903,000 | a31e810360d55c376439a617fc13be304fba2697 | 2 | {
"blob_id": "a31e810360d55c376439a617fc13be304fba2697",
"branch_name": "refs/heads/master",
"committer_date": 1611560903000,
"content_id": "0f895ef6a75c49546cfee2c018230c5aaa52a70d",
"detected_licenses": [
"MIT"
],
"directory_id": "fdfa8401132afe78041ee544005c17b700c5999f",
"extension": "py",
"fi... | 2.3125 | stackv2 | from flask import redirect, url_for, request, g, render_template, request
from flask_login import LoginManager, login_user, logout_user, current_user
from app import db
import ldap, time
from urllib.parse import urlparse
from app import telomere
from app.model.user import User
login_manager = LoginManager()
login_man... | 65 | 26.37 | 75 | 18 | 394 | python | [{"finding_id": "codeql_py/url-redirection_e8a7754607e78ef4_56ccdf59", "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)."
] | [
40
] | [
null
] | [
33
] | [
57
] | |
2024-11-19T00:11:37.904843+00:00 | 1,610,740,850,000 | 1e162d88cf1377b64ed52f51891384a8e42d7b32 | 2 | {
"blob_id": "1e162d88cf1377b64ed52f51891384a8e42d7b32",
"branch_name": "refs/heads/main",
"committer_date": 1610740850000,
"content_id": "9b31cebaf710474dfb678625a39d396d82e14175",
"detected_licenses": [
"MIT"
],
"directory_id": "31ca93947c1fd8e6fc3dd42669f61d58e69a99e4",
"extension": "py",
"file... | 2.421875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# /**********************************************************************************
# * _author : Domeniko Gentner
# * _mail : code@tuxstash.de
# * _repo : https://git.tuxstash.de/gothseidank/labertasche
# * _license : This project is under MIT License
# ****... | 191 | 38.74 | 112 | 17 | 1,677 | python | [{"finding_id": "codeql_py/stack-trace-exposure_d07739f75895742b_90dd3c2e", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 4 | true | [
"CWE-209",
"CWE-209",
"CWE-022",
"CWE-022"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
94,
131,
58,
64
] | [
null,
null,
null,
null
] | [
62,
62,
12,
16
] | [
68,
68,
18,
21
] | |
2024-11-19T00:11:44.134372+00:00 | 1,603,505,155,000 | a6133c25965c7c4cf845879d8b440edeb9d340ec | 3 | {
"blob_id": "a6133c25965c7c4cf845879d8b440edeb9d340ec",
"branch_name": "refs/heads/master",
"committer_date": 1603505155000,
"content_id": "73e1a8485fe7370921fe7798aca8c49edefbbd51",
"detected_licenses": [
"MIT"
],
"directory_id": "2cc69324c0dbb18a0f1412a6c3f592a32da84e16",
"extension": "py",
"fi... | 2.734375 | stackv2 | from flask import Flask,Response
from pimux import function
from pimux import Sensors
import subprocess
app=Flask(__name__)
f=function.misc()
s=Sensors.sensor()
@app.route('/')
def welcome():
return '''
<strong> Welcome to IOT</strong>
<hr>
Enter the url methods on your browser:
<ul>
<li>/vibrate... | 95 | 19.22 | 68 | 12 | 491 | python | [{"finding_id": "codeql_py/reflective-xss_d435d1a6c3c7b6a4_ff3bca6f", "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)."
] | [
42,
65
] | [
null,
69
] | [
12,
12
] | [
44,
8
] | |
2024-11-19T00:24:53.288714+00:00 | 1,585,686,642,000 | ebee22a02c9ee1a7cd2f8cb235b8c794f656a6d4 | 3 | {
"blob_id": "ebee22a02c9ee1a7cd2f8cb235b8c794f656a6d4",
"branch_name": "refs/heads/master",
"committer_date": 1585686642000,
"content_id": "9c28b88d6d3db1aeaa1735945105396a544e6fec",
"detected_licenses": [
"MIT"
],
"directory_id": "35852f4d02a96ce310c4f9cfd25a1d3d96957ff6",
"extension": "py",
"fi... | 2.96875 | stackv2 | """
This is a very basic sample example which does the following:
1. Connect to XNAT DB
2. Download a sample DICOM Image form XNAT DB
3. Read the DICOM image using pydicom
4. Send the data to OpenVINO model server for inference.
"""
# Connect to XNAT database
import xnat
connection = xnat.connect('https://central.xna... | 71 | 30.9 | 119 | 16 | 602 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1ce143c9f5063cbe_9529589a", "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."
] | [
35
] | [
null
] | [
29
] | [
46
] | |
2024-11-19T00:36:57.323504+00:00 | 1,683,044,109,000 | 4261305b17f91fdac7fd4d16135e312576701e15 | 2 | {
"blob_id": "4261305b17f91fdac7fd4d16135e312576701e15",
"branch_name": "refs/heads/master",
"committer_date": 1683044109000,
"content_id": "d70f315ba3d1e6e04e5ea93efd1d3a94cd10d66d",
"detected_licenses": [
"MIT"
],
"directory_id": "ba89b17864ece80b2b2602bb2c744e19c1a64a39",
"extension": "py",
"fi... | 2.3125 | stackv2 | import uuid
from flask import flash, redirect, request, url_for, g, Blueprint, render_template
from flask_login import current_user, login_user, logout_user, LoginManager, login_required
from flask_wtf import FlaskForm
from wtforms import PasswordField, StringField
from wtforms.validators import InputRequired
from sq... | 97 | 31.45 | 167 | 19 | 647 | python | [{"finding_id": "codeql_py/url-redirection_1d6c5762c1c5ac23_172a5ab1", "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_... | 3 | true | [
"CWE-601",
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
71,
73,
75
] | [
null,
null,
null
] | [
33,
33,
33
] | [
86,
87,
87
] | |
2024-11-19T01:02:08.332988+00:00 | 1,634,138,655,000 | c1ec661d32c50d0d88cbd4ee6d2a8cca4b317f91 | 3 | {
"blob_id": "c1ec661d32c50d0d88cbd4ee6d2a8cca4b317f91",
"branch_name": "refs/heads/master",
"committer_date": 1634138655000,
"content_id": "e7c7e7a489f3b9991f529cadbe148f7164b2828d",
"detected_licenses": [
"MIT"
],
"directory_id": "e0ca2dcd3ab771c61ec2511d14a7f7e11af4f8b3",
"extension": "py",
"fi... | 2.953125 | stackv2 | from jinja2 import Template
class ValidationError(Exception):
template = Template("{{ label }}が適切ではありません")
def __init__(self, label="", data=""):
self.label = label
self.data = data
@classmethod
def setTemplate(cls, template = "{{ label }}が適切ではありません"):
cls.template = Template(t... | 41 | 26.61 | 61 | 12 | 253 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5ea61e2844a843d8_d4328da4", "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... | 6 | true | [
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially... | [
11,
4,
24,
29,
35,
40
] | [
null,
null,
null,
null,
null,
null
] | [
24,
16,
16,
16,
20,
20
] | [
42,
49,
49,
50,
45,
45
] | |
2024-11-19T01:02:09.068195+00:00 | 1,625,813,537,000 | a5a88d834e0c65c1ab170345bdbbf669d6e4cb95 | 2 | {
"blob_id": "a5a88d834e0c65c1ab170345bdbbf669d6e4cb95",
"branch_name": "refs/heads/main",
"committer_date": 1625813537000,
"content_id": "bacfff21e0e30ab9bcf4eb5fb7884f70504c2cc8",
"detected_licenses": [
"MIT"
],
"directory_id": "e09929c867f45688266ec9b610dfde0a1577992a",
"extension": "py",
"file... | 2.46875 | stackv2 | # -*- coding: utf-8 -*-
"""RagaRecogFeatures.ipynb
Automatically generated by Colaboratory.
"""
from google.colab import drive
drive.mount('/content/gdrive')
from pydub import AudioSegment, utils
from secrets import API_KEY
import pandas as pd
import youtube_dl
import requests
import shutil
import os
url = 'https:... | 152 | 24.86 | 129 | 19 | 1,040 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_942a83407704867c_14c17648", "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."
] | [
80
] | [
null
] | [
19
] | [
27
] | |
2024-11-19T01:02:12.744609+00:00 | 1,629,227,792,000 | 3506685ba47d49e98e3eb16649e9e15eb3562967 | 3 | {
"blob_id": "3506685ba47d49e98e3eb16649e9e15eb3562967",
"branch_name": "refs/heads/master",
"committer_date": 1629227792000,
"content_id": "eb0b94c22ad36f15dacecdbeb757f5f7c683a11f",
"detected_licenses": [
"MIT"
],
"directory_id": "c1749f50040753791380661f6b17f28943203492",
"extension": "py",
"fi... | 3.328125 | stackv2 |
import random
def passEngine(length=64):
"""
random base64 Passwords
"""
passChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
return ''.join((random.choice(passChars) for i in range(length)))
def uniqPasses(limit=100000):
passData = []
for i in range(0... | 31 | 20.74 | 82 | 13 | 178 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_704948eda3d0ff37_1d1bbfab", "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.\... | 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 (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive d... | [
30,
23
] | [
null,
null
] | [
18,
15
] | [
26,
23
] | |
2024-11-18T23:48:37.797582+00:00 | 1,579,697,957,000 | 10fcd4756ac0d895a5b6234608b909ed4091bea5 | 2 | {
"blob_id": "10fcd4756ac0d895a5b6234608b909ed4091bea5",
"branch_name": "refs/heads/master",
"committer_date": 1579697957000,
"content_id": "f8dab151b4846da4a898e03087499e3b63b320ad",
"detected_licenses": [
"MIT"
],
"directory_id": "66e8b8d8d43d54626da8281b1f2511b6742f9e94",
"extension": "py",
"fi... | 2.34375 | stackv2 | #The MIT License (MIT)
#
#Copyright (c) 2015,2018 Sami Salkosuo
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modi... | 56 | 36 | 78 | 13 | 508 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_9f5fb75231c1bbc4_70066152", "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."
] | [
40
] | [
null
] | [
24
] | [
43
] | |
2024-11-18T23:48:43.530223+00:00 | 1,631,312,458,000 | 158b3687ec1c6aeb690ceef9c0038281b36ccaa8 | 3 | {
"blob_id": "158b3687ec1c6aeb690ceef9c0038281b36ccaa8",
"branch_name": "refs/heads/main",
"committer_date": 1631312458000,
"content_id": "3a3fb17ea04b31e338952ef440043b9a1075f123",
"detected_licenses": [
"MIT"
],
"directory_id": "ddfd97958b42a4e1bd533cf3f13316edff6d61e0",
"extension": "py",
"file... | 2.609375 | stackv2 | from flask import Flask, app, jsonify, request
from flask_cors import CORS
from flask_mysqldb import MySQL
# connection mysql
from config.db import get_connection
# models
import models.students
# config app
app=Flask(__name__)
CORS(app)
mysql = MySQL(get_connection(app))
# routers
@app.route('/')
def index():
... | 84 | 26.45 | 70 | 16 | 533 | python | [{"finding_id": "codeql_py/stack-trace-exposure_ec2ce1def29bdf2d_10883888", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 6 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-215"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/flask-debug"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
28,
41,
54,
67,
79,
84
] | [
null,
null,
null,
null,
null,
null
] | [
24,
24,
24,
24,
24,
5
] | [
25,
25,
25,
25,
25,
53
] | |
2024-11-18T23:49:54.828237+00:00 | 1,621,615,437,000 | adc4347db4f3d67e04086a14809efa8857bdd1bb | 3 | {
"blob_id": "adc4347db4f3d67e04086a14809efa8857bdd1bb",
"branch_name": "refs/heads/main",
"committer_date": 1621615437000,
"content_id": "3f7afd17cd2bf2d8f30c25791ec2adbfda53a57d",
"detected_licenses": [
"MIT"
],
"directory_id": "fc96c4c74e288e659a3a290b12032baddefa5bb1",
"extension": "py",
"file... | 2.546875 | stackv2 | from flask import Flask, render_template, request
from werkzeug.utils import secure_filename
import os
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = 'upload/'
@app.route('/upload')
def upload_file():
return render_template('upload.html')
@app.route('/uploader',methods=['GET','POST'])
def uploader():
if... | 22 | 27.14 | 68 | 14 | 134 | python | [{"finding_id": "codeql_py/path-injection_95a9d47adaa91842_042dd79b", "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)."
] | [
17
] | [
null
] | [
16
] | [
68
] | |
2024-11-19T01:51:51.985925+00:00 | 1,592,993,122,000 | 2970b762e316b505d580e9dbabadc838b75d1574 | 3 | {
"blob_id": "2970b762e316b505d580e9dbabadc838b75d1574",
"branch_name": "refs/heads/master",
"committer_date": 1592993122000,
"content_id": "524861b6c3a0a6122496715829173f3588be915c",
"detected_licenses": [
"MIT"
],
"directory_id": "c657052e2dab3385d5aba26cf9f0ed1f32882aa8",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python
# $Id: 20121108$
# $Date: 2012-11-08 17:05:18$
# $Author: Marek Lukaszuk$
#
# this is based on http://notary.icsi.berkeley.edu/
import OpenSSL.SSL
import socket
import sys
import dns.resolver
import time
def days2ctime(days):
return time.strftime("%Y-%m-%d",time.localtime(days * 86400))
def ... | 108 | 24.42 | 71 | 14 | 835 | python | [{"finding_id": "codeql_py/insecure-protocol_99a8d68b6d6af981_c3e00eea", "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 OpenSSL.SSL.Context](1).", "remediation": ""... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to OpenSSL.SSL.Context](1)."
] | [
55
] | [
null
] | [
9
] | [
54
] | |
2024-11-18T23:43:32.509581+00:00 | 1,486,582,176,000 | 77bbd431656007286d514857f0b933b964c508db | 2 | {
"blob_id": "77bbd431656007286d514857f0b933b964c508db",
"branch_name": "refs/heads/master",
"committer_date": 1486582176000,
"content_id": "227232498b4e9207f9743659341d4f8c9d912705",
"detected_licenses": [
"MIT"
],
"directory_id": "3a4939f631bafb65fc22e991e5d3452cf0266678",
"extension": "py",
"fi... | 2.375 | stackv2 | from django.db import models
import hashlib
import uuid
from datetime import datetime
from django.utils import timezone
salt = 'authsecretkey'
atoken_lifetime = 300
rtoken_lifetime = 36000
agcode_lifetime = 15
# Create your models here.
class User(models.Model):
uname = models.CharField(max_length=100, primary_... | 149 | 32.49 | 80 | 16 | 1,149 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_46349406a58db3a8_0bad2677", "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... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computational... | [
69,
136
] | [
70,
137
] | [
42,
42
] | [
33,
33
] | |
2024-11-19T00:33:07.009401+00:00 | 1,624,023,365,000 | 1f40f541426917be5c798bd49c3d56c5e4749b34 | 2 | {
"blob_id": "1f40f541426917be5c798bd49c3d56c5e4749b34",
"branch_name": "refs/heads/master",
"committer_date": 1624023365000,
"content_id": "071a845ebf698455ba02817c8bc7f0666a5dfe19",
"detected_licenses": [
"MIT"
],
"directory_id": "ccd9502bfc9739a33c1cca37843dc1298d4ec148",
"extension": "py",
"fi... | 2.390625 | stackv2 | import secrets
import sqlite3
import random
import tempfile
import json
from flask import Flask, request, redirect, render_template
from werkzeug.utils import secure_filename
from os import getcwd, path, makedirs
from api.pix import Pix
from decimal import Decimal
from urllib.parse import quote_plus
QR_FOLDER = 'medi... | 246 | 33.22 | 114 | 20 | 1,885 | python | [{"finding_id": "codeql_py/reflective-xss_e6c3eae35ae191bf_233e87c5", "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)."
] | [
147
] | [
151
] | [
16
] | [
10
] | |
2024-11-19T01:18:00.525127+00:00 | 1,535,835,040,000 | 5099759650b5ebca016a73a1b377d3e431531eb1 | 3 | {
"blob_id": "5099759650b5ebca016a73a1b377d3e431531eb1",
"branch_name": "refs/heads/master",
"committer_date": 1535835040000,
"content_id": "7b2fc28938237ddc022990da885612fe24b4d419",
"detected_licenses": [
"Unlicense"
],
"directory_id": "b5504b411dc019a395cf4cae195bd7bdcba29485",
"extension": "py",... | 3.46875 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from steganography.steganography import Steganography
def get_opcion_estegano(submenu2):
while True:
if submenu2 == 1:
ocultar_mensaje()
break
elif submenu2 == 2:
... | 37 | 33.92 | 63 | 16 | 293 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b293974baeac8bc5_20677c0d", "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."
] | [
36
] | [
null
] | [
11
] | [
22
] | |
2024-11-19T01:18:08.989790+00:00 | 1,574,463,804,000 | 9dce52f5573b2106d4feaee5661291eaa8729a5f | 2 | {
"blob_id": "9dce52f5573b2106d4feaee5661291eaa8729a5f",
"branch_name": "refs/heads/master",
"committer_date": 1574463804000,
"content_id": "05b53c1c65008b8f64cab2acdd1620396261a84a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "24a31307192a55c7c1ae1c0b40c83ff3869e1c48",
"extension": "py"... | 2.484375 | stackv2 | import json
import jinja2
import pprint
data = json.load(open('postman.json'))
extra = json.load(open('extra.json'))
env_raw = json.load(open('postman_environment.json'))
env_dict = {val['key']: val['value'] for val in env_raw['values']}
for item in data['item']:
if item['name'] in extra:
item['extra'] = ... | 55 | 31.13 | 95 | 14 | 469 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_cd1eaf160adf92cc_9f9988e5", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
17
] | [
null
] | [
16
] | [
37
] | |
2024-11-19T01:02:44.880268+00:00 | 1,534,486,019,000 | ca6bd9cf4ceb71595b8adb68865f704f6f60bc2f | 2 | {
"blob_id": "ca6bd9cf4ceb71595b8adb68865f704f6f60bc2f",
"branch_name": "refs/heads/master",
"committer_date": 1534486019000,
"content_id": "5f3abe23329b8fdb611325b799253064314135da",
"detected_licenses": [
"MIT"
],
"directory_id": "8fe105d868d01b51aac31ecef3d5834f1f340aff",
"extension": "py",
"fi... | 2.375 | stackv2 | #! /usr/bin/env python
# -*- coding:utf-8 -*-
"""
@author : MG
@Time : 2018/7/6 10:39
@File : auth.py
@contact : mmmaaaggg@163.com
@desc :
"""
import requests
import logging
# 验签数据
import hashlib
# 解密加密数据,获取watermark中的appid
import base64
import json
from Crypto.Cipher import AES
# Flask Module
from flask imp... | 253 | 33.18 | 98 | 18 | 2,126 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_131d204af1e49802_2137d896", "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 (SHA1) that is insecure.\... | 2 | true | [
"CWE-327",
"CWE-117"
] | [
"py/weak-sensitive-data-hashing",
"py/log-injection"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (SHA1) that i... | [
67,
217
] | [
null,
null
] | [
25,
43
] | [
34,
50
] | |
2024-11-19T01:02:46.696841+00:00 | 1,602,738,604,000 | fb85981d11f6791a3db9662759a4bfd6936b41ca | 2 | {
"blob_id": "fb85981d11f6791a3db9662759a4bfd6936b41ca",
"branch_name": "refs/heads/main",
"committer_date": 1602738604000,
"content_id": "c4bbb1ffa114320de1dad1ed3f33d73494d5376e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "57e1c05ac4002be296d17e7c68933bad332033e7",
"extension": "py",
... | 2.484375 | stackv2 | '''
Copyright © 2020, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
'''
import requests
import gzip
import codecs
import base64
import jwt
import os
from flask import Flask, request
from google.cloud import storage
from datetime import datetime, timedelta
def read_confi... | 183 | 31.22 | 101 | 19 | 1,412 | python | [{"finding_id": "codeql_py/partial-ssrf_fa20266099bfc657_9bf51264", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 2 | true | [
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
82,
134
] | [
null,
null
] | [
20,
14
] | [
54,
38
] | |
2024-11-19T01:02:47.996478+00:00 | 1,693,391,128,000 | fd64330e5fbf357455b50bc94cd1d9df7c5da3f5 | 2 | {
"blob_id": "fd64330e5fbf357455b50bc94cd1d9df7c5da3f5",
"branch_name": "refs/heads/master",
"committer_date": 1693391128000,
"content_id": "2edb911c6faab5a985cdfdb8a477db6528247b50",
"detected_licenses": [
"MIT"
],
"directory_id": "b96c7576b33a1dd1b128756c6de8cabdeb053303",
"extension": "py",
"fi... | 2.5 | stackv2 | import socket
import math
import sys
import time
import threading
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
cipher = AES.new('1$23cf!V@Fo2v1*i', AES.MODE_ECB)
HOST = '192.168.0.10'
PORT = 50000
def synchronized(func):
func.__lock__ = threading.Lock()
def synced_func(*args, **kws):
... | 118 | 27.46 | 88 | 17 | 886 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_abaa93053316c659_960e2e68", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
55
] | [
null
] | [
15
] | [
42
] | |
2024-11-19T01:02:55.461908+00:00 | 1,543,232,846,000 | 3bce859b92b2ab541e198122d1ff0da39726deac | 3 | {
"blob_id": "3bce859b92b2ab541e198122d1ff0da39726deac",
"branch_name": "refs/heads/master",
"committer_date": 1543232846000,
"content_id": "97532895471c145f5fd3e4bf393f651ed5ae9d5b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "444cc2db0197ff881f2b397c47c6819b28107852",
"extension": "py"... | 2.625 | stackv2 | import os
import sys
import fnmatch
import jinja2
import markdown
reload(sys)
sys.setdefaultencoding('utf8')
TEMPLATE = """<div class="release_notes">
{{content}}
</div>
"""
baseDir = '/var/www/html/products/downloads'
releaseNoteFile = '*ballerina-release-notes-*.md'
outputFile = 'RELEASE_NOTE.html'
if len(sys.arg... | 40 | 30.35 | 94 | 21 | 280 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_19469e3a3ea04acb_68536b4f", "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."
] | [
35
] | [
null
] | [
27
] | [
52
] | |
2024-11-19T01:39:19.925201+00:00 | 1,412,716,902,000 | 96b5a23e0cc04dd97b1797362a39832b3416d361 | 3 | {
"blob_id": "96b5a23e0cc04dd97b1797362a39832b3416d361",
"branch_name": "refs/heads/master",
"committer_date": 1412716902000,
"content_id": "72752877b0d69bcfce7693096fdf2cbabf157cf9",
"detected_licenses": [
"MIT"
],
"directory_id": "ee87c5f1b8070411d74d8c1cfb442bf343e46e29",
"extension": "py",
"fi... | 3 | stackv2 | #!/usr/bin/env python
ABOUT = '''
Notelock: A simple terminal note encryption service.
Use: `notelock [OPTION]... [NOTEBOOK] [message]`
Notelock stores notes in "notebooks." Each notebook has entries stored in
chronological order. To add an entry to a type `notelock [book name] [message]`,
and it will be appended to... | 309 | 30.93 | 80 | 17 | 2,606 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_f9c29cec8af6df63_70a80b7e", "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."
] | [
82
] | [
null
] | [
14
] | [
17
] | |
2024-11-19T00:28:22.892114+00:00 | 1,518,181,152,000 | 9bc55ed97e68dddefc12da46682fcf3ecb603542 | 4 | {
"blob_id": "9bc55ed97e68dddefc12da46682fcf3ecb603542",
"branch_name": "refs/heads/master",
"committer_date": 1518181152000,
"content_id": "8eabc20d2157ab1e40872aec9ff6c7b54f9f90c1",
"detected_licenses": [
"MIT"
],
"directory_id": "2e55184deb2f57a1af5f4c70e8934af4831647e6",
"extension": "py",
"fi... | 3.859375 | stackv2 | # 9-1
class Restaurant():
def __init__(self, name, cuisine_type):
self.restaurant_name = name
self.cuisine_type = cuisine_type
def describe_restaurant(self):
print('\nRestaurant name: ' + self.restaurant_name.title())
print('Cuisine type: ' + self.cuisine_type.title())
def ... | 48 | 27.02 | 67 | 15 | 333 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6490d5c97e958577_5581bc5d", "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."
] | [
37
] | [
null
] | [
15
] | [
52
] | |
2024-11-19T00:53:38.152296+00:00 | 1,648,945,629,000 | 20c3af7e96be75e62ece792b37897162b3a17ae9 | 3 | {
"blob_id": "20c3af7e96be75e62ece792b37897162b3a17ae9",
"branch_name": "refs/heads/master",
"committer_date": 1648945629000,
"content_id": "ec0ed09c9e64baf0dcb1eaec968863daf2ef9649",
"detected_licenses": [
"MIT"
],
"directory_id": "31e9ae0b5431fdb643f228713001d052e93b303d",
"extension": "py",
"fi... | 2.71875 | stackv2 | import base64
import hashlib
import hmac
from datetime import timedelta
from flask_unchained import Service, current_app, injectable
from itsdangerous import BadSignature, SignatureExpired
class SecurityUtilsService(Service):
"""
The security utils service. Mainly contains lower-level encryption/token handli... | 253 | 32.81 | 85 | 18 | 1,706 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_85d6e808b66afde2_4a603a44", "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... | [
34
] | [
null
] | [
43
] | [
66
] | |
2024-11-19T02:00:43.952889+00:00 | 1,457,230,563,000 | a192b3af70b44be10c7d57a5312adaacb9b16ffc | 3 | {
"blob_id": "a192b3af70b44be10c7d57a5312adaacb9b16ffc",
"branch_name": "refs/heads/master",
"committer_date": 1457230563000,
"content_id": "b234947e2cf6c2c224579fea16ef1a7fce015a5d",
"detected_licenses": [
"MIT"
],
"directory_id": "4f22b27f171eb1544006431cb6a31a20d4de809c",
"extension": "py",
"fi... | 2.578125 | stackv2 | from progressbar import ProgressBar, Bar, ETA # progressbar2
import argparse
import hashlib
import getpass
import base64
import time
import json
import sys
import os
class Config(object):
def __init__(self, path="~/.paranoid"):
self._path = os.path.expanduser(path)
self._config_dict = {}
... | 164 | 38.26 | 136 | 23 | 1,435 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_ee2d68058aad3419_68673af3", "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."
] | [
127
] | [
null
] | [
43
] | [
47
] | |
2024-11-19T02:01:07.452848+00:00 | 1,601,899,741,000 | 23747f47590faff331dbb9e6fb4188620b790b9c | 2 | {
"blob_id": "23747f47590faff331dbb9e6fb4188620b790b9c",
"branch_name": "refs/heads/master",
"committer_date": 1601899741000,
"content_id": "5f9bccee7d5f0adf3a0769e134f666b6034f060e",
"detected_licenses": [
"MIT"
],
"directory_id": "1e52f46f6dceb52b2b013280f40ff6d504ea370e",
"extension": "py",
"fi... | 2.34375 | stackv2 | from django.http import HttpResponseRedirect
from django.contrib.auth import get_user_model
from django.core.exceptions import ObjectDoesNotExist
from rest_framework import permissions, status
from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import AllowAny, IsAdminUser... | 136 | 36.99 | 113 | 17 | 1,161 | python | [{"finding_id": "codeql_py/stack-trace-exposure_73c7b0ce3a36c4c0_9fd196b8", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 1 | true | [
"CWE-209"
] | [
"py/stack-trace-exposure"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
102
] | [
null
] | [
25
] | [
42
] | |
2024-11-19T02:01:08.276532+00:00 | 1,582,817,096,000 | 2b2750e3269be3ccf13ff075bf075267342f350f | 3 | {
"blob_id": "2b2750e3269be3ccf13ff075bf075267342f350f",
"branch_name": "refs/heads/master",
"committer_date": 1582817096000,
"content_id": "f19b20af452a06dee44dbac2fbeaa4a996d24e8b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4070da31ff1644ea4a1f22f03444b9a94d821dd6",
"extension": "py"... | 2.96875 | stackv2 | #/usr/bin/python
import os, shutil, sys, getopt, json
from pprint import pprint
from jinja2 import Environment, FileSystemLoader
class Speaker:
name = ''
email = ''
def __init__(self, name, email):
self.name = name
self.email = email
def __repr__(self):
return "Speaker[name={... | 124 | 31.16 | 168 | 21 | 887 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_de6876d2ee28bff5_39775d18", "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."
] | [
87
] | [
88
] | [
14
] | [
43
] | |
2024-11-19T00:04:15.379603+00:00 | 1,672,338,828,000 | 33048f37109c2da16e43206bfdf74a2949c5280c | 2 | {
"blob_id": "33048f37109c2da16e43206bfdf74a2949c5280c",
"branch_name": "refs/heads/master",
"committer_date": 1672338828000,
"content_id": "55ee42f7dff1c007b1a8ee7134084df6e71365b4",
"detected_licenses": [
"MIT"
],
"directory_id": "f07eeb42182ff09bbb0e1e3b7626749f9702351b",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import requests
import os.path # lib pour test fichiers
from util_funct import get_json_data_from_file, log_error,log_event
def opendns():
"""
Update opendns with the current global ip address
"""
global debug_print
currentpathdir = os.path.dirname(os.p... | 68 | 32.31 | 77 | 14 | 608 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f53509ad4e5e0d71_46f0ee98", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
30,
33,
51,
55
] | [
null,
null,
null,
null
] | [
48,
47,
49,
40
] | [
54,
53,
55,
46
] | |
2024-11-19T00:04:22.997929+00:00 | 1,519,743,797,000 | 640bf576ae100bad50a362e33563bbee122794d6 | 3 | {
"blob_id": "640bf576ae100bad50a362e33563bbee122794d6",
"branch_name": "refs/heads/master",
"committer_date": 1519743797000,
"content_id": "d21929a738398a1c76155db5d74970e17f9b045d",
"detected_licenses": [
"MIT"
],
"directory_id": "f7dbe475e882e6bd74242c6ef286c17f1950727d",
"extension": "py",
"fi... | 2.640625 | stackv2 | #!/usr/bin/env python3
'''
Simple webserver that stores POST requests and let you browse it
'''
from datetime import datetime
import logging
import os
import os.path
import tempfile
import warnings
from flask import Flask, request, make_response # pylint: disable=import-error
from flask.exthook import ExtDeprecationWar... | 54 | 28.52 | 90 | 19 | 367 | python | [{"finding_id": "codeql_py/path-injection_341613cb376aa5d4_654d5626", "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)."
] | [
44,
47
] | [
null,
null
] | [
18,
18
] | [
35,
34
] | |
2024-11-19T00:27:17.297731+00:00 | 1,518,339,346,000 | 7938d954fb63ea7af22b833737a8d0861eff4068 | 3 | {
"blob_id": "7938d954fb63ea7af22b833737a8d0861eff4068",
"branch_name": "refs/heads/master",
"committer_date": 1518339346000,
"content_id": "3e77d6857071673875557d9211211d09c520d0c5",
"detected_licenses": [
"MIT"
],
"directory_id": "3e83c22382479c49abdbfeeffa408706eea1a298",
"extension": "py",
"fi... | 2.609375 | stackv2 | """Home - Controller
"""
from flask import Blueprint, request
from app.models.web_request import WebRequest
home = Blueprint('Home', __name__, url_prefix='/')
@home.route('', defaults={'path': ''}, methods=['GET', 'POST'])
@home.route('<path:path>', methods=['GET', 'POST'])
def index(path):
"""
Index
... | 47 | 19.17 | 63 | 11 | 241 | python | [{"finding_id": "codeql_py/reflective-xss_e1f2eedf573cc944_89bcc8b4", "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)."
] | [
45
] | [
null
] | [
12
] | [
36
] | |
2024-11-19T00:27:19.029626+00:00 | 1,687,966,427,000 | bae12b30bebc39fa0dc3f5b2cce11a5967fbe381 | 2 | {
"blob_id": "bae12b30bebc39fa0dc3f5b2cce11a5967fbe381",
"branch_name": "refs/heads/master",
"committer_date": 1687966427000,
"content_id": "cd1baabd1bc0a089a738aeba60553552c3ffc0ca",
"detected_licenses": [
"MIT"
],
"directory_id": "50203b4a349dcb2ed1e72c9f5463d84db8a6e983",
"extension": "py",
"fi... | 2.390625 | stackv2 | """
get_anomaly_id.py
"""
import logging
import traceback
from ast import literal_eval
import requests
import settings
from functions.metrics.get_metric_id_from_base_name import get_metric_id_from_base_name
# @added 20210323 - Feature #3642: Anomaly type classification
def get_anomaly_id(current_skyline_app, base_n... | 112 | 37.97 | 115 | 17 | 1,064 | python | [{"finding_id": "codeql_py/request-without-cert-validation_5355d019c972a5a9_588e6cf1", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2).\nThis request may run without certificate validation because [it is disabled](1) by [this value](3).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2).\nThis req... | [
93,
91
] | [
null,
null
] | [
17,
17
] | [
93,
116
] | |
2024-11-19T00:27:22.173664+00:00 | 1,619,439,377,000 | e837b36e7f87c9e919a65d360da5d987b752a2ad | 3 | {
"blob_id": "e837b36e7f87c9e919a65d360da5d987b752a2ad",
"branch_name": "refs/heads/main",
"committer_date": 1619439377000,
"content_id": "b9bf8339a5baf9ec7a73337f17150f495f6cb4ca",
"detected_licenses": [
"MIT"
],
"directory_id": "ae46617fcb36bad7cc6fba41c300ad1306a1c942",
"extension": "py",
"file... | 2.78125 | stackv2 | #!/usr/bin/env python
# coding: latin-1
# Autor: Ingmar Stapel
# Datum: 2020-02.02
# Version: 2.1
# Language: English
# Homepage: http://custom-build-robots.com
# With this program the robot car can independently approach
# GPS coordinates.
import time, smbus, os
# Subprocess is imported to start the GPS d... | 491 | 29.23 | 101 | 16 | 3,733 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c62ebc6c37a13ebb_043f7b90", "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.\nThis expression logs [sensitive data (private)](3) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (priva... | [
461,
462,
463,
464
] | [
null,
null,
null,
null
] | [
45,
45,
45,
45
] | [
59,
60,
57,
58
] | |
2024-11-19T00:40:19.987985+00:00 | 1,613,883,186,000 | e89d8b0080e54e29f6a1fd344d36296516fcbf99 | 3 | {
"blob_id": "e89d8b0080e54e29f6a1fd344d36296516fcbf99",
"branch_name": "refs/heads/main",
"committer_date": 1613883186000,
"content_id": "6bc3b506ae34df34364b330f1f042af2913029ba",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "51228605f1bdb5f9103569ef0c1f5ba8ad1dad8a",
"extension": "py",
... | 2.5625 | stackv2 | #june 2014
#dget RNA data for candidate CNV genes
import csv
import math
import numpy as np
import scipy
from scipy import stats
import matplotlib.pyplot as plt
import math
import itertools
from itertools import zip_longest
import pandas as pd
import timeit
#function to transpose
def transpose(mylist):
return [... | 285 | 41.71 | 131 | 33 | 3,132 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_ae37f4643b47cb2c_647a3153", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [unc.edu](1) may be at an arbitrary position in the san... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [unc.edu](1) may be at an arbitrary position in the sanitized URL."
] | [
258
] | [
null
] | [
44
] | [
69
] | |
2024-11-19T01:06:09.845470+00:00 | 1,693,383,763,000 | 2e4fc1df6c8477fca0febcc0652485ae5da19d34 | 3 | {
"blob_id": "2e4fc1df6c8477fca0febcc0652485ae5da19d34",
"branch_name": "refs/heads/master",
"committer_date": 1693383763000,
"content_id": "e308192661e282461d124a9ae7a7a511137e0867",
"detected_licenses": [
"MIT"
],
"directory_id": "88dda5e76cef286c7db3ae7e5d1a32d28f7815a3",
"extension": "py",
"fi... | 2.75 | stackv2 | """HTTP Digest authentication backend."""
from __future__ import annotations
import hashlib
import logging
from typing import Optional, TYPE_CHECKING
from django.conf import settings
from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
from reviewboard.accounts.backends... | 159 | 33.04 | 79 | 22 | 1,002 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_bbafb2d579cd631f_5e5354d1", "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... | [
105
] | [
null
] | [
39
] | [
66
] | |
2024-11-19T01:17:28.865357+00:00 | 1,459,333,274,000 | b0d4cc6ada1fb1c4be999a2654e4263e8b03dc38 | 3 | {
"blob_id": "b0d4cc6ada1fb1c4be999a2654e4263e8b03dc38",
"branch_name": "refs/heads/master",
"committer_date": 1459333274000,
"content_id": "bb8b87c78fb0f03dd428cb297cba3818bfee67e8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8b71d735852e4f853e2c3ff37a509e098109f058",
"extension": "py"... | 2.625 | stackv2 | """
Entry point for Python service, to which data is POSTed to train the ABRAID Ensemble Chain,
and from which a prediction for a new datapoint is requested.
"""
from chain import Chain
from flask import Flask, request
from sklearn.externals import joblib
import logging
import numpy as np
app = Flask(__name__)
# Glob... | 188 | 34.09 | 117 | 16 | 1,619 | python | [{"finding_id": "codeql_py/reflective-xss_d11ac9750f1a13cb_e991a8c4", "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... | 11 | true | [
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"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).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scri... | [
41,
54,
58,
61,
77,
88,
95,
164,
178,
180,
182
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
16,
20,
20,
16,
20,
20,
16,
26,
26,
25,
25
] | [
68,
72,
83,
106,
99,
95,
68,
114,
33,
32,
32
] | |
2024-11-19T01:17:29.230120+00:00 | 1,669,765,093,000 | 33c9d4779737aafded2c4b34726c8d0a470e863a | 2 | {
"blob_id": "33c9d4779737aafded2c4b34726c8d0a470e863a",
"branch_name": "refs/heads/master",
"committer_date": 1669765093000,
"content_id": "be1d8c3af24a856077f76cdbcd8d59bcd3442866",
"detected_licenses": [
"MIT"
],
"directory_id": "e74a138e31bf8072006215943d872ee58696ad76",
"extension": "py",
"fi... | 2.390625 | stackv2 | # coding: utf-8
import requests
import xml.etree.ElementTree as eT
import os
import json
class Utils:
flg_debug = True
base_path = ''
configure = {}
monitoring_ticket_ids = []
checked_ticket_ids = []
notify_tickets = []
def setFlgDebug(self, flg=False):
self.flg_debug = flg
... | 143 | 31.33 | 116 | 17 | 958 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_92383079d514bfd9_8e2c3ac1", "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."
] | [
138
] | [
null
] | [
21
] | [
31
] | |
2024-11-19T01:15:05.477802+00:00 | 1,630,843,722,000 | 07ba923b42ff2d311c0a677035952ccb7a52638a | 2 | {
"blob_id": "07ba923b42ff2d311c0a677035952ccb7a52638a",
"branch_name": "refs/heads/main",
"committer_date": 1630843722000,
"content_id": "d27313ba3fe9269d82c31b9d5fe4fdff69e9de4a",
"detected_licenses": [
"MIT"
],
"directory_id": "9ff0bbf511c33817c286935829fe7e55cf14975c",
"extension": "py",
"file... | 2.40625 | stackv2 | from src.base.pdf_classificator import analyze_pdf2
from rest_framework.serializers import ValidationError
from src.base.models import Setting
from typing import Tuple
import requests
import json
from src.settings import CREDS, API_URL
from src.base.xls_processing import analyze_xls
def send_to_API(file, name, code... | 50 | 30 | 86 | 13 | 373 | python | [{"finding_id": "codeql_py/stack-trace-exposure_07acfc88d6b200ef_3337bc5f", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 1 | true | [
"CWE-209"
] | [
"py/stack-trace-exposure"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
45
] | [
null
] | [
31
] | [
66
] | |
2024-11-19T01:15:09.274517+00:00 | 1,488,724,259,000 | 1eb46076c3b218311112c2892f4a262813511076 | 3 | {
"blob_id": "1eb46076c3b218311112c2892f4a262813511076",
"branch_name": "refs/heads/master",
"committer_date": 1488724259000,
"content_id": "b73792a29b8e570c547dde86e36500d4fc9645ef",
"detected_licenses": [
"MIT"
],
"directory_id": "d6a296eef0d9e0db6412bcebd163e31d760922f7",
"extension": "py",
"fi... | 2.75 | stackv2 | #! /bin/python3
import csv
import time
from geopy.geocoders.googlev3 import GoogleV3
geocoder = GoogleV3(api_key="AIzaSyAy6XiyZG-6u99q-qacOz-dtT9ILbYzb-4")
with open("../ReadingBusesOrig.csv") as cf:
with open("../out.csv", "a") as cw:
reader = csv.DictReader(cf)
writer = csv.DictWriter(cw, ["lati... | 27 | 35.44 | 108 | 16 | 247 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_390cb067c9e7885c_974a59c7", "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."
] | [
21,
22
] | [
null,
null
] | [
19,
19
] | [
56,
58
] | |
2024-11-19T01:32:02.579576+00:00 | 1,618,486,344,000 | 1e2c0f39b6ed80aee7af093c712a507902dfd515 | 3 | {
"blob_id": "1e2c0f39b6ed80aee7af093c712a507902dfd515",
"branch_name": "refs/heads/master",
"committer_date": 1618486344000,
"content_id": "8571abd234441c752c6ef65ea783d5e9534b6879",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b7203262280b8fabcf5573ea494e8e2408d8d2b9",
"extension": "py"... | 3.25 | stackv2 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
安装:
conda install -c bioconda mysqlclient
"""
import MySQLdb
def getVersion(db):
cursor = db.cursor()
cursor.execute("select VERSION()")
data = cursor.fetchone()
print(f"Databse version: {data}")
def createTable(db):
cursor = db.cursor()
... | 91 | 16.68 | 73 | 14 | 430 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6e028592da9c969c_77da4273", "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."
] | [
68
] | [
69
] | [
19
] | [
37
] | |
2024-11-19T01:32:21.113431+00:00 | 1,531,213,369,000 | 00d9f610af758b7210269b2fe80a7158e98ef829 | 2 | {
"blob_id": "00d9f610af758b7210269b2fe80a7158e98ef829",
"branch_name": "refs/heads/master",
"committer_date": 1531213369000,
"content_id": "805cbb15ec01ab72138f8561ead63a3b3f39c0dc",
"detected_licenses": [
"MIT"
],
"directory_id": "73d66fde5bca0a35753dcec540797f2f52493ce8",
"extension": "py",
"fi... | 2.359375 | stackv2 | """Monitor local rainfall and disable garden watering system if required."""
import urequests as requests
from machine import Pin, ADC
import machine
import utime
import urtc
import ure
import io
import sys
import gc
import wifi
import secrets
import config
DEBUG = True
WAKEUP_PIN = Pin(4, Pin.IN, Pin.PULL_UP)
SCL_PI... | 314 | 30.34 | 94 | 21 | 2,478 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_fc36c0daee7aa6fd_caec52ec", "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.\nThis expression stores [sensitive data (password)](3) as clear text."
] | [
303
] | [
null
] | [
28
] | [
68
] | |
2024-11-19T01:32:31.518348+00:00 | 1,671,450,477,000 | 6c75505f0ca7d1b28853e74de789cb7ffbedf461 | 2 | {
"blob_id": "6c75505f0ca7d1b28853e74de789cb7ffbedf461",
"branch_name": "refs/heads/master",
"committer_date": 1671450477000,
"content_id": "34b8c7ea8ccff1cd06dcd0cacedf507500d4ad2f",
"detected_licenses": [
"MIT"
],
"directory_id": "76d5910dc1006c4b805f9e10038c84d7db97f099",
"extension": "py",
"fi... | 2.390625 | stackv2 | import base64
import hashlib
import hmac
import json
import logging
import os
import todoist
from flask import Flask, jsonify, request
from mqtt import Mqtt
TODOIST_CLIENT_SECRET = os.environ.get('TODOIST_CLIENT_SECRET')
TODOIST_TOKEN = os.environ.get('TODOIST_TOKEN')
BROKERHOST = os.getenv('MQTTHOST')
BROKERPORT = ... | 102 | 30.92 | 82 | 14 | 828 | python | [{"finding_id": "codeql_py/flask-debug_af696337f896aa69_274ade62", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 4 | true | [
"CWE-215",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/flask-debug",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
102,
52,
61,
70
] | [
null,
null,
null,
null
] | [
5,
21,
21,
28
] | [
24,
77,
64,
64
] | |
2024-11-19T01:32:32.146819+00:00 | 1,499,268,827,000 | 82202efd121a9da102e66cfb50df1716b5ce2c33 | 2 | {
"blob_id": "82202efd121a9da102e66cfb50df1716b5ce2c33",
"branch_name": "refs/heads/master",
"committer_date": 1499268827000,
"content_id": "3262981bc0baba82bd0f6b8aff268de281c0710e",
"detected_licenses": [
"MIT"
],
"directory_id": "c1cb39db9d335b8edf7d582e53ad8c36d1b94fac",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python
import logging.config
from hmac import compare_digest
import hmac
import recastai
from decouple import config
from flask import Flask, request, json
from facebook.messager import Messager, FacebookMessage, FacebookMessageType
LOGGING = {
'version': 1,
'disable_existing_loggers': False... | 157 | 31.69 | 118 | 17 | 1,076 | python | [{"finding_id": "codeql_py/flask-debug_cd8ef9cf622f159c_df31cfda", "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)."
] | [
157,
114
] | [
null,
null
] | [
5,
16
] | [
24,
49
] | |
2024-11-19T01:32:37.875724+00:00 | 1,693,324,646,000 | 49c2e9eb26892912145c6b5c7d514c9e0ab47543 | 3 | {
"blob_id": "49c2e9eb26892912145c6b5c7d514c9e0ab47543",
"branch_name": "refs/heads/master",
"committer_date": 1693324646000,
"content_id": "c9495e34dac5b04f1fc23874c69a264c2e488126",
"detected_licenses": [
"MIT"
],
"directory_id": "f72c9e46af5ce5ac738693daf65e67a0962a229a",
"extension": "py",
"fi... | 2.6875 | stackv2 | import re
class ApiConfiguration:
def __init__(self, token_url=None, api_url=None, username=None, password=None, client_id=None, client_secret=None,
app_name=None, certificate_filename=None, proxy_config=None, access_token=None):
"""
The configuration required to access LUSID, re... | 126 | 30.51 | 125 | 18 | 924 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_13c15c42ff8b2f93_1297d8e5", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unrestricted wildcard '.*' which may cause 'okta\\.com' t... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unrestricted wildcard '.*' which may cause 'okta\\.com' to be matched anywhere in the URL, outside the hostname."
] | [
47
] | [
null
] | [
32
] | [
71
] | |
2024-11-19T01:32:43.426236+00:00 | 1,613,719,084,000 | 9db9db713bcc9d0bb82ca2d7915beda7d186e6ee | 2 | {
"blob_id": "9db9db713bcc9d0bb82ca2d7915beda7d186e6ee",
"branch_name": "refs/heads/master",
"committer_date": 1613719084000,
"content_id": "e91916a3b429de4e1c79c24c5ef9485c96cd9957",
"detected_licenses": [
"MIT"
],
"directory_id": "5b63deddfd5ad47134c0845d22b65decaa0d832c",
"extension": "py",
"fi... | 2.390625 | stackv2 | import hashlib
import json
import random
import socket
import time
from urllib import request
from urllib.error import HTTPError, URLError
from jinja2 import Template
HEADER_APP_KEY = 'App-Key'
HEADER_NONCE = 'Nonce'
HEADER_TIMESTAMP = 'Timestamp'
HEADER_SIGNATURE = 'Signature'
HEADER_USER_AGENT = 'User-Agent'
HEADER... | 95 | 29.79 | 114 | 17 | 699 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_1c997ba7f5814d11_81afa23e", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu... | 2 | true | [
"CWE-327",
"CWE-079"
] | [
"py/weak-sensitive-data-hashing",
"py/jinja2/autoescape-false"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
37,
87
] | [
null,
null
] | [
34,
20
] | [
38,
40
] | |
2024-11-19T01:43:44.729614+00:00 | 1,567,323,857,000 | d3374f1cfbb476307d03a9d1692cd9c6ac8f7922 | 2 | {
"blob_id": "d3374f1cfbb476307d03a9d1692cd9c6ac8f7922",
"branch_name": "refs/heads/master",
"committer_date": 1567323857000,
"content_id": "e225cce6922c750ab1f3ff652edfc6dc38ff81a1",
"detected_licenses": [
"MIT"
],
"directory_id": "c066402c3ae38ce4020dcec0da46f20ed808fa3d",
"extension": "py",
"fi... | 2.3125 | stackv2 | import os
import sys
from pathlib import Path
from tabulate import tabulate
from core import utils
import requests
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
# Console colors
W = '\033[1;0m' # white
R = '\033[1;31m'... | 343 | 30.61 | 85 | 24 | 2,473 | python | [{"finding_id": "codeql_py/request-without-cert-validation_fc97f5901fd42b18_58f8a35d", "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)."
] | [
91,
93
] | [
null,
null
] | [
13,
13
] | [
73,
61
] | |
2024-11-19T01:43:45.593813+00:00 | 1,493,816,210,000 | 7eca7e21c485ead59ea741f15c653b3a33e82dc1 | 2 | {
"blob_id": "7eca7e21c485ead59ea741f15c653b3a33e82dc1",
"branch_name": "refs/heads/master",
"committer_date": 1493816210000,
"content_id": "13dd58f475856c0ced1ec779b252df8b2396cb15",
"detected_licenses": [
"MIT"
],
"directory_id": "78a2bde9a8f96c43ed41e88c181e19783be6da8b",
"extension": "py",
"fi... | 2.40625 | stackv2 | # -*- coding: utf-8 -*-
# !/usr/bin/env python
__author__ = 'maxwu'
import tempfile
import shutil
from git.cmd import Git
from git.repo.base import Repo
from jinja2 import Template, Environment, PackageLoader
from folder_scanner import *
from bugle.utils import *
class CaseRepo(object):
def __init__(self, root=N... | 230 | 34.99 | 88 | 24 | 1,885 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2efe45e6a06bae50_9c575393", "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."
] | [
219
] | [
null
] | [
15
] | [
81
] | |
2024-11-19T01:44:05.716525+00:00 | 1,522,863,203,000 | 0883bdd34cc380825b7ee5de6d0a4ec14d3810ff | 3 | {
"blob_id": "0883bdd34cc380825b7ee5de6d0a4ec14d3810ff",
"branch_name": "refs/heads/master",
"committer_date": 1522863203000,
"content_id": "ea8e7bd7f3e3346cfb60a01c05c885e172494441",
"detected_licenses": [
"MIT"
],
"directory_id": "4e3aece055ca03afe5164683ed86b75e0384a875",
"extension": "py",
"fi... | 2.96875 | stackv2 | import n26.api as api
import click
import datetime
from tabulate import tabulate
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
# Cli returns command line requests
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
"""Interact with the https://n26.com API via the command line."""
@cli.comm... | 118 | 26.37 | 103 | 19 | 758 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_730c567cef46dcbc_2634d7fd", "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."
] | [
25,
26
] | [
null,
null
] | [
11,
11
] | [
75,
75
] | |
2024-11-19T02:19:55.972857+00:00 | 1,606,068,117,000 | 415d3a1400991e23e91fcfab7297aa3e6109cb1f | 3 | {
"blob_id": "415d3a1400991e23e91fcfab7297aa3e6109cb1f",
"branch_name": "refs/heads/master",
"committer_date": 1606068117000,
"content_id": "3b0a6dff973a18176dc35bbe92f06ba1e00dfd89",
"detected_licenses": [
"MIT"
],
"directory_id": "932eeb821b9ec49209c961d1ea9e8472b40fe83f",
"extension": "py",
"fi... | 2.859375 | stackv2 |
"""
Generate some seed data to use on the dev site.
"""
import random
import argparse
from tests import factory
from gradient import create_app
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-u', '--username',
help='prefix for customer & vendor usernames')
... | 58 | 29.09 | 82 | 14 | 354 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a95cda19f5c160ae_a8c7f95d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
38,
44
] | [
null,
null
] | [
15,
15
] | [
64,
62
] | |
2024-11-19T02:20:10.657102+00:00 | 1,574,254,582,000 | f997784bcfe99c12c09e0bd747cc4c7145e92a31 | 3 | {
"blob_id": "f997784bcfe99c12c09e0bd747cc4c7145e92a31",
"branch_name": "refs/heads/master",
"committer_date": 1574254939000,
"content_id": "a51345275a384a0e2201c9c87c000f4cc55eb07f",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "569d0bd9a8aa78029b199e6d287f08f5fba2acac",
"exten... | 2.53125 | stackv2 | from functools import wraps
import firebase_admin
from firebase_admin import auth, credentials
from flask import g, jsonify, request
from .models import Manga, User, db
def load_page_num(f):
"""
Load page from json request data into g.page
Raise 400 Invalid page number value if page is not valid int
... | 135 | 25.81 | 81 | 18 | 791 | python | [{"finding_id": "codeql_py/stack-trace-exposure_b9eb1efcfe0c97dd_d94a1f26", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 1 | true | [
"CWE-209"
] | [
"py/stack-trace-exposure"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
129
] | [
132
] | [
28
] | [
14
] | |
2024-11-19T00:59:31.335281+00:00 | 1,587,537,374,000 | f665b12bf8ffffb73989a21aa78fb7044461f99e | 3 | {
"blob_id": "f665b12bf8ffffb73989a21aa78fb7044461f99e",
"branch_name": "refs/heads/master",
"committer_date": 1587537374000,
"content_id": "33ae6d7a844672e58f401490737475375fe5fe20",
"detected_licenses": [
"MIT"
],
"directory_id": "964092cfec6190072ea82d698ff0e0fe77fd9e24",
"extension": "py",
"fi... | 2.71875 | stackv2 | # -*- coding: utf-8 -*-
# UTF-8 encoding when using korean
######################################
## 계정 등록
######################################
import requests, json, base64
import urllib
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5 as Cipher_PKCS1_v1_5
# ========== HTTP 기본 함수 =====... | 378 | 35.48 | 103 | 18 | 3,324 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_18036920aba15825_4ef99aa0", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
137,
209,
284,
361
] | [
null,
null,
null,
null
] | [
15,
15,
15,
15
] | [
40,
40,
40,
40
] | |
2024-11-19T00:59:35.950009+00:00 | 1,636,917,413,000 | bcf52484862a56c17ceed5c1d2c8380138d8fb43 | 3 | {
"blob_id": "bcf52484862a56c17ceed5c1d2c8380138d8fb43",
"branch_name": "refs/heads/master",
"committer_date": 1636917506000,
"content_id": "71806f48e2eada067ea0d2322df5513a59720bc4",
"detected_licenses": [
"MIT"
],
"directory_id": "e0896c9881de93b24b69dc91d3e1095920a36307",
"extension": "py",
"fi... | 3.1875 | stackv2 | from bs4 import BeautifulSoup
import re
import platform
import os
OUTPUT_DIR = "dist"
class TextFile:
def __init__(self, file_path, dir_path, stylesheet=None):
"""
Built-in method to initialize an instace of the TextFile class
Parameters
----------
self : Object (class Fil... | 303 | 34.29 | 94 | 23 | 2,279 | python | [{"finding_id": "codeql_py/redos_79cd170039283ae2_86938478", "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 repeti... | 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 '\"'."
] | [
163,
164
] | [
null,
null
] | [
35,
36
] | [
40,
41
] | |
2024-11-19T01:00:10.132881+00:00 | 1,489,634,286,000 | 731641d655213d2bcf738b905cc32e5b5643a94c | 3 | {
"blob_id": "731641d655213d2bcf738b905cc32e5b5643a94c",
"branch_name": "refs/heads/master",
"committer_date": 1489634286000,
"content_id": "4bc4bf50bddc2996cb7f6ef030d1fb9f6885def8",
"detected_licenses": [
"MIT"
],
"directory_id": "86b5d7eb415ed9c8ef0135021fded947c7062144",
"extension": "py",
"fi... | 2.53125 | stackv2 | '''
This file sets up multiple jobs to run on a PBS cluster. Each job collects
a portion of the total dataset via the change.org api by pointing.
'''
# Imports
import os
import sys
import pandas as pd
from os.path import isfile as file_exists
# Define full path to working folder
path="/full/path/to/working/folder"
#... | 54 | 26.85 | 75 | 13 | 430 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c6f2c626d89434d8_11720517", "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."
] | [
48
] | [
50
] | [
11
] | [
34
] | |
2024-11-19T01:11:47.516838+00:00 | 1,573,310,984,000 | 027690856f3a1bbadb6ebe9d3997b574f23a4b7f | 3 | {
"blob_id": "027690856f3a1bbadb6ebe9d3997b574f23a4b7f",
"branch_name": "refs/heads/master",
"committer_date": 1573310984000,
"content_id": "05f8ea1d89aa77b87ddc060c0505563af24ff7bd",
"detected_licenses": [
"MIT"
],
"directory_id": "b2de09337a932a575a6d294eab93f0f2e4134eb2",
"extension": "py",
"fi... | 2.828125 | stackv2 | import os
import tarfile
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import Imputer
from six.moves import urllib
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.base import BaseEstimator, Transf... | 213 | 36.45 | 104 | 13 | 1,925 | python | [{"finding_id": "codeql_py/tarslip_458b325d48cb7016_2764a7da", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
64
] | [
null
] | [
5
] | [
16
] | |
2024-11-19T01:21:37.149490+00:00 | 1,587,310,777,000 | 0f4e6aaddbd11d5415209721d36cead21c77f8a9 | 4 | {
"blob_id": "0f4e6aaddbd11d5415209721d36cead21c77f8a9",
"branch_name": "refs/heads/master",
"committer_date": 1587310777000,
"content_id": "f06d177f9361dd4fe3b43cbc3ead25c207d2393c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a92d2add8aea04da46f94c6ab1f0d1af0ee843aa",
"extension": "py"... | 3.5625 | stackv2 | """
module(file_utils) - 文件处理工具类.
Main members:
# extract_tarfile - 解压tar或tar.gz文件.
# init_file_path - 文件路径初始化,若文件夹不存在则进行创建.
"""
import os
import tarfile
import pathlib
def extract_tarfile(tarfile_name, output_path, target_file_name='target'):
""" 解压tar或tar.gz文件.
@params:
... | 40 | 23 | 74 | 15 | 249 | python | [{"finding_id": "codeql_py/tarslip_6fb465b03868c809_84a10cd4", "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)."
] | [
30
] | [
null
] | [
13
] | [
15
] | |
2024-11-19T01:22:03.992391+00:00 | 1,440,359,782,000 | 8045b0e2fdaa05326cf17480783e7169481cc42f | 3 | {
"blob_id": "8045b0e2fdaa05326cf17480783e7169481cc42f",
"branch_name": "refs/heads/master",
"committer_date": 1440359782000,
"content_id": "b27ce03b2addfce95383665e8878daa169e8d9a5",
"detected_licenses": [
"MIT"
],
"directory_id": "c28f7c6a45fc8979f9e7dabc660e0f804025be43",
"extension": "py",
"fi... | 2.90625 | stackv2 | # vim: fileencoding=utf-8 tw=100 expandtab ts=4 sw=4 :
#
# pytter
# copyright (c) 2015 Vincent Loy
# Vincent Loy <vincent.loy1@gmail.com>
import re
import json
HTML_CLASSES = {
'user': 'tweet_user',
'url': 'tweet_url',
'hashtag': 'tweet_hashtag'
}
USER_REGEX = '(\B@([a-zA-Z0-9_]+))'
URL_REGEX = '(^|\s)((f... | 139 | 29.31 | 114 | 17 | 1,050 | python | [{"finding_id": "codeql_py/overly-large-range_08006eff93fa928d_e26f3e54", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\u00e4-\\u00fc in the same character class.", "remediatio... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with \\u00e4-\\u00fc in the same character class.",
"Suspicious character range that overlaps with \\u00c4-\\u00dc in the same character class."
] | [
17,
17
] | [
null,
null
] | [
24,
27
] | [
27,
30
] | |
2024-11-19T01:22:23.506613+00:00 | 1,365,590,747,000 | da37b1390981984d837c853b96b7ab88997788f9 | 2 | {
"blob_id": "da37b1390981984d837c853b96b7ab88997788f9",
"branch_name": "refs/heads/master",
"committer_date": 1365590747000,
"content_id": "2c56fabdeecbf069d15f1df00c09461c11e42fa3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c77ea61746ce2d15e41fa60db2f3a236aee88605",
"extension": "py"... | 2.421875 | stackv2 | '''
Created on Dec 19, 2011
@author: Mariusz Nowostawski <mariusz@nowostawski.org>
'''
from django.contrib.auth import login, authenticate, logout
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http impo... | 204 | 39.62 | 138 | 16 | 1,417 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_84591f06da37a31f_ce03f867", "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."
] | [
32
] | [
null
] | [
22
] | [
61
] | |
2024-11-19T02:10:28.614339+00:00 | 1,573,802,104,000 | 22848f97e63e8a602a5a283cbf92f169734a6986 | 3 | {
"blob_id": "22848f97e63e8a602a5a283cbf92f169734a6986",
"branch_name": "refs/heads/master",
"committer_date": 1573802104000,
"content_id": "4b2c9bb3b233dfb6319a60f17d002e7c1ac8c79d",
"detected_licenses": [
"MIT"
],
"directory_id": "fd7208f6fe0c74e79acb790e482f90e317fe778e",
"extension": "py",
"fi... | 2.734375 | stackv2 | from Crypto.Cipher import AES
from binascii import hexlify
from hashlib import sha256
from os import urandom
salt = lambda: urandom(16)
iv = 'GoDaddy Auth 123'
def cipher_auth(key, secret, password):
hashed_pwd = sha256(password).digest()
aes = AES.new(hashed_pwd, AES.MODE_CBC, iv)
data = b''.join([
... | 24 | 27.12 | 47 | 11 | 199 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_f55f57cbffa36b57_dc9e43e6", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational... | [
10,
19
] | [
null,
null
] | [
25,
25
] | [
33,
33
] | |
2024-11-19T02:10:29.506654+00:00 | 1,482,999,904,000 | a8d96f59c32190accb2d6799fc9447f2fcd0491c | 2 | {
"blob_id": "a8d96f59c32190accb2d6799fc9447f2fcd0491c",
"branch_name": "refs/heads/master",
"committer_date": 1482999904000,
"content_id": "250a67c8b50cf42d06dc3fb09b6ab3d887d32997",
"detected_licenses": [
"MIT"
],
"directory_id": "19390349fceb31159c87d97f2eb4c2f527c53494",
"extension": "py",
"fi... | 2.40625 | stackv2 | import tornado.web
import util.helper
import hashlib
class MessageHandler(tornado.web.RequestHandler):
def get(self):
signature = self.get_argument("signature")
timestamp = self.get_argument("timestamp")
nonce = self.get_argument("nonce")
echostr = self.get_argument("echostr")
token = util.helper.WeiXinAp... | 28 | 22.11 | 58 | 12 | 168 | python | [{"finding_id": "codeql_py/reflective-xss_3ea01da57edefb7b_5000ad00", "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)."
] | [
22
] | [
null
] | [
14
] | [
52
] | |
2024-11-19T02:10:37.480219+00:00 | 1,497,371,955,000 | ba67491b4dc5a856d11b2bd60332d04a9b75a1b4 | 3 | {
"blob_id": "ba67491b4dc5a856d11b2bd60332d04a9b75a1b4",
"branch_name": "refs/heads/master",
"committer_date": 1497371955000,
"content_id": "d4883759cbc77c02372d8b01e7e1b24216371a27",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "035afdef594c0b9d249ae41299d8007c70a86c64",
"extension": "p... | 3.125 | stackv2 | # Little functions that make your life easier
from __future__ import print_function
import numpy as np
import os
import matplotlib.pyplot as plt
from statsmodels.tsa.tsatools import lagmat
import pickle
from itertools import islice, tee
import paramiko
from contextlib import contextmanager
from getpass import getpass
i... | 410 | 25.49 | 121 | 17 | 3,018 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_61ff35d7c38e8d53_1a27fecc", "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."
] | [
292
] | [
null
] | [
5
] | [
62
] | |
2024-11-19T02:10:45.092720+00:00 | 1,438,647,806,000 | 6625adbf8364d6b8cc3c37a9822c935b3b20cee3 | 3 | {
"blob_id": "6625adbf8364d6b8cc3c37a9822c935b3b20cee3",
"branch_name": "refs/heads/master",
"committer_date": 1438647806000,
"content_id": "74c2e3365de26d11a1864c8433233345057fcb9a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ee8e7dff726b544caf55ab0913c2dc8fbacbe51f",
"extension": "py"... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
"""
Simple Python API client for the CloudPassage API.
"""
import base64
import logging
import requests
from datetime import datetime, timedelta
from pyassage import models
from requests.auth import AuthBase
log = logging.getLogger("pyassage")
class CloudPassageAPI:
"""Provides an int... | 84 | 30.67 | 75 | 14 | 589 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_81ec708dbfe7e9db_73c1a37d", "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."
] | [
70
] | [
null
] | [
35
] | [
58
] | |
2024-11-19T02:45:16.430071+00:00 | 1,692,862,028,000 | eb607464bf4a290475e750e3e218a9925c788e6b | 3 | {
"blob_id": "eb607464bf4a290475e750e3e218a9925c788e6b",
"branch_name": "refs/heads/main",
"committer_date": 1692862028000,
"content_id": "75ea8fa9e60cec69a12f8075d2263718b512aa45",
"detected_licenses": [
"BSD-2-Clause",
"BSD-3-Clause"
],
"directory_id": "d4239425234eacb647c4cc4f2f4c8537b618fca0",... | 3.109375 | stackv2 | # -*- coding: utf-8 -*-
"""
A string is represented as valid JSON and is accessible as a dictionary and vis-a-vis.
"""
import json
from rest_framework import serializers
class JsonField(serializers.Field):
"""
Deserialize a string instance containing a JSON document to a Python object.
"""
def to_re... | 42 | 26.76 | 86 | 16 | 225 | python | [{"finding_id": "codeql_py/stack-trace-exposure_59dec8ecd8d62362_5a6d1096", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 1 | true | [
"CWE-209"
] | [
"py/stack-trace-exposure"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
34
] | [
null
] | [
51
] | [
57
] | |
2024-11-19T02:45:17.426770+00:00 | 1,243,706,901,000 | ff9a7f6d42e4206830d6033e0109e003611ed63f | 3 | {
"blob_id": "ff9a7f6d42e4206830d6033e0109e003611ed63f",
"branch_name": "refs/heads/master",
"committer_date": 1243706901000,
"content_id": "3c9624402a360881ab876680c76e8acaa66c465e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2c0b5e73a31d9773bb62a1da8322e35009d082a2",
"extension": "p... | 2.8125 | stackv2 | # Copyright 2008 (c) Estrate
from hashlib import sha1
import hmac
from base64 import b32encode
import re
import random
def nice_hash(*args):
""" Takes the unicode representation of every argument as input for a SHA
hash. Returns the BASE32 encoded version of the hash to use inside URL's
or e-mails. BASE32... | 105 | 36.46 | 141 | 21 | 1,015 | python | [{"finding_id": "codeql_py/bad-tag-filter_71aeaea35c298c8a_550465fb", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match comments containing newlines."
] | [
86
] | [
null
] | [
30
] | [
40
] | |
2024-11-19T02:45:48.519725+00:00 | 1,565,530,830,000 | d0e74ae5e57b3067141b9720fa88f64d1d6ab9be | 3 | {
"blob_id": "d0e74ae5e57b3067141b9720fa88f64d1d6ab9be",
"branch_name": "refs/heads/master",
"committer_date": 1565530830000,
"content_id": "ed7fa4eba8609604816eb785225069d8bdc6a587",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2990ceefcc944261cd26e59d498beb0b46d3e7b8",
"extension": "py"... | 2.53125 | stackv2 | # Copyright 2019 Django Cass
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 93 | 29.52 | 103 | 14 | 711 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_72a050fa2b4e6eff_a2726a5d", "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."
] | [
50
] | [
null
] | [
2
] | [
57
] | |
2024-11-19T02:45:49.784295+00:00 | 1,570,474,424,000 | 046210aa58194973530fa8e5939cb04fcb60ee89 | 3 | {
"blob_id": "046210aa58194973530fa8e5939cb04fcb60ee89",
"branch_name": "refs/heads/master",
"committer_date": 1570474424000,
"content_id": "4d4730014b6f69c6c35431e8d0f5f9e900664a6f",
"detected_licenses": [
"MIT"
],
"directory_id": "1f05f79f4dfe196da7849632243f98473cb16be7",
"extension": "py",
"fi... | 2.6875 | stackv2 | import os
import logging
import random
import jinja2
LOG = logging.getLogger(__name__)
class TemplateRenderer:
def __init__(self, app_path, tmpl_globals=None, tmpl_filters=None, default_tmpl_type='text'):
self.__path = app_path
self._tmpl_globals = tmpl_globals if tmpl_globals is not None else {}... | 79 | 55.47 | 167 | 16 | 858 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_821adec17001fc7c_b3caaa0d", "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."
] | [
75
] | [
null
] | [
19
] | [
39
] | |
2024-11-19T02:45:58.211410+00:00 | 1,533,328,040,000 | 6e6aed4625038b3f90aa5a21b7c21615da4630b9 | 3 | {
"blob_id": "6e6aed4625038b3f90aa5a21b7c21615da4630b9",
"branch_name": "refs/heads/master",
"committer_date": 1533328040000,
"content_id": "9bd45f977a933cd8e72f60a0bffe1a07339fb28d",
"detected_licenses": [
"MIT"
],
"directory_id": "899675373cb8e4a5ee6ac01bcd04e9767b5e91f0",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/env python3
import logging
import re
import os
import argparse
import time
import sqlite3
import pandas as pd
import Evtx.Evtx as evtx
from geolite2 import geolite2
from os import listdir
from os.path import isfile, join
# STATIC VARIABLES
EVTX_MAP_DESCRIPTION = ""
COLUMN_NAMES = ["datetime", "target_cna... | 193 | 37.66 | 119 | 19 | 1,622 | python | [{"finding_id": "codeql_py/overly-large-range_191d555210cbabe2_0e47582b", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 2 | true | [
"CWE-020",
"CWE-312"
] | [
"py/overly-large-range",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
20,
171
] | [
null,
172
] | [
79,
30
] | [
83,
106
] | |
2024-11-19T02:57:20.058780+00:00 | 1,578,339,663,000 | 796819210741cf6a89f92ab54c353f24911afc56 | 3 | {
"blob_id": "796819210741cf6a89f92ab54c353f24911afc56",
"branch_name": "refs/heads/master",
"committer_date": 1578339663000,
"content_id": "5fd211dd68e7c4dfac2bf7157cbb6dbe97ddfbad",
"detected_licenses": [
"MIT"
],
"directory_id": "2c7b663017e6ab5f63ff7b7335505252f2840fc1",
"extension": "py",
"fi... | 3.265625 | stackv2 | #! /usr/bin/env python
"""
Demo script showing how to create network configurations by combining data from CSV files with Jinja templates.
"""
import csv
from jinja2 import Template
source_file = "switch-ports.csv"
interface_template_file = "switchport-interface-template.j2"
# String that will hold final full confi... | 38 | 33.71 | 112 | 13 | 277 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_85a1ec52092b20eb_7867c82c", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
17
] | [
null
] | [
26
] | [
72
] | |
2024-11-19T03:12:17.995607+00:00 | 1,488,659,743,000 | 0858450eaa97f38a9ceb94dc56d684d25f19779d | 2 | {
"blob_id": "0858450eaa97f38a9ceb94dc56d684d25f19779d",
"branch_name": "refs/heads/master",
"committer_date": 1488659743000,
"content_id": "3d4163aaf40462e7417f574fdcb032fd92d29e4f",
"detected_licenses": [
"MIT"
],
"directory_id": "a4f05e039ebd0281efd5b603b55e6a76e9d175e2",
"extension": "py",
"fi... | 2.453125 | stackv2 | # Author: Michael Hawes Tony Tran
# 2 March 2017
import os
import afflictionID
from flask import Flask, render_template, request, redirect, url_for, session, send_from_directory
from werkzeug.utils import secure_filename
UPLOAD_FOLDER = './images/'
ALLOWED_EXTENSIONS = set(['jpeg', 'jpg'])
app = Flask(__name__)
app.c... | 67 | 35.39 | 119 | 16 | 595 | python | [{"finding_id": "codeql_py/flask-debug_9761f27868f5e566_480e5547", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 4 | true | [
"CWE-215",
"CWE-601",
"CWE-601",
"CWE-022"
] | [
"py/flask-debug",
"py/url-redirection",
"py/url-redirection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
67,
30,
36,
23
] | [
null,
null,
null,
null
] | [
5,
29,
29,
18
] | [
51,
40,
40,
59
] | |
2024-11-19T01:33:37.679314+00:00 | 1,528,944,169,000 | f7f9530e12c6eb579a20f9c4f6dae95c0324f3f0 | 2 | {
"blob_id": "f7f9530e12c6eb579a20f9c4f6dae95c0324f3f0",
"branch_name": "refs/heads/master",
"committer_date": 1528944169000,
"content_id": "2c7ebceb6e9e016737f4289243430edb2b6cd2f0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a39af53d10e80f67eea7142fef6c412dea12e361",
"extension": "py"... | 2.5 | stackv2 | #!/usr/bin/env python
# coding=utf-8
from flask import *
import logging
import json
from tree_builder import *
app = Flask(__name__)
@app.route('/get_suggestion/<inputs>')
def return_suggestion(inputs):
logging.info('Request /get_suggestion/'+inputs)
sugs = get_suggestion(inputs)
result = []
for sug... | 37 | 24.22 | 101 | 12 | 220 | python | [{"finding_id": "codeql_py/log-injection_1fe8373e8e249bec_51f687cc", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
12,
24
] | [
null,
null
] | [
18,
18
] | [
51,
50
] | |
2024-11-19T02:10:54.351421+00:00 | 1,600,595,594,000 | d656f291a6ee2aaeb5b1a6290530e9552daf2b54 | 2 | {
"blob_id": "d656f291a6ee2aaeb5b1a6290530e9552daf2b54",
"branch_name": "refs/heads/master",
"committer_date": 1600595594000,
"content_id": "47617f7a2e26170b0dd1ac81d81cc807b7f5948c",
"detected_licenses": [
"MIT"
],
"directory_id": "ccb9792f5f0581230c297822b2b4d912a2f4e50e",
"extension": "py",
"fi... | 2.390625 | stackv2 | from common import Common
from config import Config
from extractor import Extractor
import re
SHOW_TOP_CONTEXTS = 10
MAX_PATH_LENGTH = 8
MAX_PATH_WIDTH = 2
JAR_PATH = 'java-extractor/build/libs/JavaExtractor-0.0.1-SNAPSHOT.jar'
PROBABILITY_THRESHOLD = 0.8
FILE_NAME_INDEX = 2
METHOD_NAME_INDEX = 3
class Finder:
e... | 51 | 42.88 | 136 | 23 | 520 | python | [{"finding_id": "codeql_py/overly-large-range_8407027057c153bd_d24368fe", "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\\]."
] | [
44
] | [
null
] | [
57
] | [
60
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.