added stringlengths 32 32 | created int64 1,236B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.03 | source stringclasses 1
value | text stringlengths 330 19.3k | num_lines int64 16 648 | avg_line_length float64 15.5 59.3 | max_line_length int64 37 179 | ast_depth int64 8 38 | length int64 102 3.79k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.11k 276k | sast_codeql_findings_count int64 1 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 33 | rule_ids listlengths 1 33 | confidences listlengths 1 33 | severities listlengths 1 33 | messages listlengths 1 33 | line_starts listlengths 1 33 | line_ends listlengths 1 33 | column_starts listlengths 1 33 | column_ends listlengths 1 33 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T20:58:22.141593+00:00 | 1,620,033,920,000 | e270814b4c125ae5101fe311a88efd7127740f19 | 3 | {
"blob_id": "e270814b4c125ae5101fe311a88efd7127740f19",
"branch_name": "refs/heads/main",
"committer_date": 1620033920000,
"content_id": "e66098e908a704d0c0842c286c60c67e4a48118a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "88c567abfb5d4c1b4b0771756e271cc7e3f2fabf",
"extension": "py"... | 2.859375 | stackv2 | # import required libraries
import requests
import os
from json2html import json2html
from flask import Flask,render_template,request,redirect
#intantiate flask application
app = Flask(__name__)
# use app route to redirect to and from html page
@app.route('/', methods=['POST','GET'])
# define method to take date ... | 101 | 33.02 | 119 | 18 | 738 | python | [{"finding_id": "codeql_py/partial-ssrf_00aaf4ff6fa33ed3_563df031", "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)."
] | [
26
] | [
null
] | [
15
] | [
32
] | |
2024-11-18T20:58:33.246317+00:00 | 1,603,072,704,000 | 4b72dfa61a2f312e8d45ef2a75f91da8c061cf11 | 2 | {
"blob_id": "4b72dfa61a2f312e8d45ef2a75f91da8c061cf11",
"branch_name": "refs/heads/main",
"committer_date": 1603072704000,
"content_id": "eef4c21cf26913178fc913143598ca54e92bbb4d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2192c8ad20b0102f95c837a70f19031eee11aa9b",
"extension": "py",
... | 2.484375 | stackv2 | """
JIRA API access module
supports storing encrypted JIRA password locally and decrypting
using key in the macOS key chain
Author: Alex Radnaev (alexander.radnaev@gmail.com)
Status: Prortotype
Python Version: 3.6
"""
import logging
logging.debug('logging JIRA_API imports')
from Crypto.Cipher... | 155 | 39.7 | 106 | 22 | 1,249 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7f69618df3ac7ffb_5e1cace1", "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."
] | [
109
] | [
110
] | [
27
] | [
36
] | |
2024-11-18T20:58:34.574644+00:00 | 1,590,306,000,000 | 4b88ddf140e4fce392b5b924db1e92aa481e4be1 | 4 | {
"blob_id": "4b88ddf140e4fce392b5b924db1e92aa481e4be1",
"branch_name": "refs/heads/master",
"committer_date": 1590306000000,
"content_id": "47b5301a4a679f87c31cc32a20f6c5d8641ab8ea",
"detected_licenses": [
"MIT"
],
"directory_id": "7eeed7f13a7a606abd6dd357d4f460e1d0c8a5a7",
"extension": "py",
"fi... | 3.609375 | stackv2 | #!/usr/bin/env python3.6
import password
import user
password_obj=password.Password()
def sign_up():
'''
Function that allows a new user to sign up.
'''
username_signup=" "
password_signup=" "
print(" ")
print("-----Sign up here-----")
username_valid=True
while username_vali... | 153 | 31.14 | 82 | 17 | 971 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0f38ca250542eea6_32b6fb6f", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
32
] | [
null
] | [
19
] | [
77
] | |
2024-11-18T21:10:11.330505+00:00 | 1,452,302,902,000 | 68954b251095d88c86cf00a1d96fb229521a815e | 3 | {
"blob_id": "68954b251095d88c86cf00a1d96fb229521a815e",
"branch_name": "refs/heads/master",
"committer_date": 1452302902000,
"content_id": "cace73eee65b5ab0927230c6a357acba2c08c085",
"detected_licenses": [
"MIT"
],
"directory_id": "44c11cb5c9481dacec3a2d68bded5eb78dbb9d1d",
"extension": "py",
"fi... | 2.8125 | stackv2 | import sqlite3
import pandas as pd
from haversine import haversine
import itertools
north_pole = (90,0)
weight_limit = 1000 #1000.0
for i in range(90,-90,int(-180/1.26)): ##Other split
print ("i=: "+str(i))
for i in range(180,-180,int(-360/1.4)): ##Other split
print ("i=: "+str(i))
def bb_sort(ll... | 136 | 33.93 | 142 | 25 | 1,425 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_be4a3fdcf4cbc1a6_541f5a8d", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text.",
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
122,
127
] | [
null,
null
] | [
31,
31
] | [
80,
80
] | |
2024-11-18T21:10:16.083664+00:00 | 1,685,472,245,000 | d71b8050d096a49fe7a8401e288a110d76876752 | 2 | {
"blob_id": "d71b8050d096a49fe7a8401e288a110d76876752",
"branch_name": "refs/heads/master",
"committer_date": 1685472245000,
"content_id": "065d9a88e0db41a391a8bd4da489c1c3a1c8a336",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3cab6c7c171bb29a4f672dd72e6547759a4889f6",
"extension": "p... | 2.4375 | stackv2 | import dateutil.parser
import flask
import functools
import logging
import re
import requests
import urllib
import youtube
from models import *
app = flask.Flask(__name__)
app.secret_key = 'tAPi7MV9bnhqQyv-k1nfoQ' # TODO: Config this
@app.before_request
def set_user():
flask.g.user = User.get_or_none(email = fla... | 334 | 32.73 | 131 | 19 | 2,423 | python | [{"finding_id": "codeql_py/full-ssrf_ff8b426784f48af5_d1a165a8", "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)."
] | [
82
] | [
null
] | [
20
] | [
37
] | |
2024-11-18T21:11:08.198118+00:00 | 1,595,411,957,000 | 401ddfeb7d31012fb6bb64eaf5aee7ddb3f75ec3 | 3 | {
"blob_id": "401ddfeb7d31012fb6bb64eaf5aee7ddb3f75ec3",
"branch_name": "refs/heads/master",
"committer_date": 1595411957000,
"content_id": "e982dd48ae0168953ae872a855bb427383fd84e6",
"detected_licenses": [
"MIT"
],
"directory_id": "9ed19539249016c926b0eab0e54f00e93fc5c528",
"extension": "py",
"fi... | 2.609375 | stackv2 | import asyncio
import re
import typing as t
import urllib.parse
from contextlib import suppress
from io import BytesIO
import aiohttp
import discord
from discord.ext import commands, tasks
from discord.ext.commands import Cog, Context
from discord.utils import escape_mentions
from bot import config
from bot.core.bot ... | 335 | 37.77 | 125 | 25 | 2,796 | python | [{"finding_id": "codeql_py/overly-large-range_b9d67fd0b11a3d24_af718218", "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\\]."
] | [
175
] | [
null
] | [
42
] | [
45
] | |
2024-11-18T21:11:18.250825+00:00 | 1,526,384,156,000 | 50d28232ff8f1c61da1af149208323da653e0c02 | 3 | {
"blob_id": "50d28232ff8f1c61da1af149208323da653e0c02",
"branch_name": "refs/heads/master",
"committer_date": 1526384156000,
"content_id": "d8c45074069eb5a8e8dc21bdb75d5dd6608b5043",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "218908df3e53f2868484bbfa339d42defee3291e",
"extension": "py"... | 2.984375 | stackv2 | from flask import Flask, render_template
import requests
app = Flask('Awesome app')
@app.route('/<name>/<x>/<y>')
def index(name, x, y):
greeting = requests.get('http://greetings:5000/greeting/{}'.format(name))
greeting_type = 'hello' if 'hello' in greeting.text.lower() else 'howdy'
sum_ = requests.get(... | 25 | 23.32 | 77 | 12 | 172 | python | [{"finding_id": "codeql_py/partial-ssrf_613b3b1001950424_2512fe9e", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 2 | true | [
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).\nPart of the URL of this request depends on a [user-provided value](2)."
] | [
10,
12
] | [
null,
null
] | [
16,
12
] | [
78,
78
] | |
2024-11-18T19:03:37.890796+00:00 | 1,532,881,921,000 | 844a7db141fabb5d7ed91fe6c96a8a316270e520 | 3 | {
"blob_id": "844a7db141fabb5d7ed91fe6c96a8a316270e520",
"branch_name": "refs/heads/master",
"committer_date": 1532881921000,
"content_id": "a9960f999ea01d0a90013c262b5eac94d8615d5e",
"detected_licenses": [
"MIT"
],
"directory_id": "38bcf7aa5d815be3d4a521dd5297a5354ca7d062",
"extension": "py",
"fi... | 2.53125 | stackv2 | import argparse
import os
import sys
import jinja2
env = jinja2.Environment()
TEMPLATES = ('saas',)
def die(message, code=1):
print(message, file=sys.stderr)
sys.exit(code)
def klass_template_directory(p='..', create=True):
expanded = os.path.abspath(
os.path.expanduser(
os.path.ex... | 175 | 34.37 | 127 | 23 | 1,443 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_adf7afe6a2cad51c_bfb9ce74", "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."
] | [
6
] | [
null
] | [
7
] | [
27
] | |
2024-11-18T19:28:42.207278+00:00 | 1,634,209,082,000 | d3450959a4f9b73040894f8fa607b05e019a728e | 3 | {
"blob_id": "d3450959a4f9b73040894f8fa607b05e019a728e",
"branch_name": "refs/heads/master",
"committer_date": 1634209082000,
"content_id": "1906dec38e948cf9dff851b2301ef6a08bc1fa8e",
"detected_licenses": [
"MIT"
],
"directory_id": "3bebd8da968c6923fdc69185df99a544b0e66e70",
"extension": "py",
"fi... | 2.84375 | stackv2 | # Imports
import sqlite3
from hashlib import md5
class DBManager:
def __init__(self):
# Initialize Database
self.conn = None
self.cur = None
self.create_db_connection()
def create_db_connection(self):
self.conn = sqlite3.connect('TIWAP.db', check_same_thread=False)
... | 120 | 27.81 | 105 | 18 | 688 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_47e51749ed5cf542_87f147b3", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally exp... | [
47,
55
] | [
null,
null
] | [
28,
24
] | [
61,
57
] | |
2024-11-18T19:39:31.619991+00:00 | 1,476,889,957,000 | d5244bfeda30413a75c2aca3e5e5f2a3eb4d1acb | 2 | {
"blob_id": "d5244bfeda30413a75c2aca3e5e5f2a3eb4d1acb",
"branch_name": "refs/heads/master",
"committer_date": 1476889957000,
"content_id": "4cd6f580daa9a80e3e05eb0a28deb78fd496778e",
"detected_licenses": [
"MIT"
],
"directory_id": "a511dcd95a564a8b968d0c1f61020cf4ccdb173e",
"extension": "py",
"fi... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
import os
import fnmatch
import logging
# third-party
import requests
from crosspm.helpers.config import CROSSPM_DEPENDENCY_LOCK_FILENAME
from crosspm.helpers.exceptions import *
log = logging.getLogger(__name__)
# TODO: REWORK PROMOTER COMPLETELY to match new architecture!!!
class Promoter:... | 132 | 32.84 | 110 | 19 | 923 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9c0fda3a06b452bc_9c3b5f9e", "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)."
] | [
83
] | [
87
] | [
21
] | [
18
] | |
2024-11-18T19:39:38.752383+00:00 | 1,621,338,713,000 | 4d7b4127985d5a44e66db231a809e129b8f30915 | 3 | {
"blob_id": "4d7b4127985d5a44e66db231a809e129b8f30915",
"branch_name": "refs/heads/main",
"committer_date": 1621338713000,
"content_id": "822a26ba65564d975d9d378dd2ae093e8d0cbbc2",
"detected_licenses": [
"MIT"
],
"directory_id": "f8b263e705b8b98073427e17114649951b40f804",
"extension": "py",
"file... | 2.96875 | stackv2 | # Import libraries
from webbot import Browser
import time
# -----------------------------------------------------------------------------------------
# COURSE_NAME (COURSE_CODE)
# COURSE_INSTRUCTOR
# https://eclass.uth.gr/courses/COURSE_CODE/
# Εργασίες
# https://eclass.uth.gr/modules/work/?course=COURSE_CODE
# http... | 57 | 40.28 | 116 | 9 | 841 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_67c08af2904e23f7_03042570", "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."
] | [
44
] | [
null
] | [
75
] | [
83
] | |
2024-11-18T19:39:38.813634+00:00 | 1,550,613,675,000 | f84c35f4df1e8e4efe460d3ad68b58fc86c4ba8a | 3 | {
"blob_id": "f84c35f4df1e8e4efe460d3ad68b58fc86c4ba8a",
"branch_name": "refs/heads/master",
"committer_date": 1550613675000,
"content_id": "bf4300ebf8bbc21af603d32c8da5471a180a90ad",
"detected_licenses": [
"MIT"
],
"directory_id": "b234478e5a7ec511f701e410551c6fa09033173e",
"extension": "py",
"fi... | 2.859375 | stackv2 | import json
import os
class patient(object):
def __init__(self):
self.name = "test"
def set_bp_id(self, bp_id):
self.bp_id = bp_id
def set_pulse_id(self, pulse_id):
self.pulse_id = pulse_id
def set_temp_id(self, temp_id):
self.temp_id = temp_id
def get_bp_id(sel... | 82 | 23.32 | 58 | 13 | 490 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_545c301de8144967_a8f24233", "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."
] | [
55
] | [
null
] | [
15
] | [
24
] | |
2024-11-18T19:39:52.090485+00:00 | 1,557,430,595,000 | 8958b8991fa056b99e407420ff29c624c9d876d2 | 2 | {
"blob_id": "8958b8991fa056b99e407420ff29c624c9d876d2",
"branch_name": "refs/heads/master",
"committer_date": 1557430595000,
"content_id": "63b76987c2688dde3e3d70f841359e1ef6992d92",
"detected_licenses": [
"MIT"
],
"directory_id": "eac74662663f016d11cfb6d3c0b614d2ec31c8bc",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/env python3
import shlex
import requests
import markdown
from jinja2 import Template
import re
import os
import begin
import logging
import bottle
from jiraprinter.html.html_path import HTML_PATH
logging.getLogger("requests").setLevel(logging.WARNING)
DEFAULT_TEMPLATE = os.path.join(HTML_PATH, 'template... | 204 | 31.64 | 112 | 17 | 1,490 | python | [{"finding_id": "codeql_py/path-injection_24728c650a3600ea_446d4fc2", "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", ... | 4 | true | [
"CWE-022",
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/path-injection",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"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."
] | [
156,
139,
157,
186
] | [
null,
null,
null,
null
] | [
15,
16,
20,
20
] | [
72,
34,
38,
38
] | |
2024-11-18T19:39:52.319248+00:00 | 1,535,967,111,000 | 4aa957674b77cb7dc0630a23cbfbe968de2cf7c0 | 3 | {
"blob_id": "4aa957674b77cb7dc0630a23cbfbe968de2cf7c0",
"branch_name": "refs/heads/master",
"committer_date": 1535967111000,
"content_id": "5ab30bd7d89c094f5633860617348f967c15235a",
"detected_licenses": [
"MIT"
],
"directory_id": "892b8dc1279728f080480df069ad7c9d52f36b8b",
"extension": "py",
"fi... | 2.6875 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import re
from rp_utils import get_http_body, rp_print_escape, rp_print, html_regex
AIR_FORECAST_URL = "http://air.incheon.go.kr/airinch/dust.html"
AIR_CAI_URL = "http://air.incheon.go.kr/airinch/cai.html"
AIR_STAT = {"1": "좋음", "2": "보통", "3": "나쁨", "4": "매우나쁨"}
AIR_STAT_CO... | 205 | 31.2 | 117 | 18 | 1,736 | python | [{"finding_id": "codeql_py/bad-tag-filter_7849122feb9cc2a6_ee9004c9", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat... | 2 | true | [
"CWE-116",
"CWE-116"
] | [
"py/bad-tag-filter",
"py/bad-tag-filter"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This regular expression does not match comments containing newlines.",
"This regular expression does not match comments containing newlines."
] | [
73,
93
] | [
null,
null
] | [
44,
44
] | [
56,
56
] | |
2024-11-18T19:39:53.364253+00:00 | 1,623,426,570,000 | bb4dc1fba25c0c3600b42eaa9e1535dd77281d27 | 3 | {
"blob_id": "bb4dc1fba25c0c3600b42eaa9e1535dd77281d27",
"branch_name": "refs/heads/main",
"committer_date": 1623426570000,
"content_id": "e79f67b99c3b428b55c4afb1da5bd86873154141",
"detected_licenses": [
"MIT"
],
"directory_id": "7a86e2a05f3c92a851a79ca68bc9df5221ac4ad3",
"extension": "py",
"file... | 2.5625 | stackv2 | import tornado.ioloop
from tornado.web import RequestHandler
import requests
import json
JOKE_URL = "https://official-joke-api.appspot.com/jokes/programming/random"
VALIDATE_KEY = "http://localhost:8080/api/validate?api_key={}"
class MainHandler(RequestHandler):
async def get(self):
api_key = self.get_ar... | 37 | 37.57 | 113 | 20 | 332 | python | [{"finding_id": "codeql_py/partial-ssrf_4617e46e64f57a6b_a72c5950", "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)."
] | [
12
] | [
null
] | [
24
] | [
77
] | |
2024-11-18T20:18:01.981661+00:00 | 1,627,066,775,000 | 9dab14418d9d21e3c5c779bf24ddfb9c1057a2db | 3 | {
"blob_id": "9dab14418d9d21e3c5c779bf24ddfb9c1057a2db",
"branch_name": "refs/heads/master",
"committer_date": 1627066775000,
"content_id": "41cd935e1fb49f1ef3b8bacb4e97130bd341bf2a",
"detected_licenses": [
"MIT"
],
"directory_id": "f070ca475039f7a5ced121822da606a7a28363b7",
"extension": "py",
"fi... | 2.703125 | stackv2 | from discord.ext import commands
from Crypto.Cipher import Blowfish
import struct
import json
import zlib
from typing import NamedTuple
import io
REPLAY_SIGNATURE = b'\x12\x32\x34\x11'
BLOWFISH_KEY = b''.join([b'\x29', b'\xB7', b'\xC9', b'\x09', b'\x38', b'\x3F', b'\x84', b'\x88',
b'\xFA', b'... | 80 | 29.41 | 97 | 16 | 581 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_9733e2f5f0127f73_a843e67a", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
72
] | [
null
] | [
51
] | [
74
] | |
2024-11-18T20:18:05.925405+00:00 | 1,535,995,830,000 | 922c5901ca79b294c25e9f2352026a77b0ecb96f | 3 | {
"blob_id": "922c5901ca79b294c25e9f2352026a77b0ecb96f",
"branch_name": "refs/heads/master",
"committer_date": 1535995830000,
"content_id": "65b7a2f82974aecb26a6a2ea6dbf428a0df187cd",
"detected_licenses": [
"MIT"
],
"directory_id": "3757d25db4f116201613f9565ce01ddda9ed0e3d",
"extension": "py",
"fi... | 2.671875 | stackv2 | from app import app
import urllib.request,json
from .models import news
News = news.News
Articles=news.Articles
article_url=app.config['ARTICLES_BASE_URL']
# Getting api key
api_key = app.config['NEWS_API_KEY']
articles_url=app.config['ARTICLES_BASE_URL']
base_url = app.config["NEWS_API_BASE_URL"]
def get_news(categ... | 110 | 32.05 | 96 | 14 | 733 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_02638534432b704c_8c474688", "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."
] | [
69
] | [
null
] | [
10
] | [
26
] | |
2024-11-18T20:18:10.478684+00:00 | 1,588,807,569,000 | 9ec90467d7f4a26914ab685f7d70342485794b11 | 3 | {
"blob_id": "9ec90467d7f4a26914ab685f7d70342485794b11",
"branch_name": "refs/heads/master",
"committer_date": 1588807569000,
"content_id": "510d3407b49e247c23a301b8dca0fc69fc5c0c4b",
"detected_licenses": [
"MIT"
],
"directory_id": "653855ce321dd6c388b4357ad23156a102308670",
"extension": "py",
"fi... | 2.859375 | stackv2 | #!/usr/bin/env python
import hashlib
# Implementation of digest authentication
# As description from https://en.wikipedia.org/wiki/Digest_access_authentication
# Algorithm: MD5
# HA1 = MD5(username:realm:password)
def HA1(username, realm, password):
msg = "{}:{}:{}".format(username, realm, password)
md5 = hashli... | 54 | 25.17 | 80 | 16 | 515 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_7a1f25c26265c7ad_10316f76", "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 (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 ... | [
13
] | [
null
] | [
14
] | [
17
] | |
2024-11-18T20:18:33.984667+00:00 | 1,547,060,541,000 | 7fe404070ddf6db93ed90ebc8e32a912089a10a5 | 3 | {
"blob_id": "7fe404070ddf6db93ed90ebc8e32a912089a10a5",
"branch_name": "refs/heads/master",
"committer_date": 1547060736000,
"content_id": "e0c159a26dea41dbe94b325ee4c9a20525429d17",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3a891a79be468621aae43defd9a5516f9763f36e",
"extension": "py"... | 2.6875 | stackv2 | # Copyright (C) Jean-Paul Calderone
# See LICENSE for details.
from sys import stdout
from socket import SOL_SOCKET, SO_REUSEADDR, socket
from OpenSSL.crypto import FILETYPE_PEM, load_privatekey, load_certificate
from OpenSSL.SSL import TLSv1_METHOD, Context, Connection
def load(domain):
crt = open(domain + ".c... | 65 | 24.62 | 75 | 11 | 382 | python | [{"finding_id": "codeql_py/insecure-protocol_2d83cc372d0adebe_1d0e3931", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to Context](1).", "remediation": "", "location"... | 3 | true | [
"CWE-327",
"CWE-327",
"CWE-200"
] | [
"py/insecure-protocol",
"py/insecure-protocol",
"py/bind-socket-all-network-interfaces"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to Context](1).",
"Insecure SSL/TLS protocol version TLSv1 specified by [call to Context](1).",
"'' binds a socket to all interfaces."
] | [
37,
58,
29
] | [
null,
null,
null
] | [
22,
23,
5
] | [
43,
44,
26
] | |
2024-11-18T20:18:35.403393+00:00 | 1,538,350,120,000 | e1dd7732c15b29ea34b46ced4dd3bc9b78dfc5f3 | 2 | {
"blob_id": "e1dd7732c15b29ea34b46ced4dd3bc9b78dfc5f3",
"branch_name": "refs/heads/master",
"committer_date": 1538350120000,
"content_id": "696aa7c93ecd28869ac684d83f06cf0cf995a44c",
"detected_licenses": [
"MIT"
],
"directory_id": "e5a8e52658387a1aff8a44014a3e040b160d9db7",
"extension": "py",
"fi... | 2.375 | stackv2 | import shelve
import random
import string
import os
import sys
import logging
from flask import Flask, request, redirect, url_for, render_template, g, session, jsonify, Blueprint
logger = logging.getLogger(__name__)
annotate_bp = Blueprint('annotate', '__name__', url_prefix='/annotate')
def get_db():
return BlurbS... | 385 | 29.25 | 148 | 19 | 2,918 | python | [{"finding_id": "codeql_py/log-injection_74ee14f1fbdbd466_8a324711", "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... | 8 | true | [
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depen... | [
64,
78,
102,
116,
136,
170,
191,
207
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
16,
15,
16,
16,
15,
15,
15,
15
] | [
83,
42,
82,
86,
108,
90,
148,
93
] | |
2024-11-18T20:18:37.868077+00:00 | 1,393,848,829,000 | 14528b1dd6f8afc92371912a5e3e7d744001302f | 3 | {
"blob_id": "14528b1dd6f8afc92371912a5e3e7d744001302f",
"branch_name": "refs/heads/master",
"committer_date": 1398960616000,
"content_id": "b03c3df06db9d8a0413b4d79762eb134e9355f64",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "78e36689d7fdbea739994c2194831462c513cec9",
"extension": "p... | 2.71875 | stackv2 | #!/usr/bin/env python
"""Author: Abhijith V Mohan"""
import sys
from itertools import islice
from Crypto.Cipher import DES3
from Crypto.Util.strxor import strxor
from time import time
import struct
def ansi_x9_17(V, key):
'''
Generator for ansi_x9_17 PRNG
V: seed. It should be a string of length 8
key: concat of ... | 31 | 25.52 | 72 | 18 | 279 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_a9bd13a694de2a1a_78e37514", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptograph... | 3 | true | [
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES3](2) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES3](2) is broken or weak, and should not be used.",
"[The bl... | [
18,
19,
20
] | [
null,
null,
null
] | [
9,
7,
7
] | [
50,
35,
35
] | |
2024-11-18T20:18:38.014139+00:00 | 1,585,785,243,000 | 4040953e3c508db0715161f5882efb0145709ac6 | 3 | {
"blob_id": "4040953e3c508db0715161f5882efb0145709ac6",
"branch_name": "refs/heads/master",
"committer_date": 1585785243000,
"content_id": "5909d95a2a6ca56340aaf1dcae189d728c00d329",
"detected_licenses": [
"MIT"
],
"directory_id": "425d11c015eb48245ecaa23f288a9b235130901e",
"extension": "py",
"fi... | 3.1875 | stackv2 | import getpass
import hashlib
import os
def validPassword(password):
passwordHash = hashlib.md5(password.encode()).hexdigest()
return passwordHash
def insertUser(cursor, username, password):
passwordHash = validPassword(password)
cursor.execute('''
INSERT INTO user (username, password) VALUES ('{}', '{}')... | 110 | 27.67 | 84 | 16 | 791 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b4896a9520b798f4_b0bb95f3", "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.", ... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-327"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"[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[Sen... | [
108,
109,
6
] | [
null,
null,
null
] | [
11,
11,
30
] | [
40,
40,
47
] | |
2024-11-18T20:18:45.981765+00:00 | 1,594,580,204,000 | 938e29b0421381a2be13d51d685c9ef4f1529902 | 3 | {
"blob_id": "938e29b0421381a2be13d51d685c9ef4f1529902",
"branch_name": "refs/heads/master",
"committer_date": 1594580204000,
"content_id": "74d9902bb72a122e3500c74f1d5d49ca281dd7be",
"detected_licenses": [
"MIT"
],
"directory_id": "7f465844a08ffe3a53e988a20c518254eab43e5f",
"extension": "py",
"fi... | 3.046875 | stackv2 | """Main file for spwaning nodes and running experiments"""
# Arguments:
#
# 1: Number of nodes on the bitcoin network
# 2: Block size to create the block
# 3: Timeout (in seconds) after which nodes stop operation
# 4: Number of miners in the blockchain system
# 5: Number of dishonest nodes in the blockchain system
# 6:... | 103 | 31.27 | 81 | 16 | 821 | python | [{"finding_id": "codeql_py/weak-crypto-key_12afe1a85e4f4c41_b79c8821", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable.", "remediation": "",... | 1 | true | [
"CWE-326"
] | [
"py/weak-crypto-key"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable."
] | [
35
] | [
null
] | [
19
] | [
49
] | |
2024-11-18T20:29:33.088257+00:00 | 1,691,267,466,000 | f3caa8ee52de3c7c33b91ed4d7e8a3728f075486 | 3 | {
"blob_id": "f3caa8ee52de3c7c33b91ed4d7e8a3728f075486",
"branch_name": "refs/heads/master",
"committer_date": 1691267466000,
"content_id": "95074e8e07dca3e71908c8ed90ddb0f1ccf71ce8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ce72637209547fe47301f03cc5cb11c6f614c095",
"extension": "py"... | 2.8125 | stackv2 | """
PulseIPMI.py
Deadline Power Management IPMI Pulse Script
Example Syntax:
"../DeadlineCommand.exe" -ExecuteScript "../<repo>/custom/scripts/Pulse/PulseIPMI.py" {SLAVE_IP} {IPMI_COMMAND}
{SLAVE_IP} : variable that Deadline passes through to the PM IPMItool executable
Swap out DataIP: 10.2.1.x with Management VLAN I... | 88 | 36.2 | 111 | 15 | 803 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7df86e73f7d0c187_cfc5ba6a", "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."
] | [
66
] | [
null
] | [
15
] | [
37
] | |
2024-11-18T20:29:34.687779+00:00 | 1,525,959,311,000 | 0be8230e1b7054b08469e00cb8d6add374ac49d0 | 3 | {
"blob_id": "0be8230e1b7054b08469e00cb8d6add374ac49d0",
"branch_name": "refs/heads/master",
"committer_date": 1525959311000,
"content_id": "b0a6213d92844aed136600ecec7c6b55ddbe5cc0",
"detected_licenses": [
"MIT"
],
"directory_id": "21b2e8e7d126cd37ad32a3311cc4ca9e1ad4f1cd",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
"""
Setups dpdk and ens environment.
Mustafa Bayramov
mbayramov@vmware.com
"""
import paramiko
import sys
import yaml
import time
def openssh(host_config=None, cmds=None, verbose=False):
"""
:param host_config:
:param cmds:
:pa... | 104 | 29.54 | 100 | 17 | 691 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_98b4baf7d7af2cfe_e4d35fca", "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 WarningPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to WarningPolicy may be unsafe."
] | [
32
] | [
null
] | [
9
] | [
67
] | |
2024-11-18T20:29:47.863840+00:00 | 1,596,320,536,000 | b51fec2f8b18746c7373daf1ec3ed17a8cbafc9d | 3 | {
"blob_id": "b51fec2f8b18746c7373daf1ec3ed17a8cbafc9d",
"branch_name": "refs/heads/master",
"committer_date": 1596320536000,
"content_id": "b1563637c74d762f81e279668fc532af8067adc3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ccbedfb2c16f48b8f593fe80fb3ab7b7132f22fa",
"extension": "py"... | 2.84375 | stackv2 | from flask import Flask, escape, request, redirect, render_template, flash, url_for
from werkzeug.utils import secure_filename
import os
import shutil
import ntpath
from converter import gtlf2glb_call, obj2glb_call
UPLOAD_FOLDER = 'upload_files' #folder of the uploads
ALLOWED_EXTENSIONS = {'gltf', 'glb', 'obj'} #al... | 97 | 37.29 | 118 | 14 | 896 | python | [{"finding_id": "codeql_py/flask-debug_78ddcc99781eddbb_8650bb6e", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 4 | true | [
"CWE-215",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
96,
50,
51,
52
] | [
null,
null,
null,
null
] | [
5,
23,
23,
17
] | [
51,
27,
27,
21
] | |
2024-11-18T20:29:55.986118+00:00 | 1,607,619,551,000 | 0d44e4a69d705513858f9e9c54df3482ac50701d | 3 | {
"blob_id": "0d44e4a69d705513858f9e9c54df3482ac50701d",
"branch_name": "refs/heads/main",
"committer_date": 1607619551000,
"content_id": "ddfee08f84c692a05454e72091dcb3ec4eab6b43",
"detected_licenses": [
"MIT"
],
"directory_id": "d180c69f99d809b66a581b7341e17980cae99874",
"extension": "py",
"file... | 2.5625 | stackv2 | import logging
from django.conf import settings
from jose import jwt
from jose.exceptions import JWTError
import requests
from requests.exceptions import RequestException
from rest_framework import HTTP_HEADER_ENCODING
log = logging.getLogger(__name__)
class JWTDecodeError(Exception):
pass
class JWT:
de... | 105 | 27 | 82 | 17 | 623 | python | [{"finding_id": "codeql_py/request-without-cert-validation_b0e202eac5e4a81a_c9bd41c3", "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)."
] | [
52
] | [
null
] | [
28
] | [
69
] | |
2024-11-18T20:29:57.501230+00:00 | 1,393,519,485,000 | 01ef010370c7d2e7c4a9bbf10cac4954e1db7752 | 3 | {
"blob_id": "01ef010370c7d2e7c4a9bbf10cac4954e1db7752",
"branch_name": "refs/heads/master",
"committer_date": 1393519485000,
"content_id": "7c1cff9e89efc4e5a2db8668634f50b9044c92c6",
"detected_licenses": [
"MIT"
],
"directory_id": "b70013f94a33a19cd44fdb7a555f6f620eb7f791",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/usr/bin/env python
"""
cexbot.cexapi
"""
import requests
import requests.exceptions
import hmac
import hashlib
import json
import logging
from time import time
class CexAPI(object):
CEX_API_BASE = 'https://cex.io/api'
# format is (URI, private, required params)
api_methods = {
'ticker': ('/ticker/GHS... | 142 | 26.69 | 106 | 17 | 1,022 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_c0dcfc1d11163267_a66395a8", "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."
] | [
46
] | [
null
] | [
53
] | [
60
] | |
2024-11-18T20:29:58.310572+00:00 | 1,560,040,498,000 | c73fea4b7347c232a3db4ab2bbf2800dc5632109 | 3 | {
"blob_id": "c73fea4b7347c232a3db4ab2bbf2800dc5632109",
"branch_name": "refs/heads/master",
"committer_date": 1560040498000,
"content_id": "05b8350f3affc57a14f963777b6c1f809dc0cf35",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b7209de507c46f7f39108f852d9222ce7b5c1d92",
"extension": "py"... | 2.640625 | stackv2 | import requests
import os
import pprint
class SpreadsheetUploader:
def __init__(
self,
base_url,
username,
password,
):
"""
:param str base_url: Optional(default='test.com') - Application domain name
:param str username: Optional(default... | 169 | 32.91 | 118 | 16 | 1,185 | python | [{"finding_id": "codeql_py/request-without-cert-validation_31fcfcbe8182839b_43cbd6fc", "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)."
] | [
34,
153
] | [
39,
157
] | [
20,
20
] | [
10,
10
] | |
2024-11-18T20:30:02.600463+00:00 | 1,485,980,090,000 | 93ef748c3e90f57ac86e94abd6b3afa0f62538b1 | 3 | {
"blob_id": "93ef748c3e90f57ac86e94abd6b3afa0f62538b1",
"branch_name": "refs/heads/master",
"committer_date": 1485980090000,
"content_id": "08d8f0feb346af44bf83c87c2bb156649de6e5eb",
"detected_licenses": [
"MIT"
],
"directory_id": "776b2b7b261f2be6418100958206e65742ff85c6",
"extension": "py",
"fi... | 2.8125 | stackv2 | from msimb import db
from os import urandom
from hashlib import sha256
from base64 import b64encode
from flask.ext.login import UserMixin
def generate_salt():
rand_bytes = urandom(256)
return b64encode(rand_bytes).decode('utf-8')
def hash_password(password, salt):
return sha256('{}{}'.format(salt, passwo... | 33 | 28.21 | 69 | 14 | 232 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_03ed9ca1a2f89f7a_8a2c527b", "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... | [
13
] | [
null
] | [
19
] | [
57
] | |
2024-11-18T20:51:27.205037+00:00 | 1,644,586,316,000 | 38b9a52cd126dbd3820fbc548190b5a2347c432c | 2 | {
"blob_id": "38b9a52cd126dbd3820fbc548190b5a2347c432c",
"branch_name": "refs/heads/master",
"committer_date": 1644586316000,
"content_id": "c4ab2c51d17d0daefa1efe7d5c2a2d2bd642ecc2",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "11617a11d29800a9e9fdf8461a929764bd3704f9",
"extension": "p... | 2.390625 | stackv2 | # encoding: utf-8
"""
"""
__author__ = 'Richard Smith'
__date__ = '25 Feb 2020'
__copyright__ = 'Copyright 2018 United Kingdom Research and Innovation'
__license__ = 'BSD - see LICENSE file in top-level package directory'
__contact__ = 'richard.d.smith@stfc.ac.uk'
from tds_utils.create_catalog import CatalogBuilder, ... | 122 | 28.02 | 140 | 14 | 818 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_897d48eed05e4bd2_dd25506d", "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."
] | [
41
] | [
null
] | [
20
] | [
83
] | |
2024-11-18T19:07:23.274931+00:00 | 1,521,507,734,000 | 0d0019ba9928e7293c226fb51873ecde6b67c827 | 2 | {
"blob_id": "0d0019ba9928e7293c226fb51873ecde6b67c827",
"branch_name": "refs/heads/master",
"committer_date": 1521507734000,
"content_id": "63ff94e1e1818a06918f668118684c8f84714942",
"detected_licenses": [
"MIT"
],
"directory_id": "b4bfc22447f2d7a8c727f2c5b7097a667a301fd8",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os
from flask import render_template, redirect, flash, url_for, request
from werkzeug.urls import url_parse
from app import app, db, img
from flask_login import current_user, login_user, logout_user, login_required
from app.forms import LoginForm, RegistrationForm, UploadForm
from app.models import User, Post
@... | 67 | 34.91 | 107 | 16 | 506 | python | [{"finding_id": "codeql_py/url-redirection_67113861ea407889_41a64eda", "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)."
] | [
47
] | [
null
] | [
25
] | [
34
] | |
2024-11-18T19:07:44.651230+00:00 | 1,576,661,763,000 | 0185bd2d205b9a61c0266046a73c536e970c55f1 | 2 | {
"blob_id": "0185bd2d205b9a61c0266046a73c536e970c55f1",
"branch_name": "refs/heads/master",
"committer_date": 1576661763000,
"content_id": "360abf1c8ae62ec7d0b9ccd3a714cc81fd5b1b04",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bf1257f42fbef87d3e2c41414c2215e46c3b7fa0",
"extension": "py"... | 2.3125 | stackv2 | from django.shortcuts import render
from django.http import HttpResponse
from django.views.generic import View
from .models import User
from .forms import MessageBoardForm,MyForm,RegisterForm
# Create your views here.
class IndexView(View):
#将表单映射到模板上
def get(self,request):
form = MessageBoardForm()
... | 63 | 35.06 | 89 | 15 | 444 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4cd424d9546630e5_18cbae90", "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."
] | [
43
] | [
null
] | [
48
] | [
57
] | |
2024-11-18T19:18:14.440615+00:00 | 1,631,854,394,000 | ec93083c866c912bc81e174e1b339771979fdc5e | 3 | {
"blob_id": "ec93083c866c912bc81e174e1b339771979fdc5e",
"branch_name": "refs/heads/master",
"committer_date": 1631854394000,
"content_id": "b9cdefc5b27bee1e7f3e3ef3ff0c82d5ca3a1847",
"detected_licenses": [
"MIT"
],
"directory_id": "b2ff37406e50976b8db1c75bde4297f5039f7391",
"extension": "py",
"fi... | 2.765625 | stackv2 | from flask import Flask
app = Flask(__name__)
#This is home endpoint
@app.route('/')
def home():
return "Hello World Abinash"
#This is login endpoint
@app.route('/login')
def login():
return "This is Login page."
#This is contact endpoint
@app.route('/contact')
def contact():
return "This is Contact pa... | 28 | 17.04 | 38 | 8 | 127 | python | [{"finding_id": "codeql_py/flask-debug_ba260ab527602791_a0046109", "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)."
] | [
28,
24
] | [
null,
null
] | [
5,
12
] | [
35,
39
] | |
2024-11-18T19:18:19.603025+00:00 | 1,545,603,753,000 | 31c2932ecf4c856e79e0289fa2e4afdb7cac6d6b | 2 | {
"blob_id": "31c2932ecf4c856e79e0289fa2e4afdb7cac6d6b",
"branch_name": "refs/heads/master",
"committer_date": 1545603753000,
"content_id": "203258582a8169506e7b531dfe241552c9045e91",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6ac15ca5a1d43267dc1cbb3f6ca854cdc6b9e01d",
"extension": "py"... | 2.46875 | stackv2 | import requests
import hashlib
import json
import time
import datetime
import io
import json
import logging
import sys
from urllib.request import urlopen
#etekcitySwitch.py
#Version 1.0
#12/23/2018
#Author: @PROJECTSKYDROID
#Thanks to solarkennedy@github for initial research on plug devices.
# Define pseudo constant... | 285 | 42.2 | 177 | 22 | 2,822 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_3e3b2c7b136eb5b0_7be12fdb", "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-295"
] | [
"py/weak-sensitive-data-hashing",
"py/request-without-cert-validation"
] | [
"HIGH",
"MEDIUM"
] | [
"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... | [
64,
65
] | [
null,
null
] | [
87,
19
] | [
111,
91
] | |
2024-11-18T19:18:31.435306+00:00 | 1,527,621,963,000 | d9000c2f38a430ed53a998982ef957873a062d3c | 3 | {
"blob_id": "d9000c2f38a430ed53a998982ef957873a062d3c",
"branch_name": "refs/heads/master",
"committer_date": 1527621963000,
"content_id": "0d237ae3bc72b3a76bbff563a155ff342ea543ff",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3c98f88b1a250eb05c7ea29ea883e7d2249d2504",
"extension": "p... | 2.5625 | stackv2 | import os.path
import shutil
import tarfile
import tempfile
from .base import Command
from ..npm import Client
class Install(Command):
"""Download and install the vendored packages and their dependencies."""
def add_arguments(self, parser):
super().add_arguments(parser)
parser.add_argument('... | 52 | 39.17 | 82 | 17 | 406 | python | [{"finding_id": "codeql_py/tarslip_cead1faf191c5ba4_daf6a747", "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)."
] | [
48
] | [
null
] | [
21
] | [
24
] | |
2024-11-18T19:18:56.681191+00:00 | 1,560,943,653,000 | 5e0651893b7c8fccc06174657accf96ac3871636 | 2 | {
"blob_id": "5e0651893b7c8fccc06174657accf96ac3871636",
"branch_name": "refs/heads/master",
"committer_date": 1560943653000,
"content_id": "4da72f4841e58d5be9a295b2d051915e159e21dd",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4abf12f3dd784a5feb48f8adb22d725e775001b5",
"extension": "py"... | 2.375 | stackv2 | import time
import json
from oef.agents import OEFAgent
from oef.messages import PROPOSE_TYPES
from oef.query import *
from oef.schema import Description
from scooter_schema import *
class ApiAgent(OEFAgent):
#chargerList: List[Description]
#@property
#def chargers(self) -> List[Description]:
# r... | 95 | 34.08 | 141 | 18 | 829 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b05c19525d5f409b_9fdeffd3", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
53
] | [
null
] | [
19
] | [
47
] | |
2024-11-18T19:19:02.667430+00:00 | 1,569,750,561,000 | b619fbf3ac5c282b821ec47ab88f3f8d6d2e4dc9 | 3 | {
"blob_id": "b619fbf3ac5c282b821ec47ab88f3f8d6d2e4dc9",
"branch_name": "refs/heads/master",
"committer_date": 1569750561000,
"content_id": "384bcdeab34dd45d01d97931f1ba6cbed15059d6",
"detected_licenses": [
"MIT"
],
"directory_id": "bcfaa2ca4a0c65e4d8a465132b080a502b8eda51",
"extension": "py",
"fi... | 2.71875 | stackv2 | """this file contains code for accepting POST request and parse json values then call usecase methods"""
from rest_framework.response import Response
from rest_framework.views import APIView
from .usecase import *
class check(APIView):
def post(self, request, format=None):
"""
Accepts user re... | 48 | 39.94 | 140 | 17 | 416 | python | [{"finding_id": "codeql_py/stack-trace-exposure_746c085da7a913da_fadbf8a8", "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."
] | [
47
] | [
null
] | [
29
] | [
129
] | |
2024-11-18T19:19:12.513079+00:00 | 1,691,399,521,000 | 5dda7e33b39e1fef30cd24678f395c6ac90e6d11 | 3 | {
"blob_id": "5dda7e33b39e1fef30cd24678f395c6ac90e6d11",
"branch_name": "refs/heads/master",
"committer_date": 1691399521000,
"content_id": "c1fe3ee67df2e95a234b35e908ea2a7c6f924a20",
"detected_licenses": [
"MIT"
],
"directory_id": "6b5ffc003053d4aaacbf200c119cf2344c289da2",
"extension": "py",
"fi... | 2.59375 | stackv2 | """Module to trigger COS Bench workloads."""
import argparse
import json
import logging
import subprocess
import sys
from os.path import dirname, join
from tempfile import NamedTemporaryFile
from typing import Dict, Optional, Tuple
from jinja2 import Template
from yaml import safe_load
APP_DIR = "/opt/cosbench"
LOG =... | 269 | 28.14 | 88 | 16 | 1,822 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_800d40898dafff63_15b6c8a2", "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."
] | [
122
] | [
null
] | [
23
] | [
42
] | |
2024-11-18T19:19:15.363667+00:00 | 1,633,285,701,000 | 97501e625920c8be528efa0c15351ce8a52b3aac | 3 | {
"blob_id": "97501e625920c8be528efa0c15351ce8a52b3aac",
"branch_name": "refs/heads/main",
"committer_date": 1633285701000,
"content_id": "27ddd0dbf6b34172d5e54edcdc6d35b161793cc2",
"detected_licenses": [
"MIT"
],
"directory_id": "d132db6fcb17a223c79d8fafbb5fd512f5ed421d",
"extension": "py",
"file... | 3.484375 | stackv2 | class BookRentShop:
def __init__(self):
self.name = ""
self.mobile_number = 0
self.email = ""
self.bookList = {"In Search of Lost Time": 10,
"Ulysses": 10,
"Don Quixote": 10,
"The Grea... | 133 | 33.7 | 96 | 18 | 954 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8fbfe050df889d2a_63c2f82b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
77
] | [
null
] | [
19
] | [
58
] | |
2024-11-18T19:29:44.117431+00:00 | 1,601,468,554,000 | 07c54bb11b0f4b92f2a3403df45cbd3eed9846cf | 3 | {
"blob_id": "07c54bb11b0f4b92f2a3403df45cbd3eed9846cf",
"branch_name": "refs/heads/master",
"committer_date": 1601468554000,
"content_id": "67da719968aab2fab16a426ef79ca6f79216b179",
"detected_licenses": [
"MIT"
],
"directory_id": "0ddec47170a8c576521bc8f48f13b2b32653f56e",
"extension": "py",
"fi... | 2.59375 | stackv2 | from flask import Blueprint, render_template, request
from logging import getLogger
greeting = Blueprint("greeting", __name__, template_folder="templates")
logger = getLogger(__name__)
@greeting.route("/", methods=("GET", "POST"))
@greeting.route("/<string:greeting>", methods=("GET", "POST"))
def greeting_user(greet... | 20 | 30.6 | 72 | 13 | 142 | python | [{"finding_id": "codeql_py/log-injection_7079600db183baf3_4003a5e1", "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)."
] | [
16
] | [
null
] | [
36
] | [
45
] | |
2024-11-18T19:44:20.977359+00:00 | 1,670,903,231,000 | 6f4e5536e0a3dca4ad60e96a44c7fce3f70ef440 | 3 | {
"blob_id": "6f4e5536e0a3dca4ad60e96a44c7fce3f70ef440",
"branch_name": "refs/heads/master",
"committer_date": 1670903231000,
"content_id": "f42893d7f79ec01bcc9d6d8900d41504817b9a68",
"detected_licenses": [
"MIT"
],
"directory_id": "17c7f6328570b6bbc2a3993d0776026f511815b7",
"extension": "py",
"fi... | 3.21875 | stackv2 | # 1. Save this file as `app.py`
# 2. Make sure you have flask installed `pip install flask`
# 3. Run using `flask run -h localhost -p 5000`
"""
https://www.notion.so/Chat-Service-10e1966d9ad94950ad31fa0ba82d4b1e
"""
from flask import Flask, request
app = Flask(__name__)
name = "notion candidate"
class ChatService:
... | 117 | 25.46 | 79 | 14 | 786 | python | [{"finding_id": "codeql_py/stack-trace-exposure_101befd1ce76751c_66b5b8fb", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 4 | true | [
"CWE-209",
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)... | [
73,
57,
71,
117
] | [
null,
null,
null,
null
] | [
16,
12,
16,
12
] | [
38,
40,
28,
51
] | |
2024-11-18T19:58:06.355402+00:00 | 1,620,473,853,000 | 4d58a9f222805ebd9745622dd3b83f218f22d446 | 3 | {
"blob_id": "4d58a9f222805ebd9745622dd3b83f218f22d446",
"branch_name": "refs/heads/main",
"committer_date": 1620473853000,
"content_id": "d5fc59bc066ad41a27139261751866171cf709fc",
"detected_licenses": [
"MIT"
],
"directory_id": "6301be2ee51250763ad93a9716eafe83d25bea1d",
"extension": "py",
"file... | 2.875 | stackv2 | #importing 3rd party libraries
from flask import Flask,render_template,redirect,request,url_for,jsonify,make_response
import requests
import configparser
#API Configuration
def getApiKey():
config = configparser.ConfigParser()
config.read('config.ini')
return config['openweathermap']['api']
#Weather api fuction
d... | 72 | 25.14 | 110 | 11 | 456 | python | [{"finding_id": "codeql_py/flask-debug_af06d4cdad296b73_10ec3c20", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-918"
] | [
"py/flask-debug",
"py/partial-ssrf"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
72,
15
] | [
null,
null
] | [
2,
11
] | [
23,
32
] | |
2024-11-18T20:10:15.969971+00:00 | 1,413,613,218,000 | 3226e0966f42085f960872abd7b8a93677a0fc13 | 2 | {
"blob_id": "3226e0966f42085f960872abd7b8a93677a0fc13",
"branch_name": "refs/heads/master",
"committer_date": 1413613218000,
"content_id": "1ddba799dc7b3408221ea9e5ee9a4825f8a8a69b",
"detected_licenses": [
"MIT"
],
"directory_id": "e1e0b8366676c6d4f93bab7e3b2a089a29323456",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!coding:utf-8
import serial
import math
import pynmea2
from pyproj import Geod
import logging
class gpsparser(object):
def __init__(self, portname=None, baudrate=9600, goal=[[138.75665666666666, 35.68582166666667]], debugmode=False):
self.debugmode = debugmode
self.goal = goal
if portna... | 99 | 31.41 | 118 | 22 | 788 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_586073646d799f80_3eb3c1bc", "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."
] | [
56,
64
] | [
null,
null
] | [
22,
22
] | [
48,
49
] | |
2024-11-18T20:10:24.135913+00:00 | 1,585,472,454,000 | f264abb2d306fc943cbbf958b2f85c144575e671 | 3 | {
"blob_id": "f264abb2d306fc943cbbf958b2f85c144575e671",
"branch_name": "refs/heads/master",
"committer_date": 1585472454000,
"content_id": "e533e0c17875d4ec2366caff2fe340c2b0274b4f",
"detected_licenses": [
"MIT"
],
"directory_id": "da95fd868469535e8223059ddb69f9799b984b7a",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask, url_for
from customConverter import telConverter, ListConverter
app = Flask(__name__)
app.url_map.converters['tel'] = telConverter
app.url_map.converters['list'] = ListConverter
@app.route('/')
def hello_world():
print(url_for('posts', boards=['a', 'b']))
return 'Hello World!'
# TO... | 35 | 20.89 | 55 | 13 | 237 | python | [{"finding_id": "codeql_py/flask-debug_bbd3ee2b8dc49361_426105cf", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 4 | true | [
"CWE-215",
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a ... | [
35,
18,
24,
31
] | [
null,
null,
null,
null
] | [
5,
12,
12,
12
] | [
24,
40,
30,
33
] | |
2024-11-18T20:10:28.413204+00:00 | 1,520,141,150,000 | e3b431a68693f914ebb9b55c4465dd68786de5c8 | 3 | {
"blob_id": "e3b431a68693f914ebb9b55c4465dd68786de5c8",
"branch_name": "refs/heads/master",
"committer_date": 1520141150000,
"content_id": "13c79fcf9736bc6cec315b755d0eaf7b560bc61f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0836a0f7fc5c82562a0536da061a79862e89e509",
"extension": "py"... | 2.609375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Skyspark operation implementations.
"""
import fysom
import hmac
import base64
import hashlib
import re
from ....util import state
from ....util.asyncexc import AsynchronousException
class SkysparkAuthenticateOperation(state.HaystackOperation):
"""
An implem... | 196 | 34.25 | 107 | 15 | 1,473 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_76dd5986eefa5427_c38835f6", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 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 (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (id)](2) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](3) is used in a hashing algorithm (SHA1) th... | [
177,
181
] | [
null,
null
] | [
66,
19
] | [
73,
29
] | |
2024-11-18T20:10:32.563200+00:00 | 1,494,486,981,000 | f77525b33ae487a39f134aef2db009c15addb453 | 2 | {
"blob_id": "f77525b33ae487a39f134aef2db009c15addb453",
"branch_name": "refs/heads/master",
"committer_date": 1494486981000,
"content_id": "bce7f029d08beb0c3c80ba5894c3c3c1353bccaf",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e979fd31ed6e23859b81c9a6cbd288111a742a63",
"extension": "p... | 2.375 | stackv2 | import time
import json
import datetime
import pycurl
from ctypes import *
import math
import datetime as dt
from datetime import timedelta
import os.path
"""
Sample script reading a Davis Vantage Pro weather station data file and sending the latest weather measurements to the server.
Based on: http://www.wviewweather... | 204 | 35.79 | 126 | 18 | 1,936 | python | [{"finding_id": "codeql_py/request-without-cert-validation_4ff3677e96717840_332f572e", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2)."
] | [
193
] | [
null
] | [
17
] | [
46
] | |
2024-11-18T20:23:13.572075+00:00 | 1,528,307,269,000 | 7f7325c0655c56d7b8523f72bb735a185140eaee | 3 | {
"blob_id": "7f7325c0655c56d7b8523f72bb735a185140eaee",
"branch_name": "refs/heads/master",
"committer_date": 1528307269000,
"content_id": "04a604bd83089361a048eb202db0dc2bd1ae9425",
"detected_licenses": [
"MIT"
],
"directory_id": "ef506d4219c4037d8a2e5129550efaea0872d69b",
"extension": "py",
"fi... | 2.890625 | stackv2 | # coding:utf-8
# 一个基于Flask和SQLAlchemy+SQLite的极简记事本应用
from __future__ import unicode_literals
from flask import Flask,render_template,redirect,request,url_for
from flask_sqlalchemy import SQLAlchemy
import os
# 创建应用程序对象
app = Flask(__name__)
# 获取当前目录的绝对路径
basedir = os.path.abspath(os.path.dirname(__file__))
# sqlite数据库... | 115 | 23.63 | 89 | 15 | 808 | python | [{"finding_id": "codeql_py/flask-debug_8d70bbb07d71ecc8_0b4dc475", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-601"
] | [
"py/flask-debug",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
115,
93
] | [
null,
null
] | [
5,
25
] | [
26,
54
] | |
2024-11-18T20:23:24.423729+00:00 | 1,693,195,417,000 | 496ed1bfa6833b13688851a6dbe5407d6518f1c8 | 2 | {
"blob_id": "496ed1bfa6833b13688851a6dbe5407d6518f1c8",
"branch_name": "refs/heads/master",
"committer_date": 1693195417000,
"content_id": "351986b2db0ccd6becd25cf0aae7563602503b56",
"detected_licenses": [
"MIT"
],
"directory_id": "deda1742a61225a8c7ecd1833ec388f72d8bcc4f",
"extension": "py",
"fi... | 2.46875 | stackv2 | from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from .. import db
class User(UserMixin, db.Model):
__tablename__ = 'user'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(40), unique=True, index=True)
password_has... | 55 | 28.69 | 78 | 13 | 368 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5e4fec692e05dfdf_f789c2e9", "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."
] | [
25
] | [
null
] | [
15
] | [
23
] | |
2024-11-18T20:49:22.166913+00:00 | 1,525,802,055,000 | c1f8e77b03b6ef79de0610f06e03d2ba09603f1b | 3 | {
"blob_id": "c1f8e77b03b6ef79de0610f06e03d2ba09603f1b",
"branch_name": "refs/heads/master",
"committer_date": 1525802055000,
"content_id": "b652983e5b83f66cd4b7de3a6f00b8b7bc7680b8",
"detected_licenses": [
"MIT"
],
"directory_id": "dcb57598b4b7f9fb7a25f847574b227824b5420c",
"extension": "py",
"fi... | 2.578125 | stackv2 | from flask import request, jsonify
from sqlalchemy.exc import SQLAlchemyError
from web.helpers import PaginationHelper
from web.models import Client, ClientSchema
from web.resources import AuthRequiredResource
from web.status import status
from web.db import db
client_schema = ClientSchema()
class ClientResource(A... | 221 | 30.13 | 80 | 18 | 1,359 | python | [{"finding_id": "codeql_py/stack-trace-exposure_8d61d07be629ff36_dae6eab8", "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."
] | [
127
] | [
null
] | [
28
] | [
45
] | |
2024-11-18T20:49:56.797230+00:00 | 1,547,011,081,000 | 938da671683adb410da360e515908356db7154e6 | 3 | {
"blob_id": "938da671683adb410da360e515908356db7154e6",
"branch_name": "refs/heads/master",
"committer_date": 1547011081000,
"content_id": "8fadde1c329c9592f931de23d8bad97ac5ff1cfe",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a04b40d1eb1c639a8e7cd1bbd0a40fa64e38fa9d",
"extension": "py"... | 3.03125 | stackv2 | import requests
# Name Fake API Endpoint to retrieve generated identities
name_fake_base_url = 'https://api.namefake.com/random/random'
def get_fake_identity_json():
return (requests.get(name_fake_base_url, verify=False)).json()
class FakeAccount:
def __init__(self, fake_identity_json):
self.first_... | 32 | 30.44 | 88 | 17 | 232 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_05a8c4c8eadb026d_e7e2930d", "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... | 3 | true | [
"CWE-312",
"CWE-295",
"CWE-295"
] | [
"py/clear-text-logging-sensitive-data",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
22,
8,
26
] | [
null,
null,
null
] | [
29,
13,
9
] | [
47,
59,
55
] | |
2024-11-18T20:50:05.275857+00:00 | 1,674,229,270,000 | 994492ff74f174704843676965676ad7b7c5e599 | 3 | {
"blob_id": "994492ff74f174704843676965676ad7b7c5e599",
"branch_name": "refs/heads/master",
"committer_date": 1674229270000,
"content_id": "ea15f17e5fc320fb220cfedd9875b0520b0fa93d",
"detected_licenses": [
"MIT"
],
"directory_id": "aee6f39d43676eac2bc1e532229ae364645ded76",
"extension": "py",
"fi... | 2.671875 | stackv2 | #!/usr/bin/env python
import os
import stat
import threading
import time
from sys import exit
try:
from flask import Flask, render_template
except ImportError:
exit("This script requires the flask module\nInstall with: sudo pip install flask")
import unicornhathd
PORT = 8000
unicornhathd.rotation(0)
width... | 108 | 25.16 | 136 | 14 | 802 | python | [{"finding_id": "codeql_py/flask-debug_3363c90fb379d064_9e913971", "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-022",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection",
"py/path-injection"
] | [
"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.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
108,
59,
80
] | [
null,
null,
null
] | [
5,
21,
18
] | [
51,
48,
45
] | |
2024-11-18T20:50:08.465798+00:00 | 1,678,409,671,000 | 35abdc79653a0f6d9a0c96ec381f7a94b714df4d | 3 | {
"blob_id": "35abdc79653a0f6d9a0c96ec381f7a94b714df4d",
"branch_name": "refs/heads/master",
"committer_date": 1678409671000,
"content_id": "6add0ad7115a4655883582bae8d8be2dcf9a1e69",
"detected_licenses": [
"MIT"
],
"directory_id": "f1699a142192bdc833050acfbe262a2aaffcdbbe",
"extension": "py",
"fi... | 2.640625 | stackv2 | # -*- coding: utf-8 -*-
"""
:author: Grey Li (李辉)
:url: http://greyli.com
:copyright: © 2018 Grey Li
:license: MIT, see LICENSE for more details.
"""
import os
try:
from urlparse import urlparse, urljoin
except ImportError:
from urllib.parse import urlparse, urljoin
from jinja2 import escape
fr... | 220 | 23.05 | 95 | 15 | 1,351 | python | [{"finding_id": "codeql_py/cookie-injection_3f8f24de4ec90efb_11364a99", "tool_name": "codeql", "rule_id": "py/cookie-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cookie is constructed from a [user-supplied input](1).", "remediation": "", "location": {"file_path": "... | 2 | true | [
"CWE-020",
"CWE-601"
] | [
"py/cookie-injection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cookie is constructed from a [user-supplied input](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
132,
219
] | [
null,
null
] | [
33,
29
] | [
37,
35
] | |
2024-11-18T20:50:08.762237+00:00 | 1,425,185,374,000 | 4ae36880e294fc15437f7f9e5f18cf6235641485 | 2 | {
"blob_id": "4ae36880e294fc15437f7f9e5f18cf6235641485",
"branch_name": "refs/heads/master",
"committer_date": 1425185374000,
"content_id": "79a54c5b16cb5b718806e23c0229dd018c4073e2",
"detected_licenses": [
"MIT"
],
"directory_id": "8c77ae9b81f880f72abf49176aa745cfd4b03ba8",
"extension": "py",
"fi... | 2.40625 | stackv2 | """Amazon Simple Storage Service (S3) datastore.
.. note::
**Installation**: Use of this module requires the open source boto_
package.
.. _boto: http://code.google.com/p/boto/
"""
import base64
import datetime
import hashlib
import hmac
import json
from cloud_browser.cloud import boto_base as base
from clou... | 134 | 32.62 | 79 | 14 | 871 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_c50138dea6ac093a_5de34b2d", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure.\... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](3) is used in a hashing algorithm (SHA1) that is insecure."
] | [
92
] | [
null
] | [
39
] | [
45
] | |
2024-11-18T20:50:27.786758+00:00 | 1,529,829,963,000 | c6e6c58a5cb2ce845964d0692060182334e65e2e | 3 | {
"blob_id": "c6e6c58a5cb2ce845964d0692060182334e65e2e",
"branch_name": "refs/heads/master",
"committer_date": 1529829963000,
"content_id": "ba1a8e5a1cb8be5248723935e97a4a5341f70ede",
"detected_licenses": [
"MIT"
],
"directory_id": "3dec6182f69867370a06fecb7820aac74c76e016",
"extension": "py",
"fi... | 2.71875 | stackv2 | import json
import urllib.request as urllib2
import unicodedata
import string
from flask import Flask, render_template, request
from bs4 import BeautifulSoup
app = Flask(__name__)
class RemoveStrangeStuff:
@staticmethod
def remove_accents(data):
return ''.join(x for x in unicodedata.normalize('NFKD'... | 53 | 25.32 | 95 | 18 | 338 | python | [{"finding_id": "codeql_py/partial-ssrf_8e4c787827f3fa97_c3cfb894", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 2 | true | [
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
20,
24
] | [
null,
null
] | [
20,
25
] | [
79,
45
] | |
2024-11-18T20:50:34.943776+00:00 | 1,634,636,710,000 | 95a6b071237fb9255899a90908b2cee67245f75b | 3 | {
"blob_id": "95a6b071237fb9255899a90908b2cee67245f75b",
"branch_name": "refs/heads/master",
"committer_date": 1634636710000,
"content_id": "e7a07c1c2e4d8f3ac065ef3d876e52431b0aba91",
"detected_licenses": [
"MIT"
],
"directory_id": "389b893f1a926c687f9b82513e7bd099d6eb0d21",
"extension": "py",
"fi... | 3.171875 | stackv2 | #pip install requests hgtk
import requests, hgtk, random
#이미 있는 단어 알기위해 단어목록 저장
history = []
playing = True
#키 발급은 https://krdict.korean.go.kr/openApi/openApiInfo
apikey = ''
#좀 치사한 한방단어 방지 목록
blacklist = ['즘', '틱', '늄', '슘', '퓸', '늬', '뺌', '섯', '숍', '튼', '름', '늠', '쁨']
#지정한 두 개의 문자열 사이의 문자열을 리턴하는 함수
#string list에서 ... | 186 | 30.1 | 148 | 25 | 1,795 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e105f036f12cd634_dcdc4147", "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.", ... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensi... | [
116,
127,
181,
181,
147
] | [
null,
null,
null,
null,
null
] | [
27,
31,
31,
40,
31
] | [
60,
60,
38,
58,
92
] | |
2024-11-18T20:50:38.027396+00:00 | 1,596,549,869,000 | 0f44508fd5ad5878cf78bcdd175e1957f3322908 | 4 | {
"blob_id": "0f44508fd5ad5878cf78bcdd175e1957f3322908",
"branch_name": "refs/heads/master",
"committer_date": 1596549869000,
"content_id": "1b425d9fda9eceec3e87447f8d63d63c0f0226ff",
"detected_licenses": [
"MIT"
],
"directory_id": "61b773f9b489fe16a06d16bf140aadc1abc07a5b",
"extension": "py",
"fi... | 4.125 | stackv2 | #Done by Carlos Amaral in 07/07/2020
"""
An administrator is a special kind of user. Write a class called
Admin that inherits from the User class you wrote in Exercise 9-3 (page 162)
or Exercise 9-5 (page 167). Add an attribute, privileges , that stores a list
of strings like "can add post" , "can delete post" , "can ... | 63 | 32.54 | 80 | 13 | 513 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fea0f560b4212e24_fba5cf1e", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text."
] | [
28
] | [
31
] | [
15
] | [
41
] | |
2024-11-18T20:50:45.116757+00:00 | 1,482,881,927,000 | f948b5eed878fb86f669cd5ab63b6850f8b9fac2 | 2 | {
"blob_id": "f948b5eed878fb86f669cd5ab63b6850f8b9fac2",
"branch_name": "refs/heads/master",
"committer_date": 1482881927000,
"content_id": "ee64264fa5fab1218d6a3efc704cd8c22d058424",
"detected_licenses": [
"MIT"
],
"directory_id": "014fa1aaa424ae7d14bdd80d416973a1f8d1be91",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import getopt
import hashlib
import requests
import os
import time
import threading
import re
from xml.etree import ElementTree as et
from collections import OrderedDict
from getpass import getpass
class Item(threading.Thread):
def __init__(self):
threading.Th... | 393 | 26.59 | 163 | 21 | 3,325 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_3f222adc1ca74656_6481adda", "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... | 3 | true | [
"CWE-327",
"CWE-295",
"CWE-295"
] | [
"py/weak-sensitive-data-hashing",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"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... | [
83,
45,
52
] | [
null,
null,
null
] | [
31,
7,
8
] | [
55,
78,
103
] | |
2024-11-18T20:50:58.095318+00:00 | 1,590,942,081,000 | 06085a63a6b42bac993be71c5dea3cc12e649067 | 3 | {
"blob_id": "06085a63a6b42bac993be71c5dea3cc12e649067",
"branch_name": "refs/heads/master",
"committer_date": 1590942081000,
"content_id": "aa74a12ab3539fab6cd1dcd61eb13ef23d88d190",
"detected_licenses": [
"MIT"
],
"directory_id": "8b93cc26bea43ccac236dcd57fc2e3e4ef3eeb1c",
"extension": "py",
"fi... | 2.53125 | stackv2 | import os, json, requests, logging
from flask import Flask, Response, jsonify, request
def read_config(section, name=None, environment_variable=None, default=None, config_file_path='../../augur.config.json', no_config_file=0, use_main_config=0):
"""
Read a variable in specified section of the config file, unle... | 86 | 36.02 | 168 | 17 | 685 | python | [{"finding_id": "codeql_py/log-injection_dadd6ece950b63f4_d96dc83d", "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)."
] | [
62
] | [
null
] | [
26
] | [
81
] | |
2024-11-18T20:51:13.261997+00:00 | 1,630,794,050,000 | b8a306a6117f003bde8eaaaea98e52495fd2ea3f | 2 | {
"blob_id": "b8a306a6117f003bde8eaaaea98e52495fd2ea3f",
"branch_name": "refs/heads/main",
"committer_date": 1630794050000,
"content_id": "018dcabd604d3a2ac249ec1a40d928056c4aee71",
"detected_licenses": [
"MIT"
],
"directory_id": "e6e02688ad299f59bc4a06d2372d7c15df80ca7f",
"extension": "py",
"file... | 2.4375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 26 21:15:49 2021
@author: niravshah
"""
import requests, json
import pandas as pd
import time
from datetime import datetime
from collections import defaultdict
import time
from app.models import stocks
import pathlib
root_path = str(pathlib.Path(__... | 120 | 31.53 | 166 | 17 | 1,096 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_82042e57e3a8269d_51a018ef", "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."
] | [
77
] | [
null
] | [
32
] | [
35
] | |
2024-11-18T20:51:17.223805+00:00 | 1,612,550,447,000 | 6832cd58145be2c6a2b4cec9fbd82f1356574601 | 3 | {
"blob_id": "6832cd58145be2c6a2b4cec9fbd82f1356574601",
"branch_name": "refs/heads/master",
"committer_date": 1612550447000,
"content_id": "8d34ec60c344ab05e36b1594e67c908244e3b033",
"detected_licenses": [
"MIT"
],
"directory_id": "63db3d61afa68328a5021c72bc5788863255ad92",
"extension": "py",
"fi... | 2.703125 | stackv2 | """Contains the routes involved in the authentication process.
"""
from flask import render_template, flash, redirect, url_for, request
from werkzeug.urls import url_parse
from app.auth.forms import LoginForm, RegistrationForm
from app.auth import bp
from flask_login import current_user, login_user, login_required, lo... | 70 | 35.56 | 79 | 16 | 546 | python | [{"finding_id": "codeql_py/url-redirection_5cc80ceef61b6ed3_4fa047b6", "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)."
] | [
55
] | [
null
] | [
29
] | [
38
] | |
2024-11-18T21:13:54.997402+00:00 | 1,478,569,551,000 | ab9207a3785b7b016f947c675bb6f442e0159095 | 3 | {
"blob_id": "ab9207a3785b7b016f947c675bb6f442e0159095",
"branch_name": "refs/heads/master",
"committer_date": 1478569551000,
"content_id": "3fd1e8f1ed203cbbc4023c305b6994a109a6f2c9",
"detected_licenses": [
"MIT"
],
"directory_id": "cf096263efa32aebe096049ec5726e2468daec25",
"extension": "py",
"fi... | 2.609375 | stackv2 | import os
import logging
from logging import Formatter, FileHandler
from flask import Flask, request, jsonify, render_template, send_from_directory
from ocr import process_image, process_image_file_jpg, process_image_file_png
app = Flask(__name__)
_VERSION = 1 # API version
APP_ROOT = os.path.dirname(os.path.abspat... | 80 | 30.21 | 84 | 16 | 587 | python | [{"finding_id": "codeql_py/path-injection_1606f29ea188738b_376c8299", "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)."
] | [
46
] | [
null
] | [
17
] | [
28
] | |
2024-11-18T21:13:56.000473+00:00 | 1,568,618,821,000 | 9a2e70149e7fb4891a73f72ea460506ba88f2f88 | 3 | {
"blob_id": "9a2e70149e7fb4891a73f72ea460506ba88f2f88",
"branch_name": "refs/heads/master",
"committer_date": 1568618821000,
"content_id": "f4dcd0a20e095804bdd61ca9ed714469d2b51f75",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "46c264370ffbfa94d9803731544f517a950ebaeb",
"extension": "py"... | 2.6875 | stackv2 | from flask import Flask, Response, request, send_file, abort
import json
import sqlite3
import os
import uuid
app = Flask('FileService')
#create upload folder if not exists
storageDir = "storage"
if not os.path.exists(storageDir):
os.mkdir(storageDir)
app = Flask('FileService')
@app.route('/')
def index():
... | 50 | 25.56 | 95 | 11 | 360 | python | [{"finding_id": "codeql_py/flask-debug_312b1e5a4275235e_0805562d", "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-022",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection",
"py/path-injection"
] | [
"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.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
50,
45,
46
] | [
null,
null,
null
] | [
null,
23,
26
] | [
47,
31,
34
] | |
2024-11-18T21:13:56.195939+00:00 | 1,684,287,966,000 | 184656c07510ffdb4505cb4011be5ad1c891d97d | 3 | {
"blob_id": "184656c07510ffdb4505cb4011be5ad1c891d97d",
"branch_name": "refs/heads/master",
"committer_date": 1684287966000,
"content_id": "4ca0107e824572d1ca02ade7a52839092c96b0e5",
"detected_licenses": [
"MIT"
],
"directory_id": "be4a287e48ef2c58d0036788128de837a0d99bf3",
"extension": "py",
"fi... | 2.9375 | stackv2 | #!/usr/bin/env python
'''
ApiClient to manage the GET/POST of API requests
Specifically for use with the Nutanix v3 REST APIs
'''
import sys
try:
import urllib3
import requests
from requests.auth import HTTPBasicAuth
except ModuleNotFoundError as error:
# Output expected ImportErrors.
print(f'''
... | 147 | 37.88 | 77 | 24 | 1,091 | python | [{"finding_id": "codeql_py/request-without-cert-validation_33d26092bb6297cd_cce01286", "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)."
] | [
75,
84
] | [
82,
90
] | [
31,
31
] | [
18,
18
] | |
2024-11-18T21:13:59.036156+00:00 | 1,542,046,107,000 | 50eecfa252ffa6caf26352638304cbed7b1ce63d | 2 | {
"blob_id": "50eecfa252ffa6caf26352638304cbed7b1ce63d",
"branch_name": "refs/heads/master",
"committer_date": 1542046107000,
"content_id": "b002a3ab9ce238df9f10b659463cb528d2b7873b",
"detected_licenses": [
"MIT"
],
"directory_id": "7606c363ae07efaae7b04f400a5e9ea43b991172",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python
import app_config
import copytext
import boto
import logging
from boto.s3.connection import OrdinaryCallingFormat
from fabric.api import local, task
from jinja2 import Environment, FileSystemLoader
logging.basicConfig(format=app_config.LOG_FORMAT)
logger = logging.getLogger(__name__)
logger.se... | 97 | 26.76 | 133 | 16 | 622 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_77e232291ecf6f35_74063c86", "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."
] | [
75,
90
] | [
null,
null
] | [
11,
11
] | [
73,
73
] | |
2024-11-18T21:14:01.067676+00:00 | 1,628,553,053,000 | cc23d8c6f8e6a7adc30e3e70b9b6afdcc1b98576 | 2 | {
"blob_id": "cc23d8c6f8e6a7adc30e3e70b9b6afdcc1b98576",
"branch_name": "refs/heads/main",
"committer_date": 1628553053000,
"content_id": "f5e866999d4d0531a9acda520de9b6456aba6d40",
"detected_licenses": [
"MIT"
],
"directory_id": "5d12738f6db6a4bf8eb89ee5789e0e59c7aa47ea",
"extension": "py",
"file... | 2.375 | stackv2 | import json
import requests
from kakao.common import close
from kakao.cookie import load_cookie_from_chrome
from kakao.request import headers_vaccine
# 쿠키를 통해 사용자의 정보를 불러오는 함수
def check_user_info_loaded(jar):
user_info_api = 'https://vaccine.kakao.com/api/v1/user'
user_info_response = requests.get(user_info... | 45 | 39.07 | 104 | 17 | 557 | python | [{"finding_id": "codeql_py/request-without-cert-validation_cbdb709d3a5d4971_61aea640", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
13
] | [
null
] | [
26
] | [
105
] | |
2024-11-18T21:14:08.613788+00:00 | 1,410,218,479,000 | d9cab778be8d66fc82c96dbdf64fed6bcb0bbc91 | 2 | {
"blob_id": "d9cab778be8d66fc82c96dbdf64fed6bcb0bbc91",
"branch_name": "refs/heads/master",
"committer_date": 1410218479000,
"content_id": "00663932a72f194ee0f6a2788a2dd47d3ed339b6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8a2d7ade1d966af00b6700fd0f801af501795cd2",
"extension": "p... | 2.4375 | stackv2 | import json
import os
import requests
from time import sleep
from urllib import quote
BUILDER_URL=os.environ.get('BUILDER_URL')
BUILDER_KEY=os.environ.get('BUILDER_KEY')
BUILD_NAME=os.environ.get('BUILD_NAME')
BUILD_NAME=os.environ.get('BUILD_NAME')
BUILD_COMMIT=os.environ.get('BUILD_COMMIT')
BUILD_WORKSPACE=os.enviro... | 46 | 32.54 | 161 | 12 | 380 | python | [{"finding_id": "codeql_py/request-without-cert-validation_65821105c4aa4f7a_aa0487f9", "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)."
] | [
14,
19
] | [
null,
null
] | [
8,
12
] | [
162,
50
] | |
2024-11-18T21:14:20.964957+00:00 | 1,693,653,473,000 | ba4c51e8c294bc46335275ae1e70fe1b49e95d1e | 3 | {
"blob_id": "ba4c51e8c294bc46335275ae1e70fe1b49e95d1e",
"branch_name": "refs/heads/master",
"committer_date": 1693653473000,
"content_id": "d6def95407b5c8fdca21906b33bfd5b5c6aca93c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e92bcb90e3bfb4b6076cd9deffc3e67c9770f122",
"extension": "p... | 2.640625 | stackv2 | #!/usr/local/python3
#
# Created by LapinFou.
# https://forums.sabnzbd.org/viewtopic.php?f=9&p=122338
#
# date | version | comment
#---------------------------------------
# 2020-09-13 | 1.0 | Initial version
# 2020-09-19 | 1.1 | Code clean-up
# 2020-09-25 | 1.2 | Removed 7zip recursive unpack opt... | 138 | 34.42 | 103 | 16 | 1,245 | python | [{"finding_id": "codeql_py/overly-permissive-file_b28e9ef7473a4885_05d72717", "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."
] | [
90
] | [
null
] | [
9
] | [
42
] | |
2024-11-18T20:10:43.049100+00:00 | 1,444,985,445,000 | 8521feacddec20a43f2c173e89d6cf4eae3ae375 | 3 | {
"blob_id": "8521feacddec20a43f2c173e89d6cf4eae3ae375",
"branch_name": "refs/heads/master",
"committer_date": 1444985445000,
"content_id": "7980525d6442c672284be2b1f74c4fec9b2c308b",
"detected_licenses": [
"MIT"
],
"directory_id": "6d4ab658c4a31b24435e6ad9912ba05ec41316ee",
"extension": "py",
"fi... | 2.609375 | stackv2 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : 'Victor'
# E-mail : linxianwusx@gmail.com
# Date : '2015/10/11'
# Version : 0.3
#
import Queue
import ConfigParser
import os
import requests
import threading
import cchardet
import re
import sqlite3 as sq
import time
import jsonpickle
NUM = 0
mutex... | 296 | 31.36 | 149 | 19 | 2,255 | python | [{"finding_id": "codeql_py/request-without-cert-validation_26a5ee81a23365c5_610510f4", "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
] | [
102
] | [
24
] | [
89
] | |
2024-11-18T20:48:06.733754+00:00 | 1,692,088,724,000 | 8237905bbaf1a329d84e16bb787131ddf8040988 | 3 | {
"blob_id": "8237905bbaf1a329d84e16bb787131ddf8040988",
"branch_name": "refs/heads/main",
"committer_date": 1692088724000,
"content_id": "411b671f47eeda688e4ba0b1e1aa3c0232d8d034",
"detected_licenses": [
"MIT"
],
"directory_id": "c80d0926964a49d9b136f4d591cd220c54a5ef6b",
"extension": "py",
"file... | 2.625 | stackv2 | """
Wraps leaflet TileLayer, WmsTileLayer (TileLayer.WMS), ImageOverlay, and VideoOverlay
"""
from typing import TYPE_CHECKING, Any, Callable, Optional, Union
from branca.element import Element, Figure
from jinja2 import Environment, PackageLoader, Template
from folium.map import Layer
from folium.utilities import (... | 426 | 34.45 | 94 | 18 | 3,413 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_239cad92e7ca8fe1_e1e2a689", "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... | 5 | true | [
"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"
] | [
"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... | [
81,
200,
290,
389,
23
] | [
90,
209,
300,
399,
null
] | [
17,
17,
17,
17,
7
] | [
6,
6,
6,
6,
63
] | |
2024-11-18T20:48:10.734013+00:00 | 1,606,850,463,000 | 9251f855c705cc86aa0db3b86e186516e8934a5c | 2 | {
"blob_id": "9251f855c705cc86aa0db3b86e186516e8934a5c",
"branch_name": "refs/heads/master",
"committer_date": 1606850463000,
"content_id": "022f04a67ef2125aa155fc1c656083a4ad31907a",
"detected_licenses": [
"MIT"
],
"directory_id": "3048e2b89bd09cd8c8ef591bb18ba66f666bdf77",
"extension": "py",
"fi... | 2.46875 | stackv2 | import socket
import ssl
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.verify_mode = ssl.CERT_REQUIRED
context.check_hostname = True
context.load_default_certs()
server = "www.google.com"
port = 443
server_ip = socket.gethostbyname(server)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock = contex... | 26 | 22.81 | 56 | 9 | 161 | python | [{"finding_id": "codeql_py/insecure-protocol_df4aa8a92ede5792_47730ed7", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1).", "remediation": "", "lo... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)."
] | [
4
] | [
null
] | [
11
] | [
45
] | |
2024-11-18T20:48:13.999199+00:00 | 1,609,854,300,000 | c7af49765065c3629e6315def8175b7b9b2a6615 | 4 | {
"blob_id": "c7af49765065c3629e6315def8175b7b9b2a6615",
"branch_name": "refs/heads/main",
"committer_date": 1609854300000,
"content_id": "9e106c690dc30062487acd9192502bcfb62e683d",
"detected_licenses": [
"MIT"
],
"directory_id": "90eac602851f5196e53985ca046536f269b74417",
"extension": "py",
"file... | 3.984375 | stackv2 | """
Szyfrowanie tekstu przy pomocy algorytmu RSA.
Autor: Michał Degowski
Źródło algorytmu szyfrującego: https://pypi.org/project/rsa/
"""
import rsa
import timeit
def encrypt_RSA(message, pub):
""" Encrypting message using RSA in CBC Mode """
return rsa.encrypt(message, pub)
def decrypt_RSA(message, priv):
... | 39 | 27.46 | 85 | 10 | 291 | python | [{"finding_id": "codeql_py/weak-crypto-key_9cb84419f628a118_db02fbc5", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [512](1) bits, which is below 2048 and considered breakable.", "remediation": "", ... | 1 | true | [
"CWE-326"
] | [
"py/weak-crypto-key"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Creation of an RSA key uses [512](1) bits, which is below 2048 and considered breakable."
] | [
24
] | [
null
] | [
19
] | [
35
] | |
2024-11-18T20:48:22.260848+00:00 | 1,614,003,890,000 | 5050b5fc787dc29a5bd79dc97974ac8cf59f49fa | 2 | {
"blob_id": "5050b5fc787dc29a5bd79dc97974ac8cf59f49fa",
"branch_name": "refs/heads/main",
"committer_date": 1614003890000,
"content_id": "32b0cf7be11e1319dac7e85f08dfb5c4c547dc71",
"detected_licenses": [
"MIT"
],
"directory_id": "f3e3a204ed1976322a853de0a14f9e278654cdc1",
"extension": "py",
"file... | 2.484375 | stackv2 | from rest_framework.response import Response
from rest_framework import status
from rest_framework.views import APIView
from django.http import Http404
from game.models import Game
from game.serializers import GameSerializer
class GameAPIView(APIView):
def get(self, request):
game = Game.objects.all()
... | 91 | 31.41 | 78 | 15 | 611 | python | [{"finding_id": "codeql_py/stack-trace-exposure_bbae21a5186ab778_e678ac4b", "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."
] | [
63,
69
] | [
null,
null
] | [
29,
29
] | [
36,
36
] | |
2024-11-18T20:48:31.254944+00:00 | 1,490,206,635,000 | 25135387027367d0f08833103ab88bd4084dba49 | 3 | {
"blob_id": "25135387027367d0f08833103ab88bd4084dba49",
"branch_name": "refs/heads/master",
"committer_date": 1490209430000,
"content_id": "48fbb54bf4740e73a5f281a635c02046404bcdb1",
"detected_licenses": [
"MIT"
],
"directory_id": "7239a5284d02f8ba1e0bedf41804b5814bdd5b26",
"extension": "py",
"fi... | 2.671875 | stackv2 | from collections import OrderedDict
from os.path import dirname, join
from re import sub
from docutils.parsers.rst import Parser as RstParser
from docutils.statemachine import StringList
from docutils.utils import new_document
from jinja2 import Environment, PackageLoader
from six import iteritems
from sphinx.ext.auto... | 252 | 38.68 | 111 | 19 | 2,162 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d47f071150daf8e4_a1099421", "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."
] | [
86
] | [
null
] | [
15
] | [
74
] | |
2024-11-18T20:48:32.350092+00:00 | 1,499,990,955,000 | 1c0db23e00fc67f9007469eb1230696e24a0dff4 | 4 | {
"blob_id": "1c0db23e00fc67f9007469eb1230696e24a0dff4",
"branch_name": "refs/heads/master",
"committer_date": 1499990955000,
"content_id": "03b6dbe6a901292bda139e999af2f4824e0ef2e5",
"detected_licenses": [
"MIT"
],
"directory_id": "53b47a16a1ae260ce74327b7f12b8d84f7884937",
"extension": "py",
"fi... | 3.953125 | stackv2 | '''
Lista 3 - Exercício 2
Faça um programa que leia um nome de usuário e a sua senha e não aceite a senha igual ao
nome do usuário, mostrando uma mensagem de erro e voltando a pedir as informações.
Felipe Nogueira de Souza
Twitter: @_outrofelipe
'''
user = input("Digite um nome de usuário: ")
password = input("Digite ... | 18 | 30.5 | 88 | 9 | 149 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8089198d7ddda525_47b8c798", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
18
] | [
null
] | [
19
] | [
27
] | |
2024-11-18T20:48:34.033707+00:00 | 1,531,175,999,000 | fa55f2df7ebc510b18bc70944d75a79d22d50751 | 2 | {
"blob_id": "fa55f2df7ebc510b18bc70944d75a79d22d50751",
"branch_name": "refs/heads/master",
"committer_date": 1531175999000,
"content_id": "0c9c9126eead8bf93cca468501be4461dd65e29c",
"detected_licenses": [
"MIT"
],
"directory_id": "8449f268bfe0140f520ce231b0799d070ba09936",
"extension": "py",
"fi... | 2.40625 | stackv2 | from os import urandom
import hashlib
from pymongo import MongoClient
import json
user = input("Enter username:")
password = input("Enter password:")
salt = urandom(16).hex().upper()
pass_hash = hashlib.sha256(
str(password + salt).encode('utf-8')).hexdigest()
try:
with open('config.json') as fs:
... | 22 | 24.23 | 99 | 13 | 139 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_5583b6ea0f8ff73f_9e0e7a32", "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."
] | [
11
] | [
null
] | [
13
] | [
49
] | |
2024-11-18T21:11:32.439252+00:00 | 1,551,710,783,000 | cd771dfd3fa8ba41c1b01323b0b3bb0e5b1b37df | 3 | {
"blob_id": "cd771dfd3fa8ba41c1b01323b0b3bb0e5b1b37df",
"branch_name": "refs/heads/master",
"committer_date": 1551710783000,
"content_id": "88d3e30e75ecd721ce20e9c896ae24565e9f62da",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "17a83b2723108332ac3af37ae07b502a8a8e1ac5",
"extension": "py"... | 3.0625 | stackv2 | #!/usr/bin/env python
# encoding: utf-8
"""
@version: v1.0
@author: xag
@license: Apache Licence
@contact: xinganguo@gmail.com
@site: http://www.xingag.top
@software: PyCharm
@file: spider_boss.py
@time: 2018/10/12 10:17
@description:使用selenium爬取boss直聘网并写入到csv文件中
"""
from selenium import webdriver
import re
from lxml... | 186 | 23.72 | 119 | 16 | 1,258 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_80d8ace6b6ac64b6_9d236680", "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."
] | [
186
] | [
null
] | [
11
] | [
27
] | |
2024-11-18T21:11:39.483147+00:00 | 1,535,629,541,000 | 8694150f25fa54907ad5daaa5371e80fbe10e2de | 2 | {
"blob_id": "8694150f25fa54907ad5daaa5371e80fbe10e2de",
"branch_name": "refs/heads/master",
"committer_date": 1535629541000,
"content_id": "89bc6896619b6d96d92b3404159b5ae148203e17",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "37baccd75c504f8a12069b0cbe002a1f1dbd4f36",
"exten... | 2.5 | stackv2 | """ACME Identifier Validation Challenges."""
import binascii
import functools
import hashlib
import logging
import os
import socket
from cryptography.hazmat.backends import default_backend
from cryptography import x509
import OpenSSL
import requests
from acme import errors
from acme import crypto_util
from acme impor... | 454 | 29.75 | 84 | 15 | 3,287 | python | [{"finding_id": "codeql_py/request-without-cert-validation_dccaba70b8a0c242_c1a705b4", "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)."
] | [
144
] | [
null
] | [
29
] | [
60
] | |
2024-11-18T21:25:55.925625+00:00 | 1,616,434,291,000 | ae60a5665ce2470f5a30c218b00c64b42523ad20 | 3 | {
"blob_id": "ae60a5665ce2470f5a30c218b00c64b42523ad20",
"branch_name": "refs/heads/master",
"committer_date": 1616434291000,
"content_id": "3c8f75b3a6713838785f8ff7ec1c0832fdaec014",
"detected_licenses": [
"MIT"
],
"directory_id": "28d34f7fc1f5278c21842573399946a5d37e401c",
"extension": "py",
"fi... | 2.953125 | stackv2 | import sys
import logging
import uuid
from database.AuthSchema import Auth
LOG_FORMAT = "%(levelname)s %(asctime)s %(message)s"
logging.basicConfig(
filename="./logs/api-credentials.log",
level=logging.INFO,
format=LOG_FORMAT,
)
logger = logging.getLogger()
def create_api_credentials():
client_email... | 44 | 21.36 | 70 | 10 | 207 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_20d453dd43a58245_4677d3c9", "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."
] | [
21
] | [
28
] | [
9
] | [
12
] | |
2024-11-18T21:26:05.931884+00:00 | 1,513,866,932,000 | a7fb8facca39faada099533a06834a1ac5be8544 | 2 | {
"blob_id": "a7fb8facca39faada099533a06834a1ac5be8544",
"branch_name": "refs/heads/master",
"committer_date": 1513866932000,
"content_id": "85404a657e040de127df8b1d0f9256b0336456d1",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "28d98c4f5c68cffbca00f7b88c5ffb68400e164c",
"extension": "p... | 2.375 | stackv2 | from flask import Flask,render_template,url_for,redirect
from flask import request
from flask import make_response
from flask import abort
app = Flask(__name__)
@app.route('/')
def index():
username = request.cookies.get('username')
return 'Hello {}'.format(username)
@app.route('/user/<username>')
def user_i... | 26 | 24.08 | 78 | 12 | 150 | python | [{"finding_id": "codeql_py/insecure-cookie_ba97b7722e37689f_b0714033", "tool_name": "codeql", "rule_id": "py/insecure-cookie", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Cookie is added to response without the 'secure' flag being set.", "remediation": "", "location": {"file_path"... | 4 | true | [
"CWE-614",
"CWE-020",
"CWE-1004",
"CWE-079"
] | [
"py/insecure-cookie",
"py/cookie-injection",
"py/client-exposed-cookie",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is added to response without the 'secure' flag being set.",
"Cookie is constructed from a [user-supplied input](1).",
"Sensitive server cookie is set without HttpOnly flag.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
18,
18,
18,
11
] | [
null,
null,
null,
null
] | [
5,
32,
5,
12
] | [
41,
40,
41,
39
] | |
2024-11-18T21:26:15.553040+00:00 | 1,542,476,063,000 | e9f45ffdb9d92876bb85e9ddadb164f3efa45222 | 3 | {
"blob_id": "e9f45ffdb9d92876bb85e9ddadb164f3efa45222",
"branch_name": "refs/heads/master",
"committer_date": 1542476063000,
"content_id": "d0a218855875e2bebe1dacb48f2367c7f2e86606",
"detected_licenses": [
"MIT"
],
"directory_id": "bd3dc88f58eba8778ed04f991a4c41574e200ddd",
"extension": "py",
"fi... | 3.125 | stackv2 | import re
from .yaml import Regexpr
# Mapping from Backus-Naur repetition operator symbols to tuples
# representing bounds.
#
# Keys: symbol (str): BNF repetition operator symbol (?, +, *)
# Values: (int, int/NoneType): Tuple representing min/max bounds.
# None should be interpreted as infinity.
factor_operat... | 94 | 27.69 | 86 | 16 | 614 | python | [{"finding_id": "codeql_py/overly-large-range_bef8afaeb0269f86_fde69862", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
27
] | [
null
] | [
37
] | [
40
] | |
2024-11-18T21:51:43.752689+00:00 | 1,582,602,724,000 | 118c9fffba8b1bbfce47eb16e3cae894673269dd | 3 | {
"blob_id": "118c9fffba8b1bbfce47eb16e3cae894673269dd",
"branch_name": "refs/heads/master",
"committer_date": 1582602724000,
"content_id": "a31a51b352c4d5e1dc8de58bf9830f25b62bfd29",
"detected_licenses": [
"MIT"
],
"directory_id": "8da9dcb757595965679d36b1639b645551a4d757",
"extension": "py",
"fi... | 3.09375 | stackv2 | import csv, io, os
from flask import Flask, render_template, request
from html import escape
# filepath = '/Users/hangyullynakim/Desktop/SCHACKS_2020/RepBallot/2020.csv'
# # Initiates flask things
app = Flask(__name__)
# Takes a filpath to a .csv to read file
def read_csv(filepath, column_names):
with open(filep... | 77 | 31.44 | 160 | 15 | 638 | python | [{"finding_id": "codeql_py/path-injection_1dc7674c6931a747_7fb85e04", "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)."
] | [
12
] | [
null
] | [
15
] | [
23
] | |
2024-11-18T21:52:05.125223+00:00 | 1,621,451,798,000 | ab01f401728f71294aa9b491db5d9eef7aa1b646 | 3 | {
"blob_id": "ab01f401728f71294aa9b491db5d9eef7aa1b646",
"branch_name": "refs/heads/master",
"committer_date": 1621451798000,
"content_id": "d9d75a964370bd4f0de694f64997470ee5bd0996",
"detected_licenses": [
"MIT"
],
"directory_id": "795794f4d65bfd6d1c9a3ac71314febec164c191",
"extension": "py",
"fi... | 2.703125 | stackv2 | """
A (much) nicer API to build Masav payments file
Based on this API
https://www.masav.co.il/media/1987/mifrat_zikuim_msv.pdf
https://www.masav.co.il/media/2001/hebrew.pdf
Note: Most of the inputs to the ctor and to create_payment_file are Union[int, str].
This is because there are many fields such as payee_id that ... | 264 | 34.26 | 88 | 19 | 2,370 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f9c25f99b052a8c6_46c93cc5", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text."
] | [
180
] | [
null
] | [
25
] | [
29
] | |
2024-11-18T21:52:21.279527+00:00 | 1,617,028,965,000 | c6bcd6c287e9216333cc5b7653d5418443abd278 | 2 | {
"blob_id": "c6bcd6c287e9216333cc5b7653d5418443abd278",
"branch_name": "refs/heads/main",
"committer_date": 1617028965000,
"content_id": "45f195bd7db7da9aa319f0622513c624898e56af",
"detected_licenses": [
"Unlicense"
],
"directory_id": "9babb59421330a690aaf4c7b828fd53d59424f94",
"extension": "py",
... | 2.375 | stackv2 | """
We can identify a circular import between hello_template/templates/__init__.py and hello_template/templates/hello/views.py,
where, in the former, we import views from the later, and in the latter, we import the app from the former.
So, this actually makes the two modules depend on each other.
"""
import os
import s... | 230 | 31.38 | 132 | 19 | 2,070 | python | [{"finding_id": "codeql_py/stack-trace-exposure_94a966ef4d1383a9_1f9b52d7", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-209",
"CWE-312"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
100,
103,
114
] | [
null,
null,
null
] | [
30,
30,
11
] | [
36,
36,
34
] | |
2024-11-18T20:31:25.216616+00:00 | 1,692,312,524,000 | ee28744464a7a640d830229dba35f88648232bcb | 3 | {
"blob_id": "ee28744464a7a640d830229dba35f88648232bcb",
"branch_name": "refs/heads/master",
"committer_date": 1692312524000,
"content_id": "b074a31abd909d59a6e4f7303f7c6e25b9ea2d17",
"detected_licenses": [
"MIT"
],
"directory_id": "0693e5266da7a3a82fb7e60555c4bcb157eaedae",
"extension": "py",
"fi... | 2.703125 | stackv2 | # python 3
#
# keeps the species the same, but changes the sex for every image in
# the given folder
#
import sys
import sqlite3
from pathlib import Path
# following instructions from this brilliant, thorough, very
# useful stackoverflow answer:
# https://stackoverflow.com/a/44788410/259456
# PyExifTool is ... | 176 | 36.41 | 171 | 18 | 1,908 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9577c61bba5f1360_9c4a55dd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text."
] | [
173
] | [
null
] | [
9
] | [
65
] | |
2024-11-18T20:31:27.489459+00:00 | 1,583,225,611,000 | 42c62d654c5ba7caad8570bc1ea5c62f528b02a5 | 3 | {
"blob_id": "42c62d654c5ba7caad8570bc1ea5c62f528b02a5",
"branch_name": "refs/heads/master",
"committer_date": 1583227980000,
"content_id": "a14866f7c442b757624323df8dc53408153428a9",
"detected_licenses": [
"MIT"
],
"directory_id": "66d31280e12cf0ac786689be5a1459a6bea9f8e8",
"extension": "py",
"fi... | 2.8125 | stackv2 | import ipaddress
import logging
from kalliope.core.NeuronModule import NeuronModule, MissingParameterException, InvalidParameterException
from wakeonlan import send_magic_packet
logging.basicConfig()
logger = logging.getLogger("kalliope")
class Wake_on_lan(NeuronModule):
def __init__(self, **kwargs):
su... | 45 | 38.6 | 116 | 14 | 376 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_03c07cc678aa97fc_424c6918", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
24
] | [
25
] | [
26
] | [
81
] | |
2024-11-18T21:00:03.703752+00:00 | 1,618,951,991,000 | 1df0f07828522cfecc61d0f6d2382d3d5eec48f6 | 3 | {
"blob_id": "1df0f07828522cfecc61d0f6d2382d3d5eec48f6",
"branch_name": "refs/heads/master",
"committer_date": 1618951991000,
"content_id": "cfbca710e03e8f6c751a914ff0ba8d01a5e9cdc9",
"detected_licenses": [
"MIT"
],
"directory_id": "ea516643791a550e7d0f9d5c4fbe00e96649d910",
"extension": "py",
"fi... | 2.6875 | stackv2 | """
Handles secrets
"""
import json
import logging
from ocviapy import export
from .utils import oc, get_cfg_files_in_dir, get_json, load_cfg_file, validate_list_of_strs
log = logging.getLogger(__name__)
def parse_secret_file(path):
"""
Return a dict of all secrets in a file with key: secret name, val: pa... | 174 | 35.99 | 96 | 17 | 1,405 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_04602dce9354260d_bd1e3473", "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... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secre... | [
55,
65,
72,
79,
173
] | [
null,
null,
null,
null,
null
] | [
54,
74,
54,
63,
83
] | [
65,
85,
65,
74,
97
] | |
2024-11-18T21:10:21.263933+00:00 | 1,616,077,638,000 | 38ac6745f5f852895ba8f32fed2cea5b7056efdd | 2 | {
"blob_id": "38ac6745f5f852895ba8f32fed2cea5b7056efdd",
"branch_name": "refs/heads/master",
"committer_date": 1616077638000,
"content_id": "3ae0835adc3581500375ad3af5fc07acf0546e63",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ee96ec6e09b0cc1af28ec7b77808eb4fa6611ca8",
"extension": "py"... | 2.40625 | stackv2 | """Source routes."""
from typing import Any, Optional, Union, cast
import bottle
import requests
from pymongo.database import Database
from database.datamodels import default_source_parameters, latest_datamodel
from database.reports import insert_new_report, latest_reports
from model.actions import copy_source, move... | 227 | 48.89 | 116 | 17 | 2,472 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c3147e4f0cece8da_aeeca859", "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)."
] | [
208
] | [
210
] | [
20
] | [
10
] | |
2024-11-18T21:10:34.402039+00:00 | 1,492,125,191,000 | 1f01003b911c2b526b5e7fd6a2aa24e5f87d93b5 | 2 | {
"blob_id": "1f01003b911c2b526b5e7fd6a2aa24e5f87d93b5",
"branch_name": "refs/heads/master",
"committer_date": 1492125191000,
"content_id": "9b6177ef21eb24d71ba9ee2844ff18195ce76b51",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b1c9c6a8598cb9458a79865c5fad628caf2c0278",
"extension": "py"... | 2.453125 | stackv2 | #!/usr/bin/env python3
import os
import tornado.ioloop
import tornado.web
import tornado.httpserver
import tornado.httputil
import tornado.gen
import pickle
from hystrix import Command
import fnmatch
from io_transformers import input_transformer, output_transformer
class PredictCommand(Command):
def __init__(se... | 97 | 32.33 | 90 | 14 | 722 | python | [{"finding_id": "codeql_py/path-injection_058b443d5cbfec24_2e274f86", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).\nThis pa... | 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).\nThis path depends on a [user-provided value](2).\nThis path depends on a [user-provided value](3).",
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).\nThis path depends on a [user-provided value](3)."
] | [
61,
65
] | [
null,
null
] | [
48,
15
] | [
67,
34
] | |
2024-11-18T21:10:51.761805+00:00 | 1,637,432,315,000 | 1aa64821e6f26f65d5f29cf11618bc06db53f1a3 | 2 | {
"blob_id": "1aa64821e6f26f65d5f29cf11618bc06db53f1a3",
"branch_name": "refs/heads/master",
"committer_date": 1637432315000,
"content_id": "5b86bddfb28975be8c5110cb093aca259c37e9f0",
"detected_licenses": [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
],
"directory_id": "fd65851c797... | 2.453125 | stackv2 | #!/usr/bin/env python3
import json
from kfp import components
component_store = components.ComponentStore.default_store
component_store._refresh_component_cache()
component_urls = component_store._url_to_info_db.keys()
def make_sortable_component_url(url: str) -> str:
if url.startswith('https://raw.githubusercon... | 58 | 31.98 | 121 | 14 | 458 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_1f3c8f8df428650c_be759c63", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://raw.githubusercontent.com](1) may be at an arb... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [https://raw.githubusercontent.com](1) may be at an arbitrary position in the sanitized URL."
] | [
11
] | [
null
] | [
8
] | [
59
] | |
2024-11-18T21:10:54.952118+00:00 | 1,621,264,539,000 | eacca7f0d117710603db80ae2d9317c49a989116 | 3 | {
"blob_id": "eacca7f0d117710603db80ae2d9317c49a989116",
"branch_name": "refs/heads/master",
"committer_date": 1621264539000,
"content_id": "8f7a02473e6c50e37ee59826188cbd583cd168e5",
"detected_licenses": [
"MIT"
],
"directory_id": "f9e2114ba6288e039746705b8b11c357a07f1360",
"extension": "py",
"fi... | 2.765625 | stackv2 | """Documentation and format builders for the latest AFLUX
specification. Since AFLUX is in constant flux, we generate the
documentation and keyword lists dynamically at development time
whenever a new version is released. This happens by parsing the HTML
page that lists all available keywords and then querying the `hel... | 105 | 31.1 | 80 | 12 | 769 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_9d5a6d70a75c96db_82d0aa4b", "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
] | [
97
] | [
11
] | [
6
] | |
2024-11-18T21:23:30.515194+00:00 | 1,620,356,252,000 | aac4e95c667be956cd8b213023e02ffa4f8833a5 | 2 | {
"blob_id": "aac4e95c667be956cd8b213023e02ffa4f8833a5",
"branch_name": "refs/heads/main",
"committer_date": 1620356252000,
"content_id": "d3d55d8a8d3a6ac841232cdae0faf16b344b899e",
"detected_licenses": [
"MIT"
],
"directory_id": "5dccfedb328cbb068341bf79388ca8d03413966a",
"extension": "py",
"file... | 2.390625 | stackv2 | import os
import flask
import flask_sqlalchemy
import flask_praetorian
import flask_cors
from quickey_python_sdk import sdk
db = flask_sqlalchemy.SQLAlchemy()
guard = flask_praetorian.Praetorian()
cors = flask_cors.CORS()
# A generic user model that might be used by an app powered by flask-praetorian
class User(db.M... | 131 | 28.44 | 103 | 15 | 965 | python | [{"finding_id": "codeql_py/path-injection_6a042e2240d6dc8b_c98f23ed", "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)."
] | [
124
] | [
null
] | [
38
] | [
69
] | |
2024-11-18T21:37:18.824663+00:00 | 1,595,529,043,000 | ed4135e36c0f9376fd47ec7a324cb55a5e160e10 | 2 | {
"blob_id": "ed4135e36c0f9376fd47ec7a324cb55a5e160e10",
"branch_name": "refs/heads/master",
"committer_date": 1595529043000,
"content_id": "0ae7ebedb392b10b6efd248b439ca012509a1976",
"detected_licenses": [
"Unlicense"
],
"directory_id": "0f2f122d4db2076c2699d3f5020c709ed5a60869",
"extension": "py",... | 2.4375 | stackv2 | #!/usr/bin/python3
import argparse
import os
import re
from twisted.web import server, resource
from twisted.internet import reactor, endpoints
from twisted.web.resource import NoResource
parser = argparse.ArgumentParser()
parser.add_argument('--port', help='server port', default="3000")
args = parser.parse_args()
ho... | 41 | 27.54 | 76 | 16 | 280 | python | [{"finding_id": "codeql_py/reflective-xss_79591f3a612c786c_dce9de7c", "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)."
] | [
30
] | [
null
] | [
20
] | [
44
] | |
2024-11-18T21:37:19.015198+00:00 | 1,590,010,746,000 | cbc451187e0e07d967e3b9b05baa1e4ba3d2ba44 | 3 | {
"blob_id": "cbc451187e0e07d967e3b9b05baa1e4ba3d2ba44",
"branch_name": "refs/heads/master",
"committer_date": 1590010746000,
"content_id": "991323b4a89fdcdb03a3ec40cb19d67cdba0d018",
"detected_licenses": [
"MIT"
],
"directory_id": "641a49bd39a55d36b5177bed05e1f4f8217d984c",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/bin/env python
# coding: utf-8
import pandas as pd
import os
import sys
### Class Definitions
class FrameElement:
def __init__(self, fe_name, index, is_target=False):
self.fe_name = fe_name
self.indices = [index]
self.is_target = is_target
def append_index(self, index):
... | 118 | 40.75 | 152 | 19 | 1,177 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_0d31b84cdf748658_9862891b", "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."
] | [
108,
114
] | [
null,
null
] | [
20,
21
] | [
49,
50
] | |
2024-11-18T21:59:07.241641+00:00 | 1,505,181,151,000 | 12988d2f13d71f2870b036fc87d168e6d94dc95e | 3 | {
"blob_id": "12988d2f13d71f2870b036fc87d168e6d94dc95e",
"branch_name": "refs/heads/master",
"committer_date": 1505181151000,
"content_id": "acfdfe8dd810383fafae9f2eb38b4335c4a21d93",
"detected_licenses": [
"MIT"
],
"directory_id": "1a5b136fcc882d964a29858463ee969bf8d887b0",
"extension": "py",
"fi... | 2.921875 | stackv2 |
from flask import Flask,request
from flask import jsonify
import redis
import logging
app = Flask(__name__)
log = logging.getLogger(__name__)
@app.route("/", methods=['GET'])
def get_bistro():
return jsonify({'project':'bistro', 'version':'1.0.0'})
#connecting to the database
def connect_to_redis():
redis_url... | 65 | 23.54 | 108 | 14 | 414 | python | [{"finding_id": "codeql_py/reflective-xss_bb37b7c4e53d6a91_6a7f3b12", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability d... | 4 | true | [
"CWE-079",
"CWE-079",
"CWE-117",
"CWE-117"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provi... | [
31,
41,
30,
40
] | [
null,
null,
null,
null
] | [
10,
9,
12,
11
] | [
81,
43,
77,
82
] | |
2024-11-18T21:59:14.864586+00:00 | 1,548,454,648,000 | 1e3042dd70e971209f20c40cc189e3e5db5eb1a0 | 4 | {
"blob_id": "1e3042dd70e971209f20c40cc189e3e5db5eb1a0",
"branch_name": "refs/heads/master",
"committer_date": 1548454648000,
"content_id": "21002069a044d176c3ca1defa6cd60a3ab1e48dd",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8492e16759e2dae9cf87dfa2afe2408db6306952",
"extension": "py"... | 4.375 | stackv2 |
#Start with a main function and make each problem a function. Call those functions from your main function.
def main():
# problem1()
# problem2()
#problem3()
#problem4()
# these classes are created for the problem functions below
class Dog:
def __init__(self, name, breed, color, gender):
... | 81 | 26.23 | 150 | 16 | 566 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fc6e4c300ea6ea70_0886b7a6", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
21
] | [
null
] | [
62
] | [
73
] | |
2024-11-18T21:59:19.478613+00:00 | 1,531,744,707,000 | 880d28268a22624b4625c5f0ff6777e2de29bf20 | 2 | {
"blob_id": "880d28268a22624b4625c5f0ff6777e2de29bf20",
"branch_name": "refs/heads/master",
"committer_date": 1531744707000,
"content_id": "4c43455104afa6a7e56061d68e894eae9b303e7c",
"detected_licenses": [
"MIT"
],
"directory_id": "c2a270f90f13cfb0311f8258fe4cec0366360bc7",
"extension": "py",
"fi... | 2.359375 | stackv2 |
from jinja2 import Environment, FileSystemLoader
import os
PATH = os.path.dirname(os.path.abspath(__file__))
env = Environment(
autoescape=False,
loader=FileSystemLoader(os.path.join(PATH, 'templates'))
)
def to_html_string(table, sample=5):
if sample:
data = [list(table.data.columns)] + [list(... | 26 | 25.42 | 106 | 16 | 165 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_fd09b65cf5b70f28_9c280023", "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."
] | [
6
] | [
9
] | [
7
] | [
2
] | |
2024-11-18T21:59:22.572924+00:00 | 1,582,121,500,000 | 21cad9cda55a948b7ea3e9101b6ec281b882796d | 3 | {
"blob_id": "21cad9cda55a948b7ea3e9101b6ec281b882796d",
"branch_name": "refs/heads/master",
"committer_date": 1582121500000,
"content_id": "364434479a93436838bb207f85be7509d61309f0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "43d25a3179b8ae6920c9b084d386d67e6c515848",
"extension": "py"... | 2.84375 | stackv2 | import platform
import logging
import subprocess
import hashlib
import requests
from requests.auth import HTTPBasicAuth
def md5_digest(input_string):
"""Generates MD5 hash from the input str.
Arguments:
input_string {str} -- Input str to generate MD5 hash from.
Returns:
str -- ... | 264 | 32.19 | 101 | 15 | 1,717 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_03e1d9108d6de04a_511d4e29", "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... | [
18
] | [
null
] | [
16
] | [
44
] | |
2024-11-18T21:59:22.678550+00:00 | 1,562,591,684,000 | 823f5b5ca4991040babf2b6c715a74543f534c1c | 3 | {
"blob_id": "823f5b5ca4991040babf2b6c715a74543f534c1c",
"branch_name": "refs/heads/master",
"committer_date": 1562591684000,
"content_id": "47b6bcb482e497710ff306e05196df2721b38b58",
"detected_licenses": [
"MIT"
],
"directory_id": "53704b4b82fcc48a78f7575ee1d551d7c3405e9d",
"extension": "py",
"fi... | 2.953125 | stackv2 | #本程序是为了解析出每一个火车站的代码
#使用方法是使用本程序把输出结果重定向到ststion.py文件里面
import requests
import re
from pprint import pprint
def main():
url='https://kyfw.12306.cn/otn/resources/js/framework/station_name.js?station_version=1.9025'
r=requests.get(url,verify=False) #后面的参数可以去除https验证
r.encoding=r.apparent_encoding
p... | 19 | 28.37 | 97 | 11 | 186 | python | [{"finding_id": "codeql_py/request-without-cert-validation_54339a36a0c200a0_5fc330b5", "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)."
] | [
8
] | [
null
] | [
7
] | [
37
] | |
2024-11-18T22:11:32.431087+00:00 | 1,513,776,773,000 | afa2e76b785ed0395bc6fccd037ddb0a84f551ac | 3 | {
"blob_id": "afa2e76b785ed0395bc6fccd037ddb0a84f551ac",
"branch_name": "refs/heads/master",
"committer_date": 1513776773000,
"content_id": "5989b1dd11cef286046c217091e20a5807a41a15",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3cc1e468b52b0d77f8865d746fe6c9bf0cff3ca3",
"extension": "py"... | 3.0625 | stackv2 | '''
Scraper for ThisIsPlymouth.co.uk news stories.
'''
import re
import sys
import logging
import requests
import datetime
from bs4 import BeautifulSoup
from this_is_scraper.db import init_db
from this_is_scraper.db import get_db_session
from this_is_scraper.db import Articles
logging.basicConfig(format='%(asctim... | 126 | 30.18 | 73 | 14 | 852 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_68ddca78c55e8b78_15704ef3", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This string, which is used as a regular expression [here](1), has an unescaped '.' befor... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This string, which is used as a regular expression [here](1), has an unescaped '.' before 'co.uk/news/', so it might match more hosts than expected."
] | [
32
] | [
null
] | [
17
] | [
55
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.