added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T21:47:36.951319+00:00 | 1,571,752,204,000 | 473203ffd7425050286631acc9cee5f933e1f2b1 | 3 | {
"blob_id": "473203ffd7425050286631acc9cee5f933e1f2b1",
"branch_name": "refs/heads/master",
"committer_date": 1571752204000,
"content_id": "2a74e85fc597a6032b563a88c2854b9ae5b3c749",
"detected_licenses": [
"MIT"
],
"directory_id": "9a1e1c523a4e7f186b02511f3e159e202be37549",
"extension": "py",
"fi... | 2.578125 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
from dnac_utils import dnac_token, create_url
import requests
import json
# Entry point for program.
if __name__ == '__main__':
# get an authentication token. The username and password is obtained from an environment file
token = dnac_token()
h... | 24 | 30.96 | 98 | 12 | 178 | python | [{"finding_id": "codeql_py/request-without-cert-validation_b18910be5320c042_7da9c7de", "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)."
] | [
19
] | [
null
] | [
16
] | [
64
] | |
2024-11-18T21:47:41.626341+00:00 | 1,479,286,469,000 | 0036ea076b9a0b56ee1985d9f4646e7420b9993c | 3 | {
"blob_id": "0036ea076b9a0b56ee1985d9f4646e7420b9993c",
"branch_name": "refs/heads/master",
"committer_date": 1479286469000,
"content_id": "9340796c262832a2e56f605103972856d3c56c1a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "863da4f783f4c87fcbeac5cff242659b30dbcfba",
"extension": "p... | 2.953125 | stackv2 | #!/usr/bin/env python3
from argparse import ArgumentParser
from datetime import datetime
from dateutil import parser as DateParser
from dateutil.relativedelta import relativedelta
import json
import requests
import sys
C3_URL = "https://certification.canonical.com"
class C3api(object):
"""
a helper
"""
... | 123 | 35.44 | 92 | 16 | 1,003 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9e7045c1f26effdc_0835b51b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text."
] | [
37
] | [
null
] | [
15
] | [
29
] | |
2024-11-18T22:29:04.314330+00:00 | 1,633,685,200,000 | 82a5fccf98b6325347a841aef89c5bf190df2a7c | 3 | {
"blob_id": "82a5fccf98b6325347a841aef89c5bf190df2a7c",
"branch_name": "refs/heads/main",
"committer_date": 1633685200000,
"content_id": "9a73d79d79ed87d972288bd9afd61a35bc44bd7b",
"detected_licenses": [
"MIT"
],
"directory_id": "73ba9b0cbeb663598ff83963f0be494518f15dfe",
"extension": "py",
"file... | 2.859375 | stackv2 | import hashlib
from Crypto.Cipher import PKCS1_v1_5
from Crypto.PublicKey import RSA
from Crypto.Random import new as Random
from base64 import b64encode
from base64 import b64decode
import random
import time
from os import system
DataList = [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
... | 196 | 20.31 | 69 | 15 | 1,246 | python | [{"finding_id": "codeql_py/weak-crypto-key_5169d6f89e8ec555_f3dd2572", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable.", "remediation": "",... | 1 | true | [
"CWE-326"
] | [
"py/weak-crypto-key"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable."
] | [
81
] | [
null
] | [
20
] | [
49
] | |
2024-11-18T22:29:20.134501+00:00 | 1,402,233,939,000 | e01a1ae81ef054251abc4f7ae1204a5a01e87bc3 | 3 | {
"blob_id": "e01a1ae81ef054251abc4f7ae1204a5a01e87bc3",
"branch_name": "refs/heads/master",
"committer_date": 1402233939000,
"content_id": "da20b64046fd3b208ad702d54170f8af0fe6c7ad",
"detected_licenses": [
"MIT"
],
"directory_id": "8dcc42b713d990847b84a9f4bc0e9ee4e4c94720",
"extension": "py",
"fi... | 2.53125 | stackv2 | import common, random, string, hmac, hashlib
from google.appengine.ext import db
def hash_str(s):
return hmac.new(common.SECRET, s).hexdigest()
def make_secure_val(s):
return "%s|%s" % (s, hash_str(s))
def check_secure_val(h):
val = h.split('|')[0]
if h == make_secure_val(val):
return val
de... | 121 | 34.63 | 164 | 23 | 933 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_42737a50fc9a8089_3efb8ad1", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
21
] | [
null
] | [
24
] | [
40
] | |
2024-11-18T22:29:44.106641+00:00 | 1,620,486,737,000 | 04afc11b0b708dfc7228b7318ad101c5bfc006fa | 2 | {
"blob_id": "04afc11b0b708dfc7228b7318ad101c5bfc006fa",
"branch_name": "refs/heads/master",
"committer_date": 1620486737000,
"content_id": "f662b828bb475b74e98ae2c487d52e24a5bb87ad",
"detected_licenses": [
"MIT"
],
"directory_id": "f023f8de46c39d22d4282fe76111fb56d9b6e1f1",
"extension": "py",
"fi... | 2.46875 | stackv2 | from config_loader import ConfigLoader
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import formataddr
import smtplib
import jinja2
class MailSender:
def __init__(self, config: ConfigLoader):
self.config = config
self.jinja = jinja2.Environmen... | 51 | 34.61 | 93 | 14 | 402 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d1506d9cfc7f48d4_b91af049", "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."
] | [
12
] | [
null
] | [
22
] | [
77
] | |
2024-11-18T22:41:05.084914+00:00 | 1,540,281,020,000 | 1229fd536dba83ec5b40194bb86a411c125d6080 | 3 | {
"blob_id": "1229fd536dba83ec5b40194bb86a411c125d6080",
"branch_name": "refs/heads/master",
"committer_date": 1540281044000,
"content_id": "50a622de14c8f4f11e511a5190600f6243268e5f",
"detected_licenses": [
"MIT"
],
"directory_id": "8f1f53017db6b22256565e97770b90b7c9426f04",
"extension": "py",
"fi... | 2.734375 | stackv2 | import datetime
import getpass
import json
import os
import sys
CONFIGURATION_MESSAGE = """
To start using sokot, run:
sokot configure
""".strip()
SOKOT_CONFIG_DIR = os.path.join(os.environ['HOME'], '.sokot')
TOKEN_PATH = os.path.join(os.environ['HOME'], '.sokot', 'token')
CONFIG_PATH = os.path.join(os.environ['HOME'... | 93 | 27.23 | 89 | 14 | 643 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_409b86e6580c831d_ca90d8f9", "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."
] | [
27
] | [
null
] | [
17
] | [
22
] | |
2024-11-18T22:54:17.233153+00:00 | 1,693,664,043,000 | e3a5ba29abd1ea5a79a1532aa72c845cfaf3ed62 | 3 | {
"blob_id": "e3a5ba29abd1ea5a79a1532aa72c845cfaf3ed62",
"branch_name": "refs/heads/master",
"committer_date": 1693664043000,
"content_id": "29ca5254d4dbf1fc3dc5f73a0873c378447ece1e",
"detected_licenses": [
"MIT"
],
"directory_id": "13ce98780a7e6e7e1412ae91a0fa97a91cf66a73",
"extension": "py",
"fi... | 2.984375 | stackv2 | """This module contains useful utility methods"""
import codecs
import fasteners
import os
import re
import requests
from seleniumbase.fixtures import constants
def get_domain_url(url):
"""
Use this to convert a url like this:
https://blog.xkcd.com/2014/07/22/what-if-book-tour/
Into this:
https://... | 304 | 30.45 | 79 | 20 | 2,276 | python | [{"finding_id": "codeql_py/request-without-cert-validation_ed3027deba94aa93_c8e4d3fb", "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) by [this value](2)."
] | [
218
] | [
223
] | [
20
] | [
10
] | |
2024-11-18T22:54:31.252832+00:00 | 1,600,105,597,000 | d6a2f2a03c3b6528174130a48f4b876de82e3df6 | 3 | {
"blob_id": "d6a2f2a03c3b6528174130a48f4b876de82e3df6",
"branch_name": "refs/heads/master",
"committer_date": 1600105597000,
"content_id": "76e1be375b126992fdd0468cf3dadd085ef6fce9",
"detected_licenses": [
"MIT"
],
"directory_id": "2909dcd96d7282bbdb6c11b5474355ac3eae2bc8",
"extension": "py",
"fi... | 2.828125 | stackv2 | import requests
import json
import pprint
import time
import sys
apikey = '5713f3fc6426a4fb5486414ada0f4c29'
if len(sys.argv) > 1 :
apikey = str(sys.argv[1])
url = "http://api.openweathermap.org/data/2.5/weather?id=4076795&appid=" + apikey
page = requests.get(url)
data =json.loads(page.text)
print(data)
p... | 21 | 24.81 | 83 | 13 | 186 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_11682defebd36846_aa5a9481", "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."
] | [
14
] | [
null
] | [
9
] | [
13
] | |
2024-11-18T20:55:03.933634+00:00 | 1,572,283,414,000 | c940f523919407f2ae4b44a7b4f8f40727ead4d8 | 3 | {
"blob_id": "c940f523919407f2ae4b44a7b4f8f40727ead4d8",
"branch_name": "refs/heads/master",
"committer_date": 1572283414000,
"content_id": "081fa9c5a21898f90b78ffdf5590622cb08e8c39",
"detected_licenses": [
"MIT"
],
"directory_id": "df928bd23010186cf6efacbc4dda116d8b16542a",
"extension": "py",
"fi... | 2.6875 | stackv2 | # coding=utf-8
from socket import *
import threading
import sqlite3
import hashlib
import struct
class Server(object):
"""
1.register
2.login
3.logout
4.Get the current list of all online users
5.Group messaging to all online users
6.Private message to specified user
7.Without GUI, it ... | 295 | 27.92 | 74 | 20 | 1,803 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_b5750896c1650850_6f851e58", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-200"
] | [
"py/weak-sensitive-data-hashing",
"py/bind-socket-all-network-interfaces"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\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... | [
290,
27
] | [
null,
null
] | [
18,
9
] | [
35,
31
] | |
2024-11-18T20:55:04.729529+00:00 | 1,571,697,932,000 | 703036c2249698ce4a6010f222fc9ff5dcb449da | 2 | {
"blob_id": "703036c2249698ce4a6010f222fc9ff5dcb449da",
"branch_name": "refs/heads/master",
"committer_date": 1571697932000,
"content_id": "c9418d793f7c9babdbc9b912ebb3b030ce9acdc0",
"detected_licenses": [],
"directory_id": "a9570fbf041ff67b0183a1edb3f9186af25b5741",
"extension": "py",
"filename": "fac... | 2.453125 | stackv2 | import argparse
import sys
from os import path, makedirs, scandir
from random import shuffle
import numpy as np
import pandas as pd
from PIL import Image
from tqdm import tqdm
from classifier.FaceClassifier import FaceClassifier
models = [
"random_forest",
"knn",
"svm",
"mlp",
"dtree",
"all"
... | 307 | 33.31 | 118 | 17 | 2,401 | python | [{"finding_id": "codeql_py/tarslip_e75ca83fdd1774cd_7496cf9a", "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)."
] | [
74
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T20:55:10.762463+00:00 | 1,693,275,722,000 | 2767921f9883fabd081dae6621441756077b1d3d | 3 | {
"blob_id": "2767921f9883fabd081dae6621441756077b1d3d",
"branch_name": "refs/heads/master",
"committer_date": 1693275722000,
"content_id": "d0364cac1248b3594732fb03eaa237a8bbd14fcf",
"detected_licenses": [
"MIT"
],
"directory_id": "6d326bf37d99f4a2f089429769e41f4b16ee1a90",
"extension": "py",
"fi... | 2.609375 | stackv2 | import time
import hashlib
from typing import Optional
import requests
from .log import logger
from .exceptions import PwnedPasswordException
default_headers = {"User-Agent": "keepassxc-pwned"}
def request_password_hash(hash_head: str) -> requests.Response:
"""
Requests the Response object for the corresp... | 55 | 34.65 | 116 | 19 | 506 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_78111d2e27599b04_c70feda9", "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 (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expen... | [
48
] | [
null
] | [
36
] | [
58
] | |
2024-11-18T20:55:13.501206+00:00 | 1,630,638,898,000 | f6e3b1184f8970cd7293a4b20336bb42a17f8a9a | 3 | {
"blob_id": "f6e3b1184f8970cd7293a4b20336bb42a17f8a9a",
"branch_name": "refs/heads/main",
"committer_date": 1630638898000,
"content_id": "8420ea2147e32095b1c815918290418e82675213",
"detected_licenses": [
"MIT"
],
"directory_id": "06aa5e824faeccd1dfd78add4e49cdea42a19908",
"extension": "py",
"file... | 3 | stackv2 | import string
import nltk
import pandas as pd
import numpy as np
from bs4 import BeautifulSoup
import re
from nltk.corpus import stopwords
def remove_numbers(text):
# define the pattern to keep
pattern = r'[^a-zA-z.,!?/:;\"\'\s]'
return re.sub(pattern, '', text)
# function to remove punctuation
def rem... | 66 | 23.64 | 88 | 12 | 412 | python | [{"finding_id": "codeql_py/overly-large-range_da27bcde677f9c6d_326c94d6", "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\\]."
] | [
13
] | [
null
] | [
22
] | [
25
] | |
2024-11-18T20:55:13.846537+00:00 | 1,626,448,772,000 | fa89ccb915153733a1073aec409e889d51fdfbda | 4 | {
"blob_id": "fa89ccb915153733a1073aec409e889d51fdfbda",
"branch_name": "refs/heads/master",
"committer_date": 1626448772000,
"content_id": "2aab1441230fc4d4546dec4b845409ab58ac51f9",
"detected_licenses": [
"MIT"
],
"directory_id": "8aa331de4bf9bc29bf5cc7f21ca695debeaf964d",
"extension": "py",
"fi... | 3.9375 | stackv2 | class Contact:
def __init__(self, name, phone, birthday, address):
self.name = name
self.phone = phone
self.birthday = birthday
self.address = address
print(f"Создаём новый контакт {name}")
def show_contact(self):
print(f"{self.name} — адрес: {self.address}, теле... | 25 | 32.24 | 113 | 12 | 273 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d173c040ba191da0_fa8c665a", "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."
] | [
10
] | [
null
] | [
15
] | [
108
] | |
2024-11-18T21:07:47.815109+00:00 | 1,617,626,607,000 | 566347326f91fea396120129ceaa8c042fc0a9f1 | 3 | {
"blob_id": "566347326f91fea396120129ceaa8c042fc0a9f1",
"branch_name": "refs/heads/main",
"committer_date": 1617626607000,
"content_id": "d9b489ecc9657caca5515699a6d99daef971bba2",
"detected_licenses": [
"MIT"
],
"directory_id": "ddeaa47173161aa58eb206e5d5f6f466111fd705",
"extension": "py",
"file... | 2.5625 | stackv2 | import discord
import string
import re
import os
client = discord.Client()
partial_keywords = ['good morning', 'good mornin', 'goood morning']
def deEmojify(text):
regrex_pattern = re.compile(pattern = "["
u"\U0001F600-\U0001F64F" # emoticons
u"\U0001F300-\U0001F5FF" # symbols & pictographs
... | 50 | 31.84 | 136 | 14 | 457 | python | [{"finding_id": "codeql_py/overly-large-range_e00bb998e6062dd9_4a96ab8d", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "remediatio... | 3 | true | [
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.",
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.",
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class."
] | [
11,
11,
11
] | [
null,
null,
null
] | [
11,
14,
17
] | [
15,
18,
21
] | |
2024-11-18T21:55:58.501735+00:00 | 1,630,170,418,000 | a6f6175814ebd317e316bb3238e80590a7916e6f | 3 | {
"blob_id": "a6f6175814ebd317e316bb3238e80590a7916e6f",
"branch_name": "refs/heads/master",
"committer_date": 1630170418000,
"content_id": "14bf736cdbcba1be7d853f6fa4c1c081b375cd64",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "c63a4b78217a84fe536a519bdbfd4fb658505239",
"extension": "p... | 2.796875 | stackv2 | from cryptography.hazmat.primitives.serialization import load_pem_public_key, Encoding, PublicFormat
import hashlib
import base64
from cryptography import x509
from cryptography.hazmat.backends import default_backend
def generate_hpkp_from_pem_certificate(pem_cert: str) -> str:
# Take the certificate and convert ... | 36 | 39.39 | 119 | 11 | 362 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_34b715995196f445_e68cb5b7", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (certificate)](1) is used in a hashing algorithm (SHA1) that is i... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (certificate)](1) is used in a hashing algorithm (SHA1) that is insecure."
] | [
31
] | [
null
] | [
18
] | [
46
] | |
2024-11-18T21:56:05.978770+00:00 | 1,496,223,590,000 | 70b1673bf38b600cba76ad45e66fd7b1092be813 | 4 | {
"blob_id": "70b1673bf38b600cba76ad45e66fd7b1092be813",
"branch_name": "refs/heads/master",
"committer_date": 1496223590000,
"content_id": "09fe9a863d30fb40713c1c357277338b4f257fa8",
"detected_licenses": [
"MIT"
],
"directory_id": "94f8b252f15e5a557dcad61f7136c4941115c26e",
"extension": "py",
"fi... | 3.953125 | stackv2 | print("let's practice everything")
print("you'd need to know 'bout escapes with \\ that do \nnewlines and \ttabs")
poem ="""
\t The lovely world
with logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none."""
spacer = "--... | 34 | 24.74 | 79 | 8 | 247 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f0a1d575790fc031_f7fccaa4", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
29,
33
] | [
31,
34
] | [
7,
7
] | [
62,
76
] | |
2024-11-18T22:39:35.716549+00:00 | 1,444,151,333,000 | 60fbb52a8665521d4b819c4eba3b274c8a5b224c | 2 | {
"blob_id": "60fbb52a8665521d4b819c4eba3b274c8a5b224c",
"branch_name": "refs/heads/master",
"committer_date": 1444151333000,
"content_id": "124bfa38d3d89623c3f8bf9174750eee1126e55c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "fdfb9f19347c988b278ced6a94d0918a0423d6b8",
"extension": "py"... | 2.359375 | stackv2 | #
# Copyright (c) 2015 Autodesk Inc.
# All rights reserved
#
# 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 l... | 224 | 39.89 | 117 | 21 | 2,004 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_10399f4173382537_d07d175d", "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."
] | [
190
] | [
null
] | [
19
] | [
93
] | |
2024-11-18T22:55:01.164088+00:00 | 1,564,058,838,000 | b44c9e76288814636ea1f8435dd74840b3c91219 | 3 | {
"blob_id": "b44c9e76288814636ea1f8435dd74840b3c91219",
"branch_name": "refs/heads/master",
"committer_date": 1564058838000,
"content_id": "72ad7eac31f7fdb3fd13e8a6183d465a3cc77639",
"detected_licenses": [
"MIT"
],
"directory_id": "03dcc459ac86c66e503cf439b736c43810fa51dc",
"extension": "py",
"fi... | 2.84375 | stackv2 | # -*- coding: utf-8 -*-
# @Time : 2019/3/27 21:45
# @Author : Alan
# @Email : xiezhengwen2013@163.com
# @File : get_jsondetails.py
# @Software: PyCharm
# -*- coding: utf-8 -*-
import json
# 获取人物的身高和体重的关系
fr = open("film_characters.csv", "r")
fw = open("stat_character.csv", "w")
# 姓名 身高 体重 性别 家乡
fw.write('na... | 32 | 24.53 | 109 | 18 | 293 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_30858d7821781a2c_2150a967", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text."
] | [
28
] | [
29
] | [
14
] | [
28
] | |
2024-11-18T22:43:25.021942+00:00 | 1,481,559,130,000 | 6889eed4abe961843e1fc1e4bcfbedd8e6af4efa | 2 | {
"blob_id": "6889eed4abe961843e1fc1e4bcfbedd8e6af4efa",
"branch_name": "refs/heads/master",
"committer_date": 1481559130000,
"content_id": "0851fcb42f8b2d3391ac5966db28d3b3ba0837a4",
"detected_licenses": [
"MIT"
],
"directory_id": "181e69a629bbd668875d4215f11866c55b1e25f6",
"extension": "py",
"fi... | 2.4375 | stackv2 | from flask import *
from config import app
login = Blueprint('login', __name__, template_folder = 'views')
from utils import *
import hashlib
@app.route('/signup', methods=['GET'])
def signup_get():
return render_template('signup.html')
@app.route('/signup', methods=['POST'])
def signup_post():
salt = 'd... | 60 | 29.55 | 169 | 15 | 399 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a052a0e65de6d103_a64b17c1", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally exp... | [
15,
43
] | [
null,
null
] | [
34,
34
] | [
76,
68
] | |
2024-11-18T22:43:25.362067+00:00 | 1,592,845,613,000 | 54df2b1d58ec8e54e58b5c3796d133026683d493 | 3 | {
"blob_id": "54df2b1d58ec8e54e58b5c3796d133026683d493",
"branch_name": "refs/heads/master",
"committer_date": 1592845613000,
"content_id": "159a5305846109f15f2468e94d451f549355167d",
"detected_licenses": [
"MIT"
],
"directory_id": "62f5ddfea75897ff520c7ce74eb750b576895647",
"extension": "py",
"fi... | 3.125 | stackv2 | # Path for file sample.txt is stored in file_path
# sample.txt contains message "This is a sample message."
# Path for file M1.txt is stored in file_path_1
# M1.txt contains message "2222"
# Path for file M2.txt is stored in file_path_2
# M2.txt contains message "2477"
# Path for file M3.txt is stored in file_path_3... | 113 | 24.96 | 90 | 12 | 794 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_3bca67f88c5c84a5_52711152", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text.\nThis expression stores [sensitive data (secret)](3) as clear text.\nThis expression stores [sensitive data (secret)](4) as clear text.\nThis expression stores [sensitive data (sec... | [
106,
113
] | [
null,
null
] | [
16,
7
] | [
26,
17
] | |
2024-11-18T22:43:28.737748+00:00 | 1,625,647,840,000 | 13792b350639acdbc41eb6e54fee4e397f53dd2b | 2 | {
"blob_id": "13792b350639acdbc41eb6e54fee4e397f53dd2b",
"branch_name": "refs/heads/master",
"committer_date": 1625647840000,
"content_id": "7f9380c32c2d60b223adc278a9d9d15587a95d13",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "87e6c47bf745f0b00de2dd9bfe4d4c202cd25def",
"extension": "py"... | 2.359375 | stackv2 | # Copyright 2020, Pulumi Corporation. All rights reserved.
import abc
import hashlib
import io
import json
from random import random
import socket
import time
from typing import Any, Optional
from uuid import uuid4
import paramiko
import pulumi
from pulumi import Input, Output, dynamic
from pulumi.resource import Re... | 247 | 29.32 | 103 | 20 | 1,574 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_0c3902dd1e327b4b_b04cc7ff", "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."
] | [
58
] | [
null
] | [
5
] | [
65
] | |
2024-11-18T22:43:36.926357+00:00 | 1,570,369,002,000 | 05d384e1d8f4106bfd8d811bfe78420434fa92e9 | 3 | {
"blob_id": "05d384e1d8f4106bfd8d811bfe78420434fa92e9",
"branch_name": "refs/heads/master",
"committer_date": 1570369002000,
"content_id": "8e5dd71ac836ea4342d3a9ab4f2e314ef6f4866c",
"detected_licenses": [
"MIT"
],
"directory_id": "fcd27c89564a641d1e2138c704c90ffaccae7e03",
"extension": "py",
"fi... | 2.734375 | stackv2 | import os
import tarfile
from urllib.error import HTTPError
import urllib.request
if __name__ == "__main__":
data_url = "http://download.tensorflow.org/data/speech_commands_v0.01.tar.gz"
dir_name = "data"
filename = data_url.split("/")[-1]
# Check if directory exists
if not os.path.isdir(dir_name)... | 35 | 28.71 | 82 | 15 | 236 | python | [{"finding_id": "codeql_py/tarslip_e61c258d46d1a332_15507e33", "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)."
] | [
28
] | [
null
] | [
9
] | [
12
] | |
2024-11-18T23:10:51.164055+00:00 | 1,537,517,713,000 | 8ad7e8544b341e9b7e1fa83185e91e311c92ad6a | 2 | {
"blob_id": "8ad7e8544b341e9b7e1fa83185e91e311c92ad6a",
"branch_name": "refs/heads/master",
"committer_date": 1537517713000,
"content_id": "759470967bc07d0336b636774346a913a8a2edc9",
"detected_licenses": [
"MIT"
],
"directory_id": "db0267cfd2214ce252ec0dafb246d7de1e1d4197",
"extension": "py",
"fi... | 2.484375 | stackv2 | from . import sacco_auth
from ..models import Sacco
from .forms import SaccoLoginForm,SaccoRegistrationForm
from .. import db
from flask_login import login_user,logout_user,login_required
from flask import render_template,redirect,url_for,flash,request
@sacco_auth.route('/login',methods=['GET','POST'])
def login():
... | 59 | 35.34 | 114 | 17 | 521 | python | [{"finding_id": "codeql_py/url-redirection_08df0d0c4abded81_aa5638ad", "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)."
] | [
16
] | [
null
] | [
29
] | [
114
] | |
2024-11-18T22:29:34.718342+00:00 | 1,605,545,621,000 | d730df00bde1b0a957bbc6c400c6ad03f5d44263 | 3 | {
"blob_id": "d730df00bde1b0a957bbc6c400c6ad03f5d44263",
"branch_name": "refs/heads/main",
"committer_date": 1605545621000,
"content_id": "40adec3617d8c6b4a3f9bfb339fc1bdc39d8570c",
"detected_licenses": [
"MIT"
],
"directory_id": "2ab8870739268175b3c296dd72e8190876dd343a",
"extension": "py",
"file... | 3.0625 | stackv2 | """ Shree Krishnaya Namaha
This is an implementation of DUKPT algorithm in Python.
The reference for this implementation is the excellent write up found here:
https://www.parthenonsoftware.com/blog/how-to-decrypt-magnetic-stripe-scanner-data-with-dukpt/
This module converts the steps me... | 72 | 31.94 | 94 | 12 | 756 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_7a50086dccefd7a4_dbe992eb", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptograph... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES3](2) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES3](2) is broken or weak, and should not be used."
] | [
49,
54
] | [
null,
null
] | [
25,
26
] | [
44,
45
] | |
2024-11-18T23:10:19.966822+00:00 | 1,621,209,931,000 | 4d5868ff6813e454f40a7ed2bebdac8a9fbd09dc | 3 | {
"blob_id": "4d5868ff6813e454f40a7ed2bebdac8a9fbd09dc",
"branch_name": "refs/heads/main",
"committer_date": 1621209931000,
"content_id": "e70820fec085aa6c89db65ff790737afefb4d9d5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ba1facce447fc872c68a4ccefa4c69a1677c3a45",
"extension": "py",
... | 2.5625 | stackv2 | #!/usr/bin/python
from kubernetes import config, client
import argparse
UsedSecret, UsedConfigMap, UsedPVC = [], [], []
Secrets, ConfigMap, PVC = [], [], []
def main():
print("\nThis script is created to find unused "),
print("resource in Kubernetes and delete them\n")
parser = argparse.ArgumentParser(d... | 189 | 37.78 | 129 | 27 | 1,683 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b362681fed196a86_6bbd1b2c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](... | [
72,
151
] | [
null,
null
] | [
19,
19
] | [
129,
55
] | |
2024-11-18T23:21:46.275693+00:00 | 1,586,920,498,000 | 50ed734649615a56ba7226e71f464519c1ba09f9 | 2 | {
"blob_id": "50ed734649615a56ba7226e71f464519c1ba09f9",
"branch_name": "refs/heads/master",
"committer_date": 1586920498000,
"content_id": "86f771d3cfd012866bfd34342f9236f5e2a2057f",
"detected_licenses": [
"MIT"
],
"directory_id": "0393eecbd9b0b0a93cea07a46f49a2dfbe2efb72",
"extension": "py",
"fi... | 2.390625 | stackv2 | """
Copyright (c) 2020, Digi International, Inc.
Sample code released under MIT License.
Instructions:
- Ensure that the umqtt/simple.py and urllib/parse.py modules are in
the /flash/lib directory on the XBee Filesystem
- Create an account on the Microsoft Azure plaform, note that
if you have a corporate acco... | 435 | 36.13 | 122 | 19 | 3,625 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2b630cef020687fb_15a9b878", "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."
] | [
160
] | [
null
] | [
37
] | [
50
] | |
2024-11-18T23:21:51.023500+00:00 | 1,690,385,725,000 | 42a99a84baae02052bb9b2fb9395d45c3e9c16a4 | 2 | {
"blob_id": "42a99a84baae02052bb9b2fb9395d45c3e9c16a4",
"branch_name": "refs/heads/master",
"committer_date": 1690385725000,
"content_id": "f8728cfe4b7c831253c41262439511e30bd298fb",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "d4ae1457c11f223a63b0b3dccaa513fd3e74545e",
"extension": "p... | 2.421875 | stackv2 | import glob
import os
import shutil
import tempfile
from collections import defaultdict
import jinja2
jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader("../"))
# make the index page
# I originally wanted to use jinja2 to do this, but the CSS has double curly
# brackets, which jinja does not like, so here ... | 40 | 31.35 | 77 | 13 | 333 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b732e86070780abe_cd83a73f", "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."
] | [
9
] | [
null
] | [
13
] | [
70
] | |
2024-11-18T21:33:29.010357+00:00 | 1,691,743,333,000 | 0cda8656350ba3a2f91bb9b5d7b1c5ddf9e4735c | 3 | {
"blob_id": "0cda8656350ba3a2f91bb9b5d7b1c5ddf9e4735c",
"branch_name": "refs/heads/master",
"committer_date": 1691743333000,
"content_id": "944b75f54155103c89ac5175c8a31b07a84e5ee6",
"detected_licenses": [
"MIT"
],
"directory_id": "36d6ee027b31c328cbbece33b273d2fee8d83115",
"extension": "py",
"fi... | 2.59375 | stackv2 | import peewee
import flask
import flask_login
from ..models import User, Feed, Entry, Read
from ..utilities import format_datetime
from . import bp, SessionUser
@bp.route('/login', methods=['GET', 'POST'])
def login():
next = flask.request.values.get('next')
if flask.request.method == 'GET':
return fl... | 120 | 37.2 | 93 | 18 | 1,072 | python | [{"finding_id": "codeql_py/url-redirection_34aa6f3469ac119c_fbeecbf6", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
24
] | [
null
] | [
31
] | [
66
] | |
2024-11-18T21:33:31.710759+00:00 | 1,606,643,372,000 | 79ef2f9a0fe9d435df307bca899461973ca18b57 | 3 | {
"blob_id": "79ef2f9a0fe9d435df307bca899461973ca18b57",
"branch_name": "refs/heads/main",
"committer_date": 1606643372000,
"content_id": "0a27f6945b56aef0a075d80d0dbf6a8fd7c9ab46",
"detected_licenses": [
"MIT"
],
"directory_id": "80e20f02b1ae2001ccf15de0eda853e739104f95",
"extension": "py",
"file... | 2.6875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
from lxml import html
import argparse
import pandas as pd
import time
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
def parse_listing(keyword, place):
"""
... | 224 | 50.33 | 176 | 28 | 2,445 | python | [{"finding_id": "codeql_py/request-without-cert-validation_75e6166fb2d13fc1_b47b2f29", "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)."
] | [
31,
146
] | [
null,
null
] | [
20,
32
] | [
68,
80
] | |
2024-11-18T21:33:32.611215+00:00 | 1,592,411,016,000 | 23c2e665d19fad9ba96f42b4db4c40e99f795f4d | 2 | {
"blob_id": "23c2e665d19fad9ba96f42b4db4c40e99f795f4d",
"branch_name": "refs/heads/master",
"committer_date": 1592411016000,
"content_id": "073757f731f145ce78cb309ec1d2de14c90d09a0",
"detected_licenses": [
"MIT"
],
"directory_id": "4703be89bfa07ba48a90b76bc7295e7d547e8954",
"extension": "py",
"fi... | 2.421875 | stackv2 | """Receipt views."""
from flask import Blueprint, flash, redirect, render_template, request
from flask_login import current_user, login_required
from webapp.db import db
from webapp.receipt.models import Category, Purchase, Receipt, PurchaseCategory, Subcategory, ReceiptSubcategory
from webapp.receipt.forms import Add... | 114 | 35.6 | 113 | 15 | 873 | python | [{"finding_id": "codeql_py/url-redirection_c1acd164d2da71fb_b4760f3e", "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_... | 6 | true | [
"CWE-601",
"CWE-601",
"CWE-601",
"CWE-601",
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection",
"py/url-redirection",
"py/url-redirection",
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"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).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends o... | [
83,
88,
90,
107,
112,
114
] | [
null,
null,
null,
null,
null,
null
] | [
29,
25,
21,
29,
25,
21
] | [
45,
41,
37,
45,
41,
37
] | |
2024-11-18T21:33:36.266370+00:00 | 1,557,210,827,000 | 3fd0861e09f113dc3a809699ee2bbd9e9af23720 | 3 | {
"blob_id": "3fd0861e09f113dc3a809699ee2bbd9e9af23720",
"branch_name": "refs/heads/master",
"committer_date": 1557210827000,
"content_id": "6ac1f9ef65f490776da2621fdc16c1c082aa8d22",
"detected_licenses": [
"MIT"
],
"directory_id": "bcea9403fa68bb239fca0db8321fb10afd210389",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python
# encoding: utf-8
'''
@author: agandong4
@license: (C) Copyright 2013-2019, Node Supply Chain Manager Corporation Limited.
@contact: agandong4@gmail.com
@software: garner
@file: main.py
@time: 2019-03-17 18:59
@desc:
'''
import requests
import random
import os,re
from os import listdir
from PIL i... | 121 | 29.52 | 91 | 21 | 993 | python | [{"finding_id": "codeql_py/request-without-cert-validation_873dc81aa48cc8d7_da03834a", "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)."
] | [
40,
55
] | [
null,
null
] | [
20,
33
] | [
88,
63
] | |
2024-11-18T22:30:25.898398+00:00 | 1,504,773,743,000 | 733f8f3b5451450ae5981d2f57e2aabebb6c44fe | 3 | {
"blob_id": "733f8f3b5451450ae5981d2f57e2aabebb6c44fe",
"branch_name": "refs/heads/master",
"committer_date": 1504773743000,
"content_id": "dd13dcd3b4b1049fe78c8eb3b2d14943f32568a2",
"detected_licenses": [
"MIT"
],
"directory_id": "7f9b8614bf3b19c92b7df57cabce93bc46c1d27f",
"extension": "py",
"fi... | 2.765625 | stackv2 | # v. 1.1
# 03.09.2017
# Sergii Mamedov
"""
Requests version.
Get metadata from all dois from a journal.
Journal`s urls: https://www.crossref.org/06members/51depositor.html
"""
import time
import json
import logging
from tqdm import tqdm
import requests
FORMAT = '%(asctime)s %(levelname)s %(message)s'
logging.ba... | 68 | 22.91 | 101 | 16 | 419 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9783e648aaf602ac_960978ca", "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)."
] | [
32
] | [
null
] | [
20
] | [
102
] | |
2024-11-18T22:30:26.161922+00:00 | 1,439,803,613,000 | 1253ee843348d7b56cc897a263b6c3580a8e5715 | 2 | {
"blob_id": "1253ee843348d7b56cc897a263b6c3580a8e5715",
"branch_name": "refs/heads/master",
"committer_date": 1439803613000,
"content_id": "f4dcbdf1ebbede3658e18df45182c858870d4f19",
"detected_licenses": [
"MIT"
],
"directory_id": "2f3f327741363cf0f12b9c91ccb435508e21dbe8",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/python
import BaseHTTPServer
import os
import sys
import json
import re
import logging
from subprocess import Popen, PIPE
from netaddr import IPAddress, IPNetwork
# For a string in the format ftXYZ-aaaa10toto, extract ftXYZ
PREFIX_REGEX_PATTERN = '^(ft\w+)-.+'
prefixToNetwork = {}
noPrefixNetwork = None
... | 216 | 33.23 | 124 | 15 | 1,677 | python | [{"finding_id": "codeql_py/log-injection_ca0fca33807c63f1_85b52bb5", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2)... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2).\nThis log entry depends on a [user-provided value](3)."
] | [
85
] | [
null
] | [
22
] | [
101
] | |
2024-11-18T22:44:45.322008+00:00 | 1,458,231,096,000 | 1984581d62688b97a51534a812eff6d22e20eca3 | 3 | {
"blob_id": "1984581d62688b97a51534a812eff6d22e20eca3",
"branch_name": "refs/heads/master",
"committer_date": 1458231096000,
"content_id": "92c613a8b46e4db3c8a0c7e309ab75ae67ae4c18",
"detected_licenses": [
"MIT"
],
"directory_id": "698176804e16c7ae59f66ccebdff746f74998662",
"extension": "py",
"fi... | 2.65625 | stackv2 | # select_corpus.py
#
# This module imports metadata about reviewed volumes; selects a set of
# volumes in the "reviewed" class, and then uses a larger generic
# metadata corpus to select a matching chronological distribution of
# random volumes.
#
# It differs from the original version of the script in using
# a newer ... | 156 | 28.04 | 158 | 27 | 1,214 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_67e619da3a9d414d_12bfbf6f", "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.\nThis expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
149
] | [
null
] | [
17
] | [
21
] | |
2024-11-18T23:36:53.941489+00:00 | 1,603,824,653,000 | 7b389386831014792e14cce2a6b83231f788d5ab | 3 | {
"blob_id": "7b389386831014792e14cce2a6b83231f788d5ab",
"branch_name": "refs/heads/main",
"committer_date": 1603824653000,
"content_id": "c996f7441118fbf5f200ac2618269eaf9eeac31b",
"detected_licenses": [
"MIT"
],
"directory_id": "c2808e7abe49ea9a3fa67b4eb1e08d8e2fe9de6f",
"extension": "py",
"file... | 2.59375 | stackv2 | import torch
import os
import csv
import torch.nn as nn
import torch.optim as optim
from dataloader import get_loader, get_loader2
import torchvision.transforms as transforms
from models import classifier
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
extractor = classifier.Extractor().to(devic... | 149 | 28.39 | 133 | 16 | 1,071 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_895e762f990a2cc0_bf29b6b6", "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."
] | [
122
] | [
null
] | [
10
] | [
92
] | |
2024-11-18T21:14:10.703608+00:00 | 1,598,200,120,000 | ab37915a35254067bb8cf410be373397150cf8fa | 3 | {
"blob_id": "ab37915a35254067bb8cf410be373397150cf8fa",
"branch_name": "refs/heads/master",
"committer_date": 1598200120000,
"content_id": "7f9b5680d2664a5325a2ac452dbd55abf7df7f8d",
"detected_licenses": [
"MIT"
],
"directory_id": "4cf8c5fd053d9e20fad73e26814b48dda96db3b9",
"extension": "py",
"fi... | 2.53125 | stackv2 | """
Module for Exo-REM atmospheric model spectra.
"""
import os
import tarfile
import urllib.request
from typing import Optional, Tuple
import h5py
import spectres
import numpy as np
from typeguard import typechecked
from species.util import data_util, read_util
@typechecked
def add_exo_rem(input_path: str,
... | 158 | 33.44 | 100 | 24 | 1,160 | python | [{"finding_id": "codeql_py/tarslip_087ac4e8b9f96b9a_f7366f29", "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)."
] | [
68
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T21:14:41.202347+00:00 | 1,589,844,372,000 | a5d332c4548cc26778acf14be63f0d2d2e263419 | 3 | {
"blob_id": "a5d332c4548cc26778acf14be63f0d2d2e263419",
"branch_name": "refs/heads/master",
"committer_date": 1589844372000,
"content_id": "2ad7e6c340db33f707163f7341683949ef6239b5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8c9112da8a7d20cb7a82b098951df230076dca12",
"extension": "py"... | 2.625 | stackv2 |
"""
Kepler Web-View Run
"""
import json
import requests
from requests.auth import HTTPBasicAuth
class Run:
def __init__(self, url='https://localhost:9443/kepler', username=None,
password=None, response=None, id=None, fields=None, debug=False):
self._outputs = None
self._password = pas... | 226 | 30.21 | 120 | 20 | 1,508 | python | [{"finding_id": "codeql_py/request-without-cert-validation_10a4079e09303bee_a10b2c51", "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)."
] | [
193
] | [
196
] | [
20
] | [
26
] | |
2024-11-18T21:14:45.286037+00:00 | 1,597,303,945,000 | 4efe42b897ed85a5417b9203c16cba3cc15aab8e | 2 | {
"blob_id": "4efe42b897ed85a5417b9203c16cba3cc15aab8e",
"branch_name": "refs/heads/master",
"committer_date": 1597303945000,
"content_id": "535a7c6a22ec2300bcec04f53cac54e46fd7f5cc",
"detected_licenses": [
"MIT"
],
"directory_id": "caaf01127936891f50515ac7997c03cab7d7dca8",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python
################################################################################
# Rendered math (MathJax) with Slack's desktop client
################################################################################
#
# Slack (https://slack.com) does not display rendered math. This script
# injec... | 451 | 33.51 | 135 | 16 | 3,726 | python | [{"finding_id": "codeql_py/tarslip_186db9e564160467_7a2fb7d0", "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)."
] | [
388
] | [
null
] | [
null
] | [
12
] | |
2024-11-18T21:57:26.900060+00:00 | 1,493,140,756,000 | 453fa5acfa2697d97bfcefc33f0487b5148ddf45 | 3 | {
"blob_id": "453fa5acfa2697d97bfcefc33f0487b5148ddf45",
"branch_name": "refs/heads/master",
"committer_date": 1493140756000,
"content_id": "f8832935ad7638408f19f1000bcfc55462652159",
"detected_licenses": [
"MIT"
],
"directory_id": "c9a1d9eba2d33a62c693eeceb386c5e8097020ae",
"extension": "py",
"fi... | 2.671875 | stackv2 | import BaseHTTPServer
import re
import json
import sys
import os
from BaseHTTPServer import *
import argparse
from Controllers import *
from utils import Util
CONTROLLER_NAME = "controller-name"
class Router():
def __init__(self, server):
self.__routes = []
self.__server = server
def add_ro... | 117 | 33.39 | 108 | 15 | 880 | python | [{"finding_id": "codeql_py/path-injection_4eded8ff504b8db6_db1a7d4d", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
67,
76
] | [
null,
null
] | [
23,
23
] | [
38,
38
] | |
2024-11-18T21:57:30.179544+00:00 | 1,663,070,618,000 | dca75c68ce8ee82248eb0d464cd3609fe1c4d9e8 | 3 | {
"blob_id": "dca75c68ce8ee82248eb0d464cd3609fe1c4d9e8",
"branch_name": "refs/heads/master",
"committer_date": 1663070618000,
"content_id": "e07dc3abbf348e7ce3ce3c3fd60e10fde7df68d4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "92745aa512f030ff65808d46ad3e9faeaf84f6ad",
"extension": "py"... | 2.859375 | stackv2 | import math
import os
import sys
sys.path.append('../../')
import openlocationcode as olc
# global constants
EARTH_RADIUS_ = 6371 # kilometers
# settings: required
# make sure this folder exists and the user running this script has write access to it
TARGET_FOLDER = '/tmp'
FILE_NAME_PREFIX = 'olc_'
FILE_NAME_SU... | 120 | 32.4 | 167 | 18 | 1,066 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_3e2ba5a6667205f9_c82e0104", "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.\nThis expression stores [sensitive data (private)](3) as clear text.\nThis expression stores [sensitive data (private)](4) as clear text."
] | [
113
] | [
null
] | [
21
] | [
31
] | |
2024-11-18T21:57:32.236069+00:00 | 1,550,707,402,000 | 47ef0e5f815c3f93362785b2e6a6b4f51601eba7 | 2 | {
"blob_id": "47ef0e5f815c3f93362785b2e6a6b4f51601eba7",
"branch_name": "refs/heads/master",
"committer_date": 1550707402000,
"content_id": "4ad068490f28208a38da5bad52013e3ee715353a",
"detected_licenses": [
"MIT"
],
"directory_id": "ed104b9cd45a25f4aba504da1fce5b4094423853",
"extension": "py",
"fi... | 2.390625 | stackv2 | __author__ = 'dsmirnov@wildapricot.com'
import WaApi
import urllib.parse
import json
import logging
import config
API_KEY = config.API_KEY
# create logger with 'spam_application'
# set up logging to file - see previous section for more details
logging.basicConfig(level=logging.INFO,
form... | 88 | 31.83 | 150 | 16 | 665 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d869b8c9417186e1_52d130bd", "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."
] | [
64
] | [
null
] | [
15
] | [
22
] | |
2024-11-18T21:57:52.749220+00:00 | 1,592,284,479,000 | 4e0924dadea441c8e5269a16b24b6956a0e67088 | 3 | {
"blob_id": "4e0924dadea441c8e5269a16b24b6956a0e67088",
"branch_name": "refs/heads/master",
"committer_date": 1592284479000,
"content_id": "efb7f74f6ee48b2d70f5ad7e6cda3a41ed38f6f7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "16d5aa8e86ce364818cea3b379bfe5fe23ba8f2b",
"extension": "py"... | 2.625 | stackv2 | from flask import Flask, render_template, request, send_file
from werkzeug.utils import secure_filename
app = Flask(__name__)
@app.route('/upload')
def render_file():
return render_template('upload.html')
@app.route('/fileUpload', methods = ['GET', 'POST'])
def upload_file():
if request.method == 'POST':
... | 28 | 27 | 62 | 14 | 193 | python | [{"finding_id": "codeql_py/flask-debug_8c1547ef8aee8eaf_80de312f", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
28,
24
] | [
null,
null
] | [
5,
22
] | [
40,
40
] | |
2024-11-18T21:57:53.658188+00:00 | 1,476,193,717,000 | 019c4885543c7d8786a860e2681936c918846d08 | 3 | {
"blob_id": "019c4885543c7d8786a860e2681936c918846d08",
"branch_name": "refs/heads/master",
"committer_date": 1476193717000,
"content_id": "7244103db1da402a0e568abff5a71c962d180173",
"detected_licenses": [
"MIT"
],
"directory_id": "db78224aed607ccec18a0c5152a250978d5c613e",
"extension": "py",
"fi... | 2.71875 | stackv2 | # Author: Ian McLoughlin
# Date: October 10th, 2016
# Originally adapted from:
# http://flask.pocoo.org/
import flask as fl
app = fl.Flask(__name__)
@app.route("/")
def root():
return app.send_static_file('index.html')
@app.route("/name", methods=["GET", "POST"])
def name():
return "Hello " + fl.request.f... | 19 | 19 | 51 | 11 | 110 | python | [{"finding_id": "codeql_py/reflective-xss_60bdd54f13900306_eced28a4", "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)."
] | [
16
] | [
null
] | [
12
] | [
52
] | |
2024-11-18T21:58:09.326989+00:00 | 1,506,555,384,000 | f4ea584a5838704812703fbcb2f16096618baa91 | 2 | {
"blob_id": "f4ea584a5838704812703fbcb2f16096618baa91",
"branch_name": "refs/heads/master",
"committer_date": 1506555384000,
"content_id": "f37308e6a0ea6190b0f94e6b6e423e461d8d9435",
"detected_licenses": [
"MIT"
],
"directory_id": "804d2606aa445e2bcd4dce0db497e5f8e9864185",
"extension": "py",
"fi... | 2.46875 | stackv2 | """
Serve Mediaplayer Websocket Server.
MIT License
Copyright (c) 2017 David Döring (https://github.com/Anaeijon)
This is a synchonous HTTP and Websocket Server to serve Mediaplayer Websocket
and all needed file for Client Website to interact with Websocket.
VLC-Player is used as Mediaplayer.
Requiers Python 3.6.
... | 448 | 37.48 | 78 | 22 | 3,405 | python | [{"finding_id": "codeql_py/path-injection_39b10063744156bf_c881db3d", "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)."
] | [
318,
319
] | [
null,
null
] | [
16,
46
] | [
17,
47
] | |
2024-11-18T21:58:37.344077+00:00 | 1,669,582,791,000 | 2bd4359419680c5bd96d35e806a8ea9f8a4c6a6f | 2 | {
"blob_id": "2bd4359419680c5bd96d35e806a8ea9f8a4c6a6f",
"branch_name": "refs/heads/master",
"committer_date": 1669582791000,
"content_id": "ad95df834a35093835ef06378f4be9f8d6a9d8f8",
"detected_licenses": [
"MIT"
],
"directory_id": "3b6ea044be84a1deac7217d19b0ce722a0dda433",
"extension": "py",
"fi... | 2.359375 | stackv2 | from bisect import bisect
from itertools import groupby
from operator import itemgetter
from sqlite3 import Connection, Row
from jinja2 import DictLoader, Environment
_ENV = Environment(
trim_blocks=True,
lstrip_blocks=True,
loader=DictLoader(
{
"table_info": "PRAGMA table_info('{{ tab... | 151 | 29.26 | 100 | 19 | 1,026 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_58cfb4cc18828c8b_3bbe8206", "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."
] | [
8
] | [
36
] | [
8
] | [
2
] | |
2024-11-18T22:35:55.710840+00:00 | 1,482,653,701,000 | 7b8b2cdc888ca88c63f44cc10decde7322003ee8 | 3 | {
"blob_id": "7b8b2cdc888ca88c63f44cc10decde7322003ee8",
"branch_name": "refs/heads/master",
"committer_date": 1482653701000,
"content_id": "47adb6bab139188b23478ec94362a476081d4ba0",
"detected_licenses": [
"MIT"
],
"directory_id": "419c9a550c801f0822c8925d699a1c781f9f18a8",
"extension": "py",
"fi... | 2.546875 | stackv2 | from flask import *
from Entity.Entity import *
from PIL import Image
import base64, io, os, uuid
API = Blueprint('API', __name__)
UPLOAD_PATH = 'static/uploads'
APP_ROOT = os.path.dirname(os.path.abspath(__file__))
UPLOAD_FOLDER = os.path.join(APP_ROOT, UPLOAD_PATH)
@API.route('/croppic', methods=['GET', 'POST'])
... | 115 | 38.17 | 114 | 15 | 1,181 | python | [{"finding_id": "codeql_py/stack-trace-exposure_8d799449bdd8cf45_4e09deb7", "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."
] | [
100
] | [
103
] | [
16
] | [
10
] | |
2024-11-18T22:48:30.932358+00:00 | 1,513,533,862,000 | 3fcaf9bf88c57582f18c7d5af47a059737f60323 | 2 | {
"blob_id": "3fcaf9bf88c57582f18c7d5af47a059737f60323",
"branch_name": "refs/heads/master",
"committer_date": 1513533862000,
"content_id": "99056974503b4719424413b8efcea1ff1f3415b4",
"detected_licenses": [
"MIT"
],
"directory_id": "f9f34c357de74c497e0b0b1900a8570ec051ac64",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import Flask, render_template, url_for, redirect, request, make_response
import requests
import json
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello World!"
@app.route('/authors', methods=['POST', 'GET'])
def authors():
u = 'https://jsonplaceholder.typicode.com/users'
p = 'h... | 95 | 21.06 | 83 | 16 | 518 | python | [{"finding_id": "codeql_py/cookie-injection_3a683d224a609824_6df38f4b", "tool_name": "codeql", "rule_id": "py/cookie-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cookie is constructed from a [user-supplied input](1).", "remediation": "", "location": {"file_path": "... | 4 | true | [
"CWE-020",
"CWE-020",
"CWE-215",
"CWE-079"
] | [
"py/cookie-injection",
"py/cookie-injection",
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is constructed from a [user-supplied input](1).",
"Cookie is constructed from a [user-supplied input](1).",
"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)."
] | [
54,
55,
95,
63
] | [
null,
null,
null,
null
] | [
34,
31,
5,
12
] | [
38,
34,
53,
58
] | |
2024-11-18T22:49:03.951620+00:00 | 1,636,813,921,000 | aa4f1896e868a4ec21a56c7e0e9941e81a35eb2a | 2 | {
"blob_id": "aa4f1896e868a4ec21a56c7e0e9941e81a35eb2a",
"branch_name": "refs/heads/master",
"committer_date": 1636813921000,
"content_id": "e88cad192feee47aa8d9474ebf8c9eb55bb29381",
"detected_licenses": [
"MIT"
],
"directory_id": "a7aa25fcb11a7d9d236367e1637ea2cdbe7c905f",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/bin/env python3
"""
Developed with <3 by the Bishop Fox Continuous Attack Surface Testing (CAST) team.
https://www.bishopfox.com/continuous-attack-surface-testing/how-cast-works/
Author: @noperator
Purpose: Determine the software version of a remote PAN-OS target.
Notes: - Requires version-table.tx... | 218 | 32.16 | 103 | 17 | 1,621 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e59332684ba01329_d55e56d6", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
62
] | [
64
] | [
16
] | [
10
] | |
2024-11-18T23:26:07.828183+00:00 | 1,576,093,713,000 | 8b79c4ba6ccbb592e80499526600f1dc8d38e9c4 | 2 | {
"blob_id": "8b79c4ba6ccbb592e80499526600f1dc8d38e9c4",
"branch_name": "refs/heads/master",
"committer_date": 1576093713000,
"content_id": "5b6a2241d79ff09f2b7ed97d721b67001e4a3b4e",
"detected_licenses": [
"MIT"
],
"directory_id": "50a1f3e58f8e6d0daac894cf9613ca66fa23dfc4",
"extension": "py",
"fi... | 2.359375 | stackv2 | import os, re, requests, json
from mmpy_bot.bot import listen_to, respond_to
from mmpy_bot.utils import allow_only_direct_message
states = {} # initialize empty dict for states
API_KEY = os.getenv('CLEVERBOT_API_KEY')
@listen_to('^john (.+)$', re.IGNORECASE) # only reply to messages in public channels that start ... | 22 | 46.77 | 140 | 15 | 256 | python | [{"finding_id": "codeql_py/request-without-cert-validation_3396ff16d5ae66f3_a6b3991d", "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)."
] | [
19
] | [
null
] | [
13
] | [
141
] | |
2024-11-18T23:26:15.861324+00:00 | 1,550,108,749,000 | 451301ab888983ea327fb43fea54e0d35d41df1e | 3 | {
"blob_id": "451301ab888983ea327fb43fea54e0d35d41df1e",
"branch_name": "refs/heads/master",
"committer_date": 1550108749000,
"content_id": "d0514b8ceb49e19c358dc8db96227f4a8452a040",
"detected_licenses": [
"MIT"
],
"directory_id": "e24e224dbe682a4112d46b210740a0a60fc3e7af",
"extension": "py",
"fi... | 3 | stackv2 | # -*- coding: utf-8 -*-
from ruamel.yaml import YAML
import copy
from jinja2 import Template
def expand_namespace(namespaces, description_property):
"""Function to expand namespaces
Args:
namespaces (dict): namespaces dictionary
description_property (str): Exapanded namespace for property.
... | 149 | 31.07 | 79 | 14 | 907 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_3864b5046f34685e_c46b5345", "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."
] | [
133
] | [
null
] | [
24
] | [
46
] | |
2024-11-18T22:27:43.227335+00:00 | 1,550,095,846,000 | b3019e0d43292261ba52a1d98d555fbfc97715cf | 2 | {
"blob_id": "b3019e0d43292261ba52a1d98d555fbfc97715cf",
"branch_name": "refs/heads/master",
"committer_date": 1550095846000,
"content_id": "b5c380d311e49b36171d292f429ceae6a30b881d",
"detected_licenses": [
"MIT"
],
"directory_id": "d9dac267216108d15ea0a3ccdb55751a13a41c72",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/env python
import sys
import os
import time
import struct
import pygatt
# To discover mac addresses of nearby (on) devices:
# sudo hcitool lescan
#MACADDR = "CA:34:B1:3D:25:42"
MACADDR = "C4:29:BF:E7:CA:98"
ADDRESS_TYPE = pygatt.BLEAddressType.random
TEMPERATURE_UUID = "00002235-b38d-4985-720e-0f993a68e... | 44 | 21.43 | 72 | 10 | 356 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5a3b32ab360bae23_5861beff", "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."
] | [
26
] | [
null
] | [
20
] | [
27
] | |
2024-11-18T22:39:27.680796+00:00 | 1,552,370,446,000 | 906cb8ddd7b6e44d31726194c1f6f7cfba1e1a91 | 2 | {
"blob_id": "906cb8ddd7b6e44d31726194c1f6f7cfba1e1a91",
"branch_name": "refs/heads/master",
"committer_date": 1552370446000,
"content_id": "b9e6db7bb9bebf9c54163e1f08d174cd848e1032",
"detected_licenses": [
"MIT"
],
"directory_id": "de42eaa42cc46ccfbc7a78c664dd8b485ad9100e",
"extension": "py",
"fi... | 2.453125 | stackv2 | from django import forms
from django.contrib.auth import authenticate, login
from django.shortcuts import redirect
from django.core.validators import validate_email
from .models import Account
class LoginForm(forms.Form):
email = forms.EmailField()
password = forms.CharField(widget=forms.PasswordInput())
... | 80 | 38.25 | 92 | 17 | 544 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7b4ba23e45104095_60323b7b", "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."
] | [
68
] | [
null
] | [
26
] | [
38
] | |
2024-11-18T22:14:55.130437+00:00 | 1,518,905,259,000 | c580142bac55423496afef6095c757e9d858e4e3 | 2 | {
"blob_id": "c580142bac55423496afef6095c757e9d858e4e3",
"branch_name": "refs/heads/master",
"committer_date": 1518905259000,
"content_id": "1a54ecfcfccc53b6ef8bc9cfacbdf239e9ffd3b0",
"detected_licenses": [
"MIT"
],
"directory_id": "8070980eccc856e4eedb29de630e44024e328263",
"extension": "py",
"fi... | 2.40625 | stackv2 | import subprocess
import re
import json
import time
import os.path
from flask import Flask, request, send_from_directory,jsonify, render_template
app = Flask(__name__, static_url_path='')
wpa_conf = """country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="_ssid_"
... | 75 | 29.48 | 165 | 15 | 591 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c547239f68003fc1_fbd71de2", "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."
] | [
39,
37
] | [
null,
null
] | [
17,
22
] | [
79,
30
] | |
2024-11-18T22:55:26.442581+00:00 | 1,596,493,863,000 | 83e84ee0ecdba5056c362b55556f2154b25c0fee | 3 | {
"blob_id": "83e84ee0ecdba5056c362b55556f2154b25c0fee",
"branch_name": "refs/heads/master",
"committer_date": 1596493863000,
"content_id": "c80da5df8c94e166caec098b2ab73d7a793325dd",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "de6660c1649f7fb723b5c9ad63e2bb97d66b4edd",
"extension": "py",
... | 2.6875 | stackv2 | import requests
import urllib.request
from bs4 import BeautifulSoup
import csv
from time import sleep
manifest_arr = []
def ff(url):
r = requests.get(url, verify=False)
# htmlをBeautifulSoupで扱う
soup = BeautifulSoup(r.text, "lxml")
arr_e = soup.find_all("a")
for e in arr_e:
href = e.get... | 74 | 18.42 | 71 | 18 | 378 | python | [{"finding_id": "codeql_py/request-without-cert-validation_2d869b91685759eb_b634e20a", "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)."
] | [
12,
47
] | [
null,
null
] | [
9,
13
] | [
40,
44
] | |
2024-11-18T22:55:32.089651+00:00 | 1,527,592,592,000 | 8ede151e139265418aa34634ffda6b49e8f3ce5b | 3 | {
"blob_id": "8ede151e139265418aa34634ffda6b49e8f3ce5b",
"branch_name": "refs/heads/master",
"committer_date": 1527592592000,
"content_id": "3251c2386a1dd89d2a220bb18b028b9792870231",
"detected_licenses": [
"MIT"
],
"directory_id": "d68b3abf2045abfe9a1df891fefb1b7ae8d3574f",
"extension": "py",
"fi... | 2.53125 | stackv2 | # /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
from flask import Flask, jsonify, render_template
from datalogger import DataLogger
try:
from MAX31865.max31865 import MAX31865
except ModuleNotFoundError:
from max31865mock import MAX31865
app = Flask('rpitempmonitor')
"""Flask-App reflecti... | 55 | 22.64 | 77 | 14 | 378 | python | [{"finding_id": "codeql_py/flask-debug_ddae7273dfd4859c_1324c4d6", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
55,
38
] | [
null,
null
] | [
9,
27
] | [
44,
38
] | |
2024-11-18T22:55:39.470003+00:00 | 1,617,879,755,000 | 851745312778165cae5eee8ec478459a87fa0530 | 3 | {
"blob_id": "851745312778165cae5eee8ec478459a87fa0530",
"branch_name": "refs/heads/main",
"committer_date": 1617879755000,
"content_id": "f7bb6ca525d1d7650bd8f3e850eceb1206b7598f",
"detected_licenses": [
"MIT"
],
"directory_id": "73bd7b34193f47cae02a6f656b11f736bd37cf71",
"extension": "py",
"file... | 2.890625 | stackv2 | import os
#required for python 2.7 & >=3.3
import json
from jinja2 import Template
from PIL import Image
import operator
directory_path = os.getcwd()
DATA_DIR = 'data'
RML_DIR = 'rml'
class Chord(object):
"Empty class to hold parsed chord attributes"
pass
def parse_chords(filename):
chords = []
with ... | 64 | 26.67 | 77 | 14 | 432 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1ca96274be3e8d32_93763726", "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."
] | [
46
] | [
null
] | [
20
] | [
50
] | |
2024-11-18T23:24:02.758339+00:00 | 1,577,414,594,000 | afa9aa1bda56afb6c6a9ea7b1d6a5efdc5073802 | 3 | {
"blob_id": "afa9aa1bda56afb6c6a9ea7b1d6a5efdc5073802",
"branch_name": "refs/heads/master",
"committer_date": 1577414594000,
"content_id": "051224bb10d679ed369e67c5b03c889da9ce7662",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e6517b4079f77e6d629871fe4571416531e61b49",
"extension": "p... | 2.65625 | stackv2 | #! /usr/bin/env python
import argparse
import hashlib
import json
import re
from urllib.request import urlretrieve, urlopen
import jinja2
import yaml
def update_version(lines, version):
""" Update the text of a conda recipe to a given version. """
quoted_version = '"' + version + '"'
set_version_pattern ... | 115 | 34.55 | 75 | 14 | 1,050 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_59d57f57bed95389_c07340d1", "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."
] | [
51
] | [
null
] | [
29
] | [
57
] | |
2024-11-18T22:43:32.299986+00:00 | 1,626,629,895,000 | 71f609a81816f1feab3f3a895367dcf6f223a269 | 2 | {
"blob_id": "71f609a81816f1feab3f3a895367dcf6f223a269",
"branch_name": "refs/heads/main",
"committer_date": 1626629895000,
"content_id": "0c32aec1f6944f137a4fae76a1074cc14403f34c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5b36d4a74aa33760d96f9f1e1fdc3457a3d6c23f",
"extension": "py",
... | 2.359375 | stackv2 | import string
from fastapi import FastAPI, HTTPException
from recipe_scrapers import scrape_me
from recipe_scrapers._exceptions import WebsiteNotImplementedError
from base64 import b64encode, b64decode
import logging
from .routers import units
from .database import crud, models, schemas
from .database.db import Sess... | 80 | 27.18 | 73 | 17 | 468 | python | [{"finding_id": "codeql_py/log-injection_4128e9b0a7eb986f_b355f84d", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
32
] | [
null
] | [
14
] | [
17
] | |
2024-11-18T22:43:44.151146+00:00 | 1,571,052,081,000 | 78d3594c1555c610171973fda7afb2da5aa522c9 | 2 | {
"blob_id": "78d3594c1555c610171973fda7afb2da5aa522c9",
"branch_name": "refs/heads/master",
"committer_date": 1571052081000,
"content_id": "3d5c8daeba36e50326e8333495575899bed7aaae",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "12c428f34ed3a1ff195b4012de8c84e603974a37",
"extension": "py"... | 2.5 | stackv2 | """
Copyright (C) 2017 Extreme Networks. All rights reserved.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE L... | 111 | 36.03 | 85 | 14 | 921 | python | [{"finding_id": "codeql_py/request-without-cert-validation_a8d70aca4b12b607_a1985dd0", "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)."
] | [
36,
65
] | [
39,
70
] | [
20,
20
] | [
26,
26
] | |
2024-11-18T22:43:49.218592+00:00 | 1,527,403,885,000 | a771b1bee055592be8f5f3b6d0609c7caf663856 | 2 | {
"blob_id": "a771b1bee055592be8f5f3b6d0609c7caf663856",
"branch_name": "refs/heads/master",
"committer_date": 1527403885000,
"content_id": "b25e3e684473292fafec41727f2744dd089a816b",
"detected_licenses": [
"MIT"
],
"directory_id": "3e09fe4657a0a1d6c2fcb6894863f55a0fac9da7",
"extension": "py",
"fi... | 2.3125 | stackv2 | from project import app
from flask import json,render_template
from flask import request,jsonify,make_response,send_from_directory
from flask import Flask
from flask_cors import CORS,cross_origin
import pymongo
import os
from flask import Flask, request, redirect, url_for
from werkzeug.utils import secure_filename
UPL... | 134 | 31.88 | 126 | 19 | 905 | python | [{"finding_id": "codeql_py/url-redirection_9db6817de3845164_49ed245b", "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)."
] | [
51
] | [
null
] | [
29
] | [
40
] | |
2024-11-19T00:07:08.056975+00:00 | 1,597,413,127,000 | 58e12eb7665f6f560570948da4376ddee09e4ab8 | 2 | {
"blob_id": "58e12eb7665f6f560570948da4376ddee09e4ab8",
"branch_name": "refs/heads/master",
"committer_date": 1597413127000,
"content_id": "1faa6936083a3eee3d038cbc39bd671806439940",
"detected_licenses": [
"BSD-4-Clause-UC",
"BSD-2-Clause"
],
"directory_id": "bfc1c954fd42e3bfc464eb951aedd2067b257... | 2.46875 | stackv2 | """
.. module:: helpers
:platform: Unix, Windows
:synopsis: Cilantropy helpers entry-point.
:mod:`helpers` -- Cilantropy helpers entry-point
==================================================================
"""
try:
reload
except NameError:
from importlib import reload
import os
import sys
import json... | 324 | 26.15 | 90 | 20 | 2,048 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_aa3f355eddff1fa3_f16ffc7c", "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."
] | [
220
] | [
null
] | [
20
] | [
41
] | |
2024-11-19T00:07:16.703626+00:00 | 1,602,481,230,000 | 569ad5d48fdd0d3776f2ee33cc351b23d5bd8e46 | 3 | {
"blob_id": "569ad5d48fdd0d3776f2ee33cc351b23d5bd8e46",
"branch_name": "refs/heads/main",
"committer_date": 1602481230000,
"content_id": "b135fc96140adf49925cc4a0250e5c6fe370da1c",
"detected_licenses": [
"MIT"
],
"directory_id": "d174533d4d891763f4947a5b4bb7ff60f47f99f5",
"extension": "py",
"file... | 3.25 | stackv2 | from typing import List, Optional
from good import Good
from govt import Govt
from person import Person
class Universe:
__govt: Govt
__people: List[Person]
def __init__(self):
starting_goods = ['sugar', 'rice', 'oil']
person_id_to_starting_salaries = {
1: 100,
2: ... | 50 | 29.56 | 74 | 13 | 360 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_50a593bc16d09855_5650e455", "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."
] | [
34
] | [
null
] | [
19
] | [
72
] | |
2024-11-19T00:33:33.069540+00:00 | 1,562,307,820,000 | c6e62c3a56fcc50e91a8eee00651ad13e9116622 | 3 | {
"blob_id": "c6e62c3a56fcc50e91a8eee00651ad13e9116622",
"branch_name": "refs/heads/master",
"committer_date": 1562307820000,
"content_id": "090ffd6abb20d8ff212ce39769439ff0ce29866b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "337396f6959288c9fed7ddc79d3f266055f4e396",
"extension": "py"... | 2.796875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import webapp2
from google.appengine.api import urlfetch
import json
import jinja2
templateLoader = jinja2.FileSystemLoader(searchpath="templates/") # このディレクトリーからテンプレートを読み込む設定が含まれているオブジェクトを作る。
templateEnv = jinja2.Environment(loader=templateLoader) # テンプレートを上のtemplateLoad... | 57 | 40.18 | 131 | 18 | 740 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_8689b1d61d4e45e5_c19e72a0", "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."
] | [
10
] | [
null
] | [
15
] | [
56
] | |
2024-11-19T00:34:18.942152+00:00 | 1,632,880,075,000 | f4ac309b4e70c210b7a4d81235b18e36fd09d630 | 2 | {
"blob_id": "f4ac309b4e70c210b7a4d81235b18e36fd09d630",
"branch_name": "refs/heads/master",
"committer_date": 1632880075000,
"content_id": "43425049eb63e7c5e683dfb2a5af74102154a921",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "388750f05c5a1c8f26ae38a29587f8be9569b9c1",
"extension": "py"... | 2.40625 | stackv2 | #!/usr/bin/env python
import sys
import yaml
import getpass
import argparse
import jinja2
import os
from ansible.parsing.vault import VaultEditor, VaultSecret, is_encrypted
from generate_example_from_schema import ExampleFileGenerator
from builtins import str
DEPLOYMENT_DIR = 'deployments'
class VaultYaml(str):
... | 105 | 33.53 | 79 | 19 | 720 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e7a6cf140a1f9263_9ec2f15b", "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."
] | [
66
] | [
null
] | [
20
] | [
50
] | |
2024-11-19T00:05:00.545554+00:00 | 1,677,631,350,000 | 70a4d2401a427fbc82131cc6f71979031ee02df3 | 4 | {
"blob_id": "70a4d2401a427fbc82131cc6f71979031ee02df3",
"branch_name": "refs/heads/main",
"committer_date": 1677631350000,
"content_id": "9a2e532d8fc0a8ea8b755d975874db1964634a38",
"detected_licenses": [
"MIT"
],
"directory_id": "ccb80419b0052826afed62b945b330f9a12627f5",
"extension": "py",
"file... | 3.984375 | stackv2 | """
Author: Joshua Turner (https://github.com/joshua-matt)
Problem 79 (projecteuler.net/problem=79)
========================================
Problem Statement:
-----------------
A common security method used for online banking is to ask the user for three random characters from a passcode.
For example, if the passcod... | 56 | 46.23 | 155 | 15 | 635 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3f6bb9b9d35c84d7_8d787ba8", "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."
] | [
55
] | [
null
] | [
7
] | [
32
] | |
2024-11-18T23:05:33.804096+00:00 | 1,594,297,471,000 | 7fa157e110d0098439028f7dafb4588c15200f61 | 3 | {
"blob_id": "7fa157e110d0098439028f7dafb4588c15200f61",
"branch_name": "refs/heads/master",
"committer_date": 1594297471000,
"content_id": "033eea0eb83890f0e9e1d3e166f5320dc1be13e5",
"detected_licenses": [
"MIT"
],
"directory_id": "813c2a273a6c973d358d38e6016da7f8a7e5d840",
"extension": "py",
"fi... | 3.21875 | stackv2 | import requests
import dotenv
import os
class API(object):
"""A simple wrapper to interact with web apis
Usage:
mapbox_api= API('https://api.mapbox.com/isochrone/v1/mapbox')
options = {'/driving':None,
'%2C':[lng, lat],
'?contours_minutes':'%2c'.join(['5', '10', '15', '20']),... | 86 | 22.06 | 68 | 16 | 493 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b7b19b9a85db8693_fa1330e0", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
45
] | [
null
] | [
15
] | [
26
] | |
2024-11-18T23:43:00.198377+00:00 | 1,608,161,294,000 | af610ae0f42b68ad179843d794cd459b0f75bcdc | 3 | {
"blob_id": "af610ae0f42b68ad179843d794cd459b0f75bcdc",
"branch_name": "refs/heads/main",
"committer_date": 1608161294000,
"content_id": "60ff5ef4bea5ac5c4bde0261b7d5e5f537c35f84",
"detected_licenses": [
"MIT"
],
"directory_id": "aa94e1bf6496ec584d6333e4e7579e08a1d772b2",
"extension": "py",
"file... | 3.0625 | stackv2 | import turtle
import urllib.request
import json
## Trace the ISS - earth-orbital space station
eoss = 'http://api.open-notify.org/iss-now.json'
## Call the webserv
trackiss = urllib.request.urlopen(eoss)
## put into file object
ztrack = trackiss.read()
## JSON 2 Python data structure
result = json.loads(ztrack.decod... | 46 | 23.2 | 76 | 9 | 286 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2cdcd7dd8d4e5d10_5fdbdfaf", "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."
] | [
24,
25
] | [
null,
null
] | [
23,
22
] | [
26,
25
] | |
2024-11-19T01:21:40.054466+00:00 | 1,518,335,697,000 | 784dede298f761e03e05c0674fe17a91ae0bc10d | 3 | {
"blob_id": "784dede298f761e03e05c0674fe17a91ae0bc10d",
"branch_name": "refs/heads/master",
"committer_date": 1518335697000,
"content_id": "3cdfc96bffb720e493e6c3ce55f05dcc1ff299cf",
"detected_licenses": [
"MIT"
],
"directory_id": "1f1c5ffab001852677030e1fd745d6ac426554ad",
"extension": "py",
"fi... | 3.03125 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
模块:Web App
版本:V1.0
模式:异步HTTP
架构:使用aiohttp库中的web模块
功能:V1.0 创建一个简单的Web应用, 访问127.0.0.1:6789,返回一个Hello World!的页面
1. 首先创建一个Application对象. 使用web.Application()函数
2. 向Application对象中添加路由信息. GET方法, PATH='\', 处理函数为index
3. 运行Application.web.run_app()函数. 执... | 31 | 22.77 | 97 | 9 | 282 | python | [{"finding_id": "codeql_py/log-injection_20b71a0e7288589c_dde652d0", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
25
] | [
null
] | [
18
] | [
25
] | |
2024-11-19T00:11:32.949902+00:00 | 1,607,011,170,000 | 3acd8d9e5cd582c72ac5c8a7749c3d5aa75f9bf0 | 3 | {
"blob_id": "3acd8d9e5cd582c72ac5c8a7749c3d5aa75f9bf0",
"branch_name": "refs/heads/main",
"committer_date": 1607011170000,
"content_id": "ff72321b65d95d153cbdcb12f9a99c4fe889797c",
"detected_licenses": [
"MIT"
],
"directory_id": "2643dbc5eae2e1af62ddc0e40ac9ea3935c1b359",
"extension": "py",
"file... | 2.5625 | stackv2 | """Main file for FastAPI application."""
from html import escape
from random import choice
from typing import Dict
from fastapi import FastAPI, Request
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from jinja2 import Environment, e... | 96 | 36.07 | 108 | 18 | 806 | python | [{"finding_id": "codeql_py/stack-trace-exposure_afc84f1efbe90893_6d3542bc", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 4 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/jinja2/autoescape-false"
] | [
"HIGH",
"HIGH",
"HIGH",
"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.",
"Using jinja2 templates w... | [
61,
78,
84,
53
] | [
null,
null,
null,
null
] | [
16,
20,
16,
18
] | [
55,
26,
56,
31
] | |
2024-11-19T00:11:35.845565+00:00 | 1,572,005,137,000 | 78126ffc761522597fb4e72cb39bb6c28e1ea516 | 2 | {
"blob_id": "78126ffc761522597fb4e72cb39bb6c28e1ea516",
"branch_name": "refs/heads/master",
"committer_date": 1572005137000,
"content_id": "a3db38e8680fc2b629f775bc0b372ddb7bff4e1b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ed70049281f46b4d6073866c3cb8a405c6bebb78",
"extension": "py"... | 2.453125 | stackv2 | from re import match, compile
from urllib.parse import parse_qsl, urlsplit
rlink = compile(r'<(.*?)>(.*?)rel="([A-z\s]*)"(.*?)(?:$|(?:,))')
assignations = compile(r'([A-z]*?)="(.*?)"')
def parse(link_header):
links = {}
for match in rlink.finditer(link_header):
parsed_content = {}
link = matc... | 24 | 33.54 | 64 | 15 | 219 | python | [{"finding_id": "codeql_py/overly-large-range_9f7b12d9d34bc733_fccd5fa1", "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-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
4,
5
] | [
null,
null
] | [
38,
28
] | [
41,
31
] | |
2024-11-19T00:11:40.001583+00:00 | 1,616,034,830,000 | ad911ea9b8567b0996a5c5828fe7ff09cb1a3a05 | 3 | {
"blob_id": "ad911ea9b8567b0996a5c5828fe7ff09cb1a3a05",
"branch_name": "refs/heads/master",
"committer_date": 1616034830000,
"content_id": "2494c6368a429445a8bed3d4366d08e7ace3f044",
"detected_licenses": [
"MIT"
],
"directory_id": "2872eb01f950f4e589836d858b5a060b84c941dd",
"extension": "py",
"fi... | 2.859375 | stackv2 | import os
import shutil
import pprint
import jsonref
import pandas as pd
import numpy as np
import pydicom
from pathlib import Path
from logs import logDecorator as lD
# ----------------------------------
config = jsonref.load(open("../config/config.json"))
logBase = config["logging"]["logBase"] + ".modules.extractD... | 395 | 30.28 | 90 | 25 | 2,810 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0e04680b080a3bb3_9d22b59e", "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... | 9 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (priva... | [
72,
84,
88,
100,
104,
129,
133,
145,
149
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
23,
27,
27,
27,
27,
31,
31,
31,
31
] | [
45,
49,
54,
49,
54,
53,
58,
53,
58
] | |
2024-11-19T00:37:01.409339+00:00 | 1,631,295,913,000 | 6ec4f0750838406e41a4dc9f30feb29d02356772 | 4 | {
"blob_id": "6ec4f0750838406e41a4dc9f30feb29d02356772",
"branch_name": "refs/heads/master",
"committer_date": 1631295913000,
"content_id": "e35106ac7deb3677cce7bae97ff098422761ac4f",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "4016e9c2e766c012c760de375291cb33343e6048",
"extension": "p... | 3.75 | stackv2 | # Account class
# Errors indicated by "raise" statements
# Define a custom exception
class AbortTransaction(Exception):
'''raise this exception to abort a bank transaction'''
pass
class Account():
def __init__(self, name, balance, password):
self.name = name
self.balance = self.validateAmo... | 48 | 31.69 | 92 | 13 | 303 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c24203a16ce02f36_253c9233", "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."
] | [
48
] | [
null
] | [
35
] | [
48
] | |
2024-11-19T00:37:04.233295+00:00 | 1,667,605,317,000 | 9beee682a93e31b827b3bbdca398241fd32646d7 | 3 | {
"blob_id": "9beee682a93e31b827b3bbdca398241fd32646d7",
"branch_name": "refs/heads/master",
"committer_date": 1667605317000,
"content_id": "e56358843685e84fd069ed93d59b3613fcfaf736",
"detected_licenses": [
"MIT"
],
"directory_id": "d9e0c0b6a9f904de83e341e81e2f3d7574348f00",
"extension": "py",
"fi... | 2.640625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
@author: Andre Poley
@contact: andre.poley@mailbox.org
@copyright: (c) 2019 by Andre Poley, Berkeley
@license: MIT
@version: 0.0.5
@summary: Write input data to an influxdb
'''
import socket
import sys
import logging
import requests
def prepare_data(log):
""" Prep... | 72 | 31.46 | 104 | 14 | 577 | python | [{"finding_id": "codeql_py/request-without-cert-validation_419d8c7cda26055c_eef83040", "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)."
] | [
45
] | [
51
] | [
9
] | [
77
] | |
2024-11-19T01:02:13.352767+00:00 | 1,607,540,067,000 | 1121382c682e8b29715a4b53539597781b7bc476 | 4 | {
"blob_id": "1121382c682e8b29715a4b53539597781b7bc476",
"branch_name": "refs/heads/main",
"committer_date": 1607540067000,
"content_id": "e58526070db99bae5d80769a113ca3b486e961ff",
"detected_licenses": [
"MIT"
],
"directory_id": "0ae894af4d045449edb6fee0a2d70e5d9ec7e6f5",
"extension": "py",
"file... | 3.546875 | stackv2 | import re
with open("input.txt") as f:
lines = f.readlines()
passwords = []
for line in lines:
match = re.match(r"(\d*)-(\d*) (.): (.*)", line)
passwords.append({
"character": match.group(3),
"minOccur": int(match.group(1)),
"maxOccur": int(match.group(2)... | 22 | 28.45 | 91 | 15 | 156 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e347e76b85858bf4_f4b6d846", "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."
] | [
22
] | [
null
] | [
7
] | [
25
] | |
2024-11-19T01:02:16.676859+00:00 | 1,630,418,581,000 | 7183b5c477eeb7bf91df78adc641258fc1642393 | 3 | {
"blob_id": "7183b5c477eeb7bf91df78adc641258fc1642393",
"branch_name": "refs/heads/master",
"committer_date": 1630418581000,
"content_id": "d93735b0a5f73c85fc5cefda1fc54a00e20abc63",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9dcb39ce96ac28a1ea9d633c97a1bebfc689bf64",
"extension": "py"... | 3.125 | stackv2 | # -*- coding=utf-8 -*-
import MySQLdb
# 获得数据库连接
def getcon():
# 打开数据库连接
db = MySQLdb.connect("127.0.0.1", "root", "123456", "original_article_database", charset='utf8')
return db
# 关闭数据库连接
def closecon(db):
db.close()
# 创建表格操作
# 数据查询操作
def baseselect(db, sql):
cursor = db.cursor()
try:
... | 70 | 20.46 | 100 | 14 | 496 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_906a5095432c0c5c_7f52fc38", "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."
] | [
66
] | [
null
] | [
19
] | [
97
] | |
2024-11-19T01:02:17.391750+00:00 | 1,382,755,624,000 | 9ea9e03a1201b5bfb79c6f6a97577d86561cf0e8 | 2 | {
"blob_id": "9ea9e03a1201b5bfb79c6f6a97577d86561cf0e8",
"branch_name": "refs/heads/master",
"committer_date": 1382755624000,
"content_id": "31d55baad647ca09c39b957e49a19666c7237bdf",
"detected_licenses": [
"MIT"
],
"directory_id": "f945510bcbb0fb66393e1c0193a182d8b598cc77",
"extension": "py",
"fi... | 2.375 | stackv2 | # encoding: utf-8
from gevent import pool
import requests
import npyscreen
import pickle
import os.path
import time
class RebMaControl:
def __init__(self, repoListUrl):
self.dumpFileName_repo = "./.repoList.bin"
self.repoListUrl = repoListUrl
try:
if (os.path.isfile(self.dumpFileName_repo) and time.time() ... | 63 | 27.14 | 113 | 20 | 482 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_78a3b299bec0aef0_e03c4873", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com](1) may be at an arbitrary position in the ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [github.com](1) may be at an arbitrary position in the sanitized URL."
] | [
31
] | [
null
] | [
8
] | [
37
] | |
2024-11-19T01:51:49.692760+00:00 | 1,385,429,012,000 | a40d08b70b0533cfa6ffad6adba05e3e3f69a87a | 2 | {
"blob_id": "a40d08b70b0533cfa6ffad6adba05e3e3f69a87a",
"branch_name": "refs/heads/master",
"committer_date": 1385429012000,
"content_id": "fb7b2d11d649f8240efcba94a049304120456dd8",
"detected_licenses": [
"MIT"
],
"directory_id": "dadf95af6b485f2734c371930339125bee8fa398",
"extension": "py",
"fi... | 2.46875 | stackv2 | from __future__ import division
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import time, re, datetime
import jinja2
import os
import json
import math
import numpy
jinja_environment = jinja2.Environment(loader=jinja2.FileSystem... | 370 | 29.44 | 172 | 17 | 2,994 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_de42170c474ce79a_f5cbee7a", "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."
] | [
12
] | [
null
] | [
21
] | [
98
] | |
2024-11-19T00:55:24.334393+00:00 | 1,535,906,041,000 | 92e2c38b8a77ad63818636aa9d97af56dbb7a46f | 2 | {
"blob_id": "92e2c38b8a77ad63818636aa9d97af56dbb7a46f",
"branch_name": "refs/heads/master",
"committer_date": 1535906041000,
"content_id": "e17bb8a958e6e05411aabadbf040d4602271cf93",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "714d9859d9c7c33b4cbe83a1afe26811c0a89cfb",
"extension": "py"... | 2.390625 | stackv2 | import argparse
import os
import sys
import yaml
from jinja2 import Environment, PackageLoader
from qpropgen import DESCRIPTION
NO_CONST_REF_ARG_TYPES = {'int', 'bool', 'qreal'}
AUTOGENERATED_DISCLAIMER = 'This file has been generated with qpropgen, any' \
' changes made to it will be lost!'
HEADER_EXT = '.h'... | 126 | 26.82 | 78 | 14 | 788 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f4d1dea1c5dab02f_8c0a5acc", "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."
] | [
114
] | [
null
] | [
11
] | [
69
] | |
2024-11-19T00:55:24.567650+00:00 | 1,542,723,047,000 | 2f564302ba821a090e9c8ba8fdec65b64a993cab | 2 | {
"blob_id": "2f564302ba821a090e9c8ba8fdec65b64a993cab",
"branch_name": "refs/heads/master",
"committer_date": 1542723047000,
"content_id": "1645a668eb8b9185d7f22bfb9991353f431d672a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e27d89c7103ff2644b156f003cd9c8bf99bbbbec",
"extension": "py"... | 2.375 | stackv2 | from __future__ import absolute_import
# Import python libs
import logging
import os
try:
import paramiko
HAS_PARAMIKO = True
except:
HAS_PARAMIKO = False
# Import Salt libs
import salt.config
import salt.wheel
LOG = logging.getLogger(__name__)
def __virtual__():
'''
Only load if paramiko libr... | 109 | 31.81 | 103 | 16 | 852 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_e4610a220c5629f9_ecb371c6", "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."
] | [
57
] | [
null
] | [
9
] | [
66
] | |
2024-11-19T01:40:02.775174+00:00 | 1,518,181,152,000 | 4dfc4ce721d94ff0596b8ffd34ab6becb356717e | 4 | {
"blob_id": "4dfc4ce721d94ff0596b8ffd34ab6becb356717e",
"branch_name": "refs/heads/master",
"committer_date": 1518181152000,
"content_id": "beb0b9955fab112ae72aeb7d02e6adb4e8ee851b",
"detected_licenses": [
"MIT"
],
"directory_id": "2e55184deb2f57a1af5f4c70e8934af4831647e6",
"extension": "py",
"fi... | 3.875 | stackv2 | # 9-4
class Restaurant:
def __init__(self, name, cuisine_type):
self.restaurant_name = name
self.cuisine_type = cuisine_type
self.number_served = 0
def describe_restaurant(self):
print('\nRestaurant name: ' + self.restaurant_name.title())
print('Cuisine type: ' + self.c... | 71 | 28.3 | 67 | 15 | 487 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c6bc732d9e6a241a_33903a0e", "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."
] | [
49
] | [
null
] | [
15
] | [
52
] | |
2024-11-18T23:43:10.220573+00:00 | 1,679,855,364,000 | bfc7f289c91e38c918d1e60700e121359b57b6fe | 3 | {
"blob_id": "bfc7f289c91e38c918d1e60700e121359b57b6fe",
"branch_name": "refs/heads/master",
"committer_date": 1679855364000,
"content_id": "948b0f47ba003a3dde78860911da222f3b16984f",
"detected_licenses": [
"MIT"
],
"directory_id": "67ef5a6a853629ea64638fb788394f6c1b3eaf25",
"extension": "py",
"fi... | 2.8125 | stackv2 | import argparse
import gpxpy
import gpxpy.gpx
import datetime
import pprint
pp = pprint.PrettyPrinter(indent = 4)
class GpxError(Exception):
pass
def view():
with open('/home/henry/Downloads/track_march_02.gpx', 'r') as gpx_file:
gpx = gpxpy.parse(gpx_file)
for track in gpx.tracks:
for s... | 243 | 38.63 | 99 | 23 | 2,286 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_160969b5da5fd0f9_b73d219a", "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."
] | [
20
] | [
21
] | [
27
] | [
74
] | |
2024-11-19T00:33:02.011778+00:00 | 1,513,963,575,000 | b1504095cabec7b6bb19d01315c03c20c8fea4af | 3 | {
"blob_id": "b1504095cabec7b6bb19d01315c03c20c8fea4af",
"branch_name": "refs/heads/master",
"committer_date": 1513963575000,
"content_id": "f68c16951a1beaeba650d51c95680b8ed92de8f8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "96be9087499bd91580218fe43926612155615263",
"extension": "py"... | 2.890625 | stackv2 | from enum import Enum
from src.db import Database
class OrderType(Enum):
AUTHOR = 1
TOTAL = 2
ACTIVE_TOTAL = 3
ACTIVE_NON_REPEALS_TOTAL = 4,
ACTIVE_REPEALS_TOTAL = 5,
REPEALED_TOTAL = 6
def generate_author_index(db: Database):
bbcode = ''
authors = db.authors[:]
authors.extend(... | 247 | 36.77 | 79 | 24 | 2,476 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f6818da76434859b_ecfa5798", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw... | [
225
] | [
null
] | [
11
] | [
17
] | |
2024-11-19T01:18:01.052834+00:00 | 1,692,453,874,000 | 6236de9ac3cf85c4a8ba771c8d906a35881ebdaf | 3 | {
"blob_id": "6236de9ac3cf85c4a8ba771c8d906a35881ebdaf",
"branch_name": "refs/heads/master",
"committer_date": 1692453874000,
"content_id": "81dae1191dcf53fa4e61b59f91d1bbb5301605a9",
"detected_licenses": [
"MIT"
],
"directory_id": "d05c946e345baa67e7894ee33ca21e24b8d26028",
"extension": "py",
"fi... | 2.9375 | stackv2 | import shodan
import time
import requests
import re
# your shodan API key
SHODAN_API_KEY = '<YOUR_SHODAN_API_KEY_HERE>'
api = shodan.Shodan(SHODAN_API_KEY)
# requests a page of data from shodan
def request_page_from_shodan(query, page=1):
while True:
try:
instances = api.search(query, page=pag... | 77 | 35.08 | 104 | 15 | 673 | python | [{"finding_id": "codeql_py/request-without-cert-validation_5ef473e4ff9b1ca8_9db8d240", "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)."
] | [
27,
35
] | [
null,
41
] | [
15,
11
] | [
101,
6
] | |
2024-11-19T01:18:10.505334+00:00 | 1,540,818,126,000 | 4f485f82b8035ef05c5af9c800fb001c1e191591 | 3 | {
"blob_id": "4f485f82b8035ef05c5af9c800fb001c1e191591",
"branch_name": "refs/heads/master",
"committer_date": 1540818126000,
"content_id": "5826c1352c7e748cc0b8216c1fb7876902b50655",
"detected_licenses": [
"MIT"
],
"directory_id": "6e382ff21cd0a15c041114967f719689c9535bcb",
"extension": "py",
"fi... | 2.765625 | stackv2 | #! /Users/hugo/anaconda3/bin/python
""" Main compilation module
"""
import os
import json
import argparse
from jinja2 import Environment, FileSystemLoader
from renderer import Renderer
BASE_DIR = 'scala/src/main/scala/core/'
TEMPLATE_NAME = 'MainTemplate.scala.template'
def run(spec: str, template_dir: str, output_... | 82 | 32.07 | 78 | 13 | 522 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_67dd83010d3fc0c2_5c5e4452", "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."
] | [
39
] | [
null
] | [
17
] | [
63
] | |
2024-11-19T01:54:18.369809+00:00 | 1,591,648,726,000 | 1e4f1a5f7f1a942a90ea8560d38a57cff0ba955c | 2 | {
"blob_id": "1e4f1a5f7f1a942a90ea8560d38a57cff0ba955c",
"branch_name": "refs/heads/master",
"committer_date": 1591648726000,
"content_id": "f056535df2098c02db17658a4d492b4ac70b36eb",
"detected_licenses": [
"MIT"
],
"directory_id": "55e0541bbe70a5af322ce109c1f40d0820a6b074",
"extension": "py",
"fi... | 2.390625 | stackv2 | import requests
from django.shortcuts import render
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
class UsersPosts(APIView):
def get(self, request, format=None):
email = request.GET.get('email')
response_user = requests.get(... | 23 | 43.39 | 105 | 15 | 202 | python | [{"finding_id": "codeql_py/partial-ssrf_e3c9c2fddd363d56_ddfbbe94", "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)."
] | [
11,
16
] | [
null,
null
] | [
25,
30
] | [
98,
106
] | |
2024-11-19T00:15:31.039718+00:00 | 1,540,469,245,000 | ed7d81ffc1dc90d77b16ec0bed942f30881abc5a | 2 | {
"blob_id": "ed7d81ffc1dc90d77b16ec0bed942f30881abc5a",
"branch_name": "refs/heads/master",
"committer_date": 1540469245000,
"content_id": "63e9d5bb3b7791bb0988873fa11edf0130f62e73",
"detected_licenses": [
"MIT"
],
"directory_id": "5c36cf1f219f8a4f665f68346951d8f92b40eb28",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
# -*- mode: Python; tab-width: 4; indent-tabs-mode: nil; -*-
# ex: set tabstop=4 softtabstop=1 shiftwidth=4 expandtab:
# Please do not change the two lines above. See PEP 8, PEP 263.
'''Tanium Software Management Tool
This is a proof of concept showing how to use the following workflow using Tani... | 454 | 30.23 | 95 | 14 | 3,250 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_91455c2d6188a29b_33e45f43", "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."
] | [
177
] | [
null
] | [
27
] | [
96
] | |
2024-11-19T00:25:26.901165+00:00 | 1,616,319,793,000 | a087d30b0f2d70b409a3ea54f0a1bb2702bdfefb | 2 | {
"blob_id": "a087d30b0f2d70b409a3ea54f0a1bb2702bdfefb",
"branch_name": "refs/heads/main",
"committer_date": 1616319793000,
"content_id": "0920200b7754a25c0705a9b48a430b1a0d9c5167",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3a33553be868b376b95d7929d0e69fcab08e73d2",
"extension": "py",
... | 2.484375 | stackv2 | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.hashers import check_password
from .models import User
# not using
class EmailAuthBackend(ModelBackend):
def authenticate( request=None, **kwargs):
email = kwargs['email']
password = kwargs['password']
try:
... | 21 | 29.29 | 62 | 15 | 113 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3babf509058d0d03_fa9b3f2c", "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."
] | [
18,
19
] | [
null,
null
] | [
23,
23
] | [
31,
36
] | |
2024-11-19T00:25:36.173874+00:00 | 1,497,246,899,000 | 663a99901f45e6e3926eb913e3076ef570da9234 | 4 | {
"blob_id": "663a99901f45e6e3926eb913e3076ef570da9234",
"branch_name": "refs/heads/master",
"committer_date": 1497246899000,
"content_id": "2d373b4ad5acb25372312662f936a4b9444821b2",
"detected_licenses": [
"MIT"
],
"directory_id": "8f6b3db991a29f27472d24f0007fd43bd512949b",
"extension": "py",
"fi... | 3.515625 | stackv2 | """
Arthur Dooner
Advent of Code Day 5
Challenge 1
"""
import sys
import hashlib
def md5_func(string):
md5result = hashlib.md5()
md5result.update(string.encode('utf-8'))
return md5result.hexdigest()
INTEGER_ID = 0
PASSWORD = ""
if len(sys.argv) < 2:
print("Please pass the puzzle input as a command l... | 30 | 19.3 | 69 | 11 | 178 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dc52b8f89784bfdf_f05c848d", "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."
] | [
29
] | [
null
] | [
7
] | [
49
] | |
2024-11-19T01:02:48.743423+00:00 | 1,561,182,784,000 | 180244f21ec537481a3bc49c78078288604a8c95 | 2 | {
"blob_id": "180244f21ec537481a3bc49c78078288604a8c95",
"branch_name": "refs/heads/master",
"committer_date": 1561182784000,
"content_id": "42131eb4f9315e18845627ae2a9b551c5fdd697e",
"detected_licenses": [
"MIT"
],
"directory_id": "7f3ece2b53e3d05d24bd3dbcc78a2f48d9cb5f94",
"extension": "py",
"fi... | 2.34375 | stackv2 | from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from contribution_guide.models import ContributionGuide
from contribution_guide.serializers import ContributionGuideSerializer
from datetime import date, datetime, timezone
import requests
import os
f... | 111 | 34.08 | 79 | 17 | 759 | python | [{"finding_id": "codeql_py/partial-ssrf_6119436e43a35842_2b965e5f", "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).\nPart of the URL of this request depen... | 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).\nPart of the URL of this request depends on a [user-provided value](2).\nPart of the URL of this request depends on a [user-provided value](3).\nPart of the URL of this request depends on a [user-provided value](4).",
"Part of the URL of this... | [
103,
109
] | [
104,
110
] | [
22,
26
] | [
47,
51
] | |
2024-11-19T01:02:51.025320+00:00 | 1,599,480,058,000 | 74570a15a2ee6bb265c747f1ca80c7745bc8e379 | 3 | {
"blob_id": "74570a15a2ee6bb265c747f1ca80c7745bc8e379",
"branch_name": "refs/heads/master",
"committer_date": 1599480058000,
"content_id": "00cfa7d128f641ae2461a4d8587eba2f55027f54",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b56bec9b00ccc6e5fbb64402eeaf71d72c10327b",
"extension": "py"... | 2.65625 | stackv2 | """
Dummy permissions server
We hard-code the dataset permissions.
"""
import logging
import os
from logging.config import dictConfig
from pathlib import Path
import yaml
from aiohttp import web
from aiohttp import ClientSession, BasicAuth, FormData
LOG = logging.getLogger(__name__)
# Dummy permission database
PE... | 124 | 30.25 | 124 | 18 | 909 | python | [{"finding_id": "codeql_py/log-injection_01fec37a132de8cf_235b72ee", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 3 | true | [
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
37,
86,
89
] | [
null,
null,
null
] | [
28,
36,
41
] | [
40,
45,
59
] | |
2024-11-19T00:16:08.806204+00:00 | 1,502,258,306,000 | d96ab87d49e8fb2169cb96a3edbf3e867d62e478 | 2 | {
"blob_id": "d96ab87d49e8fb2169cb96a3edbf3e867d62e478",
"branch_name": "refs/heads/master",
"committer_date": 1502258306000,
"content_id": "bd5df2c01aa18548173e86e4f0d369735ba75ad4",
"detected_licenses": [
"MIT"
],
"directory_id": "a202accd238ad04107178adf5c27374af4ab2511",
"extension": "py",
"fi... | 2.375 | stackv2 | # coding: utf-8
from __future__ import with_statement
import os
import codecs
from operator import itemgetter
from datetime import datetime
from urlparse import urljoin
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
from markdown import Markdown
import dateutil.parse... | 105 | 34.03 | 99 | 17 | 827 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_c960b6b8b3622d55_d50360ec", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
56
] | [
57
] | [
11
] | [
60
] | |
2024-11-19T00:28:38.720322+00:00 | 1,691,737,665,000 | 32842dd0c6cd8a00520034830fae9dcaf7cfc194 | 2 | {
"blob_id": "32842dd0c6cd8a00520034830fae9dcaf7cfc194",
"branch_name": "refs/heads/master",
"committer_date": 1691737665000,
"content_id": "1310485430b79d357ca491c676d612488982c4be",
"detected_licenses": [
"Unlicense"
],
"directory_id": "6dfc23ef65e5943712340ef2b4b648cc25ea1fad",
"extension": "py",... | 2.3125 | stackv2 | from django.shortcuts import render, redirect
from django.contrib import messages
def index(request):
if request.method == 'POST':
print(request.POST['email'])
print(request.POST['password'])
if request.POST['password'] == 'password':
messages.error(request, "Your password isn'... | 23 | 33.17 | 74 | 12 | 145 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0c6c92dd1bf73d2b_ef3081e6", "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."
] | [
7
] | [
null
] | [
15
] | [
39
] | |
2024-11-19T00:28:40.066115+00:00 | 1,579,696,008,000 | 8ddf96a5e3f102cef4be1ff55652fd9e3138626b | 2 | {
"blob_id": "8ddf96a5e3f102cef4be1ff55652fd9e3138626b",
"branch_name": "refs/heads/master",
"committer_date": 1579696008000,
"content_id": "68351f0532b0ece168b9f7f9eb87c8dad0eee465",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "30f30cd1e01d244665c086a4afeeab4679c9eac5",
"extension": "py"... | 2.4375 | stackv2 | import sys
from typing import List
from jinja2 import Template, DebugUndefined
from dataclasses import dataclass, asdict, make_dataclass, field, replace
from easydict import EasyDict as ED
from .replace_utils import rreplace, is_dataclass_instance
from dacite import from_dict
def to_dict(dc):
return ED(asdict(dc))... | 189 | 36.43 | 100 | 18 | 1,633 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_82d7e65d3aa5326e_fb61b1de", "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."
] | [
18
] | [
null
] | [
16
] | [
64
] | |
2024-11-19T01:30:52.563579+00:00 | 1,483,177,312,000 | ea6a618c7216ee5dfc726341abe17dade5fe7e13 | 2 | {
"blob_id": "ea6a618c7216ee5dfc726341abe17dade5fe7e13",
"branch_name": "refs/heads/master",
"committer_date": 1483177312000,
"content_id": "271d1492a2d75194a38bef69e15772142d0bcdef",
"detected_licenses": [
"MIT"
],
"directory_id": "e59d0ce85f6fdcad9dded605c7693ede0f8bf67b",
"extension": "py",
"fi... | 2.34375 | stackv2 | from flask import render_template, request, flash, redirect, url_for, g
from app import app, lm, db
from .forms import LoginForm, UploadPostForm, SignUpForm, PostForm
from .model import User, Post
from flask_login import login_user, logout_user, current_user, login_required
import markdown
from sqlalchemy.exc import In... | 185 | 29.46 | 89 | 16 | 1,254 | python | [{"finding_id": "codeql_py/url-redirection_21d8b54bcdef8847_56aa524e", "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)."
] | [
75
] | [
null
] | [
29
] | [
73
] | |
2024-11-19T01:54:58.427570+00:00 | 1,675,072,731,000 | 13b20a2a2f749a3599065a1559499ee9ef52a9f6 | 3 | {
"blob_id": "13b20a2a2f749a3599065a1559499ee9ef52a9f6",
"branch_name": "refs/heads/master",
"committer_date": 1675072731000,
"content_id": "64615bee788c8ff43affd31ae52d95b39dbd7380",
"detected_licenses": [
"MIT"
],
"directory_id": "6b66bf6254b4e5ed7dac801a0b3093acdc8d90e4",
"extension": "py",
"fi... | 2.765625 | stackv2 | import argparse
import sys
import configparser
import feedparser
import datetime
import delorean
import requests
from bs4 import BeautifulSoup
import mistune
import jinja2
from collections import namedtuple
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# Group the... | 147 | 30.61 | 79 | 15 | 986 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_9d817624777b9b82_96ed2f46", "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."
] | [
93
] | [
null
] | [
12
] | [
42
] | |
2024-11-19T00:53:38.037787+00:00 | 1,555,438,611,000 | a6d5c6aa015136f1ed84109f0b581ea0e2646093 | 3 | {
"blob_id": "a6d5c6aa015136f1ed84109f0b581ea0e2646093",
"branch_name": "refs/heads/master",
"committer_date": 1555438611000,
"content_id": "56ef6078e7420116ef42f5a763f202d9232d5a4f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7e4573ee0c09c6e15493b5550e210561e3a226a5",
"extension": "py"... | 2.640625 | stackv2 | import argparse
import json
import logging
import os
import pprint
import pandas as pd
import requests
API_URL = 'https://earthexplorer.usgs.gov/inventory/json/v/1.4.0/'
def main(username, password, wrs2_tiles, years, csv_folder=os.getcwd(),
months=None):
"""Download filtered Landsat Collection 1 metad... | 315 | 35.23 | 86 | 21 | 2,714 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_316781c8bca76848_03b6e425", "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)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (passw... | [
153,
214
] | [
null,
null
] | [
31,
19
] | [
38,
41
] | |
2024-11-19T02:00:49.345773+00:00 | 1,588,922,308,000 | 2ba097aad7da3b0d5aa03252ed305d42514ff8c1 | 2 | {
"blob_id": "2ba097aad7da3b0d5aa03252ed305d42514ff8c1",
"branch_name": "refs/heads/master",
"committer_date": 1588922308000,
"content_id": "64c2770d32195f7470f5bc6dfcf131128dec1aac",
"detected_licenses": [
"MIT"
],
"directory_id": "ff0024dbe80069c93dbf6de472bc932381d40759",
"extension": "py",
"fi... | 2.4375 | stackv2 | import re, json, random, string
from jinja2 import Environment, FileSystemLoader
from modules.shared.base import APIProcess
from modules.shared.utils import normalize_str
class AwardBotProcess(APIProcess):
def __init__(self, source_version, subreddit_name):
# setup PRAW, db and http session
super(... | 122 | 34.72 | 82 | 18 | 832 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5347b88fbc8988a8_fa425c82", "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
] | [
20
] | [
29
] | [
10
] | |
2024-11-19T02:01:07.575760+00:00 | 1,552,773,288,000 | c796c2d56dc8d4bcd628909deeb81315be50f887 | 3 | {
"blob_id": "c796c2d56dc8d4bcd628909deeb81315be50f887",
"branch_name": "refs/heads/master",
"committer_date": 1552773288000,
"content_id": "2f47a0986acda1f8f4a4d693141ea2d182f3bb23",
"detected_licenses": [
"MIT"
],
"directory_id": "fea9a0aea71c1e4c49c78246faf9f2069b9e5d15",
"extension": "py",
"fi... | 2.734375 | stackv2 | from http.server import BaseHTTPRequestHandler, HTTPServer, SimpleHTTPRequestHandler
import urllib
class MainRequestHandler(BaseHTTPRequestHandler):
"""
The request handler for the admin panel webpage
It reads incoming logs from the Database Updater
"""
def set_manager_dict(self, d):
self.... | 92 | 27.91 | 97 | 18 | 574 | python | [{"finding_id": "codeql_py/path-injection_848634301b734816_3dfc3d67", "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).\nThis path depends on a [user-provided value](2).", "remed... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2)."
] | [
26
] | [
null
] | [
18
] | [
39
] | |
2024-11-19T02:01:07.951580+00:00 | 1,574,499,339,000 | dd47b4eb83ff81277ae59f6bd5787ffe8f5bdb46 | 3 | {
"blob_id": "dd47b4eb83ff81277ae59f6bd5787ffe8f5bdb46",
"branch_name": "refs/heads/master",
"committer_date": 1574499339000,
"content_id": "45b5708c06b1d7ee215c7c75da1d05eaa7ba5021",
"detected_licenses": [
"MIT"
],
"directory_id": "775b5c2683e1d0b1f51e10a4ee0ad716a674f14c",
"extension": "py",
"fi... | 2.65625 | stackv2 | from jinja2 import Template
from IPython.core.display import HTML
import random
import string
import json
import pkgutil
import pandas as pd
def generate_template(data, labels, values, **kwargs):
template = Template(data.decode("utf-8"))
id_name = ''.join(random.choice(string.ascii_lowercase) for i in range(1... | 46 | 37.41 | 79 | 11 | 385 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1669f0c5b2e16150_70d75e30", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
11,
37
] | [
null,
null
] | [
16,
16
] | [
46,
46
] | |
2024-11-19T00:04:17.248917+00:00 | 1,625,492,039,000 | 46b5d3ffab698238c28d078b7556e59b88b6ae62 | 3 | {
"blob_id": "46b5d3ffab698238c28d078b7556e59b88b6ae62",
"branch_name": "refs/heads/master",
"committer_date": 1625492039000,
"content_id": "203f8762cb7102d8ae4d88ee68ff3121ec90fbf3",
"detected_licenses": [
"MIT"
],
"directory_id": "d2fd1860f41e7550c6a37038133d6599bedbc323",
"extension": "py",
"fi... | 3.078125 | stackv2 | import socket
from Crypto.Cipher import AES
from Crypto.Util import number
UDP_IP = "127.0.0.1"
UDP_PORT = 5004
class Client:
#Constructor, we need to add self variable in constructor and methods in order to point to the object.
def __init__(self, localAdress, port):
self.localAdress = localAdress
... | 76 | 44.68 | 107 | 20 | 838 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_db3bee2d0e02fbb7_aff55f67", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text."
] | [
37
] | [
null
] | [
42
] | [
53
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.