added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T23:10:56.750824+00:00 | 1,583,981,717,000 | caef67370111900d7bd936089a28a7218ebb65b7 | 3 | {
"blob_id": "caef67370111900d7bd936089a28a7218ebb65b7",
"branch_name": "refs/heads/master",
"committer_date": 1583981717000,
"content_id": "8df9963c2afff3fc033507b93ccb3e37145dc68e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ca38f3db2adbdae60087dc38461d3f0c59047d30",
"extension": "py"... | 2.8125 | stackv2 | import os
import tempfile
def write_yolo_labels(img, boxes, class_num, labels):
sw = img.shape[0]
sh = img.shape[1]
yolo_text = []
for ind, box in enumerate(boxes):
if not class_num[ind] in labels:
continue
xmin = int(box[0])
ymin = int(box[1])
xmax = int(... | 39 | 21.72 | 65 | 14 | 274 | python | [{"finding_id": "codeql_py/overly-permissive-file_b5fb4df44c72d691_4eb04b9f", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable."
] | [
38
] | [
null
] | [
5
] | [
24
] | |
2024-11-18T23:11:13.539096+00:00 | 1,605,895,664,000 | cb475ecfcb90ff3cbc2aeabfa0a46dad12916fdf | 2 | {
"blob_id": "cb475ecfcb90ff3cbc2aeabfa0a46dad12916fdf",
"branch_name": "refs/heads/master",
"committer_date": 1605895664000,
"content_id": "4e03da2386012c1df425bd84e7e98a1a3ae8f50a",
"detected_licenses": [
"MIT",
"BSD-2-Clause"
],
"directory_id": "3596293489c7933f0e608a5f42aefb4dac5cfa08",
"ext... | 2.34375 | stackv2 | # Copyright 2020 ArcTouch LLC (authored by Thiago Werner at ArcTouch)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | 194 | 38.39 | 179 | 17 | 1,688 | python | [{"finding_id": "codeql_py/overly-large-range_6be84bd7d33c7417_1096bc00", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[0-9:;<=>?@A-F\\].", "remediation": "", "location": {... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[0-9:;<=>?@A-F\\]."
] | [
52
] | [
null
] | [
97
] | [
100
] | |
2024-11-18T22:48:20.873986+00:00 | 1,518,219,657,000 | ba2911f43d53ac0f903fd1e17490825e98393ccf | 3 | {
"blob_id": "ba2911f43d53ac0f903fd1e17490825e98393ccf",
"branch_name": "refs/heads/master",
"committer_date": 1518219657000,
"content_id": "846bb2532edc991ac64bb3abe0244abb88be98de",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7c0361ff5b6a180fa89b48251cfd5494f064f5db",
"extension": "py"... | 2.671875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Script to check Splunk is running on remote *nix systems and start it if not.
Requires paramiko to be installed.
'''
import paramiko
import re
import smtplib
import time
import StringIO
import socket
from email.mime.text import MIMEText
local_host = socket.gethostname... | 106 | 26.21 | 78 | 20 | 785 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_880542e25b3cccbe_1309b1f3", "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."
] | [
76
] | [
null
] | [
2
] | [
59
] | |
2024-11-18T22:48:59.504642+00:00 | 1,634,905,972,000 | 1eccae5977a3e55282d4b7879822b343051308e4 | 3 | {
"blob_id": "1eccae5977a3e55282d4b7879822b343051308e4",
"branch_name": "refs/heads/main",
"committer_date": 1634905972000,
"content_id": "9d90b266518da18941750f2b0771074c15916b0f",
"detected_licenses": [
"MIT"
],
"directory_id": "7517a09cc65bf46f1ba85cc4fd1d14eaacb282f7",
"extension": "py",
"file... | 2.59375 | stackv2 | #!/usr/bin/python3
import os
import shutil
import sys
from PyQt5 import Qt
from PyQt5.QtGui import QImage
from PyQt5.QtWidgets import QApplication, QVBoxLayout, QPushButton, QHBoxLayout, QLineEdit, QComboBox, QFileDialog, \
QMessageBox
from PyQt5.QtWidgets import QLabel, QWidget
from os.path import basename
# Cov... | 236 | 28.67 | 117 | 15 | 1,689 | python | [{"finding_id": "codeql_py/overly-permissive-file_90da42e991049cb9_bb7474bc", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable."
] | [
147
] | [
null
] | [
5
] | [
30
] | |
2024-11-18T22:49:02.080045+00:00 | 1,582,009,058,000 | 260ba402bc27ebe01b757e9f73d0c8ebdb22bd4f | 3 | {
"blob_id": "260ba402bc27ebe01b757e9f73d0c8ebdb22bd4f",
"branch_name": "refs/heads/master",
"committer_date": 1582009058000,
"content_id": "9781fe739e5c3a53317ec31dd2df70f7077ee94d",
"detected_licenses": [
"MIT"
],
"directory_id": "fd8c1f680d936bf4deb46e1bd049d7aca92b6400",
"extension": "py",
"fi... | 2.59375 | stackv2 | #!/usr/bin/env python3
import json
import pathlib
from os import chdir, chmod
class Parse:
def __init__(self, pkg_template):
self.template_dict = self.__parse(pkg_template)
self.template_path = self.__get_pkg_template_abs_path(pkg_template)
chdir(self.template_path)
def __get_pkg_... | 44 | 32.59 | 75 | 15 | 293 | python | [{"finding_id": "codeql_py/overly-permissive-file_649b9b2ad13c32ef_30ba4ff8", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable."
] | [
44
] | [
null
] | [
9
] | [
70
] | |
2024-11-18T22:49:08.457129+00:00 | 1,568,651,045,000 | 55079f457b6e2ceffbc279d48171093e19033755 | 3 | {
"blob_id": "55079f457b6e2ceffbc279d48171093e19033755",
"branch_name": "refs/heads/master",
"committer_date": 1568651045000,
"content_id": "4c856a5037f7e786f2330597ffdad0fa9aec4e88",
"detected_licenses": [
"MIT"
],
"directory_id": "b2aa67ddec166b30ccfda839f303b8f28473bb26",
"extension": "py",
"fi... | 2.75 | stackv2 | import urllib.request,json
from .models_sources import Source
from .models_article import Article
from datetime import datetime
api_key = None
base_sources_url = None
base_articles_url = None
def configure_request(app):
global api_key, base_articles_url, base_sources_url
api_key = app.config['NEWS_API_KEY']
... | 104 | 31.43 | 109 | 12 | 686 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_db2123b3d3ca9ff6_3e3cac46", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
14,
23
] | [
null,
null
] | [
11,
11
] | [
18,
25
] | |
2024-11-18T22:27:26.667161+00:00 | 1,602,526,431,000 | f0a0adadd3e34a510c8ff0eed23b687c1cbd37ff | 3 | {
"blob_id": "f0a0adadd3e34a510c8ff0eed23b687c1cbd37ff",
"branch_name": "refs/heads/main",
"committer_date": 1602526431000,
"content_id": "ebdd92af3468a04b2b22b7d85d3f7ea50c5b2334",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e2176432f37a1afdd9b71cf8c8683042c814d502",
"extension": "py",
... | 2.90625 | stackv2 | from flask import Flask, jsonify
from flask import Response
import uuid
import logging
import bisect
import redis
from redis import exceptions as r_exceptions
app = Flask(__name__)
connection = None
redis_host = "localhost"
redis_port ... | 135 | 28.1 | 151 | 15 | 905 | python | [{"finding_id": "codeql_py/stack-trace-exposure_a28fed7eaec22297_c6452917", "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."
] | [
103
] | [
null
] | [
36
] | [
72
] | |
2024-11-18T22:27:42.743974+00:00 | 1,518,133,705,000 | d9e20608c542ee7651b0c206a46de9ae15a463cd | 3 | {
"blob_id": "d9e20608c542ee7651b0c206a46de9ae15a463cd",
"branch_name": "refs/heads/master",
"committer_date": 1518133705000,
"content_id": "c73d599e41fb7f43a1f8ed7e13c150eca4d0193e",
"detected_licenses": [
"MIT"
],
"directory_id": "2b52723838481e3ef6f8ba20326487dc4086e93b",
"extension": "py",
"fi... | 2.9375 | stackv2 | from flask import Flask, request
app = Flask(__name__)
app.config['DEBUG'] = True
form="""
<!doctype html>
<html>
<body>
<form action = "/hello" method="post">
<label for="first-name">First Name:</label>
<input id="first-name" type="text" name="first_name" />
<input typ... | 29 | 18.97 | 67 | 9 | 149 | python | [{"finding_id": "codeql_py/reflective-xss_1c934271ba636197_de28b9f6", "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)."
] | [
27
] | [
null
] | [
12
] | [
48
] | |
2024-11-18T22:14:59.421464+00:00 | 1,670,290,533,000 | eabb44006e11e233040ebc61cc56ef4687563ca1 | 3 | {
"blob_id": "eabb44006e11e233040ebc61cc56ef4687563ca1",
"branch_name": "refs/heads/master",
"committer_date": 1670290533000,
"content_id": "4f19b5d34a746725635c4872bf632a30336f1657",
"detected_licenses": [
"MIT"
],
"directory_id": "38fca7b44d98174c964a8dd1f7ad60d7937a160e",
"extension": "py",
"fi... | 2.9375 | stackv2 | import tarfile, os, zipfile, shutil, glob, sys
import os.path as path
from os.path import isfile, join
from tempfile import TemporaryDirectory
dir_tmp = 'tmp_tar'
z_content = 'zippy'
tar_list = ['foo.tar', 'bar.tar.gz', 'baz.tar.bz2', 'combo.tar', 'combo2.tar', 'pre31.1.9y']
CRED = '\033[91m'
CEND = '\033[0m'
CBOLD = ... | 78 | 35.12 | 92 | 15 | 717 | python | [{"finding_id": "codeql_py/tarslip_57cdc1277357c193_948521ba", "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)."
] | [
29
] | [
null
] | [
9
] | [
14
] | |
2024-11-18T22:15:01.441642+00:00 | 1,557,425,582,000 | fe14aa85eb3e8e509690d2194e9f88e875666eb2 | 3 | {
"blob_id": "fe14aa85eb3e8e509690d2194e9f88e875666eb2",
"branch_name": "refs/heads/master",
"committer_date": 1557425582000,
"content_id": "a861e8fc1dc0aeefa73246ca91f3103a75b997c4",
"detected_licenses": [
"MIT"
],
"directory_id": "cbe2db80fb101e8a5fd323ec30c28ec7cd359c94",
"extension": "py",
"fi... | 3 | stackv2 | from flask import Flask, request, abort
import requests
import tldextract
from bs4 import BeautifulSoup
import json
from subprocess import check_output
from predict import predictor
from utils.get_news import get_news_from_headlines
from utils.similarity import Similarity
app = Flask(__name__)
@app.route("/", method... | 78 | 32.36 | 116 | 18 | 565 | python | [{"finding_id": "codeql_py/flask-debug_9ee7ef1a61ce5390_fa622595", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-918"
] | [
"py/flask-debug",
"py/full-ssrf"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"The full URL of this request depends on a [user-provided value](1)."
] | [
78,
27
] | [
null,
null
] | [
5,
32
] | [
35,
71
] | |
2024-11-18T22:55:27.970426+00:00 | 1,563,215,108,000 | 6b672565c74adc987071a052ce38a6de205b10e4 | 3 | {
"blob_id": "6b672565c74adc987071a052ce38a6de205b10e4",
"branch_name": "refs/heads/master",
"committer_date": 1563215108000,
"content_id": "770d211d5782d3ad7ae27362d27f232880fb6ce8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "900f37d81d2fdbf445e1ae5372c5ac4190848344",
"extension": "py"... | 2.90625 | stackv2 | import pkg_resources
import time
from collections import OrderedDict
import numpy as np
import pandas as pd
import knor
from scipy.stats import zscore
from plotly.offline import (download_plotlyjs, init_notebook_mode)
from jinja2 import Environment, PackageLoader, select_autoescape, FileSystemLoader
import pymeda.dat... | 338 | 31.33 | 86 | 17 | 2,428 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bfbb9501aa5c2e4f_75f7b95a", "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."
] | [
326
] | [
null
] | [
15
] | [
68
] | |
2024-11-18T22:55:37.824060+00:00 | 1,505,341,233,000 | 9f5e4b8a708291e0c733ab83c796e425177ce503 | 2 | {
"blob_id": "9f5e4b8a708291e0c733ab83c796e425177ce503",
"branch_name": "refs/heads/master",
"committer_date": 1505341233000,
"content_id": "bc570aa918261a979670cafdde71718f9a7b084a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "690abbd7260635a4a537575ca31f445672e96b37",
"extension": "py"... | 2.484375 | stackv2 | #!/usr/bin/env python
from jinja2 import Environment, FileSystemLoader
import yaml
import argparse
import os
BASE_KEY = os.environ.get('BASE_KEY')
# Dumb way to get next n ip addresses from starting ip start_ip
def dumb_get_next_ips(starting_ip, n):
ip_tokens = starting_ip.split('.')
last = int(ip_tokens[3])
... | 124 | 34.64 | 130 | 15 | 1,093 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_7ebea103e6838b8f_4f10d14a", "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."
] | [
32,
52
] | [
null,
null
] | [
11,
11
] | [
53,
53
] | |
2024-11-18T22:55:40.465871+00:00 | 1,556,144,654,000 | 36fa840c511cb8c5adb49e1d8e79ae3c7ce2dbee | 3 | {
"blob_id": "36fa840c511cb8c5adb49e1d8e79ae3c7ce2dbee",
"branch_name": "refs/heads/master",
"committer_date": 1556144654000,
"content_id": "e992f71406a90b830923df2202b89f1876161666",
"detected_licenses": [
"MIT"
],
"directory_id": "b3698a41fb58af71f610781838535d5a1b9bebec",
"extension": "py",
"fi... | 2.828125 | stackv2 | import os
import sys
import django
from selenium import webdriver
from selenium.webdriver import DesiredCapabilities
# Setting up environment
sys.path.append("/src")
os.environ['DJANGO_SETTINGS_MODULE'] = 'DjangoTest.settings'
if 'setup' in dir(django):
django.setup()
# Function returns the department and profe... | 208 | 26.3 | 102 | 17 | 1,332 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_890697ba6361fae3_106f323b", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://faculty.rpi.edu/](1) may be at an arbitrary po... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [https://faculty.rpi.edu/](1) may be at an arbitrary position in the sanitized URL.",
"The string [https://faculty.rpi.edu/](1) may be at an arbitrary position in the sanitized URL."
] | [
33,
89
] | [
null,
null
] | [
20,
16
] | [
54,
50
] | |
2024-11-18T23:55:45.024270+00:00 | 1,663,654,152,000 | 0e4fe9d5ad6159227a06c9b5093fad2b2cf1b987 | 3 | {
"blob_id": "0e4fe9d5ad6159227a06c9b5093fad2b2cf1b987",
"branch_name": "refs/heads/master",
"committer_date": 1663654152000,
"content_id": "b8f673b674ed8491bd9594869911da443e556dda",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "02912a35ae0178be82ad3b138edcb560bee6cb88",
"extension": "py"... | 2.71875 | stackv2 | #!/usr/bin/env python
#
# Copyright 2017 Juniper Networks, Inc. All rights reserved.
# Licensed under the Juniper Networks Script Software License (the "License").
# You may not use this script file except in compliance with the License, which is located at
# http://www.juniper.net/support/legal/scriptlicense/
# Unless... | 158 | 30.03 | 103 | 16 | 1,153 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d45c9d27ca6dc709_b46ae8ea", "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."
] | [
46
] | [
null
] | [
83
] | [
95
] | |
2024-11-18T23:55:46.479458+00:00 | 1,502,470,482,000 | 5e3507f2a1f5c98d4746a2ccbe0f7b971427e691 | 3 | {
"blob_id": "5e3507f2a1f5c98d4746a2ccbe0f7b971427e691",
"branch_name": "refs/heads/master",
"committer_date": 1502470482000,
"content_id": "158a6b0de7b5cb16196f91a17ea6ae12fd372067",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e66927c1b100b96ffd588a13246e3d38b594b335",
"extension": "p... | 2.59375 | stackv2 | """
WebApp to enable "tracking" feature on GitHib feature branches.
Effect : whenever new commits are pushed to the "tracked" branch,
create a PR from "tracked" branch onto "tracking".
Typical use: "master" is tracked --> "<some-feature-branch>"
"""
import datetime
import os
import requests
import tornado.httpserv... | 166 | 30.73 | 78 | 15 | 1,261 | python | [{"finding_id": "codeql_py/reflective-xss_a18389d9f4fcafde_d8182429", "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)."
] | [
135
] | [
null
] | [
20
] | [
28
] | |
2024-11-18T22:43:33.475512+00:00 | 1,481,812,845,000 | 1b2a4e11938454d5ac42994bd3a7142a4a275ed8 | 3 | {
"blob_id": "1b2a4e11938454d5ac42994bd3a7142a4a275ed8",
"branch_name": "refs/heads/master",
"committer_date": 1481812845000,
"content_id": "0193c15b10d75ce6f2b7cbbc3aa0dd7ff3dda8c1",
"detected_licenses": [
"MIT"
],
"directory_id": "4c2f73896aa9633becbf3258f0b29039da27ab23",
"extension": "py",
"fi... | 2.53125 | stackv2 | import json
import os
import googlemaps
from os.path import join, dirname
from dotenv import load_dotenv
dotenv_path = join(os.getcwd(), '.env')
load_dotenv(dotenv_path)
gmaps = googlemaps.Client(key=os.environ.get("GOOGLE_GEOCODING_KEY"))
output_csv = os.getcwd() + '/data/processed/stations.csv'
with open(os.getcwd... | 33 | 41 | 99 | 14 | 274 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f84d6129f6bdc95c_5a95d3ea", "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."
] | [
28
] | [
33
] | [
26
] | [
63
] | |
2024-11-19T00:45:03.308950+00:00 | 1,604,544,015,000 | 38aff424b63025dd034a0c2f3f566a137adec9c8 | 3 | {
"blob_id": "38aff424b63025dd034a0c2f3f566a137adec9c8",
"branch_name": "refs/heads/main",
"committer_date": 1604544015000,
"content_id": "57295e2ab69c946cd58f752836380d490e1f4105",
"detected_licenses": [
"ISC"
],
"directory_id": "a7b58053098040bcb8f7028422858503c17b1bd9",
"extension": "py",
"file... | 2.578125 | stackv2 | # This script requires an API key from data.gov in the DATA_GOV_API_KEY environment variable.
# You can get one from https://api.data.gov/signup/ and they'll email it immediately.
import datetime
import os
import requests
import sys
import tomlkit
import states
api_key = os.environ["GOOGLE_CIVIC_API_KEY"]
url = f"h... | 55 | 30.31 | 122 | 14 | 427 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7444ceaff7799aa3_f4e95402", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
16,
18,
23,
26
] | [
null,
null,
null,
null
] | [
7,
7,
11,
11
] | [
10,
11,
19,
22
] | |
2024-11-19T00:45:07.278094+00:00 | 1,585,680,441,000 | 07c9ff08c7ed15cef67f6906c78e34c41539d784 | 3 | {
"blob_id": "07c9ff08c7ed15cef67f6906c78e34c41539d784",
"branch_name": "refs/heads/master",
"committer_date": 1585680441000,
"content_id": "907e7f33bae15d7e870d6c379acb7198eaccdeee",
"detected_licenses": [
"MIT"
],
"directory_id": "e763c8d29c15a1851daea8a4f042c30df0196d51",
"extension": "py",
"fi... | 2.890625 | stackv2 | import urllib2
import requests
from bs4 import BeautifulSoup
from urlparse import urljoin
class CrawlService(object):
def __init__(self, crawler, pages, depth=2):
self.crawler = crawler
self.pages = pages
self.depth = depth
def call(self):
for i in range(self.depth):
... | 89 | 29.15 | 119 | 17 | 598 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d790e4b600108294_c473189e", "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)."
] | [
59
] | [
null
] | [
15
] | [
100
] | |
2024-11-19T01:11:15.879998+00:00 | 1,428,353,765,000 | fd8c9637f5bf7aeac1fc044dd11c81aad06d8f76 | 2 | {
"blob_id": "fd8c9637f5bf7aeac1fc044dd11c81aad06d8f76",
"branch_name": "refs/heads/master",
"committer_date": 1428353765000,
"content_id": "1a4490d70e9466b7eaeb9cb9df35db6a487b41b1",
"detected_licenses": [
"MIT"
],
"directory_id": "c78f765ae52cec65d0eb71c0448e65882f0d5cda",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python3
#################################################################################
# The MIT License (MIT)
#
# Copyright (c) 2015, George Webster. All rights reserved.
#
# Approved for Public Release; Distribution Unlimited 14-1511
#
# Permission is hereby granted, free of charge, to any person o... | 203 | 41.79 | 119 | 21 | 1,928 | python | [{"finding_id": "codeql_py/request-without-cert-validation_fe83299157a914c4_081b7928", "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)."
] | [
53
] | [
null
] | [
20
] | [
82
] | |
2024-11-18T23:46:51.079514+00:00 | 1,540,369,714,000 | 99a869cd5bbf1b214d9c89735c30fac3f816fb1a | 3 | {
"blob_id": "99a869cd5bbf1b214d9c89735c30fac3f816fb1a",
"branch_name": "refs/heads/master",
"committer_date": 1540369714000,
"content_id": "b6e7d98127024c4d1201a375c269b2a77c321360",
"detected_licenses": [
"MIT"
],
"directory_id": "4a65fc6bfd23734dadd6776247b49300dea04f7b",
"extension": "py",
"fi... | 2.59375 | stackv2 | import logging
import paramiko as paramiko
class Ssh:
def __init__(self, user: str, hostname: str, key: str):
self.ssh_client = paramiko.SSHClient()
self.ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
self.ssh_client.connect(hostname, username=user, key_filename=key)
... | 34 | 33.76 | 83 | 12 | 275 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_98566262b529d456_b4b27b58", "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."
] | [
9
] | [
null
] | [
9
] | [
78
] | |
2024-11-18T23:48:07.852465+00:00 | 1,600,667,191,000 | 1a093fc4c5ce328a6ecbbb0590f17274753f617f | 3 | {
"blob_id": "1a093fc4c5ce328a6ecbbb0590f17274753f617f",
"branch_name": "refs/heads/master",
"committer_date": 1600667191000,
"content_id": "976d24d5f97b904d671eb2638dcca25ad6d768a7",
"detected_licenses": [
"MIT"
],
"directory_id": "e08cdae39a5aae8ec95abc6aa36169bc367eebec",
"extension": "py",
"fi... | 3.3125 | stackv2 | '''
Session 36 - Flask API end points
Date - 03-Sep-2020
'''
from flask import Flask, render_template, request
app = Flask(__name__)
# this secret will be used for http session management
# use a strong secret from config file or environmnt variable instead
app.secret_key = 'someSecret'
# send simple text, when '/he... | 77 | 29.43 | 88 | 12 | 683 | python | [{"finding_id": "codeql_py/flask-debug_79a7af56c7ed55bd_0e20d099", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
77,
50
] | [
null,
null
] | [
5,
12
] | [
52,
58
] | |
2024-11-18T23:48:11.835875+00:00 | 1,504,794,063,000 | deee3ac6db93d21da2ca4969868872640f478f82 | 2 | {
"blob_id": "deee3ac6db93d21da2ca4969868872640f478f82",
"branch_name": "refs/heads/master",
"committer_date": 1504794063000,
"content_id": "47fe33c100a2861f49b280e1feeaeb05bc76761f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0a7acf4b3f1991bccec2b8d005c7138778e2b99d",
"extension": "py"... | 2.453125 | stackv2 | #! /usr/bin/env python
# coding=utf-8
import threading
import re
import socket
import logging
import urllib2
import requests
import time
#logging.getLogger("requests").setLevel(logging.ERROR)
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(filename)s [line:%(lineno)d] %(message)s')
#socket.setdefaultti... | 104 | 30.76 | 130 | 20 | 838 | python | [{"finding_id": "codeql_py/request-without-cert-validation_f50feea646a3ee9a_11e6148d", "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)."
] | [
100
] | [
null
] | [
20
] | [
80
] | |
2024-11-19T00:29:32.765322+00:00 | 1,315,429,970,000 | 299822cbfa4d7ab682fff149a013e03a1638e319 | 3 | {
"blob_id": "299822cbfa4d7ab682fff149a013e03a1638e319",
"branch_name": "refs/heads/master",
"committer_date": 1315429970000,
"content_id": "732ec35c80348bc883d05ae3ef54a4d2e962e08d",
"detected_licenses": [
"Unlicense"
],
"directory_id": "cc08944c54a81bffec3fddb4822b65ba000830a1",
"extension": "py",... | 2.765625 | stackv2 | #!/usr/bin/python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import cgi, re
import pygraphviz as pgv
from threading import Thread
from Queue import Queue
winner, loser = 1, 0
class Source(object):
def winner(self):
return None
def loser(self):
return None
slot_winner =... | 297 | 38.94 | 163 | 21 | 3,076 | python | [{"finding_id": "codeql_py/http-response-splitting_9f8d88d36b9b415b_aec7c122", "tool_name": "codeql", "rule_id": "py/http-response-splitting", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This HTTP header is constructed from a [user-provided value](1).", "remediation": "", "lo... | 4 | true | [
"CWE-113",
"CWE-1333",
"CWE-1333",
"CWE-1333"
] | [
"py/http-response-splitting",
"py/polynomial-redos",
"py/polynomial-redos",
"py/polynomial-redos"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This HTTP header is constructed from a [user-provided value](1).",
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of '/'.",
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetiti... | [
220,
174,
183,
207
] | [
null,
null,
null,
null
] | [
38,
57,
58,
65
] | [
105,
66,
67,
74
] | |
2024-11-19T00:44:17.677991+00:00 | 1,660,651,449,000 | ee643f74d59c8e8675ba693f49a6b81333623db2 | 2 | {
"blob_id": "ee643f74d59c8e8675ba693f49a6b81333623db2",
"branch_name": "refs/heads/master",
"committer_date": 1660651449000,
"content_id": "9ace400fa8ddd3e200e4d1184566619af54c7929",
"detected_licenses": [
"MIT"
],
"directory_id": "fa117906fc41cee0637d3c4cee187bbd2b8c3e64",
"extension": "py",
"fi... | 2.40625 | stackv2 | import asyncio
import datetime
import functools
import hashlib
import json
import mimetypes
import re
import urllib.parse
from concurrent.futures import ThreadPoolExecutor
from typing import List
import evernote.edam.type.ttypes as Types
from evernote.api.client import EvernoteClient as EvernoteSdk
from evernote.edam.... | 226 | 37.73 | 110 | 17 | 1,941 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_703a304ed89fe0c0_23f4c009", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure.\... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (secret)](2) is used in a hashing algorithm (SHA1) that is insecure."
] | [
94
] | [
null
] | [
33
] | [
42
] | |
2024-11-19T00:44:19.614761+00:00 | 1,626,385,820,000 | 6bf15a8e2ebd6666a6e8147c91ac28f83192a33a | 2 | {
"blob_id": "6bf15a8e2ebd6666a6e8147c91ac28f83192a33a",
"branch_name": "refs/heads/master",
"committer_date": 1626385820000,
"content_id": "470ef18669164ae9cadb492a56941639c3b57384",
"detected_licenses": [
"MIT"
],
"directory_id": "0a5c45dc84fe7121d90446b0f649871b94d9cd6b",
"extension": "py",
"fi... | 2.390625 | stackv2 | from flask import Blueprint, Response, request
from werkzeug.security import check_password_hash, generate_password_hash
from .db import get_db
bp = Blueprint('users', __name__)
ROLES = [
"patient",
"familyDoctor",
"cardiologist",
"dermatologist",
"optometrist",
"dentist",
"otolaryngologi... | 102 | 24.63 | 73 | 17 | 589 | python | [{"finding_id": "codeql_py/stack-trace-exposure_d8f0afd359d1a64c_69c2c03f", "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."
] | [
37
] | [
null
] | [
16
] | [
27
] | |
2024-11-19T00:44:27.312209+00:00 | 1,607,083,993,000 | d73e9aa7b5c52068fbd3cbd849146723b8f5d759 | 3 | {
"blob_id": "d73e9aa7b5c52068fbd3cbd849146723b8f5d759",
"branch_name": "refs/heads/main",
"committer_date": 1607083993000,
"content_id": "f78c701530be0e0b2842fb009210f9536e392c65",
"detected_licenses": [
"MIT"
],
"directory_id": "caee99a700af4d8260fdbbf78d247542e0a1691a",
"extension": "py",
"file... | 3.234375 | stackv2 | import os
from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
from Crypto.Signature import pkcs1_15
from typing import Tuple
class ElectronicSignature:
def __init__(self, read_filename: str, write_filename: str):
self.read_filename = read_filename
self.write_filename = write_filename... | 79 | 26.63 | 70 | 16 | 516 | python | [{"finding_id": "codeql_py/weak-crypto-key_78887e6d8c00d38c_070da33d", "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."
] | [
28
] | [
null
] | [
15
] | [
45
] | |
2024-11-18T23:20:02.358142+00:00 | 1,626,328,720,000 | 69631ec5ac149123493c3a5a902b14aff2aea551 | 3 | {
"blob_id": "69631ec5ac149123493c3a5a902b14aff2aea551",
"branch_name": "refs/heads/main",
"committer_date": 1626328720000,
"content_id": "22058e80498cc0c3083cdf81fb2fff12b0906d41",
"detected_licenses": [
"MIT"
],
"directory_id": "2dbd7706d02fe8e23e9e3a810074d75830dd5131",
"extension": "py",
"file... | 2.75 | stackv2 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project :fastjson_check
@File :ssh.py
@Author :trance
@Date :2021/7/6 20:08
'''
import paramiko, time, keyboard
class ssh:
"""
ssh登录 执行命令
"""
def __init__(self, ip, username, passwd, port=22):
self.ip = ip
self.username = username
... | 68 | 23.59 | 80 | 19 | 401 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_e45f358a6c6558e7_912044f5", "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."
] | [
33
] | [
null
] | [
13
] | [
70
] | |
2024-11-18T23:43:07.230616+00:00 | 1,518,800,187,000 | a3ddacf0dcc0cd3dbf0bd4ee8266eb00ba56649b | 3 | {
"blob_id": "a3ddacf0dcc0cd3dbf0bd4ee8266eb00ba56649b",
"branch_name": "refs/heads/master",
"committer_date": 1518800187000,
"content_id": "2bfc85c3c7d9038b6403bb8f3681fd28d27f1857",
"detected_licenses": [
"MIT"
],
"directory_id": "7270812c7a2ecf437de441867d9022a15faeac78",
"extension": "py",
"fi... | 3.40625 | stackv2 | #!/usr/bin/env python3
'''
wunderground
This CLI app utilizes the Weather Underground API to query
basic weather conditions for a given city/state or zip code.
Dependencies:
requests, argparse
Required Command Line Arguments:
-c City
-s State
-z Zipcode
API ke... | 95 | 28.88 | 86 | 16 | 695 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_df55b06b85886cba_24940fe1", "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."
] | [
87
] | [
null
] | [
19
] | [
59
] | |
2024-11-19T01:21:36.993074+00:00 | 1,299,712,745,000 | 9ac12bf22f345a834d32d9a150367b73c6ccf0c1 | 3 | {
"blob_id": "9ac12bf22f345a834d32d9a150367b73c6ccf0c1",
"branch_name": "refs/heads/master",
"committer_date": 1299712745000,
"content_id": "cf61ba499b631571126fa9d2d44b1bfb0e2341c2",
"detected_licenses": [
"MIT"
],
"directory_id": "f7f31b85a7d3a72c10926913eac3221d578ee046",
"extension": "py",
"fi... | 3.078125 | stackv2 | import os
import sys
import time
import urllib
import tarfile
import random
import itertools as it
from os import path
WORDLIST_URL = 'ftp://ftp.ox.ac.uk/pub/wordlists/american/dic-0294.tar.gz'
class DownloadReport(object):
'''Helper class to be used as urlretrieve hook.'''
def __init__(self):
sel... | 108 | 34.6 | 84 | 14 | 894 | python | [{"finding_id": "codeql_py/tarslip_5da26090d7044e27_b60b00be", "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)."
] | [
38
] | [
null
] | [
5
] | [
15
] | |
2024-11-19T01:21:40.688987+00:00 | 1,548,180,225,000 | 089ed8ea41ef3ab7b0dfb401d1d1940ccf50f6cb | 4 | {
"blob_id": "089ed8ea41ef3ab7b0dfb401d1d1940ccf50f6cb",
"branch_name": "refs/heads/master",
"committer_date": 1548180225000,
"content_id": "8512d0a9efbbbb92bfd6e956918a7a639972ca1a",
"detected_licenses": [
"MIT"
],
"directory_id": "98bc186305cff7cfe956ac32f04c878eecb69b90",
"extension": "py",
"fi... | 3.578125 | stackv2 | # --------------
#Header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#path of the data file- path
#Code starts here
data = pd.read_csv(path)
#print(data.head())
data['Gender'].replace('-', 'Agender', inplace=True)
gender_count = data['Gender'].value_counts()
print(gender_count)
gend... | 85 | 23.89 | 74 | 9 | 542 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_153e98723429842f_5c3e3cd3", "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."
] | [
15
] | [
null
] | [
7
] | [
19
] | |
2024-11-19T00:11:50.386496+00:00 | 1,576,937,916,000 | 409eaa75f120a78395196ce8549ddb09a3f71d90 | 3 | {
"blob_id": "409eaa75f120a78395196ce8549ddb09a3f71d90",
"branch_name": "refs/heads/master",
"committer_date": 1576937916000,
"content_id": "9687a31c7eb55214dbe256a2c99820cd31c5eca2",
"detected_licenses": [
"MIT"
],
"directory_id": "67d28159f08eecfbe3279dd5021eef1a039e536b",
"extension": "py",
"fi... | 2.5625 | stackv2 | import flask
def create_changeip_response(tor_ip_changer):
new_ip = ""
error = ""
status = 200
try:
new_ip = tor_ip_changer.get_new_ip()
except Exception as exc:
error = "{}: {}".format(exc.__class__, str(exc))
status = 500
response = flask.jsonify({"newIp": new_ip, "... | 32 | 19.72 | 63 | 13 | 170 | python | [{"finding_id": "codeql_py/stack-trace-exposure_bfaf18ba982b231b_ad1fff60", "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."
] | [
15
] | [
null
] | [
30
] | [
63
] | |
2024-11-19T00:24:53.243242+00:00 | 1,527,854,984,000 | f368d227b44280abb2e2c2e4bffa90f3169158ff | 3 | {
"blob_id": "f368d227b44280abb2e2c2e4bffa90f3169158ff",
"branch_name": "refs/heads/master",
"committer_date": 1527854984000,
"content_id": "235511d21acf5a8d83903e2f4fb619162d3b4f1c",
"detected_licenses": [
"MIT"
],
"directory_id": "eac93e77bde387c6a3027de28a05439a661664ed",
"extension": "py",
"fi... | 3.359375 | stackv2 | import re
from datetime import datetime, date, time
def splitUnit(s):
matches = re.findall(r"(\-?[0-9\.]+)\s*([A-z\"'\(\)]+)", s)
if len(matches) == 0:
raise ValueError
return [(float(m[0]), m[1].strip().lower()) for m in matches]
def roundStr(v, digits=0):
if v == int(v):
return str(i... | 419 | 31 | 96 | 22 | 3,676 | python | [{"finding_id": "codeql_py/overly-large-range_41d59e22778f55be_cad9daa5", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 2 | true | [
"CWE-020",
"CWE-312"
] | [
"py/overly-large-range",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensiti... | [
5,
357
] | [
null,
null
] | [
46,
15
] | [
49,
38
] | |
2024-11-19T00:36:54.044787+00:00 | 1,652,973,644,000 | c92cddfdd671638e5ce7b58ea0c3900b6d93fd23 | 3 | {
"blob_id": "c92cddfdd671638e5ce7b58ea0c3900b6d93fd23",
"branch_name": "refs/heads/master",
"committer_date": 1652973644000,
"content_id": "57715537c3baaefec34bd678fb92aa3c99c51448",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f2c5090dcba4590b5f04f6f4100060268496feba",
"extension": "p... | 3.03125 | stackv2 | #!python
# INPUTS:
# - source directory
# - variables directory
# - destination directory
#
# OUTPUTS:
#
# Each file in the source directory is written into the destination
# directory, with any variables replaced.
#
# TODO would be jazzy to use syslog and have a DEBUG switch
import argparse
import json
import ... | 136 | 29.98 | 109 | 17 | 970 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f9bdaca534afd241_e995f80f", "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."
] | [
103,
105
] | [
null,
null
] | [
20,
20
] | [
46,
73
] | |
2024-11-19T01:02:10.052961+00:00 | 1,685,655,221,000 | 4e6b39d2ad30cdd39a1b2c18537b0eece898701f | 3 | {
"blob_id": "4e6b39d2ad30cdd39a1b2c18537b0eece898701f",
"branch_name": "refs/heads/master",
"committer_date": 1685655221000,
"content_id": "f3475d1180692d99fdd69628aab6f260ca301150",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ab15710addd1b49b91b83f2a6bfa515d90007cc1",
"extension": "py"... | 2.765625 | stackv2 | import requests
import os
def download_from_lpdaac(h5_download_file, out_text_file_name, save_dir, token):
with open(os.path.join(save_dir, out_text_file_name), 'w') as fw:
with open(h5_download_file) as fr:
for url in fr.readlines():
# Create and submit request and download fi... | 59 | 36.12 | 110 | 24 | 436 | python | [{"finding_id": "codeql_py/request-without-cert-validation_375e101e415fbd47_5dfe7b3c", "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)."
] | [
13
] | [
null
] | [
22
] | [
91
] | |
2024-11-19T01:02:11.810817+00:00 | 1,610,757,825,000 | c69f3eccda7cd2321ad2c45d7db25aeece077c2e | 3 | {
"blob_id": "c69f3eccda7cd2321ad2c45d7db25aeece077c2e",
"branch_name": "refs/heads/master",
"committer_date": 1610757825000,
"content_id": "2d2c00ce4ef1429db591c7e981debd672cdba58a",
"detected_licenses": [
"MIT"
],
"directory_id": "73cb79b6c2e526317cbb460769b7329ecfbfb5cc",
"extension": "py",
"fi... | 2.515625 | stackv2 | # Original work Copyright (c) 2017 Samuel Dunne-Mucklow
from flask import Flask, redirect, render_template, request, g
from multiprocessing import Queue
import jinja2.ext
import os, shutil, zipfile, urllib.request, csv, io
import MyCSV
app = Flask(__name__)
@app.before_first_request
def before_first_request():
In... | 175 | 33.45 | 113 | 15 | 1,404 | python | [{"finding_id": "codeql_py/flask-debug_3a57ecff1b93e8f8_425e6ca2", "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.", ... | 16 | true | [
"CWE-215",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-pro... | [
175,
37,
38,
43,
46,
73,
149,
150,
157,
158,
158,
162,
167,
168,
169,
170
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
5,
31,
22,
27,
25,
19,
23,
19,
23,
19,
53,
33,
23,
19,
23,
23
] | [
24,
40,
31,
39,
37,
65,
64,
60,
55,
51,
94,
42,
64,
60,
64,
64
] | |
2024-11-18T23:49:53.036186+00:00 | 1,690,567,524,000 | 06e835bdbe28f304c9aa2462d691501e3ceb2694 | 3 | {
"blob_id": "06e835bdbe28f304c9aa2462d691501e3ceb2694",
"branch_name": "refs/heads/master",
"committer_date": 1690567744000,
"content_id": "d4add101c6df6fb63e21d2dbdab2061022293469",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e7feb1689a03773ce3ea89ceac03365eaa154a37",
"extension": "p... | 2.578125 | stackv2 | #!/usr/bin/env python3
import argparse
import asyncio
import os
import random
import string
import sys
from taguette import database
from taguette import validate
PASSWORD_CHARS = string.ascii_letters + string.digits + '#%&-.?~'
PASSWORD_LENGTH = 14
async def main():
parser = argparse.ArgumentParser(
... | 76 | 21.91 | 73 | 13 | 405 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e677cca5bc54c03f_9175deec", "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
] | [
71
] | [
9
] | [
49
] | |
2024-11-18T23:49:54.023693+00:00 | 1,524,839,950,000 | 6e14ce9e2a0047a9d0664a7d388ddd91c96c5a62 | 3 | {
"blob_id": "6e14ce9e2a0047a9d0664a7d388ddd91c96c5a62",
"branch_name": "refs/heads/master",
"committer_date": 1524839950000,
"content_id": "c3aa5f6cb1929f2ff96051e74cb46dff1b96f604",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4edb0d851f8127590863ca56a5feaa99298c9acf",
"extension": "py"... | 2.9375 | stackv2 | # -*- coding: utf-8 -*-
""" Export your Deezer playlists as JSON
This module spins up a server to perform authentication to a
Deezer app (see Readme) through oauth2 protocol and then uses
the official Deezer API to retrieve
and save as JSON file all your playlists.
"""
import os
import time
import webbrowser
import j... | 146 | 31.88 | 103 | 17 | 1,096 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_815f399f21d648e0_5fdf7342", "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... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-918",
"CWE-918",
"CWE-918"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this... | [
100,
104,
36,
63,
102
] | [
null,
null,
null,
null,
null
] | [
19,
19,
11,
11,
19
] | [
27,
27,
104,
97,
41
] | |
2024-11-19T01:51:55.522155+00:00 | 1,430,907,321,000 | 05c0d4c514c8799d7dba86f59b85cf2c11e623c8 | 2 | {
"blob_id": "05c0d4c514c8799d7dba86f59b85cf2c11e623c8",
"branch_name": "refs/heads/master",
"committer_date": 1430907321000,
"content_id": "1fe8e0c0dd8fc03b93c62e6600cab7c7d7718d90",
"detected_licenses": [
"MIT"
],
"directory_id": "fe52503087b3cd4c7f560769a9e4a9ba2e23e359",
"extension": "py",
"fi... | 2.5 | stackv2 | # -*- encoding: utf-8 -*-
import logging
import re
import time
import nltk
from django.db import models
from django.utils.encoding import smart_unicode
from google.appengine.ext import db
from google.appengine.ext.deferred import defer
from django.conf import settings
QUEUE_FOR_INDEXING = getattr(settings, "QUEUE_FO... | 413 | 37.09 | 137 | 20 | 3,338 | python | [{"finding_id": "codeql_py/redos_7c62ed1b27979a12_85d38de0", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitio... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitions of '\\\\!'."
] | [
353
] | [
null
] | [
40
] | [
53
] | |
2024-11-19T01:39:55.504260+00:00 | 1,484,680,556,000 | 6705ea437dcc3ebfcbacafb276aaa703c284612d | 4 | {
"blob_id": "6705ea437dcc3ebfcbacafb276aaa703c284612d",
"branch_name": "refs/heads/master",
"committer_date": 1484680556000,
"content_id": "49a2b34cbfbc9cf31d69cd89f1b72e5e312d1bed",
"detected_licenses": [
"MIT"
],
"directory_id": "86e030a11a26f9c2489363e6a90a7e060db0b103",
"extension": "py",
"fi... | 3.671875 | stackv2 | import os
import re
from copy import deepcopy
__author__ = 'Povalyaev Ivan'
# Задание-1:
# Написать программу, выполняющую операции
# (сложение и вычитание) с простыми дробями.
# Дроби вводятся и выводятся в формате: n x/y ,где n - целая часть,
# x - числитель, у - знаменатель.
# Дроби могут быть отрицательные и не име... | 192 | 40.58 | 76 | 17 | 2,158 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8d3494428887b1d2_07b2823d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text.\nThis expression logs [sensitive data (private)]... | [
186
] | [
null
] | [
15
] | [
52
] | |
2024-11-19T01:39:58.230736+00:00 | 1,558,117,736,000 | 7f7a5cd4137b117a440c109503b5a4eae9de1a43 | 2 | {
"blob_id": "7f7a5cd4137b117a440c109503b5a4eae9de1a43",
"branch_name": "refs/heads/master",
"committer_date": 1558117736000,
"content_id": "c58da775f7281671275019ef175a55447db04132",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "85395f1941957e86dc54db43573fa6c764d1cc0d",
"extension": "p... | 2.3125 | stackv2 | import os
import re
import sys
from .conda import conda, conda_env_load, conda_cmd_channels, ei_touch
from .utils import comment_find, git, pushd, sh
from configparser import ConfigParser
from glob import glob
from ruamel.yaml import YAML
DMFILE_RE = re.compile(r'^(?P<name>[A-z\-_l]+)(?:[=<>\!]+)?(?P<version>[A-z0-9.... | 249 | 31.11 | 141 | 18 | 1,827 | python | [{"finding_id": "codeql_py/overly-large-range_1dc41f67879c27e9_06e34b88", "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\\]."
] | [
11,
11
] | [
null,
null
] | [
37,
73
] | [
40,
76
] | |
2024-11-19T01:40:02.517372+00:00 | 1,518,337,689,000 | 97c1e215dd82f2f52cb752beaec43bbb6caf77e5 | 3 | {
"blob_id": "97c1e215dd82f2f52cb752beaec43bbb6caf77e5",
"branch_name": "refs/heads/master",
"committer_date": 1518337689000,
"content_id": "abf83f56e98a154a3ab52388e230b857874f28a8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b03ecd2bed1fee38fadeab8e027e09cdd0451770",
"extension": "py"... | 2.578125 | stackv2 | # Basic FLASK functions
from flask import Flask, jsonify, request, redirect, \
url_for, abort, g, flash, render_template
# SQLAlchemy functions
from models import User, Base, Category, Item
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, sessionmaker
from sqlalche... | 527 | 26.45 | 86 | 19 | 3,526 | python | [{"finding_id": "codeql_py/stack-trace-exposure_50c795c1bdf57969_56834379", "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."
] | [
449
] | [
null
] | [
27
] | [
37
] | |
2024-11-19T00:33:01.555175+00:00 | 1,555,401,733,000 | ee900fea06527a33229341d65f04aced504c9c2c | 2 | {
"blob_id": "ee900fea06527a33229341d65f04aced504c9c2c",
"branch_name": "refs/heads/master",
"committer_date": 1555401733000,
"content_id": "06354672dccf7a83f43eb1092580df2a2ced8884",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bddbd82f57d24b171594b307fd9aaf91c97a6766",
"extension": "py"... | 2.34375 | stackv2 | # config: utf-8
"""
Display or generate the documentation for the given module or function.
"""
import os
from textwrap import wrap
import jinja2
from terminaltables import SingleTable
from sugar.lib.exceptions import SugarException
from sugar.lib.loader import SugarModuleLoader
from sugar.components.docman.docrnd im... | 156 | 36.47 | 121 | 23 | 1,393 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b71b167c88ed304c_38c51136", "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."
] | [
76,
111
] | [
null,
null
] | [
16,
16
] | [
41,
41
] | |
2024-11-19T00:33:06.713617+00:00 | 1,618,857,113,000 | 308c2f83a09fefee89800dcc7473955eea1aad23 | 3 | {
"blob_id": "308c2f83a09fefee89800dcc7473955eea1aad23",
"branch_name": "refs/heads/master",
"committer_date": 1618857113000,
"content_id": "eb47326235f16f2c8622da701eb247dc26aba1c9",
"detected_licenses": [
"MIT"
],
"directory_id": "aeee38089aa851091811ea9f7cadcd3e76999b26",
"extension": "py",
"fi... | 2.890625 | stackv2 | import urllib.request, json
import json
from .models import Newssourcemodel,Newsarticlemodel
#getting api key
api_key = None
#getting base url
base_url = None
#getting articles url
articles_url = None
def configure_request(app):
global api_key,base_url,articles_url
api_key = app.config['NEWX_API_KEY']
... | 105 | 24.16 | 94 | 12 | 585 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_630d34088dad47de_142b8836", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
26,
72
] | [
null,
null
] | [
11,
11
] | [
23,
18
] | |
2024-11-19T01:17:57.575043+00:00 | 1,574,967,096,000 | a75f998d4dd79e918d153c6adeeffcbdef0d9b20 | 2 | {
"blob_id": "a75f998d4dd79e918d153c6adeeffcbdef0d9b20",
"branch_name": "refs/heads/master",
"committer_date": 1574967096000,
"content_id": "feaa82e9906471bf0a309a34f9f4980559faf82f",
"detected_licenses": [
"MIT"
],
"directory_id": "f0d48c02c7a8ae59e6d19d7dc31cbe0adb540a4d",
"extension": "py",
"fi... | 2.484375 | stackv2 | from flask import Flask
from flask import render_template
from flask import request
from flask import redirect
from flask import flash
from flask import Session
from flask import send_from_directory
from database import cursor,db, insertUser, checkUserExists,insertPorduct
from poster import Poster
import os
SESSION_TY... | 157 | 34.75 | 121 | 17 | 1,183 | python | [{"finding_id": "codeql_py/flask-debug_1faf51f3cc1dba8b_716fb66a", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-601"
] | [
"py/flask-debug",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Untrusted URL redirection depends on a [user-provided value](1).\nUntrusted URL redirection depends on a [user-provided value](2)."
] | [
154,
129
] | [
null,
null
] | [
5,
25
] | [
24,
64
] | |
2024-11-19T01:17:59.038699+00:00 | 1,541,640,762,000 | 0c861ff09fcd6f664680982f0502288b882d23dc | 3 | {
"blob_id": "0c861ff09fcd6f664680982f0502288b882d23dc",
"branch_name": "refs/heads/master",
"committer_date": 1541640762000,
"content_id": "d3f4af7be142194763d3ea00a836d2ed9e82b0b1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "306bdf7206e3081569031f74825ec5064aa2805a",
"extension": "py"... | 2.515625 | stackv2 | import json
import os
import requests
import urllib3
urllib3.disable_warnings()
class ContivSdk:
@staticmethod
def get_instance():
""" Static access method.
:rtype: ContivSdk
:return: ContivSdk instance
"""
return ContivSdk(host=os.environ.get('SW4IOT_CONTIV_HOST', '... | 126 | 27.42 | 111 | 14 | 802 | python | [{"finding_id": "codeql_py/request-without-cert-validation_cb5b5c150fbef44e_3793fb14", "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)."
] | [
48,
58
] | [
49,
null
] | [
16,
16
] | [
43,
112
] | |
2024-11-19T01:17:59.910591+00:00 | 1,532,025,431,000 | 1e71246302b4fd04e4b8b76ad970d99a4bde90b5 | 3 | {
"blob_id": "1e71246302b4fd04e4b8b76ad970d99a4bde90b5",
"branch_name": "refs/heads/master",
"committer_date": 1532025431000,
"content_id": "94c77efb0d55807a656033a05151d1f5f84dbe4a",
"detected_licenses": [
"MIT"
],
"directory_id": "610e2032a5f813f66e3c9e4a3308e0137a486512",
"extension": "py",
"fi... | 3.28125 | stackv2 | # solution to http://cryptopals.com/sets/3/challenges/18
# implementation of AES CTR mode
import math
import struct
import base64
from Crypto.Cipher import AES
# assume block length is 16
blockLength = 16
# encrypts AES cipher in ECB mode. arguments are plainBytes (bytes) and key (bytes)
# returns ciphertext (byte... | 51 | 35.04 | 104 | 12 | 505 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_c85a4a6c5b1e6f33_12128b7c", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
16
] | [
null
] | [
9
] | [
35
] | |
2024-11-19T00:25:27.587435+00:00 | 1,602,599,217,000 | d415995bcffd96d19a889da874e92f2236789158 | 2 | {
"blob_id": "d415995bcffd96d19a889da874e92f2236789158",
"branch_name": "refs/heads/master",
"committer_date": 1602599217000,
"content_id": "23ef6dcde19e7491034e8e00c0da674983feb8ce",
"detected_licenses": [
"MIT"
],
"directory_id": "7e632cb7004e9d86763cbf84347d37b30112b8e6",
"extension": "py",
"fi... | 2.453125 | stackv2 | # -*- coding: utf-8 -*-
import re
import time
from asyncio import get_running_loop
from inspect import isawaitable
from pathlib import Path
from typing import List
import psutil
from torequests.utils import get_readable_size
from .exceptions import ChromeValueError
from .logs import logger
"""
For base usage with syn... | 279 | 30.66 | 173 | 21 | 2,124 | python | [{"finding_id": "codeql_py/overly-permissive-file_eaa111f65945fd36_82976181", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable."
] | [
260
] | [
null
] | [
13
] | [
39
] | |
2024-11-19T00:25:28.376230+00:00 | 1,633,678,256,000 | 5d7b04183390d40c36e43bcbca7c72d895d45b08 | 2 | {
"blob_id": "5d7b04183390d40c36e43bcbca7c72d895d45b08",
"branch_name": "refs/heads/master",
"committer_date": 1633678256000,
"content_id": "4b614d9296ca966c33bbb81810f9de91479e8a8c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5fd71614c7594cfdc92aaa34183a6fd0cd4823b7",
"extension": "py"... | 2.4375 | stackv2 | from http.server import BaseHTTPRequestHandler, HTTPServer
import io
import logging
import os
import uuid
import json
DEFAULT_HOSTNAME = '0.0.0.0'
DEFAULT_PORT = 8789
OUTPUT_DIR = 'tmp_output'
MAX_CHUNK_SIZE=1024
os.makedirs(OUTPUT_DIR, exist_ok=True)
from server_queue import Queue, QueueException, QueueWorker
from tim... | 112 | 32.76 | 97 | 17 | 860 | python | [{"finding_id": "codeql_py/log-injection_b74dd9954ffabe96_49059f99", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
35,
35
] | [
null,
null
] | [
64,
80
] | [
78,
97
] | |
2024-11-19T00:25:33.003038+00:00 | 1,568,104,675,000 | 9e0d67bf670d8db6747672d24c027e5b58b68b5c | 2 | {
"blob_id": "9e0d67bf670d8db6747672d24c027e5b58b68b5c",
"branch_name": "refs/heads/master",
"committer_date": 1568104675000,
"content_id": "98b1e5ec04420a8f4b081b789dd7207c6a539412",
"detected_licenses": [
"MIT"
],
"directory_id": "b552bdc0dfef1c9820668a45e6eba31948d99403",
"extension": "py",
"fi... | 2.484375 | stackv2 | # coding: utf-8
from random import choice
from flask import Blueprint, g, request
from web.core import get_redis_db
bp = Blueprint("proxypool", __name__, url_prefix='/proxypool')
REDIS_KEY = 'proxies'
def _get_conn():
if not hasattr(g, 'redis'):
g.redis = get_redis_db()
return g.redis
def _get_... | 57 | 16.89 | 62 | 12 | 283 | python | [{"finding_id": "codeql_py/reflective-xss_bfc9aaa334cfb226_526ae8e9", "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)."
] | [
40
] | [
null
] | [
12
] | [
14
] | |
2024-11-19T00:25:36.290764+00:00 | 1,579,533,390,000 | c72b9280d164af8f281788cc4bc254190d717810 | 3 | {
"blob_id": "c72b9280d164af8f281788cc4bc254190d717810",
"branch_name": "refs/heads/master",
"committer_date": 1579533390000,
"content_id": "ecfdd1a93d3b1962f84580feacd58ee6da685de1",
"detected_licenses": [
"MIT"
],
"directory_id": "2149f0fbc53abfe2458c369ab8aa7cf90fd1c57e",
"extension": "py",
"fi... | 2.546875 | stackv2 | # web-app for API image manipulation
from flask import Flask, request, render_template, send_from_directory
import os
from PIL import Image
import cv2
import sys
import requests
import pandas as pd
import requests
import re
import json
import os
app = Flask(__name__)
app.config["CACHE_TYPE"] = "null"
app.config['SEN... | 102 | 25.37 | 99 | 15 | 627 | python | [{"finding_id": "codeql_py/path-injection_836274e9ac462184_d4a66c0c", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
53
] | [
null
] | [
17
] | [
28
] | |
2024-11-19T01:02:36.808771+00:00 | 1,682,597,348,000 | 8c15d8ade665a9029ca02d57fdc02db466a4f53d | 3 | {
"blob_id": "8c15d8ade665a9029ca02d57fdc02db466a4f53d",
"branch_name": "refs/heads/main",
"committer_date": 1682597348000,
"content_id": "26bd904c9e52cecd3e2e97499f12c259adc4d7c7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b652aff73d820d121bc5e3558a4bf58583101f14",
"extension": "py",
... | 3.421875 | stackv2 | from ..supported_types import DURATION
from ..abstractType import Type
import re
class Duration(Type):
def get_type(self, input_str):
try:
if self.__valid_duration(input_str):
return DURATION
return False
except:
return False
def __valid_dur... | 30 | 26.77 | 99 | 12 | 216 | python | [{"finding_id": "codeql_py/redos_6f158e60baa1e598_f705b044", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '9'.", "remediati... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '9'.",
"This part of the regular expression may cause exponential backtracking on strings starting with '9.' and containing many repetitions of '999.'."
] | [
20,
20
] | [
null,
null
] | [
29,
35
] | [
32,
38
] | |
2024-11-19T01:02:48.337640+00:00 | 1,483,472,841,000 | 7ed4d7dcb8e047fdaedba7fa194e3e72ba72cdac | 3 | {
"blob_id": "7ed4d7dcb8e047fdaedba7fa194e3e72ba72cdac",
"branch_name": "refs/heads/master",
"committer_date": 1483472841000,
"content_id": "6c8cec897224c0317f5bc0204e17c71797d6d8d6",
"detected_licenses": [
"MIT"
],
"directory_id": "4ca5a7ad2be28eebec0351704d58256238c862cc",
"extension": "py",
"fi... | 2.890625 | stackv2 | import requests
import pandas as pd
from bs4 import BeautifulSoup
import json
import re
import time
import csv
zips = pd.read_csv('Wisc Zips.csv')['Zip Code']
writefile = 'test-Wisconsin_lat_long.csv'
session = requests.session()
pattern = re.compile(r'YPU = (.*?);')
def get_yp_url(zipcode, page):
url = 'http://... | 58 | 29.28 | 96 | 16 | 415 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2f4de20e64b0fb1d_28923894", "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."
] | [
55,
55
] | [
null,
null
] | [
46,
63
] | [
61,
79
] | |
2024-11-19T01:02:57.948851+00:00 | 1,566,879,203,000 | e0502f7d3e8eb21dacbdd76ab8878c7b29221ee2 | 3 | {
"blob_id": "e0502f7d3e8eb21dacbdd76ab8878c7b29221ee2",
"branch_name": "refs/heads/master",
"committer_date": 1566879203000,
"content_id": "fe2205ca38a2cdff26878b902a23e3543fda30b4",
"detected_licenses": [
"MIT"
],
"directory_id": "80fcc4911e8479bdc008657dff17329e43eb1c49",
"extension": "py",
"fi... | 3.21875 | stackv2 | # -*- coding: latin-1 -*-
### LogRhythm Echo usecases launcher
### Julio Cesar Rodriguez Dominguez <jurasec@gmail.com>
# Import the necessary packages
from consolemenu import *
from consolemenu.items import *
import requests
def webRequestUseCases():
urlApi = "https://localhost:33333/api/usecases"
response... | 38 | 28.11 | 94 | 11 | 273 | python | [{"finding_id": "codeql_py/request-without-cert-validation_370935d5da5325e5_9f5108cf", "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)."
] | [
15,
21
] | [
null,
null
] | [
16,
5
] | [
50,
43
] | |
2024-11-19T00:16:10.488162+00:00 | 1,664,126,956,000 | 811aaa403efcff8d3396f9313f70ed3a53c91e58 | 3 | {
"blob_id": "811aaa403efcff8d3396f9313f70ed3a53c91e58",
"branch_name": "refs/heads/master",
"committer_date": 1664126956000,
"content_id": "f4f267343ca49fe7bbec56e10a25aac23a917f4c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "c416c737b4db6f34333cb071e19bdc4f6418507e",
"extension": "p... | 3.265625 | stackv2 | """ Generate responsive HTML emails from Markdown files used in a pelican blog.
Refer to https://pbpython.com/ for the details.
"""
from markdown2 import Markdown
from pathlib import Path
from jinja2 import Environment, FileSystemLoader
from premailer import transform
from argparse import ArgumentParser
from bs4 impo... | 88 | 30.97 | 79 | 13 | 609 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_25c0268cbbd38bbd_e3e4ba93", "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."
] | [
65
] | [
null
] | [
11
] | [
52
] | |
2024-11-19T00:28:22.959415+00:00 | 1,674,064,999,000 | e5746f4f52396b403f81454e713410a910a7bc51 | 2 | {
"blob_id": "e5746f4f52396b403f81454e713410a910a7bc51",
"branch_name": "refs/heads/master",
"committer_date": 1674064999000,
"content_id": "a46dbdce59636b28caf83c9bdcdf3057c0718b65",
"detected_licenses": [
"MIT"
],
"directory_id": "02bde3948681b41ab5b94553cc87ca2bfd38f159",
"extension": "py",
"fi... | 2.3125 | stackv2 | import os
import cv2
import time
import threading
import queue
import argparse
import json
import numpy as np
import torch
from Detection.Utils import ResizePadding
from CameraLoader import CamLoader, CamLoader_Q
from DetectorLoader import TinyYOLOv3_onecls
from PoseEstimateLoader import SPPE_FastPose
from fn import... | 187 | 36.17 | 107 | 20 | 1,772 | python | [{"finding_id": "codeql_py/path-injection_a1c2a0256b9730ed_affb6cf3", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
75
] | [
null
] | [
19
] | [
27
] | |
2024-11-19T01:30:53.180702+00:00 | 1,511,172,698,000 | d724bcc79f89bc817bfa3faab767c63de886f41f | 2 | {
"blob_id": "d724bcc79f89bc817bfa3faab767c63de886f41f",
"branch_name": "refs/heads/master",
"committer_date": 1511172698000,
"content_id": "1afb3a4124786fa3dcc2fe7d64b4103c942f94d5",
"detected_licenses": [
"MIT"
],
"directory_id": "cd529735d1ac558844a5c562e7ce2d43821fa1a9",
"extension": "py",
"fi... | 2.46875 | stackv2 | ## coding: utf-8
from flask import Flask
from flask import render_template, request, Response, make_response, redirect, jsonify
import datetime, re, time, os, shutil
import json, sqlite3
from cStringIO import StringIO
app = Flask(__name__)
## models
class File:
def __init__(self, token, stream):
if ... | 287 | 34.49 | 172 | 22 | 2,522 | python | [{"finding_id": "codeql_py/command-line-injection_8758409621fe165e_d1382c3d", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 7 | true | [
"CWE-078",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/command-line-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided... | [
152,
22,
195,
197,
199,
200,
202
] | [
null,
null,
null,
null,
null,
null,
null
] | [
15,
19,
23,
33,
38,
39,
35
] | [
24,
32,
24,
34,
49,
50,
46
] | |
2024-11-19T02:05:01.199682+00:00 | 1,559,716,581,000 | e66702f3fec10eb7ada5572eb70be9a22d430bda | 3 | {
"blob_id": "e66702f3fec10eb7ada5572eb70be9a22d430bda",
"branch_name": "refs/heads/master",
"committer_date": 1559716581000,
"content_id": "a4e58d3e50bcdd1bb9af9dee75936eabc00003da",
"detected_licenses": [
"MIT"
],
"directory_id": "db6bcfe897291b2f863836b565432420343f2391",
"extension": "py",
"fi... | 2.609375 | stackv2 | """core tools."""
import os
import glob
import json
import concurrent.futures
import urllib.request
from urllib.parse import urlencode, urlparse, quote
import lxml.html
import asyncio
from requests_html import AsyncHTMLSession as AsyncRequestHTMLSession
PROJECT_DIR = os.path.dirname(
os.path.dirname(
o... | 142 | 24.75 | 137 | 15 | 884 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_2449b3df540542aa_d0198c74", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://fanyi.baidu.com](1) may be at an arbitrary pos... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [https://fanyi.baidu.com](1) may be at an arbitrary position in the sanitized URL."
] | [
28
] | [
null
] | [
12
] | [
51
] | |
2024-11-19T02:01:02.589055+00:00 | 1,457,516,936,000 | e052365a1e6d79126e192ab77aac046708cb311c | 3 | {
"blob_id": "e052365a1e6d79126e192ab77aac046708cb311c",
"branch_name": "refs/heads/master",
"committer_date": 1457516936000,
"content_id": "de1eb940eedf4671bfae6ff12d017821286e6fab",
"detected_licenses": [
"MIT"
],
"directory_id": "fb8cf6ba4220416a5af5e6ba618716e8ea73245e",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from flask import Flask,redirect,request,make_response
app=Flask(__name__)
@app.route('/')
def v_index():
if request.cookies != None:
rsp=make_response(redirect('/newbies'))
rsp.set_cookie('user','tongkun')
return rsp
else:
#如果是新用户,如何处理?
# rsp=make_response(redi... | 27 | 21.59 | 57 | 14 | 179 | python | [{"finding_id": "codeql_py/reflective-xss_3b4d9816ca3e90a8_2a6b419e", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
22
] | [
null
] | [
9
] | [
58
] | |
2024-11-19T00:04:23.505283+00:00 | 1,523,866,723,000 | 38ee158c965631c4a57b7c01a87e0b5e802a1b7f | 2 | {
"blob_id": "38ee158c965631c4a57b7c01a87e0b5e802a1b7f",
"branch_name": "refs/heads/master",
"committer_date": 1523866723000,
"content_id": "592f77890c4baa19376d42480499678d7c366b06",
"detected_licenses": [
"MIT"
],
"directory_id": "bb5d1e84a048833eac83e419fb9d7f1c17631b57",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@version: ??
@author: xiaoming
@license: MIT Licence
@contact: xiaominghe2014@gmail.com
@site:
@software: PyCharm
@file: get_book.py
@time: 2018/4/14 下午7:10
"""
import os
import re
import requests
from lxml import etree
requests.packages.urllib3.disable_warnings()
url_ba... | 120 | 29.77 | 103 | 14 | 1,060 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e15ac5ef937c3acc_fe8173de", "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)."
] | [
64
] | [
null
] | [
12
] | [
72
] | |
2024-11-19T00:27:15.398042+00:00 | 1,663,363,465,000 | 8dec551be1cc2efc3233e9d63af3aab389554ba5 | 2 | {
"blob_id": "8dec551be1cc2efc3233e9d63af3aab389554ba5",
"branch_name": "refs/heads/master",
"committer_date": 1663363465000,
"content_id": "1a74549f221717f5f64b9c96734588c631e21133",
"detected_licenses": [
"MIT"
],
"directory_id": "e7e497b7385288d46ade80c85075674823d00249",
"extension": "py",
"fi... | 2.453125 | stackv2 | import flask
from pypi_org.infrastructure.view_modifiers import response
from pypi_org.viewmodels.packages.pagedetails_viewmodel import PackageDetailsViewModel
blueprint = flask.Blueprint('packages', __name__, template_folder='templates')
@blueprint.route('/project/<package_name>')
@response(template_file='packages... | 22 | 29.36 | 86 | 11 | 147 | python | [{"finding_id": "codeql_py/reflective-xss_3e94e11d7c69d7eb_f0e1e9b0", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
22
] | [
null
] | [
12
] | [
72
] | |
2024-11-19T00:40:23.579622+00:00 | 1,601,482,381,000 | aff0d3c58d802e9856d66b1a388af5065d9fba72 | 3 | {
"blob_id": "aff0d3c58d802e9856d66b1a388af5065d9fba72",
"branch_name": "refs/heads/master",
"committer_date": 1601482381000,
"content_id": "eab187c63f955c4d1c0fa36ad35e0bc7c8fcf959",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9456bfd645a151922bfde26aabb346a86ca0a3b3",
"extension": "py"... | 2.953125 | stackv2 | # Coding 205 Example
# This example retrieves a list of network devices using the APIC-EM APIs
# Then we write the network device ID and type for each device out to a file.
# * THIS SAMPLE APPLICATION AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
# * OF ANY KIND BY CISCO, EITHER EXPRESSED OR IMPLIED, INCLUDING... | 84 | 45.39 | 120 | 13 | 943 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e08a760e795a21b9_bb330096", "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)."
] | [
47,
63
] | [
null,
null
] | [
11,
24
] | [
91,
83
] | |
2024-11-19T01:17:15.941237+00:00 | 1,610,941,799,000 | f3a91b261b1841753bd1a8adc33ebab94ae0ae87 | 3 | {
"blob_id": "f3a91b261b1841753bd1a8adc33ebab94ae0ae87",
"branch_name": "refs/heads/main",
"committer_date": 1610941799000,
"content_id": "72734c5e94f7241b379043ac8e97f406c378d8a8",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f6c7852652dff0af0b8c481e7013165611682433",
"extension": "py"... | 2.84375 | stackv2 | # capualator - calculator with hidden vault
# created by : Chris Taylor [C0SM0]
# imports
from cryptography.fernet import Fernet # pip req
from PIL import Image, ImageTk # pip req
from tkinter import messagebox
from tkinter import *
import os
# root initialization
root = Tk()
root.title('Capulator')
root.config(bg='#... | 278 | 32.04 | 152 | 15 | 2,729 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_9819762ab21305f5_a886e23f", "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."
] | [
143
] | [
null
] | [
17
] | [
35
] | |
2024-11-19T01:17:29.010638+00:00 | 1,403,192,449,000 | c89bf374cbda940df0fc12d9f43801e4c8aff1e4 | 3 | {
"blob_id": "c89bf374cbda940df0fc12d9f43801e4c8aff1e4",
"branch_name": "refs/heads/master",
"committer_date": 1403192449000,
"content_id": "49b70fb4af8391ccadc943d140a9ce35aaed30b7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2f88fa972319f627bb98d58eacb1787114db53bb",
"extension": "py"... | 2.796875 | stackv2 | import hashlib
import random
import quopri
import StringIO
from string import letters
from secrets import secret_string
import hmac
import time
from hashlib import sha1
# password hash
def make_salt(length=10):
return ''.join(random.choice(letters) for x in xrange(length))
def make_pw_hash(name, pw, salt=None):... | 89 | 25.9 | 121 | 14 | 590 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_87746c1aeae46c8d_45cdb258", "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."
] | [
20
] | [
null
] | [
24
] | [
40
] | |
2024-11-19T01:17:44.310922+00:00 | 1,655,875,357,000 | d3fa6efeb6e5b59008a6be8f1952ebbd1a77ac4f | 3 | {
"blob_id": "d3fa6efeb6e5b59008a6be8f1952ebbd1a77ac4f",
"branch_name": "refs/heads/master",
"committer_date": 1655875357000,
"content_id": "00f284085978ae7275f4da7fe61d6aa9f46439fa",
"detected_licenses": [
"MIT"
],
"directory_id": "08ad52ed4d6b33d464d245273f060bd0722029ea",
"extension": "py",
"fi... | 2.5625 | stackv2 | """Start a webserver which can record the data and work as a classifier."""
# Core Library modules
import json
import logging
import os
import uuid
from typing import Any, Dict, List, Optional
# Third party modules
import pkg_resources
import requests
from flask import Flask, render_template, request
from flask_boots... | 356 | 29.16 | 90 | 19 | 2,494 | python | [{"finding_id": "codeql_py/reflective-xss_510b3c2ffb50a0e9_ec53bd9e", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
93,
139
] | [
null,
null
] | [
16,
20
] | [
49,
61
] | |
2024-11-19T01:17:54.032055+00:00 | 1,581,356,326,000 | 5b5f09ef6f014de41cf89ca3a314eb40bd1bc29b | 3 | {
"blob_id": "5b5f09ef6f014de41cf89ca3a314eb40bd1bc29b",
"branch_name": "refs/heads/master",
"committer_date": 1581356326000,
"content_id": "49e2f91e8456d19e200da8d5e155c88b57eb0012",
"detected_licenses": [
"MIT"
],
"directory_id": "f8009cbcb8e455c5a08326ddf9d755dab4935e1b",
"extension": "py",
"fi... | 2.5625 | stackv2 | from functools import wraps
from flask import Flask, request, jsonify
import uuid
app = Flask(__name__)
def _mock_get_things_from_db(id=None):
things = [{'id': '2ce41c1a-095e-4e1f-8c08-59bfd89fa806', 'name': 'thing1'},
{'id': 'c1a68009-97f0-4ca9-94fd-c300b63314b1', 'name': 'thing2'}]
if id:
... | 92 | 23.16 | 79 | 18 | 608 | python | [{"finding_id": "codeql_py/stack-trace-exposure_84c14907ec96d930_3d0b8e0b", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-215",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"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)."
] | [
31,
92,
66
] | [
null,
null,
70
] | [
24,
5,
12
] | [
40,
49,
6
] | |
2024-11-19T00:03:19.432194+00:00 | 1,521,195,662,000 | bd32a401ea31e117b93f37dd3e9ae77016bfd10a | 3 | {
"blob_id": "bd32a401ea31e117b93f37dd3e9ae77016bfd10a",
"branch_name": "refs/heads/master",
"committer_date": 1521195662000,
"content_id": "21e7160901208268756be30ff511d026c54d89a6",
"detected_licenses": [
"MIT"
],
"directory_id": "881feb2b9e0090985c0a82fe3d53181b0689bb94",
"extension": "py",
"fi... | 2.625 | stackv2 | from flask import Flask, render_template, json, jsonify, request
import flask
from database import Database
import os
app = Flask(__name__)
db = Database()
db.create_table()
@app.route('/api/movies', methods=['GET', 'POST'])
def get_movies():
try:
if flask.request.method == 'POST':
db.insert_movie(request.jso... | 29 | 23.52 | 76 | 15 | 186 | python | [{"finding_id": "codeql_py/stack-trace-exposure_b62eddea2bac5e3f_3c7704ce", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-215"
] | [
"py/stack-trace-exposure",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
22,
29
] | [
null,
null
] | [
42,
2
] | [
48,
77
] | |
2024-11-19T01:14:55.553110+00:00 | 1,507,488,163,000 | 791c76f381c4de6d88c420962b4912e1e3641691 | 3 | {
"blob_id": "791c76f381c4de6d88c420962b4912e1e3641691",
"branch_name": "refs/heads/master",
"committer_date": 1507488163000,
"content_id": "1c0db6c04602a9c7cedf2b97560b85cb15ae23fd",
"detected_licenses": [
"MIT"
],
"directory_id": "dd8a64a368d1f422d56e5da3e21592b290060296",
"extension": "py",
"fi... | 2.515625 | stackv2 | import os
from inspect import signature
from . import db
from . import settings
class Entry:
def __init__(self, id_=None, author=None, date=None, body=None, body_html=None, url=None,
plus=None, media_url=None, tags=None, is_nsfw=None, entry_id=None, type_=None):
self.id_ = id_
se... | 73 | 30.84 | 96 | 17 | 552 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_4b2046c0fa30c4de_bc10eb6c", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [gfycat.com](1) may be at an arbitrary position in the ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [gfycat.com](1) may be at an arbitrary position in the sanitized URL."
] | [
55
] | [
null
] | [
30
] | [
60
] | |
2024-11-19T01:15:11.514759+00:00 | 1,538,120,410,000 | 3e2b26e693d4bac6253f9f09e48a54073f26ba75 | 2 | {
"blob_id": "3e2b26e693d4bac6253f9f09e48a54073f26ba75",
"branch_name": "refs/heads/master",
"committer_date": 1538120410000,
"content_id": "b09b9b40cc7d158cfd6dbbf7212ac6169815d64c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c3683283a7b4553bf2a4ddccbf2827e406238ab2",
"extension": "py"... | 2.421875 | stackv2 | import os
import subprocess
from rest_framework import status
from rest_framework.response import Response
from rest_framework.generics import GenericAPIView
from .serializers import VolumeSerializer
class Volume(GenericAPIView):
queryset = []
serializer_class = VolumeSerializer
def get(self, request, fo... | 30 | 33.53 | 107 | 14 | 222 | python | [{"finding_id": "codeql_py/command-line-injection_3bb0d2768d4418d0_1e54748b", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 1 | true | [
"CWE-078"
] | [
"py/command-line-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1)."
] | [
29
] | [
null
] | [
19
] | [
22
] | |
2024-11-19T01:15:21.681642+00:00 | 1,607,431,438,000 | 2b79057b57b3614b93d1fecbbf544c80618a6a19 | 3 | {
"blob_id": "2b79057b57b3614b93d1fecbbf544c80618a6a19",
"branch_name": "refs/heads/main",
"committer_date": 1607431438000,
"content_id": "f4e26111f33827db21a841a02cfb990b981dda6b",
"detected_licenses": [
"MIT"
],
"directory_id": "4ebb06450c79980f5726bba62e1a61dad811c1da",
"extension": "py",
"file... | 2.734375 | stackv2 | import requests
import re
import json
import logging
import urllib.parse as urlparse
from bs4 import BeautifulSoup
from base.config_loader import ConfigLoader
class WebAdapter(ConfigLoader):
'''
Adapter for fetching pages from various HTML data sources
such as Wikipedia
'''
headers = {
'... | 87 | 34.99 | 79 | 19 | 709 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1175d71da2a09387_e6249c1e", "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."
] | [
86
] | [
null
] | [
27
] | [
36
] | |
2024-11-19T00:43:45.300265+00:00 | 1,620,613,530,000 | 01143f6973c1b78915ef0386761ea555339f6849 | 3 | {
"blob_id": "01143f6973c1b78915ef0386761ea555339f6849",
"branch_name": "refs/heads/main",
"committer_date": 1620613530000,
"content_id": "b525ea02f60fe4bbde6c298525dce96a625a1b08",
"detected_licenses": [
"MIT"
],
"directory_id": "5051132f0227b286557fe08784d95b612f225f9c",
"extension": "py",
"file... | 2.9375 | stackv2 | import hashlib
def crack_sha1_hash(hash, use_salts=False):
with open('top-10000-passwords.txt', 'r') as passFile:
if use_salts == False:
for password in passFile:
password=password.splitlines()[0]
if hashlib.sha1(password.encode()).hexdigest() == hash:
return(password)
retur... | 22 | 38.05 | 72 | 25 | 195 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_b5d0d5e4cbaf5fd3_b3e400a1", "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... | 3 | true | [
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"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... | [
8,
17,
18
] | [
null,
null,
null
] | [
25,
35,
36
] | [
42,
59,
60
] | |
2024-11-19T00:43:57.056325+00:00 | 1,644,547,773,000 | 567bc86a0399a8f8f5f75a95b92c5b2bd82c6d90 | 2 | {
"blob_id": "567bc86a0399a8f8f5f75a95b92c5b2bd82c6d90",
"branch_name": "refs/heads/master",
"committer_date": 1644547773000,
"content_id": "2a8310ded3a3b950a0001a44054b8c5407d452d3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5e566cbe35c36eb1e58700ceec376cc0ea4ba903",
"extension": "py"... | 2.328125 | stackv2 | import logging
from typing import Tuple, Optional
import redis
from flask import current_app
from redis import Redis
from sqlalchemy import create_engine
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm import sessionmaker
from backend.database.objects import DBObjectBase
try:
import config
DB... | 125 | 28.34 | 116 | 18 | 753 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_59eff66c2280a6b7_826b5bab", "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."
] | [
27
] | [
null
] | [
11
] | [
28
] | |
2024-11-19T01:43:49.896234+00:00 | 1,519,555,088,000 | 443ccce0e526232c33694f0aa90e8124d4a796ba | 3 | {
"blob_id": "443ccce0e526232c33694f0aa90e8124d4a796ba",
"branch_name": "refs/heads/master",
"committer_date": 1519555088000,
"content_id": "e8d8fc112f52a44e404177c27298edb05fd8f49b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "77dec7c9e9da76d55695c2a4d42d150d2b93836c",
"extension": "py"... | 2.71875 | stackv2 | import boto3
import json
rek = boto3.client('rekognition') # Setup Rekognition
s3 = boto3.resource('s3') # Setup S3
print("Getting Image")
image = s3.Object('peepaal-facedetect','trumprecognition.png') # Get an Image from S3
img_data = image.get()['Body'].read() # Read the image
print("Image retrieved")
print("Sendi... | 54 | 28.09 | 137 | 16 | 411 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_03b97e240950e601_84cb4530", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
40
] | [
null
] | [
11
] | [
14
] | |
2024-11-19T01:44:09.835283+00:00 | 1,572,641,249,000 | 13f6343a22567c01952a6ae734e83ad84c312cf4 | 3 | {
"blob_id": "13f6343a22567c01952a6ae734e83ad84c312cf4",
"branch_name": "refs/heads/master",
"committer_date": 1572641249000,
"content_id": "f871493ccd448618077d8c217bca8684c648cfb7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "97b2a9f73e902649a74ab138610b20d2a7084282",
"extension": "py"... | 2.65625 | stackv2 | import re
import logging
import sys
import json
from io import open
log = logging.getLogger()
WIKI_PREFIX = re.compile('^http://[^.]+.wikipedia.org/wiki/')
try:
unicode = unicode
except NameError:
unicode = str
def normalise_link(l):
""" Normalise links.
* strips Wikipedia article prefixes.
* ... | 36 | 20.86 | 79 | 13 | 191 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_338b32f6f8461dec_619e5d88", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'wikipedia.org/wiki/', so it might m... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'wikipedia.org/wiki/', so it might match more hosts than expected."
] | [
9
] | [
null
] | [
27
] | [
60
] | |
2024-11-19T00:59:36.189401+00:00 | 1,588,655,287,000 | 5b0ea0136499b85c193ba541b545d82be629c3cd | 3 | {
"blob_id": "5b0ea0136499b85c193ba541b545d82be629c3cd",
"branch_name": "refs/heads/master",
"committer_date": 1588655287000,
"content_id": "385815b8ac653c6a771b197f67c43434ea4ddb66",
"detected_licenses": [
"MIT"
],
"directory_id": "9492d3fb3cf1f0f79c080a540d7e267f6562cb82",
"extension": "py",
"fi... | 2.796875 | stackv2 | import re
example_string = """
daniel#1234@gmail.com
Fhewfb#186
Juven5876@gmail.com
HDFKHG287#
Phantom#123
Dyn_586
ImIn54n3
h.kdjfhkdf@gmail.com
DFj_545@gmail.com
... | 43 | 27.07 | 97 | 8 | 365 | python | [{"finding_id": "codeql_py/overly-large-range_e816642ef9d9cec3_df0f31bf", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and overlaps with A-Z in ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with 0-9 in the same character class, and overlaps with A-Z in the same character class, and is equivalent to \\[+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
27
] | [
null
] | [
91
] | [
94
] | |
2024-11-19T00:59:39.001100+00:00 | 1,625,674,590,000 | d301b45cd523c4b9dbda14aeb7b0e2aa9e460e3c | 2 | {
"blob_id": "d301b45cd523c4b9dbda14aeb7b0e2aa9e460e3c",
"branch_name": "refs/heads/main",
"committer_date": 1625674590000,
"content_id": "7043c3ec9c483d69e0578f1a111d04475e0a5e5d",
"detected_licenses": [
"MIT-0"
],
"directory_id": "cac8af7c09a9305878a7f56c11154a059df9e673",
"extension": "py",
"fi... | 2.3125 | stackv2 | ##dialer
import json
import boto3
import os
from datetime import datetime
from boto3.dynamodb.conditions import Key
def upload_dial_record(dialIndex, custID, calleeContacts, table):
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table(table)
try:
response = table.update_item(
... | 194 | 26.84 | 121 | 14 | 1,179 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f0481d848bcc9432_b74e5363", "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."
] | [
45
] | [
null
] | [
15
] | [
41
] | |
2024-11-19T01:00:06.132505+00:00 | 1,605,012,822,000 | 076f8bec442d56e09209dc65603b731c8d9cea7e | 3 | {
"blob_id": "076f8bec442d56e09209dc65603b731c8d9cea7e",
"branch_name": "refs/heads/master",
"committer_date": 1605012822000,
"content_id": "d229376711f9824dc22dd035971a4ad1d73bf7cd",
"detected_licenses": [
"MIT"
],
"directory_id": "69d706f4093a6930aa79d9a879521c271f9b0cdc",
"extension": "py",
"fi... | 2.5625 | stackv2 | #!/usr/bin/python3
# Author: alexn11 (alexn11.gh@gmail.com)
# Created: 2018-10-21
# Copyright (C) 2018, Alexandre De Zotti
# License: MIT License
"""
That's just a toy CGI and should not be used in production environment.
There is absolutely no safety feature or verification whatsoever.
It is REALLY not advised to ... | 102 | 24.18 | 129 | 12 | 687 | python | [{"finding_id": "codeql_py/command-line-injection_6042cc0449c14e78_2916bba5", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).\nThis command line depends on a [u... | 1 | true | [
"CWE-078"
] | [
"py/command-line-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).\nThis command line depends on a [user-provided value](1)."
] | [
76
] | [
null
] | [
45
] | [
67
] | |
2024-11-19T01:00:13.252612+00:00 | 1,607,845,580,000 | e131ddcacd17facc62271089b90e271c89c2fde5 | 3 | {
"blob_id": "e131ddcacd17facc62271089b90e271c89c2fde5",
"branch_name": "refs/heads/main",
"committer_date": 1607845580000,
"content_id": "87e7284e9cbba947fa0e13680d09d11e7bb2230c",
"detected_licenses": [
"MIT"
],
"directory_id": "b4f29b03d934cc5197e968d067b082592d5012cb",
"extension": "py",
"file... | 3.0625 | stackv2 | """
Parser for rfc8288 links.
"""
import re
from io import StringIO
from typing import Dict, List, Set, Tuple
from urllib.parse import unquote
__all__ = ["parse_link_header"]
def decode_extended_value(value: str) -> Tuple[str, str, str]:
"""
Decode ext-value according to rfc8187
"""
match = RE_EXT_V... | 261 | 26.35 | 118 | 19 | 1,714 | python | [{"finding_id": "codeql_py/overly-large-range_49c177ff653063a1_b0735abb", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[#$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\].", "remediati... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[#$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\]."
] | [
187
] | [
null
] | [
607
] | [
610
] | |
2024-11-19T01:11:47.172873+00:00 | 1,606,923,937,000 | 04d33f092c220dfdee11c35b767dca373456f777 | 3 | {
"blob_id": "04d33f092c220dfdee11c35b767dca373456f777",
"branch_name": "refs/heads/main",
"committer_date": 1606923937000,
"content_id": "d5b4e8250f4855d487f7e51cea98b237f9b2d031",
"detected_licenses": [
"MIT"
],
"directory_id": "72dadcd30804c770b1fbd6ba609b6fca9440425f",
"extension": "py",
"file... | 3.34375 | stackv2 | """
The periodic table, and all it's info! And functions for doing chemical things.
"""
import os
import re
import pickle
import pandas as pd
def elements(all_isotopes=True):
"""
Loads a DataFrame of all elements and isotopes.
Scraped from https://www.webelements.com/
Returns
-------
pandas ... | 161 | 23.03 | 97 | 16 | 1,100 | python | [{"finding_id": "codeql_py/overly-large-range_e620f3ddca012c84_584a0f23", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
62
] | [
null
] | [
30
] | [
33
] | |
2024-11-19T01:21:39.622562+00:00 | 1,640,178,536,000 | 20b1fca593a35aede72455f90dae39ee7a77397f | 3 | {
"blob_id": "20b1fca593a35aede72455f90dae39ee7a77397f",
"branch_name": "refs/heads/master",
"committer_date": 1640178536000,
"content_id": "50589eac2008a9d2176df207e1a8009acb31ed4b",
"detected_licenses": [
"MIT"
],
"directory_id": "8c77dcc0fd3e497194e572c8641200f08b32dc97",
"extension": "py",
"fi... | 2.609375 | stackv2 | # http://flask.pocoo.org/docs/1.0/api/#api
# $ export FLASK_APP=flask_demo.py
# $ export FLASK_ENV=development
# $ flask run
# $ flask run -h <ip> -p <port>
# $ python -m flask run
from flask import Flask, request, jsonify, abort
app = Flask(__name__)
@app.errorhandler(400)
def bad_json(error):
return 'Error ... | 40 | 23.9 | 81 | 15 | 272 | python | [{"finding_id": "codeql_py/log-injection_a65af916e66985ca_c4f10d6e", "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)."
] | [
26
] | [
null
] | [
22
] | [
81
] | |
2024-11-19T01:22:20.289515+00:00 | 1,590,157,780,000 | f2e091a621162b03d8881156bd8bd8ae1f67b510 | 3 | {
"blob_id": "f2e091a621162b03d8881156bd8bd8ae1f67b510",
"branch_name": "refs/heads/master",
"committer_date": 1590157780000,
"content_id": "19f512d2ac69e6846ee0fa89efb3c80c43b5f721",
"detected_licenses": [
"MIT"
],
"directory_id": "3ecba665fcc64278674a66cd56bae9e664af381f",
"extension": "py",
"fi... | 2.59375 | stackv2 | import os
from jinja2 import Template
from sphinxcontrib.collections.drivers import Driver
class ReportDriver(Driver):
def run(self):
from sphinxcontrib.collections.collections import COLLECTIONS
self.info('Add collection report to file...')
template_path = os.path.join(os.path.dirname(... | 30 | 35.03 | 99 | 16 | 212 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_9e4bf2c5bb7a9558_c99059de", "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."
] | [
14
] | [
null
] | [
20
] | [
56
] | |
2024-11-19T01:56:38.707547+00:00 | 1,648,933,627,000 | dda45c1dcc2cc3ff0ce3e414ca5c32dd810fae7b | 4 | {
"blob_id": "dda45c1dcc2cc3ff0ce3e414ca5c32dd810fae7b",
"branch_name": "refs/heads/master",
"committer_date": 1648933627000,
"content_id": "3c184e24b569340681d9dbdb2ab0f6fae413bf25",
"detected_licenses": [
"MIT"
],
"directory_id": "e29a504b325cbcb1bf900217bc1421785c31af37",
"extension": "py",
"fi... | 3.5625 | stackv2 | """
Examples of John's phone book lines:
"/+1-541-754-3010 156 Alphand_St. <J Steeve>\n"
" 133, Green, Rd. <E Kustur> NY-56423 ;+1-541-914-3010!\n"
"<Anastasia> +48-421-674-8974 Via Quirinal Roma\n"
Could you help John with a program that, given the lines of his phone book and a phone number num returns a string
fo... | 59 | 42.66 | 118 | 20 | 1,100 | python | [{"finding_id": "codeql_py/overly-large-range_0a656c4a939eeb0e_71854c39", "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\\]."
] | [
47
] | [
null
] | [
35
] | [
38
] | |
2024-11-19T01:56:40.296470+00:00 | 1,600,932,816,000 | f7a98fe525b0adc033e2438d546d139b036c4ed0 | 3 | {
"blob_id": "f7a98fe525b0adc033e2438d546d139b036c4ed0",
"branch_name": "refs/heads/master",
"committer_date": 1600932816000,
"content_id": "99fb47653fc32167a3e1fb1698c3e2e4fa8a2c58",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "594cfef01b8a4570c14a64584056d5d1d51fe429",
"extension": "py"... | 2.671875 | stackv2 | """
django_adtools/ad_tools.py
Some tools to use
REQUIREMENTS:
pip install python-ldap # on linux
# on Windows download compiled package for your system from https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap
"""
__author__ = "shmakovpn <shmakovpn@yandex.ru>"
__date__ = "2020-04-15"
import re
import ldap... | 190 | 37.04 | 118 | 16 | 1,757 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_83658a3c302d7813_e3efd6ea", "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... | 5 | true | [
"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"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive... | [
64,
164,
173,
182,
188
] | [
65,
165,
174,
183,
189
] | [
24,
22,
22,
22,
22
] | [
76,
97,
92,
93,
108
] | |
2024-11-19T01:56:52.044550+00:00 | 1,631,211,576,000 | fd05ad0b023332a8f932f7f20be209d1afa7dda2 | 3 | {
"blob_id": "fd05ad0b023332a8f932f7f20be209d1afa7dda2",
"branch_name": "refs/heads/master",
"committer_date": 1631211576000,
"content_id": "26e228c11e8322c8beab1a0ab0923f33d3d10769",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7e1fe6cf389bf43531cf9746e017640b1067b78d",
"extension": "py"... | 2.734375 | stackv2 | import aiofiles
import asyncio
import io
import pathlib
import tarfile
import shutil
from typing import IO
def run(main):
loop = asyncio.new_event_loop()
try:
return loop.run_until_complete(main)
finally:
loop.close()
async def reader(path: pathlib.Path, chunk_size=64*1024) -> bytes:
... | 80 | 24.25 | 70 | 13 | 474 | python | [{"finding_id": "codeql_py/tarslip_d8dec74aceda2b78_45f49532", "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)."
] | [
42
] | [
null
] | [
9
] | [
11
] | |
2024-11-19T02:45:25.795742+00:00 | 1,605,691,358,000 | 59e7d507c7aaf93c4928d9cf31bdf56804297ca5 | 3 | {
"blob_id": "59e7d507c7aaf93c4928d9cf31bdf56804297ca5",
"branch_name": "refs/heads/master",
"committer_date": 1605691358000,
"content_id": "9a69e1c6199a77830fa2ef6445310d6c86fd361a",
"detected_licenses": [
"MIT"
],
"directory_id": "c2eb355aba5064dfacf2d104306f530c5ad29e06",
"extension": "py",
"fi... | 3.1875 | stackv2 | import sys
from promptpay import qrcode
USAGE = """promptpay
Usage:
------
$ promptpay qrcode --id="0841234567"
$ promptpay qrcode --id="0841234567" --file="./qrcode-cli.png"
$ promptpay qrcode --id="0841234567" --show=true
$ promptpay qrcode --id="0841234567" --amount=2.34 --file="/Users/joe/Downloads... | 58 | 28.88 | 111 | 22 | 442 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b95cc8fb90ed0a9d_32d924ca", "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."
] | [
42
] | [
null
] | [
19
] | [
70
] | |
2024-11-19T03:12:11.212084+00:00 | 1,618,895,825,000 | 6d1b033c64a580839071e92c066f19ed4c40b491 | 3 | {
"blob_id": "6d1b033c64a580839071e92c066f19ed4c40b491",
"branch_name": "refs/heads/master",
"committer_date": 1618895825000,
"content_id": "633544f0700484abe6a45cfc6f7c9836232fbbd7",
"detected_licenses": [
"MIT"
],
"directory_id": "cb1bbab9f6d0ea673d212ba3e0a68ab1b4960786",
"extension": "py",
"fi... | 2.625 | stackv2 | from ..starro.starro import starrofy
class MyClass:
def __init__(self):
self._fullname = "Marcos Monteiro Borges"
self._celular = "+55 (11) 99882-6468"
self._cpf = "313.219.708-46"
self._ssn = "517-90-0243"
self._cnpj = "00.313.219/0000-00"
self._mail = "contat... | 133 | 20.35 | 57 | 9 | 961 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0d832dfb3ba2b3ff_fdb6c154", "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."
] | [
126,
128
] | [
null,
null
] | [
7,
7
] | [
49,
51
] | |
2024-11-19T01:33:39.449863+00:00 | 1,615,313,793,000 | 43a790da9e216db1aba32560d51ea32a68001927 | 3 | {
"blob_id": "43a790da9e216db1aba32560d51ea32a68001927",
"branch_name": "refs/heads/main",
"committer_date": 1615313793000,
"content_id": "9f7c6d0092f7770b6f2f7a2bb2c813b3ceae8e41",
"detected_licenses": [
"MIT"
],
"directory_id": "0bca91dd6124c37344104a70e020f8372c035800",
"extension": "py",
"file... | 2.765625 | stackv2 | """
Created on Mon Jan 11 20:08:27 2021
#! Python 3.8
@author: Francis Neequaye
francis.neequaye@gmail.com
"""
"""
Script Instructions
_____
1.Enter the remote IP's addresses of
Cisco (or other) devices on each search
of the Hosts.dat file
2. Enter input commands on each line of
the Commands.dat file
"""
i... | 293 | 23.99 | 127 | 20 | 1,599 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a575cbc643b69b46_260ec131", "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."
] | [
204
] | [
null
] | [
13
] | [
70
] | |
2024-11-19T01:33:46.694128+00:00 | 1,604,931,779,000 | b56bde3b543b547f0ff07d0aa471203b0a9a6d0b | 3 | {
"blob_id": "b56bde3b543b547f0ff07d0aa471203b0a9a6d0b",
"branch_name": "refs/heads/master",
"committer_date": 1604931779000,
"content_id": "e5e23cbb5d6841e8fcdf00220134286c64e5e326",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "633c024f62d68dc36b3c83b73084a9e6fcac3342",
"extension": "py"... | 2.640625 | stackv2 | import re
import sys
import yaml
import jinja2
import getpass
import socket
import os
def take_data(path):
fl = open(path, "r")
data = fl.read()
fl.close
return data
######### get file's names from the command line ###################
if (len(sys.argv)==3):
j2_file = sys.argv[1]
yaml_file = ... | 114 | 23.36 | 108 | 13 | 709 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ac3b5c6e0eeb6513_15a0609d", "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."
] | [
33
] | [
null
] | [
7
] | [
58
] | |
2024-11-19T01:57:27.700215+00:00 | 1,583,981,254,000 | 4ea9c0fe9e4692e8b6103bd3f8718ba41ac7b277 | 3 | {
"blob_id": "4ea9c0fe9e4692e8b6103bd3f8718ba41ac7b277",
"branch_name": "refs/heads/master",
"committer_date": 1583981254000,
"content_id": "dacc95761fb43f16aec78eabaa4b48519af8c5f3",
"detected_licenses": [
"MIT"
],
"directory_id": "b303f663713e617eb4c131cc1b8b5c52adf5fb90",
"extension": "py",
"fi... | 2.640625 | stackv2 | import sys
import os
import time
import tarfile
# import urllib.request as urllib2
import urllib.parse as urlparse
import requests
from PIL import Image
from io import StringIO
class ImageNetDownloader:
def __init__(self):
self.host = 'http://www.image-net.org'
def download_file(self, url, desc=Non... | 174 | 38.72 | 156 | 19 | 1,629 | python | [{"finding_id": "codeql_py/tarslip_9250f17c4bc2e419_c6cd35f1", "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)."
] | [
56
] | [
null
] | [
9
] | [
12
] | |
2024-11-19T02:11:07.218705+00:00 | 1,591,895,514,000 | 6366afa95a8d0d19f15b3b282a25f41fc79ddb6a | 3 | {
"blob_id": "6366afa95a8d0d19f15b3b282a25f41fc79ddb6a",
"branch_name": "refs/heads/master",
"committer_date": 1591895514000,
"content_id": "c42a16e309310cf80b6dfef23ff4507e07efbd9a",
"detected_licenses": [
"MIT"
],
"directory_id": "b4959f99e6421dd26b3c96e7d387688a5be0788f",
"extension": "py",
"fi... | 3.15625 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 9 13:12:07 2019
@author: PHassett
"""
import os
import copy
import jinja2
import pandas as pd
class wn_dataframe(object):
'''
A WaterNetwork Dataframe class specifically designed for mapping network
components and their attributes
wn: wntr WaterNetwork... | 135 | 40.93 | 95 | 19 | 1,197 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_505ecea648a3d9d7_cf4fe20a", "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."
] | [
120
] | [
121
] | [
18
] | [
54
] | |
2024-11-19T02:11:18.214857+00:00 | 1,615,903,503,000 | 80caa13f96ba2b3006fbc1e391caa12d1214ca82 | 3 | {
"blob_id": "80caa13f96ba2b3006fbc1e391caa12d1214ca82",
"branch_name": "refs/heads/main",
"committer_date": 1615903503000,
"content_id": "20e042e69a03d97266bb7edf5c6adcd32cc85157",
"detected_licenses": [
"MIT"
],
"directory_id": "198c2817baf6af8a89d4f7709cb8ae1683dd5ce8",
"extension": "py",
"file... | 2.90625 | stackv2 | # https://portswigger.net/web-security/sql-injection/blind/lab-conditional-responses
# Be sure to replace the URL, the Session Cookie and the Tracking ID cookie with your own.
# Huge help from Neisan and Haxguy. Couldn't have do it with out you.
import requests
import string
#Replace this Section with your URL and ... | 62 | 29.21 | 126 | 18 | 551 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b24c7f70153e2c78_5886e73c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
53,
57
] | [
null,
null
] | [
10,
11
] | [
16,
107
] | |
2024-11-19T02:11:19.259539+00:00 | 1,609,582,864,000 | 67828f16f72196e5ae61697708e25c4dc987d2c4 | 3 | {
"blob_id": "67828f16f72196e5ae61697708e25c4dc987d2c4",
"branch_name": "refs/heads/main",
"committer_date": 1609582864000,
"content_id": "878f8f8d787f7e5c6a7f195e3e934d2745bcc2d7",
"detected_licenses": [
"MIT"
],
"directory_id": "4bc3c02bd482de9e4c2188f5e1867a654afb4603",
"extension": "py",
"file... | 2.8125 | stackv2 | #Import necessary libraries
from flask import Flask, render_template, request
import numpy as np
import os
from keras.preprocessing.image import load_img
from keras.preprocessing.image import img_to_array
from keras.models import load_model
#load model
model =load_model("model/v3_pred_cott_dis.h5")
print('@@ Model ... | 71 | 29.49 | 94 | 12 | 541 | python | [{"finding_id": "codeql_py/path-injection_25e9d616ab79d462_aceb52d8", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
60
] | [
null
] | [
19
] | [
28
] | |
2024-11-19T02:32:49.182425+00:00 | 1,609,424,578,000 | 7207eae27dfcd4651f8c19197d4fd870305cee7f | 3 | {
"blob_id": "7207eae27dfcd4651f8c19197d4fd870305cee7f",
"branch_name": "refs/heads/master",
"committer_date": 1609424578000,
"content_id": "87b48e515566106f0507177bf3c6464d8dc180bb",
"detected_licenses": [
"MIT"
],
"directory_id": "552919623df750a42a55cc900807c5aa3219f9f4",
"extension": "py",
"fi... | 3.140625 | stackv2 | #!/usr/bin/env python3
# https://www.hackthebox.eu/home/challenges/Web?name=Emdee%20five%20for%20life
import requests
import hashlib
import time
import re
start_time = time.clock()
url = 'http://144.126.196.214:30773/'
# the biggest gotcha is keeping the same session
# over the request to get the string to hash
# and... | 42 | 31.6 | 97 | 12 | 374 | python | [{"finding_id": "codeql_py/overly-large-range_8e601c65c2b6c262_69939507", "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\\]."
] | [
22
] | [
null
] | [
34
] | [
37
] | |
2024-11-19T02:33:04.615982+00:00 | 1,516,550,237,000 | 3c7f4c565ad0b457e23e9a6b75aed12d67fcd63f | 3 | {
"blob_id": "3c7f4c565ad0b457e23e9a6b75aed12d67fcd63f",
"branch_name": "refs/heads/master",
"committer_date": 1516550237000,
"content_id": "a4f837fb1003b0735c885fc0b2e1384e392d23f0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3fd2a199b14d31a743a4c2bd6d9ef507f9654d53",
"extension": "py"... | 2.59375 | stackv2 | import json
import vk
import vk
import vk_api
import vk_auth.auth
def authorize(username=None, password=None, type=None):
if username is None:
username = input("Enter your username: ")
if password is None:
password = input("Enter your password: ")
au = vk_auth.auth.VKAuth(username, pass... | 77 | 34.51 | 123 | 19 | 594 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9693c014b297ec5b_b1410595", "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."
] | [
56
] | [
null
] | [
17
] | [
123
] | |
2024-11-19T02:33:06.260579+00:00 | 1,568,970,372,000 | e58ff82cfff996fbff4f1f10b049b4c600ad1333 | 2 | {
"blob_id": "e58ff82cfff996fbff4f1f10b049b4c600ad1333",
"branch_name": "refs/heads/master",
"committer_date": 1568970372000,
"content_id": "d2fe999d794b28a3553893094d20d931bae7ecd1",
"detected_licenses": [
"MIT"
],
"directory_id": "536b2dc4d0541f6f8a71d9ef8cfa6d449c5db69a",
"extension": "py",
"fi... | 2.421875 | stackv2 | # -*- coding:utf-8 -*-
'''
#=============================================================
# @Method: Query Ethernet Interface information.
# @command: getethernet
# @Param:
# @author:
# @date: 2017.8.1
#=============================================================
'''
FORMAT = '%-20s: %s'
def getethernet_init(parser,... | 192 | 30.52 | 70 | 17 | 1,483 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e1c08a0e82ac06de_33cdbcb6", "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."
] | [
112
] | [
113
] | [
11
] | [
63
] | |
2024-11-19T02:33:19.370742+00:00 | 1,408,945,843,000 | 516f91c9e7ad20b6eb11e5568af8d0434f8f0835 | 3 | {
"blob_id": "516f91c9e7ad20b6eb11e5568af8d0434f8f0835",
"branch_name": "refs/heads/master",
"committer_date": 1408945843000,
"content_id": "fcb63e2085d37b6df2d27c80c378fca13920abda",
"detected_licenses": [
"MIT"
],
"directory_id": "28b4c4676cb016e35cc7b1048097628caa113114",
"extension": "py",
"fi... | 3.1875 | stackv2 | import hashlib
import random
class AccessMode(object):
NORMAL = 'normal'
MASTER = 'master'
class PasswordService(object):
ascii_code_a = 65
ascii_code_0 = 48
number_count = 10
alphabet_count = 26
salt_length = 32
def random_salt(self):
salt_seq = []
for i in range(se... | 37 | 24.11 | 84 | 15 | 225 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_c899d5375ec25556_b737c7a8", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
35
] | [
null
] | [
23
] | [
30
] | |
2024-11-19T02:33:28.621530+00:00 | 1,620,890,096,000 | 040d66b95dace85e21c3827e5b53dc80f9efd2f1 | 2 | {
"blob_id": "040d66b95dace85e21c3827e5b53dc80f9efd2f1",
"branch_name": "refs/heads/main",
"committer_date": 1620890096000,
"content_id": "6ff3687db4043e8648ef0669e24c38937aa1754e",
"detected_licenses": [
"MIT"
],
"directory_id": "fa2e0a7c7ee37fc2e656ac7aa98467f6b6386204",
"extension": "py",
"file... | 2.3125 | stackv2 | #!/usr/bin/env python
# -*- coding:UTF-8 -*-
#
# @AUTHOR: Rabbir
# @FILE: \rab_python_packages\rab_proxy.py
# @DATE: 2020/12/15 Tue
# @TIME: 19:46:49
#
# @DESCRIPTION: 共通包 代理获取模块
import os
import json
import time
import hashlib
import requests
import psycopg2
import psycopg2.extras
# 切换路径到父级
import sys
sys.path.appen... | 425 | 34.65 | 80 | 25 | 3,513 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_bb70de53970ae344_2f60fcfd", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](2) is used in a hashing algorithm (MD5) that is insecure."
] | [
124
] | [
null
] | [
30
] | [
36
] | |
2024-11-19T02:59:46.734057+00:00 | 1,503,430,075,000 | f2318d90f97b3aa6dd617c85eeb0f5dd10c54ada | 2 | {
"blob_id": "f2318d90f97b3aa6dd617c85eeb0f5dd10c54ada",
"branch_name": "refs/heads/master",
"committer_date": 1505599437000,
"content_id": "2ad7d7fdf6bda095671d6c462cd7996dd16705cf",
"detected_licenses": [
"MIT"
],
"directory_id": "1f142fc40b1dfe9839ff19053c9bd5d4d7024379",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/python
# Hydraulics test bed - HTTP/REST server
import BaseHTTPServer
import json
import hydraulics_drv
import hydraulics_playback
import logging
import unittest
import time
import attract_manager
from cgi import parse_header, parse_multipart
from sys import version as python_version
if python_version.st... | 413 | 40.48 | 118 | 23 | 3,722 | python | [{"finding_id": "codeql_py/path-injection_a5a3f02f456bae94_913379d6", "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... | 6 | true | [
"CWE-022",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/path-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-... | [
28,
59,
82,
105,
150,
256
] | [
null,
null,
null,
null,
null,
null
] | [
20,
26,
37,
15,
38,
24
] | [
35,
60,
88,
51,
90,
76
] | |
2024-11-19T03:12:06.987527+00:00 | 1,582,291,003,000 | f4193eae8f4185267a8539668e3a3ab6bc94d1a2 | 3 | {
"blob_id": "f4193eae8f4185267a8539668e3a3ab6bc94d1a2",
"branch_name": "refs/heads/master",
"committer_date": 1582291003000,
"content_id": "68086dec34ad03a43998bb2df68e841ecb81d86a",
"detected_licenses": [
"MIT"
],
"directory_id": "d25313e946d23344ed9080d584f449c3f26c67d2",
"extension": "py",
"fi... | 2.890625 | stackv2 | import hashlib
doorID = 'abbhdwsy'
count = 0
password = ''
while len(password) < 8:
test = doorID + str(count)
md5 = hashlib.md5()
md5.update(test.encode('utf-8'))
testMD5 = md5.hexdigest()
if testMD5[0:5] == '00000':
print(testMD5[5])
password += testMD5[5]
count += 1
print(... | 19 | 16.42 | 36 | 10 | 110 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_45114a1b2285eacd_409e78a2", "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."
] | [
18
] | [
null
] | [
7
] | [
15
] | |
2024-11-19T03:12:07.933524+00:00 | 1,675,472,860,000 | 0f4c7c14219d6b574f4fc5accfbdc0c03192d74d | 3 | {
"blob_id": "0f4c7c14219d6b574f4fc5accfbdc0c03192d74d",
"branch_name": "refs/heads/master",
"committer_date": 1675472860000,
"content_id": "7cc4b00dfb1191e5c885d6b14fa67eb2c4412b82",
"detected_licenses": [
"MIT"
],
"directory_id": "555191fbd046369979840f52aaac5dc97279bf22",
"extension": "py",
"fi... | 2.765625 | stackv2 | # -*- coding: utf-8 -*-
"""
@file
@brief Functions to dump emails
"""
from jinja2 import Template
from pyquickhelper.loghelper import noLOG
class Renderer:
"""
defines way to render an email
"""
def __init__(self, tmpl, css,
style_table="dataframe100l",
style_highlig... | 87 | 34.07 | 86 | 10 | 631 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_088f907e44c2c736_cdc82430", "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."
] | [
29,
30
] | [
null,
null
] | [
26,
21
] | [
40,
34
] | |
2024-11-19T03:12:13.403358+00:00 | 1,527,676,422,000 | cd9cc7667ce5de81bbc8af43bb579b1e2037e0a8 | 3 | {
"blob_id": "cd9cc7667ce5de81bbc8af43bb579b1e2037e0a8",
"branch_name": "refs/heads/master",
"committer_date": 1527676422000,
"content_id": "7b39cd50b51c5156ed5ef2e8b76c860688c570c0",
"detected_licenses": [
"MIT",
"Python-2.0"
],
"directory_id": "889e8e316c27447795542a80a8338c3f44f21cf6",
"exten... | 2.84375 | stackv2 | # -*- coding: utf-8 -*-
"""
This module provides a simple multi-threaded writer utility for VSGProjects and VSGSolutions
"""
import os
import sys
import time
import threading
import itertools
import jinja2
import errno
class VSGJinjaRenderer(object):
"""
A class defining methods interacting with `Jinja2 <http... | 171 | 29.71 | 133 | 17 | 1,180 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4e1baa2d2ab084cb_a422b16e", "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."
] | [
33
] | [
null
] | [
15
] | [
86
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.