added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T20:40:04.714512+00:00 | 1,493,217,738,000 | d62faaf88bef4ef47beab994638b98037a45fbcb | 2 | {
"blob_id": "d62faaf88bef4ef47beab994638b98037a45fbcb",
"branch_name": "refs/heads/master",
"committer_date": 1493217738000,
"content_id": "ad900df881f716ff703a657bfc5ddfa96c91ec60",
"detected_licenses": [
"MIT"
],
"directory_id": "6ca109a3db74ee5aea194f3444dcd0e59993e168",
"extension": "py",
"fi... | 2.34375 | stackv2 | from chalktalk import app, util
from flask import render_template, request, redirect, abort, url_for, flash
import chalktalk.database
import flask_login
from chalktalk.oauth import DataportenSignin
from flask_breadcrumbs import Breadcrumbs, register_breadcrumb
import re
from chalktalk.models import User, Course
from da... | 409 | 35.55 | 118 | 20 | 3,326 | python | [{"finding_id": "codeql_py/polynomial-redos_60dcfa24ce6353e0_0b6a84d7", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with ma... | 3 | true | [
"CWE-1333",
"CWE-1333",
"CWE-601"
] | [
"py/polynomial-redos",
"py/polynomial-redos",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of '0'.",
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of '0'.",
"Untrusted URL redirection depends on a [user-provided... | [
191,
381,
136
] | [
null,
null,
null
] | [
51,
51,
21
] | [
56,
56,
45
] | |
2024-11-18T20:40:06.614975+00:00 | 1,481,500,119,000 | 88567cb56df235beedcfee25a40631447f67f8cf | 3 | {
"blob_id": "88567cb56df235beedcfee25a40631447f67f8cf",
"branch_name": "refs/heads/master",
"committer_date": 1481500119000,
"content_id": "04caf6d5bc2d130a7c13c709da3e0d5b07a6f069",
"detected_licenses": [
"MIT"
],
"directory_id": "250cebd8ec68625dc5beccc504cacec1ea305843",
"extension": "py",
"fi... | 2.75 | stackv2 | """
This file retrieves the tinydb from the pi, saves it locally, and saves the
bokey-google maps html file
"""
from __future__ import print_function
import paramiko
import datetime
import json
from bokeh.document import Document
from bokeh.embed import file_html
from bokeh.models.glyphs import Circle
from bokeh.model... | 125 | 32.82 | 79 | 13 | 979 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_c352cd8b276a85fe_c6739be7", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
50
] | [
null
] | [
9
] | [
69
] | |
2024-11-18T20:40:07.034172+00:00 | 1,457,646,489,000 | 5da62c91330b521ae860350c68f243557ff3cddf | 2 | {
"blob_id": "5da62c91330b521ae860350c68f243557ff3cddf",
"branch_name": "refs/heads/master",
"committer_date": 1457646489000,
"content_id": "a7113f209bf031012a1298149a5473c3a63065d5",
"detected_licenses": [
"MIT"
],
"directory_id": "3645696a525a122a7d9666df89758592c85c6105",
"extension": "py",
"fi... | 2.484375 | stackv2 | import hashlib
import json
from bottle import request
from malibu.util import log
from rest_api import manager, routing
from rest_api.routing.base import api_route
from validate_email import validate_email
from keydom.models.user import Token, User
from keydom.util import token_by_header_data
@routing.routing_modul... | 259 | 30.25 | 88 | 18 | 1,641 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e638d17479648b77_f717d8e7", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computational... | [
74,
106
] | [
null,
null
] | [
35,
35
] | [
43,
64
] | |
2024-11-18T20:40:07.164472+00:00 | 1,692,172,308,000 | cc5d004f873f440b5bf3457fdd53b7692860682f | 3 | {
"blob_id": "cc5d004f873f440b5bf3457fdd53b7692860682f",
"branch_name": "refs/heads/master",
"committer_date": 1692172308000,
"content_id": "686664b454d5832cce5ed43f118560a32a261147",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d0479ecf52f22cd9811b8c5c680fd42a5f5308a3",
"extension": "py"... | 3.4375 | stackv2 | # coding=utf-8
import threading
import time
import random
class Studen:
def __init__(self, name, age, sex):
self.name = name
self.age = age
self.sex = sex
# 创建全局ThreadLocal对象:
local_school = threading.local()
# 获取当前线程关联的student:
def process_studen():
stu = local_school.studen
... | 46 | 25.7 | 112 | 12 | 377 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8d0b939c763149f7_927f3ea0", "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."
] | [
22
] | [
null
] | [
11
] | [
112
] | |
2024-11-18T20:52:17.845301+00:00 | 1,576,488,257,000 | a5f4c994a392aa4f8058893eb3efdbfb802bcfbd | 3 | {
"blob_id": "a5f4c994a392aa4f8058893eb3efdbfb802bcfbd",
"branch_name": "refs/heads/master",
"committer_date": 1576488257000,
"content_id": "1a4a3b3a130f93e59e3b080f76793afaf29798dd",
"detected_licenses": [
"MIT"
],
"directory_id": "7ee11875bf546ea0b77d63bf2e81f77d7fabe94a",
"extension": "py",
"fi... | 2.65625 | stackv2 | import os
import shutil
import click
import jinja2
import pdfkit
import yaml
__author__ = "Kevin Ciarniello"
__copyright__ = "Copyright 2017, Kevin Ciarniello"
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "Kevin Ciarniello"
__email__ = "kciarnie@gmail.com"
# Template defaults
defaults = {
'labels':... | 172 | 25.61 | 94 | 15 | 1,095 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_8bcb959bc0f2524e_118cb4e1", "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."
] | [
48
] | [
null
] | [
20
] | [
45
] | |
2024-11-18T20:52:25.509802+00:00 | 1,595,185,050,000 | b506053da8b6b5477c477cbb77e9081e8346a12a | 3 | {
"blob_id": "b506053da8b6b5477c477cbb77e9081e8346a12a",
"branch_name": "refs/heads/master",
"committer_date": 1595185050000,
"content_id": "b6f555aa66afafe1e08506bfd352e75f2284180f",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "d69140eec4b35a3d500e86ac28fec91b87a37cc3",
"extension": "p... | 2.515625 | stackv2 | import json
import boto3
import hashlib
import binascii
import os
import random
import string
def rand_token(N=64):
return ''.join(random.choices(string.ascii_uppercase + string.digits + string.ascii_lowercase, k=N))
DB_CLUSTER = "database320"
DB_NAME = "db320"
MASTER_USERNAME = "admin320"
MASTER_PASSWORD = "pwFo... | 130 | 30.44 | 137 | 13 | 1,079 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d749700ef3a8514f_9964577d", "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.\nThis expression logs [sensitive data (password)](3) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
53,
79
] | [
null,
null
] | [
39,
11
] | [
54,
25
] | |
2024-11-18T21:08:31.890858+00:00 | 1,579,205,260,000 | d0bd78a870622380d574d327ca8845b36cf338ea | 3 | {
"blob_id": "d0bd78a870622380d574d327ca8845b36cf338ea",
"branch_name": "refs/heads/master",
"committer_date": 1579541166000,
"content_id": "52b4f6c07fcb8b8b228814a00d832576b8f0cf4b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "262613f3de27af6b47516ba8d1424de95248ae88",
"extension": "py"... | 2.53125 | stackv2 | """ Define the endpoints for searching. """
import json
import fastapi
import requests
from starlette import responses
import config
import schemas.search
import repository.search_repository
router = fastapi.APIRouter()
# TODO: read the ims-api endpoint from an environment variable.
@router.get("/search")
async d... | 45 | 29.64 | 118 | 13 | 277 | python | [{"finding_id": "codeql_py/partial-ssrf_21458bf03bcc453c_ce7dbf20", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
25
] | [
null
] | [
20
] | [
89
] | |
2024-11-18T21:31:32.402743+00:00 | 1,561,485,988,000 | 4e2bbad07d54d35d626f8b446608a0bd1a79877c | 3 | {
"blob_id": "4e2bbad07d54d35d626f8b446608a0bd1a79877c",
"branch_name": "refs/heads/master",
"committer_date": 1561485988000,
"content_id": "1814999694d8a1df0a525abda4f295884752a66d",
"detected_licenses": [
"MIT"
],
"directory_id": "0e35c03f8e83f3982053b428a6814b1ae30baffe",
"extension": "py",
"fi... | 2.71875 | stackv2 | from modules.API.sql_execute import sql_execute
from hashlib import sha256
## DEVELOP METHODS
def db_addProfile(data):
data.update({'password': sha256(data['password'].encode()).hexdigest()})
sql='''
INSERT INTO users (first_name, second_name, created_at, last_visit, is_blocked, is_online, is_deleted, ... | 217 | 28.49 | 125 | 20 | 1,537 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_5f95699fb7344799_6ac2ce55", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational... | [
6,
168
] | [
null,
null
] | [
37,
41
] | [
62,
66
] | |
2024-11-18T21:31:52.244895+00:00 | 1,529,644,106,000 | 12e4194553ba02de3bf532ef7ec2636f6e085db9 | 3 | {
"blob_id": "12e4194553ba02de3bf532ef7ec2636f6e085db9",
"branch_name": "refs/heads/master",
"committer_date": 1529644106000,
"content_id": "9b648e272e0658404ff125fd5f3e07bcfe173267",
"detected_licenses": [
"MIT"
],
"directory_id": "1ce7e7abd0114b7a9cf3d66db9da79f2d2359c61",
"extension": "py",
"fi... | 3.03125 | stackv2 | #!/usr/bin/env python3
from lookups.url_lookup import *
from lookups.ip_lookup import *
from lookups.hash_lookup import *
import argparse
import logging
import os
import re
# STATIC
HASHLEE_DESCRIPTION = 'This script will extract and cross reference indicators with OSINT sources'
HASHLEE_VERBOSE = False
HASHLEE_SAVE ... | 223 | 34.65 | 103 | 24 | 1,833 | python | [{"finding_id": "codeql_py/overly-large-range_9c6080d6cd577546_69a50821", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
186
] | [
null
] | [
48
] | [
51
] | |
2024-11-18T21:31:53.385609+00:00 | 1,584,786,620,000 | c765a67839a74298e1bbeeb0a9ef7564fa56c940 | 3 | {
"blob_id": "c765a67839a74298e1bbeeb0a9ef7564fa56c940",
"branch_name": "refs/heads/master",
"committer_date": 1584786620000,
"content_id": "1184273a79dcccc523bb37a72db3e35fa9f096ac",
"detected_licenses": [
"MIT"
],
"directory_id": "8afbc4160589565587b8be28448d3dc281f3f761",
"extension": "py",
"fi... | 2.6875 | stackv2 | # -*- coding: utf-8 -*-
"""
Download data from APIs.
"""
import os
import re
from flask import request, send_from_directory, stream_with_context, Response
from restapi.utilities.htmlcodes import hcodes
from restapi.utilities.logs import log
class Downloader:
def download(self, filename=None, subfolder=None, ge... | 103 | 27.05 | 85 | 15 | 659 | python | [{"finding_id": "codeql_py/polynomial-redos_1ec8a96272b72935_af9b8100", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with ma... | 1 | true | [
"CWE-1333"
] | [
"py/polynomial-redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of '9'."
] | [
64
] | [
null
] | [
38
] | [
50
] | |
2024-11-18T21:32:14.878470+00:00 | 1,527,329,099,000 | 5a71f07c1a3a21c1e55d390bbf7bf900937eb222 | 3 | {
"blob_id": "5a71f07c1a3a21c1e55d390bbf7bf900937eb222",
"branch_name": "refs/heads/master",
"committer_date": 1527329099000,
"content_id": "bfff0cab6c065638bb2f2baa41ca6027e1b5667b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "93912f51a8d222997b88ff15c3742c36663e9030",
"extension": "py"... | 2.90625 | stackv2 | #==============================================================================
# Copyright 2018 Marco Bellaccini - marco.bellaccini[at!]gmail.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 75 | 39.53 | 79 | 15 | 648 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d66ca3e72801b9ee_5d23418f", "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."
] | [
49
] | [
null
] | [
23
] | [
41
] | |
2024-11-18T21:32:22.038733+00:00 | 1,627,124,773,000 | 67d0cb6e7675ac8c8d737ed286f319850b7e34a0 | 2 | {
"blob_id": "67d0cb6e7675ac8c8d737ed286f319850b7e34a0",
"branch_name": "refs/heads/master",
"committer_date": 1627124773000,
"content_id": "0f58b9f0859b5cd765539436c63e92dee825ad0e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c705b2620119df0d60e925e55228bfbb5de3f568",
"extension": "py"... | 2.328125 | stackv2 | # -*- coding: UTF-8 -*-
__author__ = 'mcxiaoke'
import sys
import sqlite3
from flask import Flask, g
from flask import request
from flask import make_response
from flask import abort, redirect, url_for
from flask import render_template
app = Flask(__name__)
app.secret_key = 'q\x07t\\r\xe5\xd1\xa5n\xdd\x8dwq\xdc\xd3... | 87 | 19.62 | 80 | 14 | 473 | python | [{"finding_id": "codeql_py/insecure-cookie_afce1be847a5672b_11024487", "tool_name": "codeql", "rule_id": "py/insecure-cookie", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Cookie is added to response without the 'secure' flag being set.", "remediation": "", "location": {"file_path"... | 4 | true | [
"CWE-614",
"CWE-215",
"CWE-1004",
"CWE-079"
] | [
"py/insecure-cookie",
"py/flask-debug",
"py/client-exposed-cookie",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is added to response without the 'secure' flag being set.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Sensitive server cookie is set without HttpOnly flag.",
"Cross-site scripting vulnerability due to a [user-provided value]... | [
63,
85,
63,
80
] | [
null,
null,
null,
null
] | [
5,
5,
5,
12
] | [
44,
51,
44,
34
] | |
2024-11-18T21:32:28.734956+00:00 | 1,475,485,660,000 | 6d0e8403b885d3f41fc4050c3be6ebd99870e3af | 2 | {
"blob_id": "6d0e8403b885d3f41fc4050c3be6ebd99870e3af",
"branch_name": "refs/heads/master",
"committer_date": 1475485660000,
"content_id": "4f5264b3b66ce9e8928a6b513304900038d8c87f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8570b0aac9c18ae25907efc47fedd0866eaf11a4",
"extension": "py"... | 2.3125 | stackv2 | import cherrypy
import DB
import Auth
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('public/html')) # Jinja2 environment
class MainController(object):
@cherrypy.expose
@Auth.require()
def matcher(self):
db = DB.DB('matchr.db')
db.connect()
... | 96 | 35.43 | 98 | 15 | 748 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_27999bc2f1c42fa5_bbe4e2f5", "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."
] | [
5
] | [
null
] | [
7
] | [
58
] | |
2024-11-18T21:32:29.134285+00:00 | 1,600,737,209,000 | 95f51c76adb5b421470aeb617890ee7e4d30f174 | 3 | {
"blob_id": "95f51c76adb5b421470aeb617890ee7e4d30f174",
"branch_name": "refs/heads/master",
"committer_date": 1600737209000,
"content_id": "c970ee293a011083d0fc4e549a3974191b5fccea",
"detected_licenses": [
"MIT"
],
"directory_id": "e9f08ff45153f19715a8a48f56e7078c02a6ff36",
"extension": "py",
"fi... | 3.296875 | stackv2 | from flask import Flask, render_template
from datetime import datetime
app = Flask(__name__)
@app.route('/')
def home():
return render_template("home.html")
@app.route('/hello/<name>')
def hello_function(name):
return render_template("hello.html", name=name)
@app.route('/weather')
def weather_function():
... | 65 | 18.78 | 85 | 14 | 299 | python | [{"finding_id": "codeql_py/stack-trace-exposure_60cf6736c19c42a5_5fcf52c6", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 4 | true | [
"CWE-209",
"CWE-215",
"CWE-079",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulne... | [
55,
65,
45,
55
] | [
null,
null,
null,
null
] | [
16,
5,
16,
16
] | [
29,
24,
22,
29
] | |
2024-11-18T21:49:05.584490+00:00 | 1,617,546,319,000 | 3ed8b4cfb943ed477b13a4b6b19f6628a0d49cc8 | 2 | {
"blob_id": "3ed8b4cfb943ed477b13a4b6b19f6628a0d49cc8",
"branch_name": "refs/heads/main",
"committer_date": 1617546319000,
"content_id": "a74f1a22cc39e81914a1aee532d2fb98f40d9b6e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "930aa3ab7021e5f0f22de4b2736839fabf133e8f",
"extension": "py",
... | 2.40625 | stackv2 | from flask import Flask, render_template, request, redirect
from werkzeug.utils import secure_filename
import os
from shutil import copyfile
import numpy as np
from keras.preprocessing import image
from keras.models import load_model
import sys
from PIL import Image
sys.modules['Image'] = Image
import tensorflow as ... | 81 | 27.6 | 84 | 12 | 560 | python | [{"finding_id": "codeql_py/path-injection_cfde842d44330cab_66d0a8b2", "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
] | [
50
] | |
2024-11-18T21:49:16.384047+00:00 | 1,332,785,519,000 | 46ea2b58e0097a109bed8e0bf707c21e4d18bf75 | 3 | {
"blob_id": "46ea2b58e0097a109bed8e0bf707c21e4d18bf75",
"branch_name": "refs/heads/master",
"committer_date": 1332785519000,
"content_id": "83d67be1e664c93c7fb1d90a8f53db64a782b29f",
"detected_licenses": [
"MIT"
],
"directory_id": "8fb1d41797595550418ecfc0e7558f38254b4606",
"extension": "py",
"fi... | 2.671875 | stackv2 | import re
import urllib
from email.Utils import formatdate
from django.utils.encoding import smart_str, force_unicode
from django.utils.functional import allow_lazy
ETAG_MATCH = re.compile(r'(?:W/)?"((?:\\.|[^"])*)"')
def urlquote(url, safe='/'):
"""
A version of Python's urllib.quote() function that can ope... | 119 | 31.53 | 83 | 14 | 1,004 | python | [{"finding_id": "codeql_py/redos_c7edf33218041913_b98ecd96", "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 '\\\\!'."
] | [
8
] | [
null
] | [
36
] | [
49
] | |
2024-11-18T21:49:16.942105+00:00 | 1,545,056,531,000 | 32248cb11a7a4f53ea150825470a351957ab0f4b | 3 | {
"blob_id": "32248cb11a7a4f53ea150825470a351957ab0f4b",
"branch_name": "refs/heads/master",
"committer_date": 1545056531000,
"content_id": "4dfe74d31a585f2f7ea3cd7afccfb5914ea50cad",
"detected_licenses": [
"MIT"
],
"directory_id": "258be99735c281c50992eed650332459e2e53886",
"extension": "py",
"fi... | 2.859375 | stackv2 |
# coding: utf-8
# In[15]:
import keras
import string
import pickle
import nltk
import re
from keras.preprocessing.sequence import pad_sequences
from sklearn.manifold import TSNE
from nltk.corpus import stopwords
nltk.download('stopwords')
from flask import Flask,jsonify,request
from flask_restful import Resource, Ap... | 97 | 29.02 | 85 | 19 | 892 | python | [{"finding_id": "codeql_py/overly-large-range_94c949ecf6d6bd12_b7009fbb", "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 is equivalent to \\[+... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+,\\-.\\/0-9:;<=\\]."
] | [
32
] | [
null
] | [
39
] | [
42
] | |
2024-11-18T22:26:07.292730+00:00 | 1,629,949,555,000 | b3f230da8c4dcecd98d2b2317cd627834f391689 | 3 | {
"blob_id": "b3f230da8c4dcecd98d2b2317cd627834f391689",
"branch_name": "refs/heads/main",
"committer_date": 1629949555000,
"content_id": "211e9fe2c0e0d7e1ce32cb841b702d80f405c55f",
"detected_licenses": [
"MIT"
],
"directory_id": "aeac5f69f57810905502a7ba26aae366a636bad6",
"extension": "py",
"file... | 2.78125 | stackv2 | import requests
import os
from dotenv import load_dotenv
LAST_PROBLEM = 132
load_dotenv()
api_key = os.getenv('API_KEY')
print (f'api_key = {api_key}')
assert api_key is not None
def http_error(code: int) -> str:
if code == 200:
return "OK"
else:
return "Error"
def submit_solution(problem_id... | 43 | 27.14 | 81 | 14 | 308 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7f40bca1eed02a61_a8c1728b", "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."
] | [
9
] | [
null
] | [
8
] | [
30
] | |
2024-11-18T22:26:07.345722+00:00 | 1,601,070,673,000 | e4f5deabdfe8cde156f61335eb31680d230fc791 | 2 | {
"blob_id": "e4f5deabdfe8cde156f61335eb31680d230fc791",
"branch_name": "refs/heads/master",
"committer_date": 1601070673000,
"content_id": "d1575f8858c4d891a74ba8f53e672b0681bf07e6",
"detected_licenses": [
"MIT"
],
"directory_id": "241fdc99dfb3e2824ca121cfb2882d31f1c8b3c8",
"extension": "py",
"fi... | 2.40625 | stackv2 | import logging
import flask
from flask import current_app, redirect, render_template, request
from application import GAME_MANAGER_CONFIG_KEY
from application.data.game_manager import GameManager
from . import main
LOG = logging.getLogger("Routes")
@main.route("/")
def index():
return render_template("index.ht... | 81 | 27.62 | 71 | 15 | 522 | python | [{"finding_id": "codeql_py/log-injection_5b0c22c206d3940b_99d222d8", "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).\nThis log entry depends on a [user-provided value](2)."
] | [
39,
60
] | [
null,
null
] | [
14,
14
] | [
46,
60
] | |
2024-11-18T20:31:24.553561+00:00 | 1,483,451,143,000 | dfbe25d07337c9f89f100c595e8ac37e7677d311 | 2 | {
"blob_id": "dfbe25d07337c9f89f100c595e8ac37e7677d311",
"branch_name": "refs/heads/master",
"committer_date": 1483451143000,
"content_id": "38295cc2b82653c1776ea44bb48d75aceda5565a",
"detected_licenses": [
"MIT"
],
"directory_id": "357b1dfc72bd378378b913b5edfbd902da747e9a",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import request, current_app
from datetime import datetime, timedelta
from exceptions.handler import UserAlreadyExists
from models import db, User, Session
import hashlib
import jwt
def register(username, password):
""" Registers a user """
user = User.query.filter_by(username=username).first()
... | 67 | 29.88 | 74 | 13 | 442 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_0e320e2f3995b9cb_2599d27d", "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."
] | [
37
] | [
null
] | [
36
] | [
44
] | |
2024-11-18T20:31:24.887242+00:00 | 1,600,147,783,000 | a1b401247adb63118592ea69be4f98baa4a73730 | 3 | {
"blob_id": "a1b401247adb63118592ea69be4f98baa4a73730",
"branch_name": "refs/heads/master",
"committer_date": 1600147783000,
"content_id": "e35ca224787713af0e339c89b4544d5732b53f5d",
"detected_licenses": [
"MIT"
],
"directory_id": "92a933c214445c50514dc54e0d695afd0e91f72a",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/local/bin/python2.7
#coding=utf-8
#__author__ = 'wangliang'
from flask import Flask
import re
import urllib2
import json
import time
import cookielib
import traceback
import os
import socket
from flask import Flask
app = Flask(__name__)
timertmp = time
#设置连接超时时间
socket.setdefaulttimeout(5)
#重写重新定向类(禁止重定向)... | 229 | 34.77 | 142 | 17 | 2,239 | python | [{"finding_id": "codeql_py/partial-ssrf_bf9995b4fad5d055_0d31e3cd", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 2 | true | [
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
65,
153
] | [
null,
null
] | [
13,
14
] | [
91,
87
] | |
2024-11-18T20:31:37.214189+00:00 | 1,606,690,165,000 | 6c76cb21fa4fa2b084d040e949291bdc26b8cc8c | 4 | {
"blob_id": "6c76cb21fa4fa2b084d040e949291bdc26b8cc8c",
"branch_name": "refs/heads/main",
"committer_date": 1606690165000,
"content_id": "f8ed298c7f971b0d892065d8e71cd0f9b85ebba8",
"detected_licenses": [
"MIT"
],
"directory_id": "965dc6c1b12c1d70adfdb9160716e27516a78d15",
"extension": "py",
"file... | 3.859375 | stackv2 | #Write a program that stores birthdays information about friends. If there is no name on list
#program should add it
birthdays = {'Tom':'25 January','Mark':'15 December','Alice':'08 April'}
question1 = ""
name = str(input("Who's birthday are you looking for? (blank for break)"))
while name !="":
if name in birthda... | 20 | 36.85 | 106 | 11 | 190 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_960cd28b2fd76700_744d2e68", "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."
] | [
9
] | [
null
] | [
41
] | [
56
] | |
2024-11-18T20:53:34.957330+00:00 | 1,608,474,023,000 | 7a6a2b1a43314cf9e584cbddad9e95fe67c603a8 | 3 | {
"blob_id": "7a6a2b1a43314cf9e584cbddad9e95fe67c603a8",
"branch_name": "refs/heads/master",
"committer_date": 1608474023000,
"content_id": "5157175dc02e2148bdd034ace5004437b4c22d7b",
"detected_licenses": [
"MIT"
],
"directory_id": "e44126f00ec82826bf0d4abab7531644e70ff357",
"extension": "py",
"fi... | 3.09375 | stackv2 | import logging
import hashlib
from logs.setup_logs import init_logs
from readers.file_reader import FileReader
logger = init_logs(__name__, logging.INFO)
# Part 1
MAGIC_HASH_PREFIX = "00000"
# Part 2
MAGIC_HASH_PREFIX_2 = "000000"
def main():
secret_prefix = FileReader.read_input_as_string()
current_postfi... | 36 | 23.83 | 89 | 13 | 214 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_59d561433eca2a07_75a11e9a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-327"
] | [
"py/clear-text-logging-sensitive-data",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
27,
28
] | [
null,
null
] | [
19,
24
] | [
64,
52
] | |
2024-11-18T21:10:24.483852+00:00 | 1,552,953,692,000 | 53926df662c1cea7897c4a8bc86036acec20428d | 3 | {
"blob_id": "53926df662c1cea7897c4a8bc86036acec20428d",
"branch_name": "refs/heads/master",
"committer_date": 1552953692000,
"content_id": "439a4da860db10b757b3138745e257bb13adda04",
"detected_licenses": [
"MIT"
],
"directory_id": "2183cf9aa14e439485194028781ed2c2df1b568d",
"extension": "py",
"fi... | 2.609375 | stackv2 | from libs import reaction as reactioncommand
import asyncio, re, discord
from libs import savetome
class Reaction(reactioncommand.AdminReactionAddCommand):
'''Creates messages that work with `give_role` and `remove_role` reaction commands
**Usage**
Send a message of the following form
```
` ``
<emoji id 1> : <rol... | 43 | 47.42 | 124 | 20 | 502 | python | [{"finding_id": "codeql_py/redos_5edde8b5b51f16ff_0c8dec62", "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 ' '.", "remediati... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ' '."
] | [
34
] | [
null
] | [
34
] | [
41
] | |
2024-11-18T21:10:50.809490+00:00 | 1,382,519,729,000 | 562d2654a6811f00c1fb0106db0b3bf0fcbbcb0f | 3 | {
"blob_id": "562d2654a6811f00c1fb0106db0b3bf0fcbbcb0f",
"branch_name": "refs/heads/master",
"committer_date": 1382519729000,
"content_id": "570415b15b1727ffa5e862322dde492c8ac363e6",
"detected_licenses": [
"MIT"
],
"directory_id": "938d128ada7eff9a60f4df0b3d69a36e30bb005b",
"extension": "py",
"fi... | 3.078125 | stackv2 | #!/usr/bin/python2
"""
Copyright 2013 Christophe-Marie Duquesne <chmd@chmd.fr>
This file is in PUBLIC DOMAIN.
It contains function to Encrypt/Decrypt text in an openssl compatible way,
with minimal dependencies (pycrypto). See the functions aes_encrypt/aes_decrypt.
"""
import sys
import select
from base64 import b64... | 84 | 30.48 | 80 | 14 | 758 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_fd6060f47aa3a080_28fe05da", "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... | 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 (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.\n[Sensitive data (secret)](3) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (password)](4) is used in a hashing algorith... | [
30,
31,
32
] | [
null,
null,
null
] | [
22,
22,
22
] | [
33,
40,
40
] | |
2024-11-18T21:10:55.960525+00:00 | 1,627,458,818,000 | 38a1d681b809eb627141ee9eefeb7133e1f1e208 | 3 | {
"blob_id": "38a1d681b809eb627141ee9eefeb7133e1f1e208",
"branch_name": "refs/heads/main",
"committer_date": 1627458818000,
"content_id": "e9b62d00afe079859ee6aeaed9a425e48090b4ef",
"detected_licenses": [
"MIT"
],
"directory_id": "aaea8cad69bcb98783b48ace958ad0fb5db46f86",
"extension": "py",
"file... | 3.03125 | stackv2 | from flask import Flask, redirect, request
import requests
import os
app = Flask(__name__)
# Get environment variables
client_id = os.getenv('CLIENT_ID')
client_secret = os.environ.get('CLIENT_SECRET')
@app.route("/")
def start_page():
"""
The root page just redirects to Yahoo to get the access code
and ... | 37 | 38.92 | 153 | 11 | 400 | python | [{"finding_id": "codeql_py/reflective-xss_613eb461f56b3765_61de7e13", "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)."
] | [
37
] | [
null
] | [
10
] | [
96
] | |
2024-11-18T21:11:11.907579+00:00 | 1,488,419,081,000 | efe5697fe4d1ffa2488bf6d463864221ad1b9c36 | 3 | {
"blob_id": "efe5697fe4d1ffa2488bf6d463864221ad1b9c36",
"branch_name": "refs/heads/master",
"committer_date": 1488419081000,
"content_id": "a1c35c432a1a37a01cf3edcf2dac236f54717983",
"detected_licenses": [
"MIT"
],
"directory_id": "68e8a483213b14787cd861c9f9f6c15d2863281f",
"extension": "py",
"fi... | 2.8125 | stackv2 | import urllib.request
import os
import tarfile
def download_dataset(url, name):
if not os.path.exists('data'):
os.makedirs('data')
filename = 'data/' + name
if not os.path.isfile(filename):
print('Downloading {} dataset...'.format(name))
testfile = urllib.request.URLopener()
... | 28 | 23.39 | 55 | 13 | 162 | python | [{"finding_id": "codeql_py/tarslip_9010a18d1378a582_2bfdf2b2", "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)."
] | [
19
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T21:11:14.039278+00:00 | 1,637,403,899,000 | 191994712ff3d06df969d4d01261827a7c7febf2 | 4 | {
"blob_id": "191994712ff3d06df969d4d01261827a7c7febf2",
"branch_name": "refs/heads/main",
"committer_date": 1637403899000,
"content_id": "df8463d4d890046e56d171bdeabca9005712083d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "68d158d5e2da776da924912208c73d5d8099cac5",
"extension": "py",
... | 3.546875 | stackv2 | tabs = int(input())
salary = int(input())
globa = 0
isLostSalary = False
for i in range(0, tabs):
tab = input()
if tab == "Facebook":
globa += 150
if (salary - globa) <= 0:
isLostSalary = True
break
elif tab == "Instagram":
globa += 100
if (salary - ... | 30 | 19.67 | 39 | 11 | 177 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_92241e186fd78201_e55c5c2d", "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."
] | [
30
] | [
null
] | [
11
] | [
17
] | |
2024-11-18T21:47:33.336361+00:00 | 1,564,071,238,000 | e1298c441274065e3e08a7aba49cd0edc869e844 | 2 | {
"blob_id": "e1298c441274065e3e08a7aba49cd0edc869e844",
"branch_name": "refs/heads/master",
"committer_date": 1564071238000,
"content_id": "f89f258439c70c3bbae1a9fdb1dab82591bd05bf",
"detected_licenses": [
"MIT"
],
"directory_id": "eb5e2555165a9f8bff78a8e8a6c7e545c61d9904",
"extension": "py",
"fi... | 2.34375 | stackv2 | # -*- coding: utf-8 -*-
# __author__ = xiaobao
# __date__ = 2018/11/25 16:40:28
# desc: 常用函数
import os
import sys
import subprocess
import logging
import shutil
from jinja2 import Template
from common.my_exception import MyException
import common.my_path as my_path
def RunCmd(szCmd, szOutputFile=None, bStdout=Fal... | 63 | 23.13 | 110 | 13 | 416 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_63e9ebc246df09e4_420b7974", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
57
] | [
null
] | [
23
] | [
50
] | |
2024-11-18T21:47:40.771294+00:00 | 1,626,085,149,000 | 3ebaa5b322beb3816d6174f5dce3911cb9553338 | 2 | {
"blob_id": "3ebaa5b322beb3816d6174f5dce3911cb9553338",
"branch_name": "refs/heads/main",
"committer_date": 1626085149000,
"content_id": "84d34e1060417d9311b6f31115177d2fea7f35f0",
"detected_licenses": [
"MIT"
],
"directory_id": "ab2f4953dc5191ff3496a6cf03f80690521d9c19",
"extension": "py",
"file... | 2.375 | stackv2 | from flask import Flask, request, abort, jsonify, render_template, redirect
import webbrowser
import requests
import threading
import os.path
import json
import time
import re
import os
import db
from datetime import datetime
app = Flask(__name__)
return_result = ''
def db_clean():
try:
db.delete_comment... | 74 | 20.05 | 75 | 14 | 369 | python | [{"finding_id": "codeql_py/url-redirection_a76b14082bd6c084_0125f476", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
57
] | [
null
] | [
21
] | [
40
] | |
2024-11-18T22:28:48.108484+00:00 | 1,654,009,261,000 | 3ea4d0ce572158880a1144372b2a290ddbdf91f8 | 3 | {
"blob_id": "3ea4d0ce572158880a1144372b2a290ddbdf91f8",
"branch_name": "refs/heads/master",
"committer_date": 1654009261000,
"content_id": "d9275cf04283ac527d7d06cca5a0d14b2c38d423",
"detected_licenses": [
"MIT"
],
"directory_id": "e3c37227d207bce1a6f9a5b6763d255468b90881",
"extension": "py",
"fi... | 3.3125 | stackv2 | # -*- coding: UTF-8 -*-
from packageDerivedClass.Testpackage import getPackageOk
class Employee(object):
empCount =0 #类属性
def __init__(self,name,salary):
self.name = name #对象属性
self.salary = salary
Employee.empCount += 1
def ShowCount(self):
print("Totol %d"%(Employee.empCount))
def Show(self):
pr... | 88 | 18.95 | 61 | 14 | 577 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f4bec568b2ccd2d9_e41bacf1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
17,
56
] | [
null,
null
] | [
9,
9
] | [
52,
61
] | |
2024-11-18T22:28:48.160314+00:00 | 1,498,855,224,000 | 5775ed17f32988d323c918166bb2da72ee4c485f | 3 | {
"blob_id": "5775ed17f32988d323c918166bb2da72ee4c485f",
"branch_name": "refs/heads/master",
"committer_date": 1498855224000,
"content_id": "26af3dcd2b4ee2cc0237e9b118322c2e831decdc",
"detected_licenses": [
"MIT"
],
"directory_id": "46f9ab8b4f2e3dd1aa9c4c34b0ad2395ee2c1dba",
"extension": "py",
"fi... | 2.875 | stackv2 | import hashlib
import os
import subprocess
from flask import Flask, jsonify, request, send_file, after_this_request
app = Flask(__name__)
TEMP_PATH = '/tmp/images'
@app.route("/ping", methods=['POST'])
def ping():
return jsonify({'status': 'ok'})
@app.route("/", methods=['POST'])
def home():
data = reque... | 63 | 24.89 | 76 | 13 | 394 | python | [{"finding_id": "codeql_py/command-line-injection_ff8cc13eec1ea7b5_600820b4", "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)."
] | [
57
] | [
null
] | [
21
] | [
28
] | |
2024-11-18T22:29:02.714904+00:00 | 1,575,516,421,000 | c160971a035acac1d5e39cd31d132e566961a02e | 3 | {
"blob_id": "c160971a035acac1d5e39cd31d132e566961a02e",
"branch_name": "refs/heads/master",
"committer_date": 1575516421000,
"content_id": "164a41a701b80789fc6e65dd404b490847deaa04",
"detected_licenses": [
"MIT"
],
"directory_id": "dcfe8d0b68e5581f4e1971e5f871a9650ce0d38c",
"extension": "py",
"fi... | 3.4375 | stackv2 | #!/usr/bin/env python3
import argparse
import random
import re
import sys
from dire import die
# --------------------------------------------------
def get_args():
"""get args"""
parser = argparse.ArgumentParser(
description='Guessing game',
formatter_class=argparse.ArgumentDefaultsHelpFormat... | 118 | 27.36 | 79 | 16 | 653 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5d05135b1955dc38_2ab0487b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
112
] | [
null
] | [
17
] | [
79
] | |
2024-11-18T22:29:02.769194+00:00 | 1,614,140,154,000 | f752d6df3584434a6610d3ae153f4ee2484656cb | 3 | {
"blob_id": "f752d6df3584434a6610d3ae153f4ee2484656cb",
"branch_name": "refs/heads/main",
"committer_date": 1614140154000,
"content_id": "fdfb1ea082e538aeae42a732bcb5d7b02f17ab73",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "39094ba8929673c1ad8c2b034adf4f006d44a117",
"extension": "py",
... | 2.515625 | stackv2 | import logging
logger = logging.getLogger(__name__)
class DecryptEncrypt:
def __init__(self):
pass
def encrypt_secret(self, secret, vault_name, keyid, subscription_id, region):
logger.info("secret to encrypt: {0}" .format(secret))
logger.info("keyid: {0}" .format(keyid))
logge... | 26 | 33.19 | 86 | 12 | 221 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8f66375079b170c0_ea63c44b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
10
] | [
null
] | [
21
] | [
61
] | |
2024-11-18T22:29:19.636358+00:00 | 1,636,050,565,000 | 29e925808ede79c6e1d7838ab79ff8c112c274ff | 3 | {
"blob_id": "29e925808ede79c6e1d7838ab79ff8c112c274ff",
"branch_name": "refs/heads/main",
"committer_date": 1636050565000,
"content_id": "1e69798b90b216cfa02705ceceb018bfb7f12137",
"detected_licenses": [
"MIT"
],
"directory_id": "287add3abe5c6cc75dccbccd06e8b2a875e87481",
"extension": "py",
"file... | 2.609375 | stackv2 | import time
from pprint import pprint
import socket
import re
import paramiko
import yaml
class ConnectSSH:
def __init__(
self, host, username, password, enable_pass, max_read=60000, read_pause=0.5
):
self.host = host
self.username = username
self.password = password
s... | 106 | 27.87 | 88 | 17 | 689 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a505b7d485638b6b_12197b83", "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."
] | [
21
] | [
null
] | [
9
] | [
69
] | |
2024-11-18T22:40:31.962252+00:00 | 1,677,649,023,000 | 19ec28cfe2321e51ea19b306633d8d235fff1079 | 3 | {
"blob_id": "19ec28cfe2321e51ea19b306633d8d235fff1079",
"branch_name": "refs/heads/master",
"committer_date": 1677649023000,
"content_id": "69267694dc7c49b5f5ac96b4777d12f828c5a760",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "b4a3facc5fcd12a85c1ca0d33d78312eb94b61cf",
"extension": "p... | 2.671875 | stackv2 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions to perform Xcode-style build steps.
These functions are executed via gyp-mac-tool when using the Makefile generator.
""... | 210 | 32.94 | 80 | 17 | 1,784 | python | [{"finding_id": "codeql_py/overly-permissive-file_fd37b010dbd12268_3f932ec0", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world writable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world writable."
] | [
158
] | [
null
] | [
10
] | [
70
] | |
2024-11-18T22:41:14.262834+00:00 | 1,541,628,851,000 | 621309db3f4e97c509f99572601e5353b7bfb5b2 | 3 | {
"blob_id": "621309db3f4e97c509f99572601e5353b7bfb5b2",
"branch_name": "refs/heads/master",
"committer_date": 1541628851000,
"content_id": "4076b0b803e40ebfb755298d048971eab72b97c8",
"detected_licenses": [
"MIT"
],
"directory_id": "46f69cd0dc621772a86801b0b7b72b42db445b4c",
"extension": "py",
"fi... | 2.6875 | stackv2 | from classifier import get_tweets_predictions
from bs4 import BeautifulSoup
from urllib2 import urlopen
import re
import os
import nltk
from nltk.stem.porter import PorterStemmer
from sklearn.externals import joblib
import numpy as np
import pandas as pd
from textstat.textstat import *
from vaderSentiment.vaderSentimen... | 249 | 37.24 | 111 | 18 | 2,239 | python | [{"finding_id": "codeql_py/overly-large-range_a5b60717deda8ea1_f7fd8301", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].",
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
39,
120
] | [
null,
null
] | [
59,
59
] | [
63,
63
] | |
2024-11-18T22:54:05.766139+00:00 | 1,576,313,791,000 | 1294bf2f9faf46b9e6402f033a30985ee26fe4f5 | 3 | {
"blob_id": "1294bf2f9faf46b9e6402f033a30985ee26fe4f5",
"branch_name": "refs/heads/master",
"committer_date": 1576313791000,
"content_id": "5ffdf7c4a91fc38b0e7bfab31bdef05ec8e23ff7",
"detected_licenses": [
"MIT"
],
"directory_id": "fc99fb32b31c5d3f44dd435cb78d0ebda060331d",
"extension": "py",
"fi... | 2.71875 | stackv2 | import json
import time
from myqueue.urlqueue import Context
from myqueue.urlqueue import UrlQueue
from myqueue.contentqueue import ContentQueue
import requests
import requests.packages.urllib3.exceptions as exc
# 禁用安全请求警告
requests.packages.urllib3.disable_warnings(exc.InsecureRequestWarning)
class fetcher:
"""
... | 95 | 24.95 | 109 | 14 | 549 | python | [{"finding_id": "codeql_py/request-without-cert-validation_7384a24713b5d7fb_4faaca67", "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)."
] | [
70
] | [
null
] | [
24
] | [
110
] | |
2024-11-18T21:07:39.477791+00:00 | 1,516,682,898,000 | 926257712db5d80aa95b8520bff423bcd045f4f3 | 3 | {
"blob_id": "926257712db5d80aa95b8520bff423bcd045f4f3",
"branch_name": "refs/heads/master",
"committer_date": 1516682898000,
"content_id": "bcb2074bdfb0ada6628ec274252af3bbe85139a7",
"detected_licenses": [
"MIT"
],
"directory_id": "7ea65b7af5d763a9d1b12d7c44e1b58c591f23fc",
"extension": "py",
"fi... | 3.15625 | stackv2 | """Script to geocode Nevada licensee data."""
import os
import json
import sys
import time
from geopy import geocoders
from geopy.geocoders import GoogleV3
SOURCE_FILENAME = 'nevada-licensees-05-clean.json'
TARGET_FILENAME = 'nevada-licensees-10-geocoded.json'
PLACE_ID = 'place_id'
LAT = 'latitude'
LNG = 'longitude'
... | 98 | 30.7 | 78 | 16 | 747 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_377a525eda9822bb_072a7e8a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
38
] | [
null
] | [
11
] | [
46
] | |
2024-11-18T21:33:02.969160+00:00 | 1,636,379,146,000 | 816e54345ae9bcd6cc4d2a016555b6a31f7cf31a | 2 | {
"blob_id": "816e54345ae9bcd6cc4d2a016555b6a31f7cf31a",
"branch_name": "refs/heads/master",
"committer_date": 1636379146000,
"content_id": "d9f1dc60fbaa7f0b15e17d6aff1ac803e9b0e0f6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "45e46c8e850c98cd0ff7ec4cb7f040ead42355ae",
"extension": "py"... | 2.421875 | stackv2 | #!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Authors:
# - Paul Nilsson, paul.nilsson@cern.ch, 2017
import os
import re... | 178 | 33.33 | 102 | 16 | 1,471 | python | [{"finding_id": "codeql_py/overly-permissive-file_f7cce85f81f16aa1_5a76a6c5", "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."
] | [
90
] | [
null
] | [
9
] | [
30
] | |
2024-11-18T21:33:17.067696+00:00 | 1,587,674,110,000 | 8240d9850ce9057e408c23d8c56734b724b03d7f | 4 | {
"blob_id": "8240d9850ce9057e408c23d8c56734b724b03d7f",
"branch_name": "refs/heads/master",
"committer_date": 1587674110000,
"content_id": "6f5d6e5b5da1f61fc334f41ea49d8de6e8e1aa12",
"detected_licenses": [
"MIT"
],
"directory_id": "72ad38d33d7739b28b52c228c45f703e076e25fa",
"extension": "py",
"fi... | 3.625 | stackv2 | import random
print (' Hello What is your name')
name =input()
print ('Let start the secret no. guessing game'+ str(name))
secretnumber=random.randint(1,100)
for guessestaken in range(1,10):
guess=input()
if secretnumber < guess:
print('Todha kam guess kijiye')
elif secretnumber > guess:
print('Todha zyada gues... | 22 | 19.41 | 59 | 9 | 133 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9050950b6f6eecf1_f54eabdb", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
21
] | [
null
] | [
8
] | [
31
] | |
2024-11-18T21:33:19.186069+00:00 | 1,558,857,108,000 | 21789b9014100d127d477de9026d2b2179196707 | 3 | {
"blob_id": "21789b9014100d127d477de9026d2b2179196707",
"branch_name": "refs/heads/master",
"committer_date": 1558857108000,
"content_id": "3e91504cffb801d49b910b5f7ac5b391c49522b8",
"detected_licenses": [
"MIT"
],
"directory_id": "6e542075a3b8aa3b3549120a0d59991216f21375",
"extension": "py",
"fi... | 2.625 | stackv2 | """
Send an email for each subreddit with all the topic found base on the search string.
"""
import logging
from logging.handlers import RotatingFileHandler
import sys
import yaml
import praw
import requests
from datetime import datetime
from typing import List, Dict
from jinja2 import Environment
from tinydb import ... | 179 | 31.02 | 108 | 17 | 1,382 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_092f2de0a18a0ecd_f3d5cf93", "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."
] | [
118
] | [
null
] | [
12
] | [
25
] | |
2024-11-18T21:33:21.361220+00:00 | 1,627,823,565,000 | 815303452362e745f266f99759a6aa4391e92710 | 2 | {
"blob_id": "815303452362e745f266f99759a6aa4391e92710",
"branch_name": "refs/heads/main",
"committer_date": 1627823565000,
"content_id": "408aa8bf7b156e606dce4372687c52d1afc310b8",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "347c82088e689a5a1272e5a790d8d96d62081a04",
"extensi... | 2.390625 | stackv2 | #----------------------------------------------------#
# 对视频中的predict.py进行了修改,
# 将单张图片预测、摄像头检测和FPS测试功能
# 整合到了一个py文件中,通过指定mode进行模式的修改。
#----------------------------------------------------#
import os
import cv2
import time
import json
import flask
import requests
import traceback
import numpy as np
import tensorfl... | 60 | 31.05 | 108 | 21 | 468 | python | [{"finding_id": "codeql_py/flask-debug_1158cb92acb54971_8ca7e588", "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/partial-ssrf"
] | [
"HIGH",
"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.",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
60,
37
] | [
null,
null
] | [
5,
22
] | [
59,
49
] | |
2024-11-18T21:33:23.046595+00:00 | 1,593,699,108,000 | d122e03e8c0475f0a0c049c7f361b3979702d36a | 3 | {
"blob_id": "d122e03e8c0475f0a0c049c7f361b3979702d36a",
"branch_name": "refs/heads/master",
"committer_date": 1593699108000,
"content_id": "0afabf394807ed28971834aaf98826db763a508a",
"detected_licenses": [
"MIT"
],
"directory_id": "fb6f02a1e8e675b976367eae9d185984fe98c4a5",
"extension": "py",
"fi... | 3.078125 | stackv2 | # utility script that creates the full rockyou leak using the word count
# redirect this output to a file to save it. Once you do that it is recommended
# to 'sort -R' to randomize it.
with open('../data/rockyou-full.txt', 'w') as fo:
#with open('../data/rockyou-withcount.txt', 'r', encoding="ISO-8859-1") as fi:
... | 34 | 34.03 | 82 | 16 | 250 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8003b61d385487c7_f59d4d02", "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."
] | [
28
] | [
null
] | [
27
] | [
35
] | |
2024-11-18T21:33:33.348657+00:00 | 1,581,331,374,000 | bbc96810c3cd80e3f796891c454c45457663ac50 | 3 | {
"blob_id": "bbc96810c3cd80e3f796891c454c45457663ac50",
"branch_name": "refs/heads/master",
"committer_date": 1581331374000,
"content_id": "10fb0fc1c1de0c0cbc1db0d68f2f36b4b5740e2b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "358317b8d7879eec8cc8e40f7dc6ae621ecd94f1",
"extension": "p... | 2.515625 | stackv2 | """
Set up and build the support pages for various types of problems.
"""
from __future__ import (absolute_import, division, print_function)
import inspect
import os
from jinja2 import Environment, FileSystemLoader
import fitbenchmarking
def create(results_per_test, group_name, support_pages_dir,
optio... | 138 | 34.9 | 79 | 16 | 1,015 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_67008ec6b01c44a7_a239fa07", "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."
] | [
89
] | [
null
] | [
15
] | [
65
] | |
2024-11-18T21:55:40.298319+00:00 | 1,556,742,639,000 | 459ad67a935b31c5f117adf8df926a55b327dbf0 | 2 | {
"blob_id": "459ad67a935b31c5f117adf8df926a55b327dbf0",
"branch_name": "refs/heads/master",
"committer_date": 1556742639000,
"content_id": "fb2af6526ca648a502e61f75c6c3e6427cf217c3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c1c0929611855a4d1b9d8b6aa2cf9af029552058",
"extension": "py"... | 2.390625 | stackv2 | import socket
import ssl
from urllib.request import Request, urlopen
#import websocket
def DELETE(url, data='', headers={}):
return Http_Request(url, data, headers, 'DELETE')
def GET(url,headers = {}, encoding = 'utf-8'):
return Http_Request(url, data='', headers=headers, method='GET', encoding=encoding)
... | 82 | 29.4 | 126 | 12 | 668 | python | [{"finding_id": "codeql_py/insecure-protocol_586bd06490127d77_e04e64b8", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1).", "remediation": "", "lo... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)."
] | [
24
] | [
null
] | [
16
] | [
50
] | |
2024-11-18T21:55:51.414564+00:00 | 1,599,239,155,000 | 87b0abf5db8cea643a3f319e11125e733987ab24 | 4 | {
"blob_id": "87b0abf5db8cea643a3f319e11125e733987ab24",
"branch_name": "refs/heads/master",
"committer_date": 1599239155000,
"content_id": "8d533db303b5df0bdb5689ce90c4354980d33e81",
"detected_licenses": [
"MIT"
],
"directory_id": "c383cbc41de71b53c3ed532b7b484788a8826041",
"extension": "py",
"fi... | 3.53125 | stackv2 | import random
import sys
from enum import Enum, auto, unique
# all lower-case alphabet letters
ALPHABET_LETTERS_LOWER_CASE = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
# all upper-case alphabet lette... | 115 | 42.61 | 142 | 15 | 1,275 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d181cd5b85dcf725_8bc2df48", "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."
] | [
115
] | [
null
] | [
11
] | [
60
] | |
2024-11-18T21:56:02.343864+00:00 | 1,568,012,767,000 | ebfc7356fccdcbfe7f7b7e726fd24891fbaaa447 | 3 | {
"blob_id": "ebfc7356fccdcbfe7f7b7e726fd24891fbaaa447",
"branch_name": "refs/heads/master",
"committer_date": 1568012767000,
"content_id": "add6c492a77bb85d7575c71624a87a1c042217c2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c88d25197d8116f61fd326165a71a63d0d603600",
"extension": "py"... | 2.765625 | stackv2 | import argparse
import os
import tarfile
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--input', nargs='*', required=True)
parser.add_argument('--output', required=True)
parser.add_argument('--prefix', required=True)
return parser.parse_args()
def main():
args = ... | 30 | 23.77 | 88 | 14 | 172 | python | [{"finding_id": "codeql_py/tarslip_33a1a658b89e75ef_0be0a00a", "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)."
] | [
22
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T23:06:23.009662+00:00 | 1,601,217,023,000 | 290a55e8ac0b2b4f4a330a64841e1ffc750f00bf | 2 | {
"blob_id": "290a55e8ac0b2b4f4a330a64841e1ffc750f00bf",
"branch_name": "refs/heads/master",
"committer_date": 1601217023000,
"content_id": "03312262e71555a9da169f41821e31bdd9ca9677",
"detected_licenses": [
"MIT"
],
"directory_id": "3b98c12adae1a0fa19628e88e6bbd5c23a863baf",
"extension": "py",
"fi... | 2.4375 | stackv2 | from django import forms
import logging
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import PricingPeriod
from .form_helpers import daterange, set_week_price
class PricingPeriodForm(forms.ModelForm):
class Meta:
model = PricingPeriod
fields =... | 98 | 42.5 | 138 | 29 | 867 | python | [{"finding_id": "codeql_py/log-injection_56a35f0a4251d22c_d763ec11", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2)... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2).\nThis log entry depends on a [user-provided value](3).\nThis log entry depends on a [user-provided value](4)."
] | [
45
] | [
48
] | [
26
] | [
107
] | |
2024-11-18T20:56:50.006109+00:00 | 1,599,434,011,000 | c2a7f48ff3c6d0cf11cd9d4419b52fda80030bb2 | 2 | {
"blob_id": "c2a7f48ff3c6d0cf11cd9d4419b52fda80030bb2",
"branch_name": "refs/heads/master",
"committer_date": 1599434011000,
"content_id": "d69b1b80c4868ca149524b45d0c7cb05f48f1747",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3723d256b1f28030c02a4a71c1631aaac881da34",
"extension": "py"... | 2.359375 | stackv2 | # coding: utf-8
# Copyright (C) 2018 UKP lab
#
# Author: Daniil Sorokin (ukp.tu-darmstadt.de/ukp-home/)
#
# Embeddings and vocabulary utility methods
import logging
import re
import os
import codecs
import json
import numpy as np
from pycorenlp import StanfordCoreNLP
from typing import Set, Iterable
logger = loggin... | 348 | 31.97 | 146 | 26 | 3,083 | python | [{"finding_id": "codeql_py/overly-large-range_5a506473786f59ea_7c66a0a2", "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:\\].", "remediation": "", "location... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\['()*+,\\-.\\/0-9:\\]."
] | [
46
] | [
null
] | [
33
] | [
36
] | |
2024-11-18T20:56:51.961741+00:00 | 1,531,740,841,000 | 89e44baf9873c3969358e9c052030b9b82cf5c14 | 3 | {
"blob_id": "89e44baf9873c3969358e9c052030b9b82cf5c14",
"branch_name": "refs/heads/master",
"committer_date": 1531740841000,
"content_id": "44a2ddda4d3a3fe92fb84712de3cffd23e81ca06",
"detected_licenses": [
"Unlicense"
],
"directory_id": "ccaa17b146c6f7125007118a4758e3164370ab58",
"extension": "py",... | 2.90625 | stackv2 | import flask
from flask import Flask
from flask import request
app=Flask('temp')
# http://127.0.0.1:5005/say_hello?name=Kenny
@app.route('/say_hello',methods=['GET','POST'])
def say_hello():
if request.method == 'GET':
return 'HELLO ' + request.args['name']
elif request.method == 'POST':
return... | 20 | 24.15 | 85 | 14 | 157 | python | [{"finding_id": "codeql_py/reflective-xss_1e090aa560485c12_6fe1e554", "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)."
] | [
10,
12
] | [
null,
null
] | [
16,
16
] | [
47,
86
] | |
2024-11-18T20:56:59.853159+00:00 | 1,512,820,560,000 | d17d3e8cd9ab9baefb780f338a9010ed571eeeac | 3 | {
"blob_id": "d17d3e8cd9ab9baefb780f338a9010ed571eeeac",
"branch_name": "refs/heads/master",
"committer_date": 1512820560000,
"content_id": "75197d133d4f9dd4d6c5eb82aeb67a4c2381c4b8",
"detected_licenses": [
"MIT"
],
"directory_id": "477d20ab48f86d118f246ede046d0daf86c1c511",
"extension": "py",
"fi... | 2.546875 | stackv2 | """
Blog view functions
"""
from calendar import month_name
from itertools import groupby
import os
from flask import Blueprint, render_template, g, send_from_directory, abort
BLOG = Blueprint('blog', __name__)
@BLOG.route('/')
def index():
"""blog index page"""
pages = g.pages
items = pages.sorted
... | 50 | 24.9 | 75 | 14 | 326 | python | [{"finding_id": "codeql_py/path-injection_ab305c93069c521e_1c91aee1", "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)."
] | [
41
] | [
null
] | [
32
] | [
36
] | |
2024-11-18T22:17:36.301649+00:00 | 1,548,390,467,000 | 31120fabc3a025eb02d1b37b9d79ab3a0c1baac8 | 2 | {
"blob_id": "31120fabc3a025eb02d1b37b9d79ab3a0c1baac8",
"branch_name": "refs/heads/master",
"committer_date": 1548390467000,
"content_id": "74727fa17c56a2c4bdf41cf548d2567051d6822e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "fa05e7cd0225e281ae4901955c4b467f5344ffc4",
"extension": "py"... | 2.390625 | stackv2 | #!/usr/bin/env python3
import os
import cgi
import cgitb
cgitb.enable()
from templates import login_page, secret_page, after_login_incorrect
from secret import username, password
form = cgi.FieldStorage()
f_username = form.getfirst("username")
f_password = for... | 69 | 23.78 | 79 | 12 | 385 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0d081cdc3275b1a6_c0c98bf7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
48,
56,
58
] | [
null,
null,
null
] | [
11,
15,
15
] | [
46,
59,
49
] | |
2024-11-18T22:43:25.089363+00:00 | 1,648,679,673,000 | 60a83a447fa424fdfb83dbda458db79a9c2e40a7 | 2 | {
"blob_id": "60a83a447fa424fdfb83dbda458db79a9c2e40a7",
"branch_name": "refs/heads/master",
"committer_date": 1648679673000,
"content_id": "8175afa5b9aa7b97bd4edda8882b4c4c8bcf9e29",
"detected_licenses": [
"MIT"
],
"directory_id": "c037fed7240849392bb5496dd2ec8a0344aa1b48",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python3
import sys, os, subprocess, re
from jinja2 import Environment, FileSystemLoader, Template
def ram_info():
meminfo_regex = re.compile(r'(.+):\s+(\S+) kB')
with open('/proc/meminfo') as f:
lines = f.readlines()
for line in lines:
m = meminfo_regex.match(line)
... | 196 | 28.92 | 89 | 18 | 1,454 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_7a038a5e392fbccc_c8cbbf40", "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."
] | [
191
] | [
null
] | [
11
] | [
90
] | |
2024-11-18T22:43:34.288590+00:00 | 1,642,844,541,000 | 5b473964c8aeec0f182fffd77c082337540bb33d | 3 | {
"blob_id": "5b473964c8aeec0f182fffd77c082337540bb33d",
"branch_name": "refs/heads/master",
"committer_date": 1642844541000,
"content_id": "dc44824332a05d4a1fd75f706c703f6412e2512c",
"detected_licenses": [
"MIT"
],
"directory_id": "2ecb5fda8d15515ea3bd0c567cf05a32766de99e",
"extension": "py",
"fi... | 2.578125 | stackv2 | from . import auth_blueprint
from flask.views import MethodView
from flask import Blueprint, make_response, request, jsonify
from app.models import User
class RegistrationView(MethodView):
"""This class-based view registers a new user."""
def post(self):
# Query to see if the user already exists
... | 85 | 30.66 | 79 | 18 | 502 | python | [{"finding_id": "codeql_py/stack-trace-exposure_99dd9fefefe1b20a_c4b75c9a", "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-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
33,
69
] | [
null,
null
] | [
46,
42
] | [
54,
50
] | |
2024-11-18T22:29:49.402558+00:00 | 1,596,731,048,000 | a71e0132eea6d3238cf2ad5143aae01501bcacd5 | 3 | {
"blob_id": "a71e0132eea6d3238cf2ad5143aae01501bcacd5",
"branch_name": "refs/heads/master",
"committer_date": 1596731048000,
"content_id": "62cb65585dac885f432b767c6a3d40b698742281",
"detected_licenses": [
"MIT"
],
"directory_id": "e1c3787082a7083e0c3ebc685c3e06b6fb62d0cc",
"extension": "py",
"fi... | 2.53125 | stackv2 | import requests
import logging
import uuid
from paython.exceptions import MissingDataError
from paython.payway_exceptions import PaywayException
logger = logging.getLogger(__name__)
class Payway(object):
def __init__(self, username, password, company_id, source_id, debug=False):
self.username = username... | 62 | 38.44 | 115 | 15 | 490 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ba7a86efe75ee7fb_0de20973", "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."
] | [
35
] | [
null
] | [
26
] | [
38
] | |
2024-11-18T22:29:53.186214+00:00 | 1,594,788,524,000 | 55e9c727a5d7332316ab84b300c7c76f1d35bd34 | 3 | {
"blob_id": "55e9c727a5d7332316ab84b300c7c76f1d35bd34",
"branch_name": "refs/heads/master",
"committer_date": 1594788524000,
"content_id": "2f4b55215435e524d78e91bfefde3265d75936d2",
"detected_licenses": [
"MIT"
],
"directory_id": "e5a52ff59ad76274960253680c59c4cdfed4eb35",
"extension": "py",
"fi... | 2.546875 | stackv2 | import psycopg2
import json
import os
from .secrets import get_secret_image_gallery
connection = None
def get_secret():
jsonString = get_secret_image_gallery()
return json.loads(jsonString)
def get_password(secret):
if secret:
os.environ["IG_PASSWORD"] = secret
return secret['password']
d... | 162 | 22.7 | 110 | 16 | 805 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_28d6cb34ea2242fe_1eccf5fb", "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."
] | [
131
] | [
null
] | [
15
] | [
110
] | |
2024-11-18T22:30:02.677201+00:00 | 1,621,766,327,000 | 2d233c75ce94d2de037a211be977b9f088b66758 | 4 | {
"blob_id": "2d233c75ce94d2de037a211be977b9f088b66758",
"branch_name": "refs/heads/main",
"committer_date": 1621766327000,
"content_id": "8c054c1fe836adf3817f1daff2e0a927e59105f6",
"detected_licenses": [
"MIT"
],
"directory_id": "f3d47ec86af44c186c7531faed084c287cfbffd3",
"extension": "py",
"file... | 3.953125 | stackv2 | import secrets
from typing import Optional
from common.base_class import BaseCipher
class SubstitutionCipher(BaseCipher):
"""
a substitution cipher is a method of encrypting in which units
of plaintext are replaced with the ciphertext, in a defined manner
"""
def __init__(self, alphabet_id: Opti... | 56 | 36.91 | 90 | 13 | 473 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a6128ee085a360ba_b40e559d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text.",
"This expression logs [sensitive data (secret)](... | [
54,
56
] | [
null,
null
] | [
11,
11
] | [
49,
49
] | |
2024-11-18T23:10:10.824395+00:00 | 1,547,689,730,000 | 579514ba969ddc86854a0112f908cd66e5e62ce3 | 3 | {
"blob_id": "579514ba969ddc86854a0112f908cd66e5e62ce3",
"branch_name": "refs/heads/master",
"committer_date": 1547689730000,
"content_id": "b764124463312898988b03725ef38244e53db3e9",
"detected_licenses": [
"MIT"
],
"directory_id": "60dedf0df206dbc425de75e11c1757f9adff3b1a",
"extension": "py",
"fi... | 3 | stackv2 | #!/usr/bin/python
from flask import Flask
from flask import request
from flask import render_template
app = Flask(__name__)
@app.route('/')
def index():
return '<h1>you should enter something like this 127.0.1:5000/sum/float/a/b</h1>'
@app.route('/sum/float/<float:a>/<float:b>/')
def getFloatSum(a,b):
# test url: ht... | 19 | 23.89 | 82 | 8 | 162 | python | [{"finding_id": "codeql_py/reflective-xss_5b01dc317a899b25_2a9485a6", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability d... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2)."
] | [
15
] | [
null
] | [
9
] | [
56
] | |
2024-11-18T23:15:51.718177+00:00 | 1,578,230,122,000 | b73f19d7957fce1d8c6e532dc12492420775d7ce | 3 | {
"blob_id": "b73f19d7957fce1d8c6e532dc12492420775d7ce",
"branch_name": "refs/heads/master",
"committer_date": 1578230122000,
"content_id": "542dbe3807dbd5c76e65e8ca952982204eec85f0",
"detected_licenses": [
"MIT"
],
"directory_id": "3331571121ccd25d8d88fe65ded49c3cc197a85d",
"extension": "py",
"fi... | 3.21875 | stackv2 | import hashlib
import time
from Crypto.Cipher import AES
import base64
def user_sign_api(data, private_key):
"""
用户签名+时间戳 md5加密
:param data:
:param private_key:
:return:
"""
api_key = private_key
# 当前时间
now_time = time.time()
client_time = str(now_time).split('.')[0]
# si... | 58 | 23.17 | 108 | 15 | 480 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_3cb4ff7dd9366331_7eecaaa7", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
22
] | [
null
] | [
16
] | [
31
] | |
2024-11-18T23:15:58.478608+00:00 | 1,560,346,577,000 | 85d9e2d6096684b33bfbde938a47ddc12175aa82 | 2 | {
"blob_id": "85d9e2d6096684b33bfbde938a47ddc12175aa82",
"branch_name": "refs/heads/master",
"committer_date": 1560346577000,
"content_id": "433e01a23803d5965b557f1b1ec830f3ebf6fa9f",
"detected_licenses": [
"MIT"
],
"directory_id": "157c7325539a713b35bb418913303d5a9036ac56",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#http://blog.cgfm.jp/garyu/archives/3396
#xxx http://5st7.hatenablog.com/
import os
import sys
import datetime
import argparse
import subprocess
import requests
import pprint
#Docomo 音声合成 API
API_KEY = 'xx'
url = "https://api.apigw.smt.docomo.ne.jp/aiTalk/v1/textToSpe... | 95 | 21.76 | 109 | 12 | 826 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ac2736b70a8f1709_ef48eb13", "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."
] | [
83
] | [
null
] | [
10
] | [
26
] | |
2024-11-18T22:30:20.182258+00:00 | 1,692,002,585,000 | 1ff5103149a7c1eee445ea51b58c5d92bc165d9a | 3 | {
"blob_id": "1ff5103149a7c1eee445ea51b58c5d92bc165d9a",
"branch_name": "refs/heads/master",
"committer_date": 1692002585000,
"content_id": "203665029051ecf239e8cf997b6d5f16a89f3e86",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "fa89ef4a8eb06dc2015d7116637f230b6891eb8d",
"extension": "p... | 2.890625 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from refinery.units import RefineryPartialResult
from refinery.lib.crypto import des_set_odd_parity
from refinery.units.crypto.keyderive import Arg, KeyDerivation
__all__ = ['DESDerive']
class DESDerive(KeyDerivation):
"""
Implements the same functionality as `D... | 47 | 34.51 | 108 | 19 | 472 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_30ba00766cf8e76b_b394bf5b", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptograph... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES](2) is broken or weak, and should not be used."
] | [
41
] | [
null
] | [
26
] | [
69
] | |
2024-11-18T22:30:21.247813+00:00 | 1,658,328,995,000 | f7a7d3cf422b3137710b65bb8558fd8c8bc4a972 | 3 | {
"blob_id": "f7a7d3cf422b3137710b65bb8558fd8c8bc4a972",
"branch_name": "refs/heads/master",
"committer_date": 1658328995000,
"content_id": "2bf5ace8f408855911ebaf67d1d182d93e22680d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "472abfbf629a92d7c774d444c63f265cb17f203f",
"extension": "py"... | 2.609375 | stackv2 | '''
Function:
皮皮搞笑视频下载器类
Author:
Charles
微信公众号:
Charles的皮卡丘
'''
import re
import json
from .base import Base
from ..utils import filterBadCharacter
'''皮皮搞笑视频下载器类'''
class Pipigaoxiao(Base):
def __init__(self, config, logger_handle, **kwargs):
super(Pipigaoxiao, self).__init__(config, logger_ha... | 63 | 33.6 | 143 | 18 | 610 | python | [{"finding_id": "codeql_py/overly-large-range_7be39e16c98c1825_ace4905f", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
23
] | [
null
] | [
62
] | [
65
] | |
2024-11-18T22:30:23.864166+00:00 | 1,604,339,954,000 | c91dfbf20855d65172c7146d6794310e4774f104 | 3 | {
"blob_id": "c91dfbf20855d65172c7146d6794310e4774f104",
"branch_name": "refs/heads/master",
"committer_date": 1604339954000,
"content_id": "e3c810e34846f59e36e374230c831ca41aaa8c3a",
"detected_licenses": [
"MIT"
],
"directory_id": "3f070d4d6985778c60ef951ba3fd0a14a9649c87",
"extension": "py",
"fi... | 2.765625 | stackv2 | """This module models a common API for ssh access to the lrz cluster.
Classes:
ssh: Used for standard blocking ssh connections
sshRunner: Asynchronous fifo based non-blocking ssh connections
It is used for long running ssh connections, which are checked periodically
"""
import lo... | 89 | 40.54 | 99 | 12 | 773 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_81dafe1df28a1d3e_37dccb48", "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."
] | [
29
] | [
null
] | [
9
] | [
73
] | |
2024-11-18T22:30:31.153901+00:00 | 1,588,229,933,000 | 06d7251199814e7ffd81ada06eb93f2e1fda0254 | 3 | {
"blob_id": "06d7251199814e7ffd81ada06eb93f2e1fda0254",
"branch_name": "refs/heads/master",
"committer_date": 1588229933000,
"content_id": "32e4db4994abe1e78a9fb16b2102706b92059411",
"detected_licenses": [
"MIT"
],
"directory_id": "3e0d5533f58f49f1dec573a7860b8da7473d6a3b",
"extension": "py",
"fi... | 3.34375 | stackv2 | def identifying_code():
while True:
phone_number = input('Enter Your Number:')
CN_mobile = [134,135,136,137,138,139,150,151,152,157,158,159,182,183,184,187,188,147,178,1705]
CN_union = [130,131,132,155,156,185,186,145,176,1709]
CN_telecom = [133,153,180,181,189,177,1700]
fir... | 29 | 40.72 | 102 | 16 | 368 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0e46b4c37ba6067a_9d46975e", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
15,
19,
23
] | [
null,
null,
null
] | [
71,
71,
71
] | [
83,
83,
83
] | |
2024-11-18T22:30:34.996985+00:00 | 1,634,765,262,000 | f89ebdf2f466c929dc3bc352b8bf72ee0cd7d62b | 2 | {
"blob_id": "f89ebdf2f466c929dc3bc352b8bf72ee0cd7d62b",
"branch_name": "refs/heads/main",
"committer_date": 1634765262000,
"content_id": "67bccbaf0223abaea081c5d88e51c80610bb4932",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "9eec87e5cc05fe4b072e5151f29fbd89bd7f47fa",
"extension": "py"... | 2.484375 | stackv2 | #!/usr/bin/env python
"""
Copyright 2016 Cisco Systems All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of co... | 82 | 33.46 | 88 | 16 | 659 | python | [{"finding_id": "codeql_py/request-without-cert-validation_cec004b9db9742d5_4e7b5390", "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)."
] | [
73
] | [
74
] | [
20
] | [
61
] | |
2024-11-18T23:36:48.200113+00:00 | 1,689,195,610,000 | efa37e8ff6e3d5270585b4b1596d3451d095444b | 2 | {
"blob_id": "efa37e8ff6e3d5270585b4b1596d3451d095444b",
"branch_name": "refs/heads/master",
"committer_date": 1689195610000,
"content_id": "24ed05cccf55c4518e816dff2244ef4d50e10d81",
"detected_licenses": [
"MIT"
],
"directory_id": "faa390890e17219fd763bd66e66bb6753c692b14",
"extension": "py",
"fi... | 2.46875 | stackv2 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# File : cifar.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 01/19/2018
#
# This file is part of Jacinle.
# Distributed under terms of the MIT license.
import os.path as osp
import functools
import pickle
import tarfile
import numpy as np
from ... | 69 | 27.87 | 82 | 14 | 573 | python | [{"finding_id": "codeql_py/tarslip_cfca884cf5b725a9_c1414707", "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)."
] | [
58
] | [
null
] | [
9
] | [
38
] | |
2024-11-18T23:36:49.684374+00:00 | 1,646,744,972,000 | 2a8917f4c24fbc2870ae8e0899eee1baa1150fb8 | 2 | {
"blob_id": "2a8917f4c24fbc2870ae8e0899eee1baa1150fb8",
"branch_name": "refs/heads/master",
"committer_date": 1646744972000,
"content_id": "0d9ee8346ac5938ce478367a33b8d99e97b7b992",
"detected_licenses": [
"MIT"
],
"directory_id": "11969852a5c6e9a1d13814a13fa371e1e723b5b6",
"extension": "py",
"fi... | 2.4375 | stackv2 | import os
from flask import Blueprint, request, jsonify, make_response, current_app
from flask.views import MethodView
import hashlib, binascii, uuid
import jwt
import datetime
from .. import db
bp = Blueprint('api', __name__, url_prefix='/')
class TestAPI(MethodView):
def get(self):
return make_respons... | 110 | 38.3 | 149 | 20 | 943 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_53deb0aeccd6c483_cf711a40", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational... | [
33,
68
] | [
null,
null
] | [
43,
43
] | [
74,
74
] | |
2024-11-18T23:36:50.239897+00:00 | 1,625,045,360,000 | 4707c2db6fa2ce6461400640ff3dfae039b14d46 | 3 | {
"blob_id": "4707c2db6fa2ce6461400640ff3dfae039b14d46",
"branch_name": "refs/heads/master",
"committer_date": 1625045360000,
"content_id": "cbf1320717ec0704b890686fe59d703a64aa1bc7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "02b46c9e927f3f14caeee947171bb6d33b16cee7",
"extension": "py"... | 2.515625 | stackv2 | import logging
from fastapi import APIRouter, HTTPException, Request, status
from fastapi.responses import HTMLResponse, Response
from fastapi.templating import Jinja2Templates
import orjson
logger = logging.getLogger("organizations")
router = APIRouter(tags=['organizations'])
templates = Jinja2Templates(directory=... | 115 | 35.03 | 87 | 14 | 875 | python | [{"finding_id": "codeql_py/reflective-xss_94f35120b4b4e5e8_905347c5", "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... | 7 | true | [
"CWE-079",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/reflective-xss",
"py/log-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",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This... | [
115,
48,
69,
89,
94,
109,
114
] | [
null,
null,
null,
null,
null,
null,
null
] | [
33,
54,
42,
54,
44,
54,
44
] | [
70,
57,
62,
57,
47,
57,
47
] | |
2024-11-18T21:57:29.874967+00:00 | 1,622,965,838,000 | 3562c0690dbf095feaa450b3c63390ea4efd3a1d | 3 | {
"blob_id": "3562c0690dbf095feaa450b3c63390ea4efd3a1d",
"branch_name": "refs/heads/main",
"committer_date": 1622965838000,
"content_id": "54e80835bd91ad5154a9ec024789a608cb542610",
"detected_licenses": [
"MIT"
],
"directory_id": "0a2616413bcce2342ee6cebdb3afa5ee48f19e64",
"extension": "py",
"file... | 2.59375 | stackv2 | import hashlib
import os
import schedule
import threading
import base64
import time
from dotenv import load_dotenv
from flask import Flask, request, session, redirect
from flask_cors import CORS
import psycopg2
#################################### Flask #####################################
app = Flask(__name__)
app... | 191 | 29.9 | 118 | 14 | 1,273 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_59a7a45c03dda6c1_1eadf61e", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
98,
139
] | [
null,
null
] | [
9,
31
] | [
40,
62
] | |
2024-11-18T21:57:57.640723+00:00 | 1,560,150,430,000 | 81b7f7dc11028134feb0c77c32c5773a2cf7bbf2 | 2 | {
"blob_id": "81b7f7dc11028134feb0c77c32c5773a2cf7bbf2",
"branch_name": "refs/heads/master",
"committer_date": 1560150430000,
"content_id": "2e2ff12f41857b52dc3989347a1231340c0c6c79",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b4598b8bff1150686a6d45f24e2aa126a7b5bff7",
"extension": "py"... | 2.34375 | stackv2 | import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
from flask import jsonify
def execute(request):
request_json = request.get_json()
key = request_json['key']
email_from = request_json['email_from']
email_to = request_json['email_to']
subject_txt = request_json[... | 27 | 29.56 | 43 | 14 | 186 | python | [{"finding_id": "codeql_py/stack-trace-exposure_6b2e0a35f8c21463_d0512f93", "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."
] | [
26
] | [
null
] | [
24
] | [
36
] | |
2024-11-18T22:47:42.452530+00:00 | 1,629,993,708,000 | 9617f5e7bb4cc71467e174b6fe56cff4de5be974 | 2 | {
"blob_id": "9617f5e7bb4cc71467e174b6fe56cff4de5be974",
"branch_name": "refs/heads/main",
"committer_date": 1629993708000,
"content_id": "c6b72b19aee9a54d801487429314befad02f2192",
"detected_licenses": [
"MIT"
],
"directory_id": "5ede29f69353fee755fd2874aca566eeee4edd8b",
"extension": "py",
"file... | 2.46875 | stackv2 | from flask import current_app as app
import pandas as pd
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from flask import url_for, redirect, render_template, \
request, make_response, Blueprint, flash
from flask_login import login_required, logout_user, \
current_user, login_user
from flask_mai... | 167 | 29.25 | 105 | 16 | 1,060 | python | [{"finding_id": "codeql_py/url-redirection_546c5abe0d53f310_eb934939", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
35
] | [
null
] | [
29
] | [
66
] | |
2024-11-18T23:10:50.587320+00:00 | 1,632,233,112,000 | 9c40061717c01d058073902aff0a876c343cc836 | 3 | {
"blob_id": "9c40061717c01d058073902aff0a876c343cc836",
"branch_name": "refs/heads/master",
"committer_date": 1632233112000,
"content_id": "880a2acc10a3a6567448dbf7ca2f1a8143cb1091",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3deedff971db4df5c748b89a5888e9120f7e2177",
"extension": "py"... | 2.84375 | stackv2 | #!/usr/bin/env python3
import cgi, cgitb, secret, os
cgitb.enable()
# Python 3.7 versus Python 3.8
try:
from cgi import escape # v3.7
except:
from html import escape # v3.8
form = cgi.FieldStorage()
username = form.getvalue('username')
pwd = form.getvalue('password')
def after_login_incorrect():
retu... | 75 | 26.01 | 94 | 13 | 533 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6e4fe31b55ba2b4b_1cbca41c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text."
] | [
71
] | [
null
] | [
11
] | [
32
] | |
2024-11-18T23:10:52.022059+00:00 | 1,544,027,251,000 | b345ce983d1bc2278191f62fe3c1741a8f95faa9 | 2 | {
"blob_id": "b345ce983d1bc2278191f62fe3c1741a8f95faa9",
"branch_name": "refs/heads/master",
"committer_date": 1544027251000,
"content_id": "8151e679cece50ec70ef7cba3ecd8cd1af571505",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4449413025f7ec64234d6b3dfa6541d57e8380ef",
"extension": "py"... | 2.453125 | stackv2 | #!/usr/bin/env python
import argparse
import requests
import datetime
from datetime import date
from configparser import ConfigParser
try:
import json
except ImportError:
import simplejson as json
# Import the atlassian.ini config file
config = ConfigParser()
config.read('./atlassian.ini')
api_url = config... | 150 | 34.26 | 137 | 18 | 1,123 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_403f38a6470ff873_7641c86b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
42
] | [
null
] | [
15
] | [
41
] | |
2024-11-18T23:10:55.440541+00:00 | 1,567,328,777,000 | a41abac1ca39ac95d0126fb778ee5488bad1eda2 | 2 | {
"blob_id": "a41abac1ca39ac95d0126fb778ee5488bad1eda2",
"branch_name": "refs/heads/master",
"committer_date": 1567328777000,
"content_id": "3c29ca5d7ddb4c1ac79367ee39ad2a7452f20100",
"detected_licenses": [
"MIT"
],
"directory_id": "5ace5d90bd6ba57915306ce11e683711aee29e38",
"extension": "py",
"fi... | 2.34375 | stackv2 | from bs4 import BeautifulSoup
import requests
from time import sleep
from flask import Flask, jsonify, json, render_template
from flask import request
from flask_sqlalchemy import SQLAlchemy
import smtplib
from string import Template
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
fr... | 150 | 23.59 | 114 | 17 | 947 | python | [{"finding_id": "codeql_py/flask-debug_813d4132bd738a6b_6987eda1", "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/partial-ssrf"
] | [
"HIGH",
"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.",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
150,
110
] | [
null,
null
] | [
2,
11
] | [
21,
29
] | |
2024-11-18T22:05:56.682747+00:00 | 1,603,817,453,000 | 8036e240d4a61554f84d695f279ef7c0f51c196b | 2 | {
"blob_id": "8036e240d4a61554f84d695f279ef7c0f51c196b",
"branch_name": "refs/heads/master",
"committer_date": 1603817453000,
"content_id": "55167e0015ac1c0585052f9838c2ffdac5de8b40",
"detected_licenses": [
"MIT"
],
"directory_id": "a772d4337d160294d8e4f405f0bd5a6bf5900ba1",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python3
import pandas as pd
import sqlalchemy
import tempfile
import tarfile
import glob
DEFAULT_COLLECTIONS_FILE = "collections.db"
class Collections: pass
def load(filepath):
with tempfile.TemporaryDirectory() as tmp_dir:
with tarfile.open(filepath, 'r:gz') as tar:
tar.ext... | 31 | 26.71 | 92 | 14 | 172 | python | [{"finding_id": "codeql_py/tarslip_4ebefa6207c5089f_c8ddcbef", "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)."
] | [
18
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T22:35:53.734821+00:00 | 1,627,847,518,000 | f9e148fd41653cef51de9f00eb01c1e637f00dfb | 3 | {
"blob_id": "f9e148fd41653cef51de9f00eb01c1e637f00dfb",
"branch_name": "refs/heads/main",
"committer_date": 1627847518000,
"content_id": "0887132d4048cb56664a3d837a14483f31b490ca",
"detected_licenses": [
"MIT"
],
"directory_id": "90720abe66aa16e2b5da22872f3282dcd7ed8cb3",
"extension": "py",
"file... | 2.53125 | stackv2 |
from flask import Flask, request, g, render_template, redirect, session, flash
from flask_sqlalchemy import SQLAlchemy
from werkzeug.utils import secure_filename
import hashlib
import os, sys
from database import DB
from datetime import timedelta
app = Flask(__name__, template_folder='templates')
app.config['SQLALCHE... | 141 | 37.87 | 127 | 15 | 1,363 | python | [{"finding_id": "codeql_py/flask-debug_37b7189ebe82ce3e_f548fa6f", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-327",
"CWE-327"
] | [
"py/flask-debug",
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"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.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (passwor... | [
141,
41,
64
] | [
null,
null,
null
] | [
5,
34,
34
] | [
24,
51,
51
] | |
2024-11-18T22:49:09.230242+00:00 | 1,633,424,221,000 | 06b0301f2388eacfa5dc3a07265ed359d4fe4ad1 | 3 | {
"blob_id": "06b0301f2388eacfa5dc3a07265ed359d4fe4ad1",
"branch_name": "refs/heads/main",
"committer_date": 1633424221000,
"content_id": "405958cf3c4b1b21167400cd9b5f48a19e371f19",
"detected_licenses": [
"MIT"
],
"directory_id": "77e1b8a006703690c4b4dab635d05a9d7ac7f88b",
"extension": "py",
"file... | 3.4375 | stackv2 | #!/usr/bin/env python3
# -*- coding^ utf-8 -*-
import sys
if __name__ == '__main__':
workers = []
while True:
command = input(">>> ").lower()
if command == 'exit':
break
elif command == 'add':
surname = input("Фамилия ")
name = input("Имя ")
... | 91 | 29 | 106 | 27 | 600 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2e746dd1c480e9e7_5f01dc9c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
56,
75
] | [
62,
77
] | [
21,
25
] | [
22,
107
] | |
2024-11-18T23:26:02.919147+00:00 | 1,575,846,121,000 | 6e7929723c17301adbef21ee45e6c360d400b01f | 3 | {
"blob_id": "6e7929723c17301adbef21ee45e6c360d400b01f",
"branch_name": "refs/heads/master",
"committer_date": 1575846121000,
"content_id": "110378eba646e534356e47f4de6fb1b3ad54416d",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "4e9ea23072070a312fe932d3757df5fc3a046ebd",
"extension": "p... | 2.65625 | stackv2 | """utility functions used by the :mod:`followit`
"""
import functools
import json
from django.http import HttpResponse
import followit
def get_object(model_name, object_id):
"""not a view, just a function, returning an object"""
model = followit.REGISTRY[model_name]
return model.objects.get(id = object_id)... | 50 | 31.24 | 78 | 16 | 343 | python | [{"finding_id": "codeql_py/stack-trace-exposure_0a35e3d0adfaebd5_e6029238", "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."
] | [
40
] | [
null
] | [
29
] | [
45
] | |
2024-11-18T23:26:12.401857+00:00 | 1,513,440,511,000 | 29c53e2b6b0fa56f7d4543a8a5a4fbd1e6b16aed | 2 | {
"blob_id": "29c53e2b6b0fa56f7d4543a8a5a4fbd1e6b16aed",
"branch_name": "refs/heads/master",
"committer_date": 1513440511000,
"content_id": "249f34ac00e798f929f668c85584748ebba044d4",
"detected_licenses": [
"MIT"
],
"directory_id": "8b9abf8eb999102745c210f5a8f354954614d032",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# clipproxy.py
#
"""A small server copies the data it receives to the primary selection."""
import argparse
import json
import logging
import sys
from base64 import b64decode
from subprocess import PIPE, run, STDOUT
import pyperclip
import flask
log = logging.getLogg... | 67 | 25.61 | 94 | 15 | 456 | python | [{"finding_id": "codeql_py/log-injection_69f549c64086f48e_431b7389", "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)."
] | [
40
] | [
null
] | [
40
] | [
49
] | |
2024-11-18T22:27:18.045821+00:00 | 1,602,249,404,000 | 011022486160bcf51f8fd0daf5c8b17e3b088ce3 | 4 | {
"blob_id": "011022486160bcf51f8fd0daf5c8b17e3b088ce3",
"branch_name": "refs/heads/master",
"committer_date": 1602249404000,
"content_id": "27caebf618cbd779f0c5bbcfd70e515db71596a8",
"detected_licenses": [
"MIT"
],
"directory_id": "9b14d00945e97c2af79c72085a288d8971baef04",
"extension": "py",
"fi... | 4.03125 | stackv2 | import re, sys
def main() -> int:
user_password = input('Enter a password: ')
if is_strong_password(user_password):
print(f'{user_password!r} is a strong password.')
else:
print(f'{user_password!r} is a weak password.\nPlease try again.')
return 0
def is_strong_password(password: str) ... | 34 | 31.35 | 74 | 12 | 277 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_306b8cf583fec031_2a91c77b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
6,
8
] | [
null,
null
] | [
15,
15
] | [
57,
74
] | |
2024-11-18T22:27:34.936174+00:00 | 1,596,120,410,000 | 23b9300da9068155616f7409776d46550650d6bd | 3 | {
"blob_id": "23b9300da9068155616f7409776d46550650d6bd",
"branch_name": "refs/heads/master",
"committer_date": 1596120410000,
"content_id": "56bf893065429a5ffd19634ceec125a972344d8c",
"detected_licenses": [
"MIT"
],
"directory_id": "52e70b29fd7eccd3fc743be54c79c6857dd43d6a",
"extension": "py",
"fi... | 2.578125 | stackv2 | # coding: utf-8
import os
import re
import warnings
import pdfkit
from jinja2 import Environment, FileSystemLoader
from . import TEMPLATES_DIR
from .coloring_utils import toRED, toBLUE, toGREEN
def sanitize_filename(fn, ext=None):
fn = fn.replace("/", "√")
if ext is not None:
ext = ext if ext.startswi... | 106 | 45.67 | 129 | 15 | 1,225 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5c7543241d5afcfa_5bbd1668", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
57
] | [
null
] | [
11
] | [
70
] | |
2024-11-18T22:27:42.091759+00:00 | 1,540,827,423,000 | b9d3e840b2f14b29e8ef55ef481f0c1a90fa4351 | 2 | {
"blob_id": "b9d3e840b2f14b29e8ef55ef481f0c1a90fa4351",
"branch_name": "refs/heads/master",
"committer_date": 1540996970000,
"content_id": "e4dad926c07e38c8e2d37fc90f8f8b6b96eebe25",
"detected_licenses": [
"MIT"
],
"directory_id": "bc5e3ec2665f795b84671317ce736719ab79dc0f",
"extension": "py",
"fi... | 2.4375 | stackv2 | from flask import current_app, g, Response
from maintain_frontend.config import REPORT_API_BASE_URL
class ReportAPIService(object):
"""Service class for making requests to report-api"""
@staticmethod
def send_number_of_charges_per_search_data(report_data):
current_app.logger.info(
"Ca... | 24 | 37.42 | 83 | 17 | 181 | python | [{"finding_id": "codeql_py/stack-trace-exposure_cdf671000e5db21c_b3869bf9", "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."
] | [
24
] | [
null
] | [
38
] | [
40
] | |
2024-11-18T22:55:36.531534+00:00 | 1,637,630,290,000 | 0f582c11d3cb98d3b3dc213139674a8ce3515d03 | 3 | {
"blob_id": "0f582c11d3cb98d3b3dc213139674a8ce3515d03",
"branch_name": "refs/heads/main",
"committer_date": 1637630290000,
"content_id": "a04797cd04f9899bc1f624fff087f63c22b46ffb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1ed783dd8b21c53e74d3eaa20cb8691bc2b9c31a",
"extension": "py",
... | 2.59375 | stackv2 | import requests
from urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
from urllib.parse import urljoin
from bs4 import BeautifulSoup
from logging import getLogger, StreamHandler, Formatter
from http.cookies import SimpleCookie
from tqdm import tqdm
import dateparser
logger = getLogger(__name__... | 86 | 31.28 | 96 | 20 | 639 | python | [{"finding_id": "codeql_py/request-without-cert-validation_6b8aa99393bdcf19_cfe4fa0b", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
31
] | [
null
] | [
16
] | [
84
] | |
2024-11-18T22:55:38.349272+00:00 | 1,608,613,875,000 | 368494e190c85d8a1dbbb5d4f0a5075bca316a2a | 2 | {
"blob_id": "368494e190c85d8a1dbbb5d4f0a5075bca316a2a",
"branch_name": "refs/heads/master",
"committer_date": 1608613875000,
"content_id": "b826567b727e6f10882b4fc7757d4a5086426c96",
"detected_licenses": [
"MIT"
],
"directory_id": "714a0b02234feed873d820fed59f34560eacc949",
"extension": "py",
"fi... | 2.34375 | stackv2 | # MIT License
#
# Copyright (c) 2019 Loh Yu Chen & Chi Junxiang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, ... | 269 | 35.78 | 88 | 25 | 2,103 | python | [{"finding_id": "codeql_py/flask-debug_5298a60822209a34_b6868bc0", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
269,
237
] | [
null,
null
] | [
5,
9
] | [
33,
22
] | |
2024-11-18T22:55:44.703457+00:00 | 1,648,945,629,000 | 81ab7a66b50ad4ef85dae2fe1305f4ad0242f32b | 3 | {
"blob_id": "81ab7a66b50ad4ef85dae2fe1305f4ad0242f32b",
"branch_name": "refs/heads/master",
"committer_date": 1648945629000,
"content_id": "27332c86a2b5b93bf9511737526afed9403cd51f",
"detected_licenses": [
"MIT"
],
"directory_id": "31e9ae0b5431fdb643f228713001d052e93b303d",
"extension": "py",
"fi... | 2.6875 | stackv2 | import re
from flask import (Response, current_app, request, redirect as flask_redirect,
url_for as flask_url_for)
from flask_unchained.string_utils import kebab_case, right_replace, snake_case
from flask_unchained._compat import is_local_proxy
from py_meta_utils import _missing
from typing import *... | 333 | 38.93 | 97 | 16 | 3,114 | python | [{"finding_id": "codeql_py/url-redirection_de7a277975ec59e0_75fae80c", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
245
] | [
null
] | [
35
] | [
74
] | |
2024-11-19T00:33:34.086162+00:00 | 1,466,022,666,000 | b93d0df199ee2f61470cb2c58a9575855a728502 | 2 | {
"blob_id": "b93d0df199ee2f61470cb2c58a9575855a728502",
"branch_name": "refs/heads/master",
"committer_date": 1466023180000,
"content_id": "78bbc830d29e05f06aabe38c8aa114948a0cf9ff",
"detected_licenses": [
"MIT"
],
"directory_id": "a3e34e3e1c895b41fc10d5dc1736f06ca4ea0fc9",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Gets the visual representation of database schema (data model)
"""
import os
import sys
# from sqlalchemy.ext.automap import automap_base
# from sqlalchemy.inspection import inspect
# from sqlalchemy.orm import Session
from sqlalchemy import create_engine
from sqlalc... | 91 | 29.02 | 74 | 18 | 574 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bcaae8849852e573_b6e14e7b", "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."
] | [
37
] | [
40
] | [
11
] | [
28
] | |
2024-11-19T00:45:04.558153+00:00 | 1,605,705,401,000 | 507c5a4ffeb2879fd061399582bc6bb81dd4e5b9 | 3 | {
"blob_id": "507c5a4ffeb2879fd061399582bc6bb81dd4e5b9",
"branch_name": "refs/heads/master",
"committer_date": 1605705401000,
"content_id": "bc1ca3ceccfa8d62712790d9f7ac651de6680e4c",
"detected_licenses": [
"MIT"
],
"directory_id": "637397bd7d0c0fb6b4f45a1032de79ea2e96dea0",
"extension": "py",
"fi... | 2.71875 | stackv2 | # 使用了 https://github.com/East196/sorrypy 中的源码
import hashlib
import os
import re
from subprocess import Popen, PIPE
from jinja2 import Template
from nonebot import log
def calculate_hash(src):
m2 = hashlib.md5()
m2.update(str(src).encode("utf8"))
return m2.hexdigest()
def render_gif(template_name, sent... | 74 | 35.68 | 108 | 12 | 741 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1bbaca99aa868b3e_0d53b0a8", "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."
] | [
42
] | [
null
] | [
25
] | [
43
] | |
2024-11-18T23:28:38.310128+00:00 | 1,513,113,894,000 | a1799ff4b0799c8eb82231bd754629010447dd71 | 2 | {
"blob_id": "a1799ff4b0799c8eb82231bd754629010447dd71",
"branch_name": "refs/heads/master",
"committer_date": 1513113894000,
"content_id": "34387c7a42216b487e950786c3c981d14caf7715",
"detected_licenses": [
"MIT"
],
"directory_id": "cdd4a5d92c90f30f7e7d8a154af9900218166873",
"extension": "py",
"fi... | 2.359375 | stackv2 | from . import auth
from flask import request, render_template
from flask import url_for, redirect, flash, abort
from ..forms.login_form import LoginForm
from flask_login import login_user
from ..models.user import User
from app import login_manager
@auth.route('/login', methods=['GET'])
def login_get():
form = Login... | 39 | 27.82 | 73 | 16 | 245 | python | [{"finding_id": "codeql_py/url-redirection_afe80ba96737710d_e6b557e7", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
29
] | [
null
] | [
23
] | [
52
] | |
2024-11-18T23:40:02.959371+00:00 | 1,567,939,042,000 | d9f43d4add1d9d97565707a054bfd08ba4d730d7 | 3 | {
"blob_id": "d9f43d4add1d9d97565707a054bfd08ba4d730d7",
"branch_name": "refs/heads/master",
"committer_date": 1567939042000,
"content_id": "1916ff32633d413e80ae559659fbde9c804d4130",
"detected_licenses": [
"MIT"
],
"directory_id": "4f941f91f97a413c7481d12a91f376100450c8ed",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/env python3
import requests
import bs4
import os
import json
from collections import OrderedDict
from datetime import datetime
import urllib3
url = 'https://www.benzinpreis-aktuell.de/tanken-esso-tankstelle-kehl-77694-92ef.html'
jsonFile = '/home/pi/Projets/python/pySpider-prix-carbu-de/data.json'
# add p... | 50 | 37.16 | 117 | 13 | 548 | python | [{"finding_id": "codeql_py/request-without-cert-validation_8a5bf3f69fc706cb_22cdff2e", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
19
] | [
null
] | [
12
] | [
43
] | |
2024-11-19T00:05:02.503207+00:00 | 1,588,686,327,000 | 8c4a088cd046b4159c6b4a6f595010fcdda8b30c | 2 | {
"blob_id": "8c4a088cd046b4159c6b4a6f595010fcdda8b30c",
"branch_name": "refs/heads/master",
"committer_date": 1588686327000,
"content_id": "08b2e330936b29b8b66060163adb43fe1f71efa9",
"detected_licenses": [
"MIT"
],
"directory_id": "fe6f4d538ea9814bc1cffd4c8e5cc6adc9efbfad",
"extension": "py",
"fi... | 2.453125 | stackv2 | # coding=utf-8
import time
import re
import json
import requests
from config import URL_LOGIN
from config import URL_HOME
from config import HEADERS_LOGIN
from config import HEADERS_HOME
from config import EMAIL
from config import PASSWORD
from lxml import etree
from config import ssn
def do_login():
print('请求主... | 102 | 20.66 | 76 | 15 | 625 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e3322bc498fd4d81_709de353", "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."
] | [
36
] | [
null
] | [
11
] | [
35
] | |
2024-11-19T01:11:30.135249+00:00 | 1,690,907,071,000 | d7388e8bb37fe410a24f15cf5cedd5aa0f676a9d | 3 | {
"blob_id": "d7388e8bb37fe410a24f15cf5cedd5aa0f676a9d",
"branch_name": "refs/heads/master",
"committer_date": 1690907071000,
"content_id": "b84d094178f929f1f7acdca02e7e4c2544c28d1a",
"detected_licenses": [
"MIT"
],
"directory_id": "9960165c56715ff8c793058cc86b65cda281ce37",
"extension": "py",
"fi... | 2.609375 | stackv2 | import json
import os
import pickle as pkl
import tarfile
from collections import namedtuple
import csv
import gzip
from pathlib import Path
from typing import Union
import torch
class Loader:
"""
gs://bucket/file.th
./foo/**/*.jpg
"""
def __call__(self, path, format=None, deserialize=None, filesystem... | 220 | 20.69 | 96 | 19 | 1,313 | python | [{"finding_id": "codeql_py/tarslip_47ed6b12adc62cee_01564f3c", "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)."
] | [
185
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T23:48:06.292126+00:00 | 1,579,268,021,000 | acb216ff0c6bc9aba6afcde9239bda957a5a94e0 | 3 | {
"blob_id": "acb216ff0c6bc9aba6afcde9239bda957a5a94e0",
"branch_name": "refs/heads/master",
"committer_date": 1579268021000,
"content_id": "e8ffcc036fd23deda164efc6ec45f64458aad589",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ce729906834ccbd8da28f1ad44802b1bfb628575",
"extension": "py"... | 2.921875 | stackv2 | from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
from math import ceil
from set1.XOR import xor
from set2.padding import pkcs7_padding, pkcs7_strip
from random import randint
import os
backend = default_backend()
def encrypt_aes_128_... | 73 | 29.4 | 76 | 11 | 606 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_89f1a646133d7c3f_972df66c", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
15,
21
] | [
null,
null
] | [
12,
22
] | [
33,
44
] | |
2024-11-18T23:48:07.115877+00:00 | 1,589,166,998,000 | cde1fcedc5deefcfd2e978679988650f1dc77e52 | 2 | {
"blob_id": "cde1fcedc5deefcfd2e978679988650f1dc77e52",
"branch_name": "refs/heads/master",
"committer_date": 1589166998000,
"content_id": "534e15bc344e8ce8d93a6188489969d562188ba2",
"detected_licenses": [
"MIT"
],
"directory_id": "ef3a8ecbd9156f72dec72f391e4c5f4af83efdcd",
"extension": "py",
"fi... | 2.328125 | stackv2 | from flask import Flask, render_template, request, redirect
import os
import base64
import random
import pandas as pd
from tinydb import TinyDB, Query, where
#########################
db = TinyDB('data.json')
#########################
#########################
data_path = ""
outpath = ""
name=""
filepaths = []
com... | 190 | 20.83 | 116 | 20 | 1,006 | python | [{"finding_id": "codeql_py/path-injection_1dee7bcb5ef09ea0_9781e5bf", "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", ... | 8 | true | [
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"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"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).",
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).",
"This path depends on a [user-provided value](1).",
... | [
70,
104,
107,
122,
151,
153,
170,
174
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
14,
20,
15,
14,
28,
15,
28,
14
] | [
21,
50,
24,
21,
37,
22,
37,
21
] | |
2024-11-18T23:48:19.997516+00:00 | 1,607,964,036,000 | 64ad05579d20f94f806ae03005af813e3e2c684f | 3 | {
"blob_id": "64ad05579d20f94f806ae03005af813e3e2c684f",
"branch_name": "refs/heads/main",
"committer_date": 1607964036000,
"content_id": "707996a81d12163148a7b75e9bf5f8751dd1d3d1",
"detected_licenses": [
"MIT"
],
"directory_id": "b23c3a6dc10cb7598a17016690b2f6b7af011137",
"extension": "py",
"file... | 3.21875 | stackv2 | import datetime
import os
users = []
bookingList = []
def programInit():
with open("userdata.csv") as userdata:
for line in userdata:
info = line.split(sep=",")
# print(info)
if (len(info) > 1):
std = student(info[0], info[1], info[2], info[3], info[4], ... | 290 | 32.61 | 142 | 31 | 2,269 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_dd4cf5f4dc942408_d467ce09", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
45,
44
] | [
null,
null
] | [
28,
19
] | [
35,
26
] | |
2024-11-19T00:29:32.464254+00:00 | 1,542,512,078,000 | 11a591835243ad4e2206059bf0bb172130deeaba | 3 | {
"blob_id": "11a591835243ad4e2206059bf0bb172130deeaba",
"branch_name": "refs/heads/master",
"committer_date": 1542512078000,
"content_id": "43d0b4ad5a4e64bdddc228175f31723dbe7a855d",
"detected_licenses": [
"MIT"
],
"directory_id": "02bcd98063c2088e9ab6a266c7f7c57d0c06cd33",
"extension": "py",
"fi... | 3 | stackv2 | import sys
from ftplib import FTP
def check_anonymous(target):
try:
ftp = FTP(target)
ftp.login()
print("\n[!] Anonymous Login Working")
print("\n[*] Username: anonymous")
print("\n[*] Password: anonymous")
except:
pass
def ftplogin(target, username, password):
... | 46 | 30.2 | 134 | 13 | 335 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_195c479317da5ac0_41908353", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
20
] | [
null
] | [
15
] | [
46
] | |
2024-11-19T00:44:14.086504+00:00 | 1,617,861,233,000 | daf30071fd13ab06da670e4ce16aca83f17e475a | 3 | {
"blob_id": "daf30071fd13ab06da670e4ce16aca83f17e475a",
"branch_name": "refs/heads/main",
"committer_date": 1617861233000,
"content_id": "eb73955061110cb20d1c149b0f08fdf9dffba440",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "86216c205cb82fa20a956873b890a54f4c9cf183",
"extension": "py",
... | 2.703125 | stackv2 | from flask import Flask
import boto3
from botocore.exceptions import ClientError
import json
import psycopg2
app = Flask(__name__)
def get_secret():
secret_name = "flasksecret"
region_name = "ap-southeast-1"
session = boto3.session.Session()
client = session.client(
service_name='secretsmanag... | 175 | 31.69 | 108 | 15 | 1,178 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_28fa06e9db8ae573_f717759f", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
25
] | [
null
] | [
19
] | [
75
] | |
2024-11-19T00:44:16.095556+00:00 | 1,572,375,479,000 | 54fc6a01324ce9dc91891b1a5632a78ac2112440 | 3 | {
"blob_id": "54fc6a01324ce9dc91891b1a5632a78ac2112440",
"branch_name": "refs/heads/master",
"committer_date": 1572375479000,
"content_id": "32139e1f231570ab0fd5963c8efa735bf667f9c0",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "52cdbd145ea7bb4de86341d33a50fd7eb562324f",
"extension": "p... | 2.53125 | stackv2 | import io
import json
import requests
import webbrowser
import numpy as np
import pandas as pd
from jinja2 import Template
from bs4 import BeautifulSoup
from bokeh.plotting import figure
from bokeh.palettes import colorblind
from bokeh.models import Arrow, Label, HoverTool
from bokeh.models.sources import ColumnDataSou... | 315 | 34.4 | 91 | 21 | 2,571 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5a76f763b873a499_ea91ee02", "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."
] | [
185
] | [
187
] | [
23
] | [
6
] | |
2024-11-18T23:05:25.055807+00:00 | 1,447,299,671,000 | d997321b25bc041bbbab92e6209cd0b2d0e5f4ed | 2 | {
"blob_id": "d997321b25bc041bbbab92e6209cd0b2d0e5f4ed",
"branch_name": "refs/heads/master",
"committer_date": 1447299671000,
"content_id": "1eb83f5ae05379896bbcc801bc2b393633a0d10c",
"detected_licenses": [
"MIT"
],
"directory_id": "190b4291e56b9ce8120c88a85ea864a27ab3694a",
"extension": "py",
"fi... | 2.40625 | stackv2 | import os
import sys
import logging
import paramiko
import subprocess
import multiprocessing
if sys.version_info.major == 2:
from environment import Environment
else:
from yarn.environment import Environment
from getpass import getpass
from contextlib import contextmanager
from paramiko.ssh_exception import Aut... | 186 | 38.77 | 131 | 19 | 1,642 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_13cd738fd465fad6_72b4d740", "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."
] | [
91
] | [
null
] | [
9
] | [
66
] | |
2024-11-18T23:05:33.432399+00:00 | 1,624,201,664,000 | 4e80e1d08c9a11e49d98a0c9abbec651c4b93ea7 | 3 | {
"blob_id": "4e80e1d08c9a11e49d98a0c9abbec651c4b93ea7",
"branch_name": "refs/heads/master",
"committer_date": 1624201664000,
"content_id": "7d809318911d36912dd62d0507ae495415cf39e2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4a63e96d7015e3e13d9b5204fc0261c05f600d3b",
"extension": "py"... | 2.546875 | stackv2 | from markupsafe import escape
from flask import Flask
app = Flask(__name__)
@app.route('/user/<username>')
def show_user_profile(username):
return f"User {escape(username)}"
@app.route('/post/<int:post_id>')
def show_post(post_id):
return f"Post {post_id}"
@app.route('/path/<path:subpath>')
def show_subp... | 23 | 17.57 | 39 | 10 | 110 | python | [{"finding_id": "codeql_py/flask-debug_bdef4eb0aa975686_be6994f9", "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)."
] | [
23,
14
] | [
null,
null
] | [
5,
12
] | [
24,
29
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.