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-19T02:32:03.303339+00:00 | 1,605,036,327,000 | 211d7bf038d28e94ea11a5a33d3540ff7de3c3e6 | 2 | {
"blob_id": "211d7bf038d28e94ea11a5a33d3540ff7de3c3e6",
"branch_name": "refs/heads/master",
"committer_date": 1605036327000,
"content_id": "a8e563e114ec6f6e9ea0f830208ef10d78198c7a",
"detected_licenses": [
"MIT"
],
"directory_id": "f7c3a4da93ede87bf47913a804456da407ac9988",
"extension": "py",
"fi... | 2.328125 | stackv2 | """Myo-to-OSC application.
Connects to a Myo, then sends EMG and IMU data as OSC messages to localhost:3000
"""
import datetime
import math
import logging
import argparse
import sys
import time
import subprocess
import pythonosc
import unittest
import asyncio
import os
import socket
from pythonosc import dispatcher
fro... | 117 | 30.53 | 166 | 16 | 1,031 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_22a2419aee6fc614_cb3790e7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
77,
89
] | [
null,
null
] | [
9,
9
] | [
32,
35
] | |
2024-11-19T02:32:15.150474+00:00 | 1,488,345,816,000 | 8bb19bf5b9a7ce81b2adf6a4fa0a4973316b1219 | 3 | {
"blob_id": "8bb19bf5b9a7ce81b2adf6a4fa0a4973316b1219",
"branch_name": "refs/heads/master",
"committer_date": 1488345816000,
"content_id": "46f219e12c2b9aa8a045af3b557661ac58d19d8a",
"detected_licenses": [
"MIT"
],
"directory_id": "ea05de2b797f1c870ff40d3adad2518b5e1cae26",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/env python
# coding=utf-8
""" keychain.py: Access keychain
Created by gogleyin on 5/18/16.
"""
import os
import re
from subprocess import check_output, CalledProcessError
import logging
logger = logging.getLogger(__name__ if __name__ != '__main__' else os.path.splitext(os.path.basename(__file__))[0])
lo... | 189 | 37.5 | 119 | 14 | 1,802 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4275d47cbfca39a4_549dcf84", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw... | [
67
] | [
null
] | [
18
] | [
21
] | |
2024-11-19T02:32:22.336629+00:00 | 1,575,921,851,000 | d657ef841afc39861a127c799d1e1b435a3d0afe | 2 | {
"blob_id": "d657ef841afc39861a127c799d1e1b435a3d0afe",
"branch_name": "refs/heads/master",
"committer_date": 1575921851000,
"content_id": "a81d9861cd0281d2d3e6c0ae7fc359862516fea0",
"detected_licenses": [
"MIT"
],
"directory_id": "7f86ed95067d7cb2dc83a7e12c2b1ce1e7dbfca6",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os
import re
import string
import traceback
from typing import TextIO
from jinja2 import Template
from jinja2.exceptions import TemplateSyntaxError, TemplateError
from jinja2 import StrictUndefined, Undefined
from doxybook.node import Node, DummyNode
from doxybook.constants import Kind
from doxybook.templates.an... | 419 | 39.07 | 120 | 22 | 3,625 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2a433fe7a3d19cff_190f81c9", "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... | 13 | true | [
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"... | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially... | [
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
39,
36,
47,
42,
40,
37,
38,
35,
37,
35,
44,
34,
35
] | [
97,
91,
113,
103,
99,
93,
97,
89,
93,
89,
107,
87,
89
] | |
2024-11-19T02:32:24.800222+00:00 | 1,588,104,840,000 | e26229e07bb0654e368ef410269e474ccf64814a | 3 | {
"blob_id": "e26229e07bb0654e368ef410269e474ccf64814a",
"branch_name": "refs/heads/master",
"committer_date": 1588104840000,
"content_id": "88de83bb2a4f21ef3f5695779e207ffdf35f3295",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8525c4b4ae752839bde994bd288c65d5ae5c3318",
"extension": "p... | 2.53125 | stackv2 | #! /usr/bin/env python3
"""
ONTAP REST API Python Sample Scripts
This script was developed by NetApp to help demonstrate NetApp technologies. This
script is not officially supported as a standard NetApp product.
Purpose: THE FOLLOWING SCRIPT SHOWS SVM OPERATIONS USING REST API
usage: python3 svm_operations.py [-h] ... | 463 | 32.95 | 91 | 18 | 3,701 | python | [{"finding_id": "codeql_py/request-without-cert-validation_fd825d87291a1f48_ca36d101", "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]... | 13 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"... | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
45,
69,
96,
122,
137,
164,
179,
206,
221,
297,
318,
375,
390
] | [
null,
null,
97,
123,
null,
165,
null,
207,
null,
301,
null,
376,
null
] | [
20,
20,
28,
20,
24,
20,
24,
20,
24,
20,
24,
20,
24
] | [
72,
72,
67,
66,
83,
66,
83,
66,
83,
26,
83,
66,
83
] | |
2024-11-19T02:32:31.432449+00:00 | 1,452,462,462,000 | fb39fc67b759130c1e44ed7c9cf8997b18300290 | 3 | {
"blob_id": "fb39fc67b759130c1e44ed7c9cf8997b18300290",
"branch_name": "refs/heads/master",
"committer_date": 1452462462000,
"content_id": "f18877f29a40844d035a9f26a8995a9ff4f7013b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ebd7ae58ec1275dc066c6a0feaad458e9820912b",
"extension": "py"... | 2.546875 | stackv2 | #!/usr/bin/env python3
import argparse
import os
import random
import shapefile # pip install pyshp
import sys
import requests
import multiprocessing
import getcolor
import pandas as pd
import creds
IMGS_PER_SOURCE = 100
LL_RANGE = 0.1
API_KEY = creds.API_KEY
GOOGLE_URL = ("http://maps.googleapis.com/maps/api/street... | 148 | 29.58 | 80 | 21 | 1,256 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_e0fa26249e49e29b_fadb427e", "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."
] | [
97
] | [
null
] | [
17
] | [
26
] | |
2024-11-19T02:32:46.284867+00:00 | 1,509,423,243,000 | b85c0383394e45b80512c99586edb67509b5490f | 2 | {
"blob_id": "b85c0383394e45b80512c99586edb67509b5490f",
"branch_name": "refs/heads/master",
"committer_date": 1509423243000,
"content_id": "5d411ffaf1855d7a079a22dd2aae45b5f6c77aef",
"detected_licenses": [
"MIT"
],
"directory_id": "f89d2bebf54d7aede4c7c7971731815b2ad756db",
"extension": "py",
"fi... | 2.5 | stackv2 | from jinja2 import Template
import os
from optparse import OptionParser
import logging
import csv
import time
import re
from watchdog.observers import Observer
from watchdog.events import LoggingEventHandler, FileSystemEventHandler
from itertools import zip_longest
from livereload import Server
VERSION = '0.1.0'
REN... | 175 | 31.46 | 95 | 19 | 1,121 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_65cbb0bdba8f04a9_0938845f", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
52,
81
] | [
null,
null
] | [
24,
24
] | [
54,
60
] | |
2024-11-19T02:32:53.031964+00:00 | 1,475,041,056,000 | 35bb913af1ca06f1219f7e3d926e50bf48971929 | 3 | {
"blob_id": "35bb913af1ca06f1219f7e3d926e50bf48971929",
"branch_name": "refs/heads/master",
"committer_date": 1475041056000,
"content_id": "6752178724c65ae6c845818deda2cf94ec5858c1",
"detected_licenses": [
"MIT"
],
"directory_id": "511fb3e98810d883d836f0ce32c8c9b45e64ca40",
"extension": "py",
"fi... | 2.65625 | stackv2 | from flask import Flask, render_template, send_file, request
from datetime import date
from io import BytesIO
app = Flask(__name__)
@app.route('/create', methods=['POST', 'GET'])
def create_form():
today = date.today()
if request.method == 'POST':
file = BytesIO()
titlestr = '# %s\n' % requ... | 30 | 27.33 | 60 | 17 | 183 | python | [{"finding_id": "codeql_py/path-injection_a9da1e793ea2fb7a_f87487ec", "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)."
] | [
25
] | [
null
] | [
26
] | [
30
] | |
2024-11-19T02:43:27.726844+00:00 | 1,598,844,131,000 | 1c90186f874cb43ef498c3a32602c6044eb295ba | 3 | {
"blob_id": "1c90186f874cb43ef498c3a32602c6044eb295ba",
"branch_name": "refs/heads/master",
"committer_date": 1598844131000,
"content_id": "08027bb6421713cb68a8a4bc244adc533bb85dea",
"detected_licenses": [
"MIT"
],
"directory_id": "7b006946c78d7d3edf3191506595d41875fb8965",
"extension": "py",
"fi... | 2.78125 | stackv2 | from bs4 import BeautifulSoup
import re
import json
import math
import itertools
from operator import itemgetter
from collections import defaultdict
import datetime
meets = {}
with open('R_results/json/meets.json') as meetsObj:
meets = json.load(meetsObj)
genders = {
'1': {'name': 'men', 'styles': [1, 2, 3, 5... | 367 | 34.87 | 116 | 22 | 3,772 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_597c2a1d2b953089_9e0f7e2b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
269,
286
] | [
null,
null
] | [
32,
20
] | [
38,
26
] | |
2024-11-19T02:54:52.834982+00:00 | 1,559,711,408,000 | 6e8a47ec9a5a66c7fd381cb0fb4558410204746b | 3 | {
"blob_id": "6e8a47ec9a5a66c7fd381cb0fb4558410204746b",
"branch_name": "refs/heads/master",
"committer_date": 1559711408000,
"content_id": "3a9daa30d7f3aa886fc80aa7bab37a83178f3050",
"detected_licenses": [
"MIT"
],
"directory_id": "887e00f3d3968c7add1e7d10d42ed1e8875d216f",
"extension": "py",
"fi... | 2.71875 | stackv2 | import flask
import random
server = flask.Flask(__name__)
registered_users = {}
submissions = {}
def generate_id():
pool = list("abcdefghijklmnopqrstuvwxyz124567890")
return ''.join(random.choice(pool) for i in range(5))
# The Web Page paths
@server.route("/",methods=["GET"])
def index_page():
return ... | 94 | 32.95 | 96 | 19 | 728 | python | [{"finding_id": "codeql_py/stack-trace-exposure_8a2829055c094d83_57a68d92", "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."
] | [
48,
80
] | [
null,
null
] | [
30,
30
] | [
59,
59
] | |
2024-11-19T02:55:03.720865+00:00 | 1,625,272,493,000 | ffd75d484b22ad1dbb8df45f49c9e9c6dc7da141 | 3 | {
"blob_id": "ffd75d484b22ad1dbb8df45f49c9e9c6dc7da141",
"branch_name": "refs/heads/master",
"committer_date": 1625272493000,
"content_id": "28312b6ccd98133013fee92cbca4e9218921d970",
"detected_licenses": [
"MIT"
],
"directory_id": "9f8971d6a0c875b9f2b0178439d977ae2640997e",
"extension": "py",
"fi... | 2.546875 | stackv2 | import tornado.web
from utils import SessionStore
import uuid
from utils import GameLogicClient
from dataclasses import asdict
from typing import Dict, Optional, Awaitable
import json
class UpdateSessionHandler(tornado.web.RequestHandler):
"""Turn this async!
https://github.com/tornadoweb/tornado/blob/stable/... | 46 | 35.8 | 96 | 19 | 353 | python | [{"finding_id": "codeql_py/reflective-xss_4fd71abf307e0e3d_779884a6", "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)."
] | [
43
] | [
null
] | [
24
] | [
39
] | |
2024-11-19T02:55:19.013108+00:00 | 1,579,326,585,000 | a505ae2aacf78b7fc87f8bad6ef6fb9e0085a5f1 | 3 | {
"blob_id": "a505ae2aacf78b7fc87f8bad6ef6fb9e0085a5f1",
"branch_name": "refs/heads/master",
"committer_date": 1579326585000,
"content_id": "c466a97729be6e5207b5d0863a1b28f3ddaa9741",
"detected_licenses": [
"MIT"
],
"directory_id": "b7ab0b78ab257dd6996dfb74eb84368eda212ae3",
"extension": "py",
"fi... | 2.546875 | stackv2 | from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from . import forms
from . import models
import hashlib
@csrf_exempt
def login(request):
if request.session.get('is_login', None):
return JsonResponse({"success": False, "msg": '请勿重复登录'})
message = ""
success... | 80 | 34.62 | 77 | 21 | 563 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_14c7d8ec7cd2f29e_f6d2f220", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
78
] | [
null
] | [
16
] | [
33
] | |
2024-11-19T02:55:26.017554+00:00 | 1,490,363,552,000 | e66c251ed5523f80068f35fe80f26d7a1c259716 | 2 | {
"blob_id": "e66c251ed5523f80068f35fe80f26d7a1c259716",
"branch_name": "refs/heads/master",
"committer_date": 1490363552000,
"content_id": "09cbb98ddecc9351f7b63eecc70c8441171e53c4",
"detected_licenses": [
"MIT"
],
"directory_id": "bc61aca3346eb98e41d1a54e9ac730cad7af7eb0",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
import uuid
import json
import redis
import logging
from tornado import escape, web, websocket
from Handlers.BaseHandler import BaseHandler
logger = logging.getLogger(__name__)
class ChatSocketHandler(websocket.WebSocketHandler, BaseHandler):
"""ChatSocketHandler
"""
def initiali... | 69 | 28.97 | 93 | 14 | 436 | python | [{"finding_id": "codeql_py/log-injection_e8c8679ecdfb56c4_22984571", "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)."
] | [
61
] | [
null
] | [
49
] | [
56
] | |
2024-11-19T02:55:28.734114+00:00 | 1,619,619,035,000 | 6f7e6d0e500a5033aae818bcbcf5b8090ebcb837 | 2 | {
"blob_id": "6f7e6d0e500a5033aae818bcbcf5b8090ebcb837",
"branch_name": "refs/heads/master",
"committer_date": 1619619035000,
"content_id": "97fcddf59fc7a873b57616f4f62ce172821bdab4",
"detected_licenses": [
"MIT"
],
"directory_id": "68192b41ad2e33710b3b7e9a110650f32558769b",
"extension": "py",
"fi... | 2.40625 | stackv2 | from datetime import datetime, time
import logging
import json
import os
import requests
import traceback
from dotenv import load_dotenv
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from src import models
from src import data
from src import finance_stats
load_dotenv()
def send_sla... | 130 | 28.1 | 96 | 16 | 897 | python | [{"finding_id": "codeql_py/log-injection_31ca6cc08ac8a621_7031ec76", "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)."
] | [
127
] | [
null
] | [
23
] | [
60
] | |
2024-11-19T02:55:43.894827+00:00 | 1,635,238,608,000 | 164adad053a66e884a00071e543f2be59498de5f | 3 | {
"blob_id": "164adad053a66e884a00071e543f2be59498de5f",
"branch_name": "refs/heads/master",
"committer_date": 1635238608000,
"content_id": "f7d1046cc6fea4c4c6603612a42d537fb4b69ecf",
"detected_licenses": [
"MIT"
],
"directory_id": "e9bc91f5edff5ade04010965892b7b4e317c6f8f",
"extension": "py",
"fi... | 3.03125 | stackv2 | """
html_generator.py
this module perform making result of backtest into HTML format.
"""
import os
from jinja2 import Environment, PackageLoader
from abc import *
class HtmlGenerator(metaclass=ABCMeta):
PACKAGE_PATH = os.path.basename(os.path.dirname(os.path.realpath(__file__)))
TEMPLATE_PATH = "templates... | 52 | 30.4 | 112 | 15 | 380 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5a22348b106b79f0_5588df3b", "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."
] | [
45
] | [
null
] | [
16
] | [
108
] | |
2024-11-19T02:56:01.677213+00:00 | 1,616,430,415,000 | dc52b1a67cb190ec9af83b022bb8827bf13cabe8 | 3 | {
"blob_id": "dc52b1a67cb190ec9af83b022bb8827bf13cabe8",
"branch_name": "refs/heads/master",
"committer_date": 1616430415000,
"content_id": "0d5794d55159857a0d511f2d32877ab1f5e30d80",
"detected_licenses": [
"MIT"
],
"directory_id": "572e61f6c7d27be807f1badf1b39349d99d29831",
"extension": "py",
"fi... | 2.953125 | stackv2 | def secureErase(file, passes, securityLevel):
import random
import os
import sys
FileNameLength = 50
charList = list('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=[];,./!@#$%^&*(){}|_+<>?')
# Check if the file exists
if not os.path.exists(file):
sys.exit(str(file... | 202 | 30.94 | 111 | 20 | 1,585 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_9b8cda5d3a4fe8be_0daf94cf", "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... | [
148,
179
] | [
null,
null
] | [
32,
31
] | [
56,
55
] | |
2024-11-19T03:10:30.729803+00:00 | 1,555,928,548,000 | 1dbe18beebb66327b159cdd85b3c810d31f206ae | 2 | {
"blob_id": "1dbe18beebb66327b159cdd85b3c810d31f206ae",
"branch_name": "refs/heads/master",
"committer_date": 1555928548000,
"content_id": "bd0be4ee3e94593faad3803c325f5fe85803a6b1",
"detected_licenses": [
"MIT"
],
"directory_id": "fe61c2b9f81c5fdd4a19bee41dc6abeeb7d0b65a",
"extension": "py",
"fi... | 2.375 | stackv2 | import os
import shutil
import tarfile
import urllib.request
"""
Download a pretrained TF detection model
"""
MODEL = "ssdlite_mobilenet_v2_coco_2018_05_09"
MODEL_FILE = MODEL + ".tar.gz"
DOWNLOAD_BASE = "http://download.tensorflow.org/models/object_detection/"
DEST_DIR = "pretrained_model"
if __name__ == "__main_... | 30 | 22.1 | 74 | 10 | 180 | python | [{"finding_id": "codeql_py/tarslip_8fc64186855a57d7_53cd45d9", "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)."
] | [
23
] | [
null
] | [
5
] | [
8
] | |
2024-11-19T03:10:38.480048+00:00 | 1,640,275,576,000 | 843edae4370398e77a6b1eff9a5179e2386f4e8d | 3 | {
"blob_id": "843edae4370398e77a6b1eff9a5179e2386f4e8d",
"branch_name": "refs/heads/master",
"committer_date": 1640275576000,
"content_id": "1faab76c40da4354b15fc10ac35c39623f0e0136",
"detected_licenses": [
"MIT"
],
"directory_id": "131cde78ae574ea3262ade2a6f2b58b9cc5f3ddc",
"extension": "py",
"fi... | 2.90625 | stackv2 | # Issues encountered:
# -> Non-english characters
# -> issues with strings and char encoding while printing and writing to file
# -> newlines in windows for csv
import csv
import re
import time
import urllib3
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
from bs4 import Beau... | 227 | 38.98 | 111 | 19 | 2,054 | python | [{"finding_id": "codeql_py/request-without-cert-validation_4b89f15f8840a60c_867b50bd", "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]... | 4 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
116,
128,
176,
192
] | [
null,
null,
null,
null
] | [
9,
13,
13,
17
] | [
42,
48,
44,
53
] | |
2024-11-19T03:10:39.291290+00:00 | 1,657,054,496,000 | da2677fcd4cfaf58fff7a5b30bcf84db4b5013da | 3 | {
"blob_id": "da2677fcd4cfaf58fff7a5b30bcf84db4b5013da",
"branch_name": "refs/heads/master",
"committer_date": 1657054496000,
"content_id": "985d3d97088967a90438d2d9692bf2724498f58e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e074be8c042a872c3c97abe6e01ccaad101f0564",
"extension": "py"... | 2.609375 | stackv2 | import base64
import gzip
import hashlib
import logging
import tarfile
import io
import os
LOGGER = logging.getLogger(__name__)
def authorized_files():
files = []
for root, _, filenames in os.walk('.'):
for filename in filenames:
files.append(os.path.join(root, filename))
return files... | 97 | 25.37 | 73 | 17 | 622 | python | [{"finding_id": "codeql_py/tarslip_7f0cdc912d003016_8392308a", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
29
] | [
null
] | [
5
] | [
8
] | |
2024-11-19T03:10:49.812852+00:00 | 1,441,412,523,000 | 95b910b3b8840a9fd66a6b9e030af36091f25041 | 3 | {
"blob_id": "95b910b3b8840a9fd66a6b9e030af36091f25041",
"branch_name": "refs/heads/master",
"committer_date": 1441412523000,
"content_id": "6c525263918cdd057d923fbb58e0fc7dd54bbf90",
"detected_licenses": [
"MIT"
],
"directory_id": "c32007d0845939ad921ae623fc7a3b0870c9cfb1",
"extension": "py",
"fi... | 2.5625 | stackv2 | from flask import Flask, render_template, request, redirect, url_for
import base64
import json
app = Flask(__name__)
# app.config['DEBUG'] = True
TITLE = "Nice assertion! ;)"
NOT_VALID_ASSERTION = "Invalid assertion! :("
VALID_ASSERTION = "Success! Valid assertion! :)"
@app.route('/')
def index():
return render... | 53 | 31.72 | 149 | 15 | 450 | python | [{"finding_id": "codeql_py/stack-trace-exposure_c81fe38ed7ebee6f_e54d717f", "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."
] | [
46
] | [
null
] | [
20
] | [
61
] | |
2024-11-19T03:10:50.276885+00:00 | 1,614,873,147,000 | 98d44654c831f57b56ec666dd193a546dc86c24a | 3 | {
"blob_id": "98d44654c831f57b56ec666dd193a546dc86c24a",
"branch_name": "refs/heads/main",
"committer_date": 1614873147000,
"content_id": "0938654db3b6a1b57b2d9985d37ae53db0a2a11c",
"detected_licenses": [
"MIT"
],
"directory_id": "43163ffe371050647f9005edf19f1f733d8543f6",
"extension": "py",
"file... | 2.546875 | stackv2 | from rich import print
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
import os
import xmltodict
def get_joomla_version_1(args):
print('\n[yellow][INF] Trying to get Joomla version... [/]')
manifest_... | 52 | 34.79 | 95 | 14 | 430 | python | [{"finding_id": "codeql_py/request-without-cert-validation_5d1c513382527401_afd54697", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
17,
40
] | [
null,
null
] | [
20,
20
] | [
96,
96
] | |
2024-11-19T03:21:52.195322+00:00 | 1,590,420,754,000 | 2afe81e5f60ede1c114596ae593974440e04fd21 | 4 | {
"blob_id": "2afe81e5f60ede1c114596ae593974440e04fd21",
"branch_name": "refs/heads/master",
"committer_date": 1590420754000,
"content_id": "ed3fd6aecca3982104c8ce6a0d25886ef80276ee",
"detected_licenses": [
"MIT"
],
"directory_id": "654ed8e9825cf972eba7f448a69a3a2e441f55a2",
"extension": "py",
"fi... | 3.78125 | stackv2 | # Реализовать функцию, принимающую несколько параметров, описывающих данные пользователя:
# имя, фамилия, год рождения, город проживания, email, телефон.
# Функция должна принимать параметры как именованные аргументы.
# Реализовать вывод данных о пользователе одной строкой.
def print_user_data(*, name, surname, birth... | 22 | 31.05 | 89 | 10 | 208 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a500dbe3732bc187_9e5db3fb", "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
] | [
10
] | [
11
] | [
49
] | |
2024-11-19T03:43:55.855266+00:00 | 1,521,107,885,000 | 4e09f00874a14634352db4aa82768598474e820d | 3 | {
"blob_id": "4e09f00874a14634352db4aa82768598474e820d",
"branch_name": "refs/heads/master",
"committer_date": 1521107885000,
"content_id": "e00b8c48eef593fc1a8ddbcff7e5c4dc1212c08c",
"detected_licenses": [
"Unlicense"
],
"directory_id": "7d090cbc0af62a40565ccef2db24293cb7b14edb",
"extension": "py",... | 2.53125 | stackv2 | from flask import Flask,request,jsonify
from flask_pymongo import PyMongo
app = Flask(__name__)
app.config['MONGO_DBNAME']='testsaylani'
app.config['MONGO_URI']='mongodb://testuser:testuser@ds223578.mlab.com:23578/testsaylani'
mongo=PyMongo(app)
@app.route('/')
def hello_world():
return 'Hello Flask App!'
@app... | 98 | 29.64 | 179 | 16 | 721 | python | [{"finding_id": "codeql_py/flask-debug_771dc56271bd2486_8fe15d4c", "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-079",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss"
] | [
"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.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
98,
66,
84
] | [
null,
null,
null
] | [
null,
16,
16
] | [
20,
35,
34
] | |
2024-11-19T03:44:05.045159+00:00 | 1,489,254,137,000 | 396bc26bcea63d886b8f90e267ea1da807590dfa | 3 | {
"blob_id": "396bc26bcea63d886b8f90e267ea1da807590dfa",
"branch_name": "refs/heads/master",
"committer_date": 1489254137000,
"content_id": "8015aa149836ac95f96a1465cbcd208ca876745f",
"detected_licenses": [
"Unlicense"
],
"directory_id": "5b9d9793007eccf18a4ebf5dc01d01d69d6cb6a0",
"extension": "py",... | 2.609375 | stackv2 | from enum import Enum, unique
import re
import sys
from io import StringIO
char_to_loctype = dict() # type: dict[str, LocusType]
loctype_to_char = dict() # type: dict[LocusType, str]
@unique
class LocusType(Enum):
GENOME = 1
CODING = 2
NONCODING = 3
PROTEIN = 4
@staticmethod
def from_character(c: str) -> 'Lo... | 142 | 27.68 | 120 | 18 | 1,413 | python | [{"finding_id": "codeql_py/overly-large-range_3b23a6a7b8896020_b0bd3aab", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
66
] | [
null
] | [
40
] | [
43
] | |
2024-11-19T03:44:12.474380+00:00 | 1,543,783,795,000 | 5fb4657260c98a52c14e5a7cb1c827ca48a9e1e0 | 3 | {
"blob_id": "5fb4657260c98a52c14e5a7cb1c827ca48a9e1e0",
"branch_name": "refs/heads/master",
"committer_date": 1543783795000,
"content_id": "eb56b7b8af58780a18440e888dacd26ab3d29dcb",
"detected_licenses": [
"MIT"
],
"directory_id": "72aa6230512c502670514b6e81e8ef0125b58b6f",
"extension": "py",
"fi... | 2.578125 | stackv2 | #!/usr/bin/env python
import os
import subprocess
from flask import Flask, abort, request, jsonify, g, url_for
from flask_sqlalchemy import SQLAlchemy
from flask_httpauth import HTTPBasicAuth
from passlib.apps import custom_app_context as pwd_context
from itsdangerous import (TimedJSONWebSignatureSerializer
... | 95 | 30.85 | 103 | 13 | 716 | python | [{"finding_id": "codeql_py/command-line-injection_9b17868f205c949f_2e3807a1", "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": {... | 3 | true | [
"CWE-078",
"CWE-078",
"CWE-215"
] | [
"py/command-line-injection",
"py/command-line-injection",
"py/flask-debug"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"This command line depends on a [user-provided value](1).",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
73,
85,
95
] | [
null,
null,
null
] | [
31,
31,
5
] | [
47,
47,
40
] | |
2024-11-19T03:44:22.031879+00:00 | 1,555,537,565,000 | b47cd8ff2bf183defd514228fc061e9ca2cf52d1 | 2 | {
"blob_id": "b47cd8ff2bf183defd514228fc061e9ca2cf52d1",
"branch_name": "refs/heads/master",
"committer_date": 1555537565000,
"content_id": "d09c449fa793e9e0aaa5fdfa397121110655108b",
"detected_licenses": [
"MIT"
],
"directory_id": "f22baa3f639fc66af90ccb97e6b23021365207a0",
"extension": "py",
"fi... | 2.328125 | stackv2 | from app import app, db, socketio
import os
from flask import render_template, flash, redirect, url_for, request, jsonify, send_file
from app.forms import LoginForm
from flask_login import current_user, login_user, logout_user, login_required
from app.models import User, Project, File
from app.forms import Registration... | 227 | 35.05 | 172 | 21 | 1,838 | python | [{"finding_id": "codeql_py/url-redirection_9500f00d2e9e5d77_e3cad625", "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)."
] | [
56
] | [
null
] | [
25
] | [
34
] | |
2024-11-19T03:44:22.932619+00:00 | 1,478,724,777,000 | 656bdff9565ba2c10474ed55accba88d591923b2 | 3 | {
"blob_id": "656bdff9565ba2c10474ed55accba88d591923b2",
"branch_name": "refs/heads/master",
"committer_date": 1478724777000,
"content_id": "22dc036b19b5b5755ca1da8dc4c8e95fbc453b66",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bdd1076246cfb8652615cc7eefe509565670c0a4",
"extension": "p... | 2.671875 | stackv2 | #!/usr/bin/env python
import webapp2
import os
import jinja2
from iprzedszkole import *
from models import Note
from google.appengine.ext import ndb
from google.appengine.api import memcache
import logging
jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.dirname(__file__)))
expirationTime = 600
... | 59 | 31.92 | 89 | 16 | 485 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f39ded84e330aa1d_e75988e1", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
12
] | [
null
] | [
13
] | [
90
] | |
2024-11-19T01:44:07.708863+00:00 | 1,484,533,904,000 | f3c94d8d1ad24943b1e7c4c47c01847e81e17fd9 | 2 | {
"blob_id": "f3c94d8d1ad24943b1e7c4c47c01847e81e17fd9",
"branch_name": "refs/heads/master",
"committer_date": 1484533904000,
"content_id": "a38dfbf865c770c99e696492b5dbd097b8693d50",
"detected_licenses": [
"MIT"
],
"directory_id": "d40654796e0c8e423881bff2b66dffb33e93b03f",
"extension": "py",
"fi... | 2.46875 | stackv2 | import sqlite3
#TODO change to static path
from flask import Flask, jsonify, g, request
from sqlite3 import dbapi2 as sqlite3
DATABASE = 'test.db'
def get_db():
db = getattr(g, '_database', None)
if db is None:
db = g._database = sqlite3.connect(DATABASE)
db.row_factory = sqlite3.Row
return db
def close_conn... | 42 | 22.93 | 124 | 11 | 275 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bc5a23b3a6ad347e_56c84dc1", "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."
] | [
29
] | [
null
] | [
8
] | [
11
] | |
2024-11-19T02:08:17.559814+00:00 | 1,521,617,440,000 | a7ca2b06dcc6644673fe4b36bf6de0f918ade4e6 | 3 | {
"blob_id": "a7ca2b06dcc6644673fe4b36bf6de0f918ade4e6",
"branch_name": "refs/heads/master",
"committer_date": 1521617440000,
"content_id": "9a7b881231eda1cff8b04be68961d1d4aadf79db",
"detected_licenses": [
"MIT"
],
"directory_id": "49075e3c60108e40976ca12d9499ced6e8b7b0e6",
"extension": "py",
"fi... | 3.03125 | stackv2 | import base64
import hashlib
from Crypto import Random
from Crypto.Cipher import AES, ARC4
from Crypto.Hash import SHA
class AESCipher(object):
"""AES encrypt and decrypt.
The encrypt result is a b64encoded string, easy to transfer.
"""
def __init__(self, key):
self.bs = 32
self.key... | 78 | 27.12 | 66 | 18 | 597 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_af1fd8ee395f86c4_7940ad7e", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used.", "... | 4 | true | [
"CWE-327",
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used.",
"[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used.",
"[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used.",
"[The cryptographic algorithm ARC4](1) is broken or weak, ... | [
46,
56,
66,
76
] | [
null,
null,
null,
null
] | [
27,
18,
27,
18
] | [
53,
49,
53,
49
] | |
2024-11-19T02:21:30.216929+00:00 | 1,623,689,057,000 | 54ad255cdcdaacfd9705c7aa017feb80ffef1ac4 | 3 | {
"blob_id": "54ad255cdcdaacfd9705c7aa017feb80ffef1ac4",
"branch_name": "refs/heads/main",
"committer_date": 1623689057000,
"content_id": "5e2223465213574807a417dbb84421df37378ded",
"detected_licenses": [
"Unlicense"
],
"directory_id": "9ac168c9005c75720b2c8c5e1e830bacc83758e5",
"extension": "py",
... | 2.609375 | stackv2 | import json
import os
import struct
import sys
import threading
import time
import flask
import pvporcupine
import pyaudio
import speech_recognition as sr
from flask import request, Flask, jsonify
from playsound import playsound
import audioUtils
import config
import pathfile
import serverUtils
global no_voice_mode
... | 252 | 27.69 | 123 | 19 | 1,680 | python | [{"finding_id": "codeql_py/command-line-injection_ea9bf3b4f3b3267b_f125fbb6", "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)."
] | [
218
] | [
219
] | [
9
] | [
30
] | |
2024-11-19T02:58:03.267719+00:00 | 1,456,635,644,000 | fc98ff5e3b234dec11267bf32f4343877c10f335 | 2 | {
"blob_id": "fc98ff5e3b234dec11267bf32f4343877c10f335",
"branch_name": "refs/heads/master",
"committer_date": 1456635644000,
"content_id": "a23c4fba58b425545f35d1e1c3bb812a095d69b6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "0586b01aba4e148d47b8801e0029f1475dfb21c5",
"extension": "p... | 2.328125 | stackv2 | from __future__ import print_function, unicode_literals
import uuid
import pandas as pd
import networkx as nx
import numpy as np
import jinja2
import os
import json
import copy
from networkx.readwrite import json_graph
from IPython.display import HTML
from cytoolz.dicttoolz import valmap, merge
from IPython.display im... | 304 | 37.9 | 136 | 20 | 2,485 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5ed62bd43c35fe0f_f527abd5", "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."
] | [
200
] | [
222
] | [
30
] | [
5
] | |
2024-11-19T03:10:08.370675+00:00 | 1,623,336,522,000 | 2f036517e1e1f000c642e9122e1bfa2ba0ca00f9 | 3 | {
"blob_id": "2f036517e1e1f000c642e9122e1bfa2ba0ca00f9",
"branch_name": "refs/heads/master",
"committer_date": 1623336522000,
"content_id": "6af170db5272153fa9294d43da292da57fcce8fd",
"detected_licenses": [
"MIT"
],
"directory_id": "d9198a6e7f1ed803f18c7588621fc3db70c02032",
"extension": "py",
"fi... | 2.84375 | stackv2 | #!/usr/bin/env python3
import os
import requests
import urllib.request, urllib.error, urllib.parse
import json
import sys
import time
import webbrowser
from stravalib import Client
from stravalib.exc import AccessUnauthorized
# we need the files "client_id", "auth_code" and "client_secret" inside this path
# if you ch... | 137 | 32.67 | 117 | 17 | 980 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7da0bc8d47fcb2ad_0cdfb5aa", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
44,
45
] | [
null,
null
] | [
30,
19
] | [
41,
85
] | |
2024-11-19T03:22:59.173272+00:00 | 1,510,366,069,000 | 63a2d80ec3af2ab6f44ca8a0d039c0b083245290 | 3 | {
"blob_id": "63a2d80ec3af2ab6f44ca8a0d039c0b083245290",
"branch_name": "refs/heads/master",
"committer_date": 1510366069000,
"content_id": "9777415db47819ebcc2db63fde297f1aaf13e64a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1c79e9ae96df7abd633680b15dc82d8f1f51446f",
"extension": "py"... | 2.53125 | stackv2 | '''
MCAN - Make Crypto API Nicer
Python3 script that uses Flask to make an API that uses an API to make it look cleaner and display what you need
A piece of the PyCryptoTools project (used to be PyCryptoCheck)
Made by Nekmit (nekmit@riseup.net)
'''
# import some stuff
import os
import sys
import requests
import json... | 35 | 27.11 | 124 | 15 | 304 | python | [{"finding_id": "codeql_py/partial-ssrf_044322dc2942f7e0_7518e6ee", "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)."
] | [
24
] | [
null
] | [
8
] | [
125
] | |
2024-11-19T01:34:48.268867+00:00 | 1,543,432,970,000 | 9b1fca2f9c3a01865e18740ed14c7e4de35f9b81 | 3 | {
"blob_id": "9b1fca2f9c3a01865e18740ed14c7e4de35f9b81",
"branch_name": "refs/heads/master",
"committer_date": 1543432970000,
"content_id": "b00ed63b418d03088262a0c513ce43ba7de39c2c",
"detected_licenses": [
"MIT"
],
"directory_id": "43aac0ee9789a8c240826432bc322da7050dbb17",
"extension": "py",
"fi... | 3.421875 | stackv2 | #Importing list of saved names
import os
import json
from dotmap import DotMap
facebook = {}
def get_info(facebook):
try:
__location__ = os.path.join(os.getcwd(), os.path.dirname(__file__))
config = open(os.path.join(__location__, "full_list.json"), "r")
config = json.load(config)
... | 148 | 30.78 | 159 | 20 | 1,029 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3668778f320b2dfe_5c8d6c05", "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."
] | [
65
] | [
null
] | [
86
] | [
102
] | |
2024-11-19T01:34:51.496770+00:00 | 1,617,256,839,000 | 3bbece4f7ee5b999c4265a6013df50b686ad96ac | 3 | {
"blob_id": "3bbece4f7ee5b999c4265a6013df50b686ad96ac",
"branch_name": "refs/heads/master",
"committer_date": 1617256839000,
"content_id": "b1a3da15cb20e5ac9d6890aa3a2b0f443a15f895",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6f417c5224981b2eb101739b1b72c9b60c7a91d3",
"extension": "py"... | 2.6875 | stackv2 | #!/usr/bin/env python
import paramiko
import os
from argparse import ArgumentParser
def get_args():
"""
Get CLI arguments.
"""
parser = ArgumentParser(description='Arguments for talking to vCenter')
parser.add_argument('-s', '--host',
required=True,
... | 58 | 27.26 | 84 | 12 | 335 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_770bbf606db67060_ecc6d7fd", "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."
] | [
40
] | [
null
] | [
5
] | [
62
] | |
2024-11-19T01:34:52.617174+00:00 | 1,446,443,865,000 | a5f8ffd1f446e5c72f9a82f5987217df04e6b180 | 3 | {
"blob_id": "a5f8ffd1f446e5c72f9a82f5987217df04e6b180",
"branch_name": "refs/heads/master",
"committer_date": 1446443865000,
"content_id": "d405fef458e0a036661c6c9eb6626b3fbb4f02f5",
"detected_licenses": [
"MIT"
],
"directory_id": "bb30d911092809dc3b0fdfa67bf29b5b5968857c",
"extension": "py",
"fi... | 2.75 | stackv2 | from urlparse import urlparse
from flask import request, url_for, redirect
from flask.ext.wtf import Form
from wtforms import StringField, PasswordField, BooleanField, SubmitField, HiddenField
from wtforms.validators import Required, Length, Email, Regexp, EqualTo
from wtforms import ValidationError
from ..models impor... | 139 | 41.55 | 86 | 14 | 1,212 | python | [{"finding_id": "codeql_py/url-redirection_e307ad768be856b0_76ee0fff", "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)."
] | [
53
] | [
null
] | [
33
] | [
39
] | |
2024-11-19T01:34:53.976610+00:00 | 1,517,852,618,000 | 167a32542b6b43e3104d365dc8e505ddf0c4a52c | 3 | {
"blob_id": "167a32542b6b43e3104d365dc8e505ddf0c4a52c",
"branch_name": "refs/heads/master",
"committer_date": 1517852694000,
"content_id": "ccf771be32719130362328b888104b411f1eaab0",
"detected_licenses": [
"MIT"
],
"directory_id": "5ee3103578039bda22e0dfdd4c535fcfbe0d2d5a",
"extension": "py",
"fi... | 2.625 | stackv2 | # Andrea Masi 2014 eraclitux@gmail.com
import os
import datetime
def ensure_secret():
"""Check if secret key to encryot sessions exists,
generate it otherwise."""
home_dir = os.environ['HOME']
file_name = home_dir + "/.ipcamweb"
if os.path.exists(file_name):
with open(file_name, "r") as s_... | 51 | 33.67 | 85 | 16 | 442 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_3eae2ac0ad99d05c_12b932e6", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text."
] | [
17
] | [
null
] | [
35
] | [
46
] | |
2024-11-19T01:34:55.639046+00:00 | 1,688,050,504,000 | 09c9b6b8a4fa4a19e9bf2a6eaf0c6795689908d7 | 2 | {
"blob_id": "09c9b6b8a4fa4a19e9bf2a6eaf0c6795689908d7",
"branch_name": "refs/heads/main",
"committer_date": 1688050504000,
"content_id": "bda7b482a7fcfa9a7ffd555066a4de02811b206c",
"detected_licenses": [],
"directory_id": "6e6e0703965bc6fe9a2d1c108d4f7c1acc0d0c0d",
"extension": "py",
"filename": "prep.... | 2.484375 | stackv2 | import time
import sys
import argparse
import os
from glob import glob
import tarfile
import urllib.request
import pandas as pd
import dask.array as da
DATASETS = ["random", "flights", "all"]
here = os.path.dirname(__file__)
data_dir = os.path.abspath(os.path.join(here, "data"))
def parse_args(args=None):
pars... | 133 | 30.29 | 122 | 17 | 1,039 | python | [{"finding_id": "codeql_py/tarslip_348e066220ec85d5_f461f19e", "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).\nThis file extraction depends on a [potentially un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).\nThis file extraction depends on a [potentially untrusted source](1)."
] | [
66
] | [
null
] | [
13
] | [
20
] | |
2024-11-19T02:07:52.081304+00:00 | 1,584,350,546,000 | f63f543e3b2dba12bd8821c97bd498fd481acf74 | 3 | {
"blob_id": "f63f543e3b2dba12bd8821c97bd498fd481acf74",
"branch_name": "refs/heads/master",
"committer_date": 1584350546000,
"content_id": "4a8f3708bcc806a6c437a9ede152949de3a32318",
"detected_licenses": [
"MIT"
],
"directory_id": "97e57c64282777a781442a1dfd70fcd750ce7f88",
"extension": "py",
"fi... | 2.90625 | stackv2 | """
Common functions for other core-modules.
"""
import re
import requests
from xml.etree import ElementTree as etree
from .exceptions import FritzConnectionException
NS_REGEX = re.compile("({(?P<namespace>.*)})?(?P<localname>.*)")
def localname(node):
if callable(node.tag):
return "comment"
m = N... | 61 | 32.44 | 77 | 13 | 442 | python | [{"finding_id": "codeql_py/request-without-cert-validation_527057c86d4d0cc7_7881348b", "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)."
] | [
40
] | [
null
] | [
16
] | [
64
] | |
2024-11-19T02:08:03.514607+00:00 | 1,618,582,090,000 | cf1902577bf96a989dd7af48ce8c5f6341617e71 | 2 | {
"blob_id": "cf1902577bf96a989dd7af48ce8c5f6341617e71",
"branch_name": "refs/heads/master",
"committer_date": 1618582090000,
"content_id": "caeddd28b00e51e0b70632320dbf0e8622e709ae",
"detected_licenses": [
"MIT"
],
"directory_id": "a88d9141afb71128da4cc34f7964a9ed7628e42a",
"extension": "py",
"fi... | 2.484375 | stackv2 | # aws_handler - This handles various aws functions
import base64
import boto3
import json
import logging
from botocore.exceptions import ClientError
class AWS(object):
def __init__(self, data=None):
self.data = data
self.client = None
def get_credentials(self):
if self.data['aws'][... | 127 | 38.58 | 117 | 18 | 1,046 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_824920f6db285a22_2ef80b68", "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."
] | [
38
] | [
40
] | [
22
] | [
73
] | |
2024-11-19T02:17:44.945322+00:00 | 1,634,397,650,000 | 1240be297c58978132f73fa8e2f125f62a26a2fb | 3 | {
"blob_id": "1240be297c58978132f73fa8e2f125f62a26a2fb",
"branch_name": "refs/heads/main",
"committer_date": 1634397650000,
"content_id": "907d1f0ff268ce4f2f651f9e77b6648f41808d4e",
"detected_licenses": [
"MIT"
],
"directory_id": "17e33c36cbabd49813238b1fa0bd66f13abe8e80",
"extension": "py",
"file... | 2.859375 | stackv2 | """
Modulo contenente le route della fase di autenticazione.
Le route sono registrate nel Blueprint 'auth', con prefisso '/auth'.
"""
from datetime import date, datetime
import functools
from flask import (
Blueprint, request, current_app, redirect, url_for, flash, render_template, g, abort
)
from flask_login imp... | 264 | 43.81 | 117 | 24 | 2,368 | python | [{"finding_id": "codeql_py/url-redirection_2e9e98e5329c4d94_869b6395", "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).\nUntrusted URL redirection depends on a ... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).\nUntrusted URL redirection depends on a [user-provided value](1)."
] | [
190
] | [
null
] | [
29
] | [
61
] | |
2024-11-19T02:18:21.514683+00:00 | 1,441,284,608,000 | 12f2158a5e2d4a7d0e89203376f6b2f54d4d1542 | 2 | {
"blob_id": "12f2158a5e2d4a7d0e89203376f6b2f54d4d1542",
"branch_name": "refs/heads/master",
"committer_date": 1441284608000,
"content_id": "333f7360f11e9bff0a8a08844343aeca61f9804a",
"detected_licenses": [
"MIT"
],
"directory_id": "94160c505953772fa9659da19f96acf6de834caa",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/python
import os
import sys
import fcntl
import errno
from .init import beans_conn as db
def get_dir(s, dir):
def parse(line):
p, h, c = line.split(' ')
return p, (int(h), int(c))
return dict(parse(line) for line in
filter(None, (s.get(dir) or '').split('\n')))
def... | 126 | 27.54 | 100 | 25 | 1,059 | python | [{"finding_id": "codeql_py/overly-permissive-file_b13a6e23cfad2a6f_22d41185", "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 group writable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to group writable."
] | [
114
] | [
null
] | [
10
] | [
63
] | |
2024-11-19T02:29:58.142649+00:00 | 1,687,917,663,000 | 972287a5f35cd7fc5661dec375a424b794e75ad1 | 2 | {
"blob_id": "972287a5f35cd7fc5661dec375a424b794e75ad1",
"branch_name": "refs/heads/master",
"committer_date": 1687917663000,
"content_id": "cf24fbf50c325f186b369fa291970e1a040ac0e9",
"detected_licenses": [
"MIT"
],
"directory_id": "a3a8ba68479e18c525592f55d09c68eace143390",
"extension": "py",
"fi... | 2.453125 | stackv2 | import fcntl
import os
import random
import re
import string
import subprocess
import sys
import time
from urllib.parse import urlparse
from typing import Tuple
import requests
from .exceptions import CmdException
from .log import Log
def is_a_glob(a_string):
"""
Return True or False depending on whether a_... | 102 | 31.22 | 92 | 20 | 731 | python | [{"finding_id": "codeql_py/request-without-cert-validation_11690f73b23d39c6_02c37c3b", "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)."
] | [
101
] | [
null
] | [
12
] | [
56
] | |
2024-11-19T02:30:08.186194+00:00 | 1,496,611,304,000 | 131b1a721980cec397dd3056c6e6a27cc33f4b7a | 3 | {
"blob_id": "131b1a721980cec397dd3056c6e6a27cc33f4b7a",
"branch_name": "refs/heads/master",
"committer_date": 1496611304000,
"content_id": "1493a2c8eff385805e1d1e0101be2be42f87f69a",
"detected_licenses": [
"MIT"
],
"directory_id": "9c2a9536363e139f44b38a911686eef307a9fb7c",
"extension": "py",
"fi... | 2.984375 | stackv2 | import os
from base64 import b64decode
from binascii import hexlify, unhexlify
from functools import reduce
from random import SystemRandom
from Crypto.Cipher import AES
def split_by_n(seq, n):
"""A generator to divide a sequence into chunks of n units."""
while seq:
yield seq[:n]
seq = seq[... | 196 | 23.29 | 81 | 12 | 1,278 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_5473a426ba9d9789_2a7df5e4", "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."
] | [
67,
75
] | [
null,
null
] | [
10,
10
] | [
31,
31
] | |
2024-11-19T02:30:20.908274+00:00 | 1,681,994,390,000 | de3e8207dce8ade24b13130876ee1683dd505702 | 3 | {
"blob_id": "de3e8207dce8ade24b13130876ee1683dd505702",
"branch_name": "refs/heads/master",
"committer_date": 1681994390000,
"content_id": "53dc7780a2f530b23f9efe6ba80c320e4901cd72",
"detected_licenses": [
"MIT"
],
"directory_id": "a886b3362e50b30310c208a793e16cc6bee39512",
"extension": "py",
"fi... | 2.6875 | stackv2 | """
NBSC's api information:
url: "https://data.stats.gov.cn/english/easyquery.htm"
params: id=zb&dbcode=hgnd&wdcode=ab&m=getTree
"""
import os
import time
import pickle
import random
import requests
import pandas as pd
from tqdm import tqdm
from fake_useragent import UserAgent
from requests.packages.urllib3.exception... | 130 | 32.19 | 154 | 17 | 1,076 | python | [{"finding_id": "codeql_py/request-without-cert-validation_00f39eff2383d8a2_0738dc31", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
57,
113
] | [
null,
null
] | [
13,
13
] | [
155,
96
] | |
2024-11-19T02:30:23.216980+00:00 | 1,486,915,289,000 | c632e3d2d1963686230a7b4fea06b1eb4da318cb | 3 | {
"blob_id": "c632e3d2d1963686230a7b4fea06b1eb4da318cb",
"branch_name": "refs/heads/master",
"committer_date": 1486915289000,
"content_id": "06229134873bcead83d655a33fd1157a19f859f7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e1537dcdede9516ac5008803038e8ca5997cdd6d",
"extension": "py"... | 2.6875 | stackv2 | # -*- encoding: utf-8 -*-
import pandas as pd
import numpy as np
import re
from textblob import TextBlob
import gensim
from gensim.models import Word2Vec
# Load the data.
print "load data"
train_bio = pd.read_csv("../input_light/biology.csv",encoding='utf-8')
train_cooking = pd.read_csv("../input_light/cooking.csv"... | 107 | 30.57 | 93 | 16 | 990 | python | [{"finding_id": "codeql_py/overly-large-range_20b5602251bfcd9f_cd68bee1", "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": "", "lo... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\['()*+,\\-.\\/0-9:;<=>?@\\]."
] | [
34
] | [
null
] | [
26
] | [
29
] | |
2024-11-19T02:41:48.566821+00:00 | 1,623,158,510,000 | 81aa2f313efbec5e3214873ab4415069807a752d | 3 | {
"blob_id": "81aa2f313efbec5e3214873ab4415069807a752d",
"branch_name": "refs/heads/master",
"committer_date": 1623158510000,
"content_id": "0db4ebf954e3f2707558a785f9597c701e3b1f38",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e1c5f9b4ee97eab6737997b1926bcc4d1b90d743",
"extension": "py"... | 2.578125 | stackv2 | """
This is the controller.
"""
import csv
import gzip
import io
import json
import re
import os
import zipfile
import zlib
import pickle
import logging
import uvicorn
import urllib.request
import ssl
from retry import retry
from fastapi import FastAPI
from starlette.responses import StreamingResponse
from cota_tvier_... | 121 | 27.76 | 97 | 17 | 801 | python | [{"finding_id": "codeql_py/full-ssrf_6fc88bd79ccd1afc_62485d98", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 1 | true | [
"CWE-918"
] | [
"py/full-ssrf"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1)."
] | [
37
] | [
null
] | [
10
] | [
37
] | |
2024-11-19T02:50:53.754131+00:00 | 1,691,786,508,000 | a03ae7d443b3e477329001ffd95bcc68a1c52d40 | 2 | {
"blob_id": "a03ae7d443b3e477329001ffd95bcc68a1c52d40",
"branch_name": "refs/heads/master",
"committer_date": 1691786508000,
"content_id": "475228fc93980f33349a1949f3870a6b9dc13376",
"detected_licenses": [
"MIT"
],
"directory_id": "ca5c687ee0626163ced136d4e3ab01a158306169",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import jinja2
try:
from ..pkg import textfile
except: # pragma: no cover
from docfly.pkg import textfile
data = dict()
dir_path = os.path.dirname(__file__)
for basename in os.listdir(dir_path):
if basename.endswith(".tpl"):
fname, ext = os.... | 46 | 25.52 | 77 | 11 | 299 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bada0f5a57f16f2b_076dfb77", "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... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
22,
23,
24
] | [
null,
null,
null
] | [
11,
14,
15
] | [
39,
45,
47
] | |
2024-11-18T18:05:59.128443+00:00 | 1,621,947,687,000 | 692ee00e315a62fcb20006d44f96e5f6fd1173e8 | 2 | {
"blob_id": "692ee00e315a62fcb20006d44f96e5f6fd1173e8",
"branch_name": "refs/heads/master",
"committer_date": 1621947687000,
"content_id": "83c72c51b9b115139bcb3d9726af5371f50cfbb4",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "1dea04211024c0072b8d289e4babf981ece16b5b",
"extension": "p... | 2.34375 | stackv2 | from flask import render_template, request, jsonify, redirect, flash, url_for
from flask_login import current_user, login_user, login_required, logout_user
from app import app, db, moment, client
from app.forms import markdownform, LoginForm, SignUpForm, PasswordResetRequestForm, ResetPasswordForm
from app.models impor... | 196 | 38.33 | 115 | 17 | 1,521 | python | [{"finding_id": "codeql_py/url-redirection_080a4aa140373c08_765349ed", "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)."
] | [
113
] | [
null
] | [
25
] | [
34
] | |
2024-11-18T18:15:56.133882+00:00 | 1,622,444,330,000 | 4e8cc30d19d96dd53d4dcfe9b3dd192bb54a59b7 | 3 | {
"blob_id": "4e8cc30d19d96dd53d4dcfe9b3dd192bb54a59b7",
"branch_name": "refs/heads/main",
"committer_date": 1622444330000,
"content_id": "bff65b68becf76ee1941a7dface88f45162a739e",
"detected_licenses": [
"MIT"
],
"directory_id": "1286a3c8922c0f369b011b5a7712c382242fc97e",
"extension": "py",
"file... | 2.65625 | stackv2 | import os
import re
import smtplib
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from typing import Iterable, Optional
import pandas as pd
from PIL import Image, ImageDraw, ImageFont
from dotenv import load_dotenv
# Validate Ema... | 162 | 27.52 | 74 | 17 | 1,115 | python | [{"finding_id": "codeql_py/redos_05a176d474cbae99_5b5b9005", "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... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '_'.",
"This part of the regular expression may cause exponential backtracking on strings starting with 'a@' and containing many repetitions of '_'."
] | [
16,
16
] | [
null,
null
] | [
15,
32
] | [
29,
46
] | |
2024-11-18T18:59:36.942234+00:00 | 1,605,598,287,000 | 24ee0fde14855109b25b6acbd1b5f4d079f4281b | 2 | {
"blob_id": "24ee0fde14855109b25b6acbd1b5f4d079f4281b",
"branch_name": "refs/heads/master",
"committer_date": 1605598287000,
"content_id": "6c96edce20f4f33056bc7d4162a68ff6c49c41f5",
"detected_licenses": [
"ISC"
],
"directory_id": "c10107d2424cafb60335a30a05d78284397591d2",
"extension": "py",
"fi... | 2.4375 | stackv2 | __author__ = 'talluri'
#!/usr/bin/env python
# by carlcarl
import getopt
import sys
import hmac
import hashlib
import base64
import urllib
def formattedCmd(api, cmd):
s = 'apiKey=' + api + '&' + cmd
return s
def encypt(string, key):
h = hmac.new(key, string, hashlib.sha1)
return base64.b64encode(... | 57 | 19.53 | 99 | 12 | 327 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_ea38715ccc133654_46646b52", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure."
] | [
21
] | [
null
] | [
23
] | [
29
] | |
2024-11-18T19:23:47.849549+00:00 | 1,634,067,927,000 | 12c095245fe0b51a65c418f2d20ee14319485eff | 3 | {
"blob_id": "12c095245fe0b51a65c418f2d20ee14319485eff",
"branch_name": "refs/heads/main",
"committer_date": 1634067927000,
"content_id": "2725789d569b1f6e08e1fe76994f3486a98801e4",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e52fb8b5f7c4f59dc3414cfa29498864bf686c58",
"extension": "py"... | 2.828125 | stackv2 | """Utility functions for the jade package."""
from datetime import datetime, date
from pathlib import PosixPath, WindowsPath
from typing import Union
import enum
import functools
import gzip
import logging
import json
import os
import re
import shutil
import stat
import sys
from dateutil.parser import parse
import to... | 523 | 23.48 | 99 | 18 | 2,917 | python | [{"finding_id": "codeql_py/overly-permissive-file_e480900de51b247c_b8242fbc", "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."
] | [
94
] | [
null
] | [
5
] | [
30
] | |
2024-11-18T19:23:47.916359+00:00 | 1,629,058,022,000 | 62bdc7aa12aa2697b724a55d1b08ee5a2517a718 | 2 | {
"blob_id": "62bdc7aa12aa2697b724a55d1b08ee5a2517a718",
"branch_name": "refs/heads/main",
"committer_date": 1629058022000,
"content_id": "7b5195b952db95b753d10cbb21c45168f88caeff",
"detected_licenses": [
"MIT"
],
"directory_id": "8638e5a67b6a8cdd7921f11643394d4a9bd37ce1",
"extension": "py",
"file... | 2.5 | stackv2 | import re
from re import Match
from time import sleep
from typing import Literal
import serial
from . import meters
from .types import IdentificationMsg, DataMsg, WrongBCC, ResponseError
def make_cmd_msg(obis: str = "", mode: Literal["P", "W", "R"] = "R", data: bytes = b"") -> bytes:
"""Return generated byte co... | 190 | 38.41 | 97 | 16 | 2,817 | python | [{"finding_id": "codeql_py/overly-large-range_c66f62be1566f4be_c0ea5b8d", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[\"#$%&'()*+,\\-.\\].", "remediation": "", "location"... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[\"#$%&'()*+,\\-.\\]."
] | [
50
] | [
null
] | [
17
] | [
21
] | |
2024-11-18T19:23:49.506590+00:00 | 1,543,814,522,000 | 32b181bf032a0552afab9b16df0e97148d363b86 | 3 | {
"blob_id": "32b181bf032a0552afab9b16df0e97148d363b86",
"branch_name": "refs/heads/master",
"committer_date": 1543814522000,
"content_id": "214f90433682b1a96b5c6a5aeb3efe57ffb1e2d4",
"detected_licenses": [
"MIT"
],
"directory_id": "309c6e2f6972f5deefb0b10bc343b160850456b5",
"extension": "py",
"fi... | 3.125 | stackv2 | #!/usr/bin/env python3
"""
ECB cut-and-paste
https://cryptopals.com/sets/2/challenges/13
"""
import html
import os
from Crypto.Cipher import AES
from challenge9 import pad
from collections import OrderedDict
from lantern.util import group
TEST_FORM = 'foo=bar&baz=qux&zap=zazzle'
TEST_DICT = OrderedDict([('foo', 'ba... | 67 | 28.85 | 107 | 15 | 545 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_6946bb9bbc43f2b9_3d9fcb61", "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": ... | 4 | true | [
"CWE-327",
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[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."
] | [
47,
52,
59,
67
] | [
null,
null,
null,
null
] | [
21,
21,
31,
7
] | [
98,
54,
64,
41
] | |
2024-11-18T19:23:56.092817+00:00 | 1,625,556,060,000 | 90842f041dbfdf43ed1db28629b7164554b3ad8c | 3 | {
"blob_id": "90842f041dbfdf43ed1db28629b7164554b3ad8c",
"branch_name": "refs/heads/main",
"committer_date": 1625556060000,
"content_id": "55e98c374010c21f1e054d7efa6c6efd11437c26",
"detected_licenses": [
"MIT"
],
"directory_id": "d0f0c14f21cfb0d53d68702ca5e790079c9f381b",
"extension": "py",
"file... | 2.546875 | stackv2 | import hashlib
import random
import uuid
from django.conf import settings
from utils import cache_util
_salt_source = "abcdefghijklmnopqrstuvwxyz" # 密码盐随机字符范围
_salt_length = 8 # 密码盐长度
_token_key = "token_"
_permissions_key = "permissions_"
_organization_key = "organization_"
"""
安全的辅助类
... | 122 | 24.28 | 112 | 14 | 837 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e2826ccdcaa398f0_0499d735", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
40,
43
] | [
null,
null
] | [
15,
15
] | [
48,
66
] | |
2024-11-18T19:23:57.163835+00:00 | 1,479,506,323,000 | d9a3c53bd5e36291e935946b3e7cac67e59c3587 | 2 | {
"blob_id": "d9a3c53bd5e36291e935946b3e7cac67e59c3587",
"branch_name": "refs/heads/master",
"committer_date": 1479506323000,
"content_id": "a7b4f28a55c079ec765669f1f5194b27e7058209",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0587cb6eea33231521a982a8219e0bc2ea6cc2a4",
"extension": "py"... | 2.375 | stackv2 | #!/usr/bin/env python
from subprocess import Popen, PIPE
import requests
import pprint
import json
def gettoken():
p = Popen(['oc', 'whoami', '-t'], stdin=PIPE, stdout=PIPE, stderr=PIPE)
output, err = p.communicate()
rc = p.returncode
return output.rstrip('\n')
def aosget(url, token):
headers... | 47 | 23 | 111 | 16 | 301 | python | [{"finding_id": "codeql_py/request-without-cert-validation_63fb3ecddf90195f_7e9bb39b", "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
] | [
11
] | [
59
] | |
2024-11-18T19:24:01.478021+00:00 | 1,621,281,426,000 | adccdff4b4bd9bb1f844edcdb241f077e7575439 | 2 | {
"blob_id": "adccdff4b4bd9bb1f844edcdb241f077e7575439",
"branch_name": "refs/heads/main",
"committer_date": 1621281426000,
"content_id": "857c6a30efd97f1bc81a5dcd95cab739e1e667b7",
"detected_licenses": [
"MIT"
],
"directory_id": "c1ed3cd15504b46ae398e7fb1c336cc5f7128844",
"extension": "py",
"file... | 2.34375 | stackv2 | import os
from pathlib import Path
from flask import Flask, render_template, request, url_for, send_file
from modules.classes import InstagramPage
app = Flask(__name__)
@app.context_processor
def override_url_for():
"""
Generate a new token on every request to prevent the browser from
caching static fil... | 97 | 36.33 | 125 | 22 | 706 | python | [{"finding_id": "codeql_py/flask-debug_ba985890cb8b17dd_b9b72613", "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.", ... | 5 | true | [
"CWE-215",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-pro... | [
97,
48,
50,
62,
93
] | [
null,
null,
null,
null,
null
] | [
5,
17,
26,
27,
22
] | [
24,
81,
84,
111,
30
] | |
2024-11-18T19:24:03.677546+00:00 | 1,574,554,949,000 | 0adeb2e71bdcb34f1e76c71adf33754ebc8c35ea | 3 | {
"blob_id": "0adeb2e71bdcb34f1e76c71adf33754ebc8c35ea",
"branch_name": "refs/heads/master",
"committer_date": 1574554949000,
"content_id": "4e615c8bb1d004f0f9449ef241bd65e21c83b034",
"detected_licenses": [
"MIT"
],
"directory_id": "ae87bf50c2c78315b1ca9f2608f796dac78396c8",
"extension": "py",
"fi... | 2.6875 | stackv2 | from functools import partial
from http.server import HTTPServer
import socketserver
import socket
import ssl
import templates
import threading
"""
Saturday 11/23/2019
I currently am getting an OSERROR as seen on socketserver.py line 312.
When connecting explicitly to the server, I see that there is SSL available,
bu... | 85 | 35.94 | 108 | 18 | 657 | python | [{"finding_id": "codeql_py/insecure-default-protocol_53a2a88a21dc4b34_49e911e6", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
70
] | [
75
] | [
36
] | [
22
] | |
2024-11-18T19:58:23.427967+00:00 | 1,606,593,514,000 | 2da7b7fb8f6563a80131f0be42d5f3c86bd5f6bd | 3 | {
"blob_id": "2da7b7fb8f6563a80131f0be42d5f3c86bd5f6bd",
"branch_name": "refs/heads/main",
"committer_date": 1606593514000,
"content_id": "a895677bc4b75612d2ec66273e6aefbf7b428286",
"detected_licenses": [
"MIT"
],
"directory_id": "b0878950de12951af0c2d3441a199ab4fe46ae66",
"extension": "py",
"file... | 2.609375 | stackv2 | '''
Backend of the DormRover project. Powered by Flask and python/C++ binding utilities
'''
from flask import Flask, jsonify, request, send_from_directory, Response
from flask_cors import CORS
from firmware_wrapper import *
from requests import get
from time import sleep
from random import choice
import os
import soc... | 128 | 26.66 | 134 | 16 | 879 | python | [{"finding_id": "codeql_py/stack-trace-exposure_66ae17d284e5a05b_b2934161", "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."
] | [
70
] | [
null
] | [
20
] | [
24
] | |
2024-11-18T19:58:32.766230+00:00 | 1,541,493,505,000 | 4c77ab59969947a07f92d0fd49c2a23c857cc341 | 2 | {
"blob_id": "4c77ab59969947a07f92d0fd49c2a23c857cc341",
"branch_name": "refs/heads/master",
"committer_date": 1541493505000,
"content_id": "a50f02bc70eccb439b641b88e6004df614373789",
"detected_licenses": [
"MIT"
],
"directory_id": "b231674a7bc68165d22c1334becbe8e7ea940993",
"extension": "py",
"fi... | 2.359375 | stackv2 | from celery.result import AsyncResult
from email_validator import EmailNotValidError, validate_email
from flask import (Blueprint, current_app, jsonify, request)
api = Blueprint('api', __name__, url_prefix='/')
@api.route('/pull', methods=['POST'])
def pull_files():
current_app.logger.debug("API call pull: %s"... | 49 | 27.27 | 88 | 18 | 334 | python | [{"finding_id": "codeql_py/stack-trace-exposure_44afcacac2658eca_d5f7909b", "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."
] | [
29
] | [
null
] | [
28
] | [
45
] | |
2024-11-18T18:39:37.041562+00:00 | 1,615,989,112,000 | 7fd3e5245444e2eae0f01134e248f162416b5a40 | 4 | {
"blob_id": "7fd3e5245444e2eae0f01134e248f162416b5a40",
"branch_name": "refs/heads/master",
"committer_date": 1615989112000,
"content_id": "124cc1e445a2d0b373a5a6fa87482b958859b628",
"detected_licenses": [
"MIT"
],
"directory_id": "b996d458a2d96643176465220596c8b747e43b65",
"extension": "py",
"fi... | 4.34375 | stackv2 | # Hangman game
import random
import string
WORDLIST_FILENAME = "/Users/dhruvmanilawala/cs/py/mit/edx/psets/p3_hangman/words.txt"
def loadWords():
"""
Returns a list of valid words. Words are strings of lowercase letters.
Depending on the size of the word list, this function may
take a while to finis... | 146 | 28.64 | 85 | 16 | 1,015 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_314da590d11e5766_25c86adc", "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... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (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.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](... | [
115,
118,
125,
134
] | [
null,
null,
null,
null
] | [
64,
59,
34,
15
] | [
75,
70,
45,
80
] | |
2024-11-18T18:39:50.883078+00:00 | 1,626,158,451,000 | df07a1cc344c498c9762ea0a6cd21ab0f9aa5443 | 2 | {
"blob_id": "df07a1cc344c498c9762ea0a6cd21ab0f9aa5443",
"branch_name": "refs/heads/main",
"committer_date": 1626158451000,
"content_id": "f334adb665c60aff7eb8d3de4554a75b95a007d6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "59f7807fd43c1d189c6f68263af8cb3bfc9e6ec2",
"extension": "py",
... | 2.34375 | stackv2 | import hashlib
import re
from flask import Blueprint, make_response, session, request, redirect, url_for
from common.utility import ImageCode, gen_email_code, send_email
from module.credit import Credit
from module.user import User
user = Blueprint('user', __name__)
# 获取图片验证码
@user.route('/vcode')
def vcode():
... | 155 | 28.52 | 79 | 16 | 1,270 | python | [{"finding_id": "codeql_py/insecure-cookie_634b9184620d6a68_660084e4", "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"... | 14 | true | [
"CWE-614",
"CWE-614",
"CWE-614",
"CWE-020",
"CWE-312",
"CWE-1333",
"CWE-1333",
"CWE-1333",
"CWE-1004",
"CWE-1004",
"CWE-1004",
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/insecure-cookie",
"py/insecure-cookie",
"py/insecure-cookie",
"py/cookie-injection",
"py/clear-text-storage-sensitive-data",
"py/polynomial-redos",
"py/polynomial-redos",
"py/polynomial-redos",
"py/client-exposed-cookie",
"py/client-exposed-cookie",
"py/client-exposed-cookie",
"py/weak-sen... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is added to response without the 'secure' flag being set.",
"Cookie is added to response without the 'secure' flag being set.",
"Cookie is added to response without the 'secure' flag being set.",
"Cookie is constructed from a [user-supplied input](1).",
"This expression stores [sensitive data (passw... | [
102,
103,
118,
102,
103,
28,
52,
135,
102,
103,
118,
62,
89,
141
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
13,
13,
5,
45,
45,
34,
36,
36,
13,
13,
5,
32,
32,
32
] | [
78,
78,
51,
53,
53,
39,
44,
44,
78,
78,
51,
49,
49,
49
] | |
2024-11-18T18:40:03.897776+00:00 | 1,628,413,537,000 | 3f79541f6d94b06ddb379bebb1005e915802e7b9 | 4 | {
"blob_id": "3f79541f6d94b06ddb379bebb1005e915802e7b9",
"branch_name": "refs/heads/master",
"committer_date": 1628413537000,
"content_id": "90aa17d9365cd4f8888d100a80181294eb5e0a99",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "be55991401aef504c42625c5201c8a9f14ca7c3b",
"extension": "py"... | 3.6875 | stackv2 | #coding:utf-8
import time1
"""
装饰器的架子
"""
def timmer(func):
def wrapper(*args, **kwargs):
st = time1.time()
rt = func(*args, **kwargs)
ed = time1.time()
print('运行时间是:%s' % (ed - st))
return rt
return wrapper
@timmer# 相当于 test = timmer(test)
def test(name, age):
... | 42 | 15.1 | 72 | 12 | 249 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_92af988e0f02f468_a732bc11", "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."
] | [
32
] | [
null
] | [
11
] | [
72
] | |
2024-11-18T18:47:03.793257+00:00 | 1,635,417,176,000 | 9d1d88c95d44f67f935c3f5c10878b532694c969 | 2 | {
"blob_id": "9d1d88c95d44f67f935c3f5c10878b532694c969",
"branch_name": "refs/heads/main",
"committer_date": 1635417176000,
"content_id": "c328d10a20ffe75bfc230c70295d288f88d54f66",
"detected_licenses": [
"MIT"
],
"directory_id": "d3a4f053a5f7a768ea4c4950860c4f33e46b4e29",
"extension": "py",
"file... | 2.40625 | stackv2 | import threading
import time
import bs4
import requests
import StellarPlayer
import re
import urllib.parse
home_66ys_url = 'http://www.66ys.co/'
def concatUrl(url1, url2):
splits = re.split(r'/+',url1)
url = splits[0] + '//'
if url2.startswith('/'):
url = url + splits[1] + url2
else:
u... | 377 | 40.46 | 159 | 25 | 3,546 | python | [{"finding_id": "codeql_py/request-without-cert-validation_5701211d7fb2eacf_116787ce", "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]... | 5 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
24,
44,
84,
114,
135
] | [
null,
null,
null,
null,
null
] | [
11,
11,
15,
15,
15
] | [
41,
51,
50,
160,
48
] | |
2024-11-18T20:58:17.366888+00:00 | 1,439,378,834,000 | e6b13585ce28e687cd6457fb58c08129ecc0ebbd | 3 | {
"blob_id": "e6b13585ce28e687cd6457fb58c08129ecc0ebbd",
"branch_name": "refs/heads/master",
"committer_date": 1439378834000,
"content_id": "4e1b3ca95b8356088c0e71ab3cbbaf54bf1dc9d6",
"detected_licenses": [
"MIT"
],
"directory_id": "04eedb73626fe41eda4ee0a99f693676f14ddaa5",
"extension": "py",
"fi... | 2.53125 | stackv2 | import os
import re
import requests
import urllib
import wx
import wx.lib.newevent
import threading
from bs4 import BeautifulSoup
basedir = os.path.dirname( __file__ )
basedir = os.path.normpath( basedir )
os.environ['REQUESTS_CA_BUNDLE'] = os.path.join(basedir , 'requests', 'cacert.pem')
LoggerEvent,EVT_LOGGER = wx.l... | 110 | 33.96 | 105 | 19 | 1,059 | python | [{"finding_id": "codeql_py/request-without-cert-validation_085e3ff8970569ca_5869fb86", "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)."
] | [
39
] | [
null
] | [
8
] | [
58
] | |
2024-11-18T20:58:17.671630+00:00 | 1,611,874,426,000 | 108e8e8bab5e8702534c573ec490f4853bd2bfc7 | 3 | {
"blob_id": "108e8e8bab5e8702534c573ec490f4853bd2bfc7",
"branch_name": "refs/heads/master",
"committer_date": 1611874426000,
"content_id": "ad83100dd21b7c395f643c944ebdc198288b79b5",
"detected_licenses": [
"MIT"
],
"directory_id": "cf336e8105a491e429c9728dbd32a1081acbfb78",
"extension": "py",
"fi... | 2.890625 | stackv2 | from flask import Flask, render_template, redirect, request, url_for, make_response, abort
import os
# All Flask applications must create an application instance.
# The web server passes all requests it receives from clients to this object for handling, using a protocol called
# Web Server Gateway Interface (WSGI)
ap... | 51 | 35.1 | 120 | 12 | 436 | python | [{"finding_id": "codeql_py/flask-debug_f0eecfe140589f59_c6b6d647", "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-079",
"CWE-601"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/url-redirection"
] | [
"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.",
"Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2).",
"Untrusted URL redirection depends on a [user-pro... | [
51,
28,
37
] | [
null,
null,
null
] | [
5,
30,
21
] | [
51,
96,
48
] | |
2024-11-18T20:16:01.607708+00:00 | 1,634,616,532,000 | 483b32ed547b83fb64b7b0e4c7d2be7917f9bbc6 | 4 | {
"blob_id": "483b32ed547b83fb64b7b0e4c7d2be7917f9bbc6",
"branch_name": "refs/heads/main",
"committer_date": 1634616532000,
"content_id": "276f7dbce781552e84596b5b8bb8a331b898c37d",
"detected_licenses": [
"MIT"
],
"directory_id": "1dc8bf5fd8525aab3a2f65116af4db31b371af5c",
"extension": "py",
"file... | 3.5 | stackv2 |
#checks an API key to see if it's valid (format wise)
#returns True if it's valid, False otherwise
def apiKeyIsValid(apiKey):
from re import match
API_KEY_PATTERN = "AIza[0-9A-Za-z-_]{35}"
return bool(match(API_KEY_PATTERN, apiKey))
#reads a file that contains the API key
#there is most likely a bette... | 39 | 24.85 | 84 | 12 | 243 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0950363cb5e39e8b_dee53dc7", "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."
] | [
34
] | [
null
] | [
34
] | [
40
] | |
2024-11-18T20:16:04.401861+00:00 | 1,448,476,043,000 | 07354dbcf7235ad56a54f58a378c164273fd130b | 3 | {
"blob_id": "07354dbcf7235ad56a54f58a378c164273fd130b",
"branch_name": "refs/heads/master",
"committer_date": 1448476043000,
"content_id": "20d6060d519350101071c3bbc681b743dddd397a",
"detected_licenses": [
"MIT"
],
"directory_id": "051d25888b6a36e50714fa5940f6a31ee951ce77",
"extension": "py",
"fi... | 2.515625 | stackv2 | from django import forms
import os
from os.path import isdir
class PipelineScriptsDirectoryForm(forms.ModelForm):
def clean_script_directory(self):
script_dir = self.cleaned_data['script_directory']
script_dir = script_dir.strip()
if len(script_dir) < 4:
raise forms.Validation... | 17 | 31.53 | 114 | 13 | 115 | python | [{"finding_id": "codeql_py/path-injection_5ec475951ea8e61c_39575692", "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)."
] | [
14
] | [
null
] | [
22
] | [
32
] | |
2024-11-18T19:38:02.372919+00:00 | 1,475,456,656,000 | 57b951e220e50f1041efae814d2137e5ba5f8d8a | 3 | {
"blob_id": "57b951e220e50f1041efae814d2137e5ba5f8d8a",
"branch_name": "refs/heads/master",
"committer_date": 1475456656000,
"content_id": "7ed4eeb7d93c02b19a6722d1e99625796a8c4101",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b97b0482613531534ec8b969709bdbb6c736667f",
"extension": "py"... | 2.625 | stackv2 | import re
import hmac
import random
import string
import hashlib
import time
import lib.constants as c
import logging
def make_secure_val(val):
return '%s|%s' % (val, hmac.new(c.SECRET, val).hexdigest())
def check_secure_val(secure_val):
val = secure_val.split('|')[0]
if secure_val == make_secure_val(val... | 44 | 25.64 | 72 | 13 | 304 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_7da97da746d7b74f_9f4d576b", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
39
] | [
null
] | [
24
] | [
50
] | |
2024-11-18T19:38:11.828009+00:00 | 1,605,974,062,000 | ef8e92daeda2630440fcf95d986ca17e476f40f8 | 3 | {
"blob_id": "ef8e92daeda2630440fcf95d986ca17e476f40f8",
"branch_name": "refs/heads/master",
"committer_date": 1605974062000,
"content_id": "c132931e734d65641a02721cb31401197ed8acb5",
"detected_licenses": [
"MIT"
],
"directory_id": "0c79f36da68f46d1e2ba19f0c2d3296f008f86c1",
"extension": "py",
"fi... | 3.21875 | stackv2 | #!/usr/bin/env python
import ftplib
import argparse
import sys
# Usage python BruteForceFTP.py -a 192.168.3.84 -d data/passwords.txt -u data/usernames.txt
# Or python BruteForceFTP.py -a 192.168.3.84 -d data/passwords.txt -s ftpuser
if sys.version_info[0] >= 3:
raw_input = input
str = str
def connect(host, user... | 127 | 36.43 | 143 | 20 | 1,098 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bd860346729a35f4_3b3384df", "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."
] | [
77,
80
] | [
null,
81
] | [
19,
23
] | [
105,
53
] | |
2024-11-18T19:38:20.079841+00:00 | 1,596,751,054,000 | e2df6b263cab45e9bb36ff0ff6977cfec681e400 | 3 | {
"blob_id": "e2df6b263cab45e9bb36ff0ff6977cfec681e400",
"branch_name": "refs/heads/master",
"committer_date": 1596751054000,
"content_id": "029d1819ea9ed8f084d2368ac3603d1ac29e33b1",
"detected_licenses": [
"MIT"
],
"directory_id": "c82a49fa3561b15de3b0071d3687f1bd1147f69d",
"extension": "py",
"fi... | 3.203125 | stackv2 | #A fanfiction downloader.
#Import necessary modules
import requests, bs4, re, os
#This is the basic url I'm trying to link
#https://www.fanfiction.net/s/11697407/1/Contractual-Invalidation
#The segments are as such:
#https://www.fanfiction.net/s/ (All of this is the same... unless they threw in the review thing for som... | 68 | 45.21 | 155 | 14 | 823 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_360e067743bb63ff_f2b29586", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'fanfiction.net/s/', so it might mat... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'fanfiction.net/s/', so it might match more hosts than expected."
] | [
15
] | [
null
] | [
30
] | [
59
] | |
2024-11-18T20:10:36.888692+00:00 | 1,568,331,046,000 | 666f49f3a4380a22e1f27366d2c45cb5fab1cf87 | 2 | {
"blob_id": "666f49f3a4380a22e1f27366d2c45cb5fab1cf87",
"branch_name": "refs/heads/master",
"committer_date": 1568331046000,
"content_id": "a1d25b454fd9eda1ad3e11d8986744ee55cacdfa",
"detected_licenses": [
"MIT"
],
"directory_id": "267c8acb85add4be977d251c8ae01e9359aa9641",
"extension": "py",
"fi... | 2.453125 | stackv2 | """Create a Keyvault in a resource group.
Set a secret inside the keyvault.
Retrieve the secret from the keyvault.
List all the keyvaults in the resource group.
Delete keyvault and resource group.
This script expects that the following environment vars are set:
AZURE_TENANT_ID: your Azure Active Directory tenant id o... | 140 | 35.06 | 109 | 19 | 1,076 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fd161a4e8991d97e_e1a0a4be", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
108,
113
] | [
null,
null
] | [
11,
11
] | [
24,
24
] | |
2024-11-18T20:10:37.735772+00:00 | 1,575,730,094,000 | e927690e38b4462d0699efa88c98dc75491b1e69 | 3 | {
"blob_id": "e927690e38b4462d0699efa88c98dc75491b1e69",
"branch_name": "refs/heads/master",
"committer_date": 1575730094000,
"content_id": "688aa8ca6f7bb2f836b81a99de86f58ed3294dea",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "312befb5170b032246ec69c982921b13c072f5f5",
"extension": "py"... | 2.984375 | stackv2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 57 | 28.88 | 78 | 13 | 402 | python | [{"finding_id": "codeql_py/reflective-xss_331f35bd48cb5df0_c8fca13e", "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)."
] | [
57
] | [
null
] | [
12
] | [
74
] | |
2024-11-18T20:10:52.770630+00:00 | 1,633,371,548,000 | 5733f012dd7162c5cada32527050a17854652aee | 3 | {
"blob_id": "5733f012dd7162c5cada32527050a17854652aee",
"branch_name": "refs/heads/master",
"committer_date": 1633371548000,
"content_id": "555c085190b52461992a0839a470e7fc6a75e56f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "aedf162d1ebae13e16c89cbd1bf309806677b9f4",
"extension": "py"... | 2.75 | stackv2 | import base64
import hashlib
from application.model.scholar_payment_account_log import ScholarPaymentAccountLog
class BaseComponent(object):
@staticmethod
def _sha1_encrypt(plaintext: str):
"""
将明文字符串使用SHA1算法进行散列
:param plaintext:
:return:
"""
sha1 = hashlib.sh... | 82 | 35.07 | 112 | 19 | 599 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_83a47fe078870623_be229bf8", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure."
] | [
16
] | [
null
] | [
21
] | [
39
] | |
2024-11-18T20:10:56.612004+00:00 | 1,606,658,898,000 | 2b8fd83bc3cb3562bd5cda47d2a82d33ab828abe | 2 | {
"blob_id": "2b8fd83bc3cb3562bd5cda47d2a82d33ab828abe",
"branch_name": "refs/heads/main",
"committer_date": 1606658898000,
"content_id": "7f7710da8e801acc5e4e4d379f4114417ebb909a",
"detected_licenses": [
"MIT"
],
"directory_id": "99b11f4d5a1b75762cc7d05b56475580c5dd1a1b",
"extension": "py",
"file... | 2.421875 | stackv2 | import subprocess
import base64
from flask import Flask, request, redirect, send_from_directory
from twilio.twiml.messaging_response import MessagingResponse
#from twilio.twiml.voice_response import VoiceResponse, Record
app = Flask(__name__, static_url_path='')
@app.route("/audio/<path:path>", methods=['GET', 'POST... | 48 | 32.29 | 68 | 12 | 388 | python | [{"finding_id": "codeql_py/flask-debug_78b5dbe193892bcd_beef1085", "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)."
] | [
48,
44
] | [
null,
null
] | [
5,
12
] | [
33,
26
] | |
2024-11-18T20:10:58.898106+00:00 | 1,651,056,049,000 | 8c063877053f558e2765cfecd05a01dee20892db | 2 | {
"blob_id": "8c063877053f558e2765cfecd05a01dee20892db",
"branch_name": "refs/heads/master",
"committer_date": 1651056049000,
"content_id": "1e0a144b987fda2b2b3dd12a85057a5fc3646af5",
"detected_licenses": [
"MIT"
],
"directory_id": "48c9b8ea2493df7767548b80121e96c129f64b34",
"extension": "py",
"fi... | 2.421875 | stackv2 | from flask import Flask, render_template, jsonify, request, abort
from flask.ext.api import status
from advertiser.advertiser import Advertiser
app = Flask(__name__)
advert = Advertiser()
@app.route("/api/")
def main():
return render_template('index.html')
@app.route("/api/advertiser/", methods=['GET'])
def g... | 57 | 32.25 | 74 | 18 | 406 | python | [{"finding_id": "codeql_py/stack-trace-exposure_edf82d50ce643edb_7d493bf4", "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."
] | [
53
] | [
null
] | [
28
] | [
54
] | |
2024-11-18T20:26:12.528516+00:00 | 1,430,780,931,000 | 4b3f15a0fdd5657f718d41e4050300193b2e1a11 | 2 | {
"blob_id": "4b3f15a0fdd5657f718d41e4050300193b2e1a11",
"branch_name": "refs/heads/master",
"committer_date": 1430780931000,
"content_id": "fb100791298854f69871808cb35a700710652f6b",
"detected_licenses": [
"MIT"
],
"directory_id": "a2c86b1614d30225bbb3878946f692f75eedf251",
"extension": "py",
"fi... | 2.40625 | stackv2 | # -*- coding: utf8 -*-
import sys
from jinja2 import Template
import sqlite3
def export_layout(db, html_writer):
sql = """
SELECT
market_penetration.country_name,
nb_internauts,
nb_sales,
market_penetration.penetration_rate,
penetration_performance.norm_spread > 2 AS ... | 40 | 25.73 | 85 | 12 | 244 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_90f303e2dc7b5386_99a6219b", "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."
] | [
29
] | [
null
] | [
13
] | [
35
] | |
2024-11-18T20:26:20.239205+00:00 | 1,571,651,474,000 | 0cef40827dc84433e5b1ba79da0bcb23f8001657 | 3 | {
"blob_id": "0cef40827dc84433e5b1ba79da0bcb23f8001657",
"branch_name": "refs/heads/master",
"committer_date": 1571651474000,
"content_id": "793e3bea550061f9de31070fd096b81c5f1d4dec",
"detected_licenses": [
"MIT"
],
"directory_id": "dbba49f071f43c2b0cfd2440907470da3d897fce",
"extension": "py",
"fi... | 2.5625 | stackv2 | from flask import redirect, request, session, url_for
from functools import wraps
def breadcrumb(text):
def func(f):
@wraps(f)
def wrapper(*args, **kwargs):
"""Historical breadcrumbs."""
if 'breadcrumbs' not in session:
session['breadcrumbs'] = []
... | 36 | 29.42 | 64 | 17 | 230 | python | [{"finding_id": "codeql_py/url-redirection_9d5aa59a9374e4b4_231211a2", "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)."
] | [
34
] | [
35
] | [
25
] | [
49
] | |
2024-11-18T20:26:21.208524+00:00 | 1,633,877,423,000 | 0cd15b082f3a51030b176aa5558493624d0423d2 | 3 | {
"blob_id": "0cd15b082f3a51030b176aa5558493624d0423d2",
"branch_name": "refs/heads/main",
"committer_date": 1633877423000,
"content_id": "9a793877aef944659042ac633496e1c6614c8f4c",
"detected_licenses": [
"MIT"
],
"directory_id": "205865ef525bc116308fbe0c4966d2261ec9d622",
"extension": "py",
"file... | 2.75 | stackv2 | #!/usr/bin/env python3
'''
This script reads program files and concatenates the beginning of
all files to create a input prompt which is then fed to OpenAI
Codex to generate a README.
'''
import sys
# Check if the openai module is installed.
try:
import openai
except ImportError:
print('openai module not foun... | 177 | 32.96 | 169 | 20 | 1,393 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5aac38a3c2e0525e_94b92f51", "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."
] | [
41,
58
] | [
null,
null
] | [
15,
15
] | [
79,
75
] | |
2024-11-18T20:26:42.320401+00:00 | 1,607,318,428,000 | 73b995742594f23ede4743478b39041e2b30cc76 | 4 | {
"blob_id": "73b995742594f23ede4743478b39041e2b30cc76",
"branch_name": "refs/heads/main",
"committer_date": 1607318428000,
"content_id": "690754b7a4001d9a7c2be3825c9bf11c35bf7fa7",
"detected_licenses": [
"MIT"
],
"directory_id": "69958e59f7b8bb02304425fe06b2039219229ec9",
"extension": "py",
"file... | 3.6875 | stackv2 |
# name = "小仓"
# gender = "male"
# type = "拉布拉多"
# dog1 的特征
dog1 = {'name':"小仓",
'gender':"male",
'type':"拉布拉多"}
dog2 = {'name':"alex",
'gender':"male",
'type':"拉布拉多"}
def dogJiao(dog):
print("[%s]狗在叫。。" %dog['name'])
def dogEat(dog):
print("[%s]狗在吃饭。。" %dog['name'])
dogJiao(... | 41 | 16.44 | 41 | 12 | 246 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d508d4d98b290d40_7223b059", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
26
] | [
null
] | [
15
] | [
40
] | |
2024-11-18T20:26:44.089590+00:00 | 1,672,042,102,000 | da7352be96ac1280067581faeb89921cd6d57149 | 3 | {
"blob_id": "da7352be96ac1280067581faeb89921cd6d57149",
"branch_name": "refs/heads/master",
"committer_date": 1672042102000,
"content_id": "9d97cd11fcd27c25ab9cd523b1b01b4cd8f8bacf",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "f3111d5a67dcbf22e4785d0092deb8cc99024046",
"extension": "p... | 2.890625 | stackv2 | """See __init__.py for what is considered public here."""
import errno
import itertools
import logging
import os
import shutil
import struct
import sys
import tempfile
import xml.etree.ElementTree as etree
import zipfile
import urllib.request
def safe_open(path, overwrite=False):
"""
Open but do not overwri... | 489 | 27.44 | 78 | 19 | 3,076 | python | [{"finding_id": "codeql_py/overly-permissive-file_455a9ef8c7848c63_2fba6d57", "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 readable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world readable."
] | [
41
] | [
null
] | [
14
] | [
72
] | |
2024-11-18T20:26:46.540078+00:00 | 1,625,587,958,000 | de6e9ce8ff26f508dfd59670a8fc229fe251e2bd | 3 | {
"blob_id": "de6e9ce8ff26f508dfd59670a8fc229fe251e2bd",
"branch_name": "refs/heads/main",
"committer_date": 1625587958000,
"content_id": "281e55eb704179f8982820608b6d4d27045e20af",
"detected_licenses": [
"MIT"
],
"directory_id": "2162d1e02db09459c27adb57d98554761466ba33",
"extension": "py",
"file... | 2.515625 | stackv2 | import re
import sys
import os
import json
import urllib
from urllib.request import urlopen
import requests
import hashlib
import zlib
import configparser
from bs4 import BeautifulSoup
from urllib.parse import unquote
from urllib.parse import urlparse
import tldextract
imgExtentions = ["png","jpeg","jpg","gif"]
confi... | 210 | 35.53 | 175 | 20 | 1,734 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_ea7a4230f91ed59a_cf4dc14e", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [facebook.com](1) may be at an arbitrary position in th... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [facebook.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [instagram.com](1) may be at an arbitrary position in the sanitized URL."
] | [
178,
180
] | [
null,
null
] | [
24,
26
] | [
45,
48
] | |
2024-11-18T20:26:47.065021+00:00 | 1,543,821,519,000 | b868bf8a5e691e7b1b22a0b8cbaa30d095f6aa40 | 2 | {
"blob_id": "b868bf8a5e691e7b1b22a0b8cbaa30d095f6aa40",
"branch_name": "refs/heads/master",
"committer_date": 1543821519000,
"content_id": "5cdbf6a6c96929a624141750d2824f1d49d55e9d",
"detected_licenses": [
"MIT"
],
"directory_id": "9098777a6ce2ede3fb010b1ce08fd38c5f5112b6",
"extension": "py",
"fi... | 2.375 | stackv2 | import asyncio
import logging
import uuid
from hashlib import md5
import jinja2
from aiohttp import web
from aiohttp_jinja2 import setup as jinja_setup, render_template
from db import db_connect, find_user, SecurityException, DbException
from flags import task_ids, flags
def generate_token():
return str(uuid.uu... | 138 | 29.01 | 86 | 16 | 897 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_d67206bb9bae7fd9_b6a14f34", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-601"
] | [
"py/weak-sensitive-data-hashing",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
65,
57
] | [
null,
null
] | [
28,
38
] | [
45,
55
] | |
2024-11-18T20:26:57.488658+00:00 | 1,426,768,556,000 | f2104706a618e2bf02c669f1eea8feb0981dd25d | 3 | {
"blob_id": "f2104706a618e2bf02c669f1eea8feb0981dd25d",
"branch_name": "refs/heads/master",
"committer_date": 1426768556000,
"content_id": "58a8e57884e04c3693ca2a17819a6263fb01b79d",
"detected_licenses": [
"MIT"
],
"directory_id": "4eb1b0e7f719c38b98b7ab75968a68523fc132f7",
"extension": "py",
"fi... | 2.578125 | stackv2 | """ Drupdates Site building module. """
import git, os
from drupdates.utils import Utils
from drupdates.settings import Settings
from drupdates.drush import Drush
from drupdates.constructors.datastores import Datastores
from git import Repo
class Sitebuild(object):
""" Build out the repository folder. """
def... | 92 | 40.64 | 95 | 16 | 866 | python | [{"finding_id": "codeql_py/overly-permissive-file_42df315329454142_a6c52d69", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable."
] | [
82
] | [
null
] | [
13
] | [
49
] | |
2024-11-18T20:27:05.109171+00:00 | 1,563,469,045,000 | d08eb43f284b17bc135d86923a38772804e6d6aa | 3 | {
"blob_id": "d08eb43f284b17bc135d86923a38772804e6d6aa",
"branch_name": "refs/heads/master",
"committer_date": 1563469045000,
"content_id": "94fbd4b2941c63ff6135b75132971b278a1ae64b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3f3987b34a8c41579f7b191cae4a586daca5dd92",
"extension": "py"... | 2.765625 | stackv2 | # -*- coding: utf-8 -*-
"""provides sequencing fetching from NCBI and Ensembl
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import re
import os
import random
import time
import requests
_logger = logging.getLogger(__name__)
# Reece requested registration on... | 251 | 30.28 | 103 | 16 | 2,514 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_62ff6dee17265edb_e85fbcda", "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."
] | [
220
] | [
null
] | [
29
] | [
61
] | |
2024-11-18T20:27:06.424518+00:00 | 1,685,609,044,000 | ad344a1e4dbcf6bbe88c3cfff2b598fdea821478 | 3 | {
"blob_id": "ad344a1e4dbcf6bbe88c3cfff2b598fdea821478",
"branch_name": "refs/heads/master",
"committer_date": 1685609044000,
"content_id": "911a30c5231b247a1e317307aca6b96573cf549d",
"detected_licenses": [
"MIT"
],
"directory_id": "ce607df215bd0569a966033092ae3d24f48af714",
"extension": "py",
"fi... | 2.671875 | stackv2 | import asyncio
import functools
import hashlib
import random
from typing import Callable, Iterable, List, Sequence, Any, Tuple
from aiocqhttp.message import escape
from aiocqhttp import Event as CQEvent
from . import NoneBot
from .exceptions import CQHttpError
from .typing import Message_T, Expression_T
def context... | 203 | 26.93 | 150 | 15 | 1,661 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a7b6e916f15b6e04_ba4aa808", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](3) is used in a hashing algorithm (MD5) that is insecure."
] | [
58
] | [
null
] | [
30
] | [
52
] | |
2024-11-18T20:52:15.578882+00:00 | 1,603,017,739,000 | cc303728b584c643afc017602da66ccdae5d59ef | 2 | {
"blob_id": "cc303728b584c643afc017602da66ccdae5d59ef",
"branch_name": "refs/heads/main",
"committer_date": 1603017739000,
"content_id": "4736e918cf9f78c73a022c9f0ea56b3fc074d75b",
"detected_licenses": [
"MIT"
],
"directory_id": "106828d27af3de446250c444fc18da2241704ce4",
"extension": "py",
"file... | 2.359375 | stackv2 | import re
import string
from googletrans import Translator
lang_translator=Translator()
#lang_translator.translate(tweet,dest=lang).text
Dict=""":-) - basic smiley
:) - midget smiley
,-) - winking happy smiley
(-: - left hand smiley
(:-) - smiley big face
(:-( - very unhappy smiley
,-} - wry and winking smiley
8-O - O... | 250 | 25.4 | 91 | 18 | 1,943 | python | [{"finding_id": "codeql_py/overly-large-range_15340457f3b3c4b8_739280c0", "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\\\\[\\\\\\\\]^_\\]."
] | [
135
] | [
null
] | [
45
] | [
48
] | |
2024-11-18T20:52:47.337660+00:00 | 1,542,277,782,000 | ec47f93163ec836430bcdcc64708adfdc7cd5ab4 | 2 | {
"blob_id": "ec47f93163ec836430bcdcc64708adfdc7cd5ab4",
"branch_name": "refs/heads/master",
"committer_date": 1542277782000,
"content_id": "807febf53478b75f0331e7a0a168ae770a61c645",
"detected_licenses": [
"MIT"
],
"directory_id": "abcc88d3071a678822b33095b737ec839bde9cbb",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python
import os
import sys
import gzip
import tempfile
import shutil
import urllib.request
from tqdm import tqdm
from lxml import etree
import pandas as pd
import datetime
import argparse
import copy
##########################
# COMMAND LINE
#
parser = argparse.ArgumentParser()
# group for either out o... | 275 | 35.03 | 144 | 19 | 2,480 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_29c2681ee90b09e2_ce10a107", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [orcid.org/](1) may be at an arbitrary position in the ... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [orcid.org/](1) may be at an arbitrary position in the sanitized URL.",
"The string [genealogy.ams.org](1) may be at an arbitrary position in the sanitized URL."
] | [
124,
136
] | [
null,
null
] | [
16,
18
] | [
35,
44
] | |
2024-11-18T20:52:52.036820+00:00 | 1,591,087,645,000 | ffb1241a29555f65402b1734bb22b1dd806efe56 | 2 | {
"blob_id": "ffb1241a29555f65402b1734bb22b1dd806efe56",
"branch_name": "refs/heads/master",
"committer_date": 1591087645000,
"content_id": "71388dd4ec81d847f2d4ba4ea11267a718005a29",
"detected_licenses": [
"MIT"
],
"directory_id": "37d8778243ddcbc22dd0f07721051f7c89a3e3ff",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import io
import requests
import zipfile
import tarfile
# We need to build the module using a Rust binary
# This logic tries to grab it from GitHub, based on the platform
platform = sys.platform
print(platform)
# If we sign our requests, GH doesn't a... | 63 | 36.63 | 129 | 13 | 671 | python | [{"finding_id": "codeql_py/tarslip_a22197cbde037597_e24929af", "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).\nThis file extraction depends on a [potentially un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).\nThis file extraction depends on a [potentially untrusted source](1)."
] | [
63
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T19:02:58.538907+00:00 | 1,531,815,636,000 | 54d111ee3276b67538df8ff9ad366498413954f2 | 3 | {
"blob_id": "54d111ee3276b67538df8ff9ad366498413954f2",
"branch_name": "refs/heads/master",
"committer_date": 1531815636000,
"content_id": "3515eb1c64dba612d7c51766a5f0f5fef802d0af",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "bce286337b64d7ca60124c993d176feff9de9ee0",
"extension": "p... | 2.625 | stackv2 | from flask import Flask, request, Response
import json
import os
import service
pred = service.Prediction();
#print(pred.card_detection('/data/features/test_3.png'))
UPLOAD_FOLDER_PATH = '/data/features/temp/'
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg'])
if not os.path.exists(UPLOAD_FOLDER_PATH):
os.makedirs... | 55 | 26.95 | 75 | 22 | 368 | python | [{"finding_id": "codeql_py/path-injection_3f9eba3fcc914707_0e31733f", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
37,
47
] | [
null,
null
] | [
19,
16
] | [
66,
25
] | |
2024-11-18T19:14:32.684781+00:00 | 1,626,088,974,000 | 85c1126e656fa21a86b21d963b16399d42eb207b | 2 | {
"blob_id": "85c1126e656fa21a86b21d963b16399d42eb207b",
"branch_name": "refs/heads/main",
"committer_date": 1626088974000,
"content_id": "32e34e8b142c034e47327e5d059859e8eb253ed4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a1210d5864760071ff1e10cdf37bfdd9d2397d53",
"extension": "py",
... | 2.46875 | stackv2 | import paramiko
import multiprocessing as mp
processes = []
"""
Function that establishes the connection to the respective controller.
Args:
address: The IP address of the controller
command: The specific python command used to run the controller
status: The specific action that you want to run for instance start, ... | 78 | 35.91 | 114 | 14 | 621 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_4a6c01ff7b863ecb_20394186", "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."
] | [
20
] | [
null
] | [
5
] | [
62
] | |
2024-11-18T19:14:34.380686+00:00 | 1,461,101,023,000 | 6a09bdc7d01646e5b86bcd4ad2914bf2898784fe | 2 | {
"blob_id": "6a09bdc7d01646e5b86bcd4ad2914bf2898784fe",
"branch_name": "refs/heads/master",
"committer_date": 1461101023000,
"content_id": "4bc54631c4cb51cc1d891c23d03fc47ad39341a2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0d06f4819730df52f62d26a3872fa01aa7237d80",
"extension": "py"... | 2.359375 | stackv2 | __author__ = 'amandeep'
import json
from flask import request
from flask import Response
from flask import make_response
from functools import wraps
from flask import Flask
from elasticsearch_manager import ElasticSearchManager
from dig_bulk_folders import BulkFolders
import ConfigParser
application = Flask(__name__)... | 261 | 29.51 | 124 | 21 | 1,740 | python | [{"finding_id": "codeql_py/stack-trace-exposure_bee7117114f8679a_eefd2716", "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.\n[S... | 5 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.\n[Stack trace information](1) flows to this location and may be exposed to an external user.\n[Stack trace information](1) flows to this location and may be exposed to an external user.\n[Stack trace information](1) flows t... | [
135,
150,
114,
197,
225
] | [
null,
null,
null,
null,
null
] | [
25,
25,
25,
25,
25
] | [
31,
31,
31,
31,
31
] | |
2024-11-18T19:14:37.495034+00:00 | 1,553,604,563,000 | fb53532d482354a7d51b4056174ff3f178ae07a3 | 2 | {
"blob_id": "fb53532d482354a7d51b4056174ff3f178ae07a3",
"branch_name": "refs/heads/master",
"committer_date": 1553604563000,
"content_id": "afad1adbfd5a4ceb58971891452788a327bbd4c7",
"detected_licenses": [
"MIT"
],
"directory_id": "e69939434c0ee2ecb40830f8fb1b767799601dcf",
"extension": "py",
"fi... | 2.4375 | stackv2 | from gi.repository import GLib
from threading import Thread
import requests
from .Jibril import decrypt_data
from pprint import pprint as pp
def get(url, handler, args=None, key = None):
"""Makes a simple request asking for thecomplete name of the user. Also
saves the UID vvariable for the upcoming ... | 32 | 37.09 | 109 | 16 | 263 | python | [{"finding_id": "codeql_py/request-without-cert-validation_a495bee0500734e7_92df65d6", "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)."
] | [
18
] | [
null
] | [
24
] | [
67
] | |
2024-11-18T19:14:38.392499+00:00 | 1,624,189,541,000 | 90bd92d5e42e728fc173a4598bac74346b90d416 | 2 | {
"blob_id": "90bd92d5e42e728fc173a4598bac74346b90d416",
"branch_name": "refs/heads/main",
"committer_date": 1624189541000,
"content_id": "987a62842722c1b358752278f33ff7a5b8953a73",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "748da83fed85768545f685b44e8ca950be247081",
"extension": "py",
... | 2.34375 | stackv2 | from flask import Flask
from flask import request
from flask import render_template, send_from_directory, url_for
import sys, os, cv2
from pathlib import Path
from .model import Model
from .helper import draw_boxes
model = Model()
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = '/home/ubuntu/website/static/upl... | 48 | 29.46 | 131 | 14 | 302 | python | [{"finding_id": "codeql_py/path-injection_397fbf099aa0a09d_c87869cd", "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)."
] | [
29
] | [
null
] | [
32
] | [
50
] | |
2024-11-18T19:14:42.412530+00:00 | 1,653,307,582,000 | e71e44ab2eb902a3a9271743d4be68194012f6ef | 2 | {
"blob_id": "e71e44ab2eb902a3a9271743d4be68194012f6ef",
"branch_name": "refs/heads/main",
"committer_date": 1653307582000,
"content_id": "d558ef5fd0b196006b33312f2d1d5352d866720d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "38591a5e865b6af09ba46634c0e557cf18c9d287",
"extension": "py",
... | 2.46875 | stackv2 | # -*- coding: utf-8 -*-
import time
import requests
import argparse
def login(username, password):
loginURL = 'http://10.0.0.55:801/srun_portal_pc.php?ac_id2=1&'
loginPram = {'action': 'login', 'username': username, 'password': password, 'ac_id': '1', 'user_ip': '', 'nas_ip': '', 'user_mac': '', 'save_me': ... | 93 | 33.98 | 167 | 16 | 768 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c041436c4653b2e8_508fc79d", "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.\... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text.\nThis expression stores [sensitive data (password)](4) as clear text.",
"This expression logs [sensitive... | [
52,
16,
19,
30,
33
] | [
null,
null,
null,
null,
null
] | [
21,
15,
15,
15,
15
] | [
47,
45,
45,
46,
46
] | |
2024-11-18T19:14:45.373073+00:00 | 1,395,874,973,000 | 668b750379aee6449b662a7da0e14bcdd06fccae | 3 | {
"blob_id": "668b750379aee6449b662a7da0e14bcdd06fccae",
"branch_name": "refs/heads/master",
"committer_date": 1395874973000,
"content_id": "bcd67fb762c5f819e003f2f71bae9e27763f3964",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "6d9a9f0216b3fe4256dacd2cedb8bd15be2224d9",
"extension": "p... | 2.625 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 23 19:40:24 2014
@author: zachpowers
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function )
import pandas as pd
import geojson
from geojson import Point, Feature, FeatureCollection, LineString
from jinja2 i... | 175 | 42.85 | 124 | 20 | 1,609 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_0aa4fc1f4e273d8c_7abc04fd", "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."
] | [
95
] | [
null
] | [
20
] | [
80
] | |
2024-11-18T19:14:51.537800+00:00 | 1,550,454,957,000 | f109d2e001c0b3d6f2b9129529b8d92a0f8d92e2 | 3 | {
"blob_id": "f109d2e001c0b3d6f2b9129529b8d92a0f8d92e2",
"branch_name": "refs/heads/master",
"committer_date": 1550455707000,
"content_id": "857540b30e122c222af1259d97071f57023f2b07",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "558aeee0f3e0ec385027460bbc0f26c05bcb2f43",
"extension": "p... | 2.90625 | stackv2 | from inspect import Parameter
from typing import Any
try:
import jinja2
except ImportError: # pragma: no cover
raise ImportError("'jinja2' missing. Run 'pip install jinja2'.")
class MailTemplates:
"""Renders jinja2 templates for use in html email bodies.
Unlike the molten.contrib.templates this obj... | 53 | 27.98 | 83 | 13 | 332 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_3f34d30c83ad576c_6d32f23e", "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."
] | [
20
] | [
null
] | [
28
] | [
84
] | |
2024-11-18T19:27:34.245362+00:00 | 1,517,537,754,000 | 9284e931057a476edd026bdcf3b9aca9a477ae5e | 2 | {
"blob_id": "9284e931057a476edd026bdcf3b9aca9a477ae5e",
"branch_name": "refs/heads/master",
"committer_date": 1517537754000,
"content_id": "79c5d9a688c18536477091ab64565660c086788b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "81e86ff28a47465609c05ddd00f4590d92d98abb",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/env python
"""Intersight Device Connector API access classes and device claim via the Intersight API."""
import sys
import argparse
import os.path
import subprocess
import json
import re
from xml.etree import ElementTree
import platform
import requests
from intersight.intersight_api_client import IntersightA... | 326 | 45 | 153 | 21 | 3,216 | python | [{"finding_id": "codeql_py/request-without-cert-validation_2fff5105f00390c8_9ae9c3b0", "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]... | 11 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"... | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
39,
46,
72,
76,
95,
101,
129,
153,
166,
198,
219
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
20,
28,
20,
28,
16,
20,
16,
16,
13,
20,
13
] | [
90,
125,
103,
98,
76,
83,
104,
72,
69,
107,
102
] | |
2024-11-18T19:27:41.295308+00:00 | 1,613,722,840,000 | 1f753e8b637ce57c6610ed657fe8202be9c859ed | 2 | {
"blob_id": "1f753e8b637ce57c6610ed657fe8202be9c859ed",
"branch_name": "refs/heads/main",
"committer_date": 1613722840000,
"content_id": "afe23ee6ed3c56e3fa39f697fe9c83f9df7893f8",
"detected_licenses": [
"MIT"
],
"directory_id": "c48cc05313d21e52cb8d0bbfd962cf51b153fc6d",
"extension": "py",
"file... | 2.40625 | stackv2 | from os import path, environ
from io import StringIO
import yaml
environ['TC_ROOT_DIR'] = path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../'))
# TODO: use config like this : https://github.com/kdart/devtest/blob/master/devtest/config.py
def get():
config_file_path = path.join(environ['TC_ROO... | 38 | 33.61 | 97 | 13 | 338 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_eb8954df5e4c3bbc_eed76382", "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."
] | [
37
] | [
null
] | [
7
] | [
35
] | |
2024-11-18T19:38:36.486840+00:00 | 1,361,636,493,000 | 126fe8c19ff07560676bba268a04c3396a4819b5 | 2 | {
"blob_id": "126fe8c19ff07560676bba268a04c3396a4819b5",
"branch_name": "refs/heads/master",
"committer_date": 1361636493000,
"content_id": "656c8f9af3e0a4600853fa0b16323087f0051822",
"detected_licenses": [
"MIT"
],
"directory_id": "704249e9d06aa4f5dde7b8a37235696064ae3e1e",
"extension": "py",
"fi... | 2.46875 | stackv2 | import webapp2
import jinja2
import os
import json
import re
from google.appengine.ext import db
jinja_environment = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__)))
class Tag(db.Model):
latitude = db.FloatProperty()
longitude = db.FloatProperty()
accuracy = db.IntegerP... | 100 | 30.08 | 82 | 18 | 603 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_703ec926a1127cc2_6c27f71f", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
9
] | [
10
] | [
21
] | [
63
] | |
2024-11-18T20:06:05.888732+00:00 | 1,516,163,554,000 | b58645aaabb7e35e7d5a03175ef829168fafd7f9 | 3 | {
"blob_id": "b58645aaabb7e35e7d5a03175ef829168fafd7f9",
"branch_name": "refs/heads/master",
"committer_date": 1516163554000,
"content_id": "00d2a8f61bfbb404d6b1c231715bb7427755ecf2",
"detected_licenses": [
"MIT"
],
"directory_id": "88210ef63c47f970e0952a5167fa721e6b7bd400",
"extension": "py",
"fi... | 2.640625 | stackv2 | #!/usr/bin/python3
#coding:utf-8
import cgi, os
import cgitb; cgitb.enable()
form = cgi.FieldStorage()
# 获取文件名
fileitem = form['file']
message=""
# 检测文件是否上传
if fileitem.filename:
# 设置文件路径
fn = os.path.basename(fileitem.filename)
f=open('data/' + fn, 'wb')
f.write(fileitem.file.read())
f.close()
m... | 25 | 15.12 | 43 | 10 | 130 | python | [{"finding_id": "codeql_py/path-injection_6aa6feb559e0e06b_288b1ea4", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
16
] | [
null
] | [
11
] | [
23
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.