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-19T01:11:55.533436+00:00 | 1,395,184,664,000 | c4f7e82a77bf014b4653118ee8065f30e401bd06 | 2 | {
"blob_id": "c4f7e82a77bf014b4653118ee8065f30e401bd06",
"branch_name": "refs/heads/master",
"committer_date": 1395184664000,
"content_id": "ed1c07fcf9e2e1bcbf6bad3461d90768e42c048e",
"detected_licenses": [
"MIT"
],
"directory_id": "ea0439bb26cecf198b9375a927ed8e4583758cc2",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/bin/env python
# coding=utf8
from flask import Blueprint, request, redirect, render_template, url_for, session, current_app
from flask.ext.login import login_user, logout_user
from flask.ext.principal import Identity, AnonymousIdentity, identity_changed
from lightningwolf_smp.forms.login import LoginForm
login... | 47 | 29.74 | 94 | 14 | 307 | python | [{"finding_id": "codeql_py/url-redirection_02b058176401bead_757a735d", "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)."
] | [
45
] | [
null
] | [
25
] | [
78
] | |
2024-11-19T01:21:34.386723+00:00 | 1,536,121,507,000 | 1db8f5cf4dfda32021dfddd93e59e31c70a85b20 | 3 | {
"blob_id": "1db8f5cf4dfda32021dfddd93e59e31c70a85b20",
"branch_name": "refs/heads/master",
"committer_date": 1536121507000,
"content_id": "c787390f4332d73d193e7733422802106d4311e8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "fc64949e465e6de8383c75520582a0f7a5b5b457",
"extension": "py"... | 2.53125 | stackv2 | #!/usr/bin/env python3
"""
Simple search UI for PostgreSQL full-text search
"""
import json
import flask
import os
import urllib.parse, urllib.request
from jinja2 import Environment, FileSystemLoader
JSON_HOST = "http://localhost:8001" # Where the restserv service is running
env = Environment(loader=FileSystemLoader... | 42 | 29.36 | 135 | 17 | 307 | python | [{"finding_id": "codeql_py/partial-ssrf_4d0b8e0fbbd2b0f9_7002aa81", "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-079"
] | [
"py/partial-ssrf",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
31,
14
] | [
null,
null
] | [
22,
7
] | [
51,
136
] | |
2024-11-19T01:21:41.044705+00:00 | 1,595,580,619,000 | 584a698db9415aba6155e4405555939b4eb4f650 | 4 | {
"blob_id": "584a698db9415aba6155e4405555939b4eb4f650",
"branch_name": "refs/heads/master",
"committer_date": 1595580619000,
"content_id": "fa73eafce5270b0189c1d6738fd279d821e8a7d8",
"detected_licenses": [
"MIT"
],
"directory_id": "6fe3911be5fd5aa3d74b90c4d4d723a95faed6d4",
"extension": "py",
"fi... | 4.0625 | stackv2 | # M0_C7 - Employee Database
########################################
# Modify and debug the code as needed. #
########################################
import sys
usage = '''Usage: [COMMAND] [ID]
add [ID] - Add a new employee record
edit [ID] - Edit an employee record
view [ID] - View an employee rec... | 116 | 28.6 | 120 | 20 | 788 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4fd7f11c3dac924f_705f4e30", "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."
] | [
108
] | [
null
] | [
27
] | [
82
] | |
2024-11-19T01:56:43.395671+00:00 | 1,612,504,405,000 | f45ce0c8ab900c70ca7ec01f186b8341e7a82cf4 | 2 | {
"blob_id": "f45ce0c8ab900c70ca7ec01f186b8341e7a82cf4",
"branch_name": "refs/heads/master",
"committer_date": 1612504405000,
"content_id": "cca50a5e9a4a3f442281e9445726ee41fa481911",
"detected_licenses": [
"MIT"
],
"directory_id": "6b69c9a7700ec2ea4a0630364fc893bd114c9131",
"extension": "py",
"fi... | 2.3125 | stackv2 | import os
import threading
import hashlib
import ast
import keypirinha as kp
import keypirinha_util as kpu
class Pass(kp.Plugin):
"""
Provides an interface to a [password store](https://www.passwordstore.org/).
"""
CAT_FILE = kp.ItemCategory.USER_BASE + 1
CAT_FILE_LINE = kp.ItemCategory.USER_BASE ... | 205 | 37.75 | 111 | 19 | 1,698 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_56b71d87a10167d3_ba8dfd26", "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."
] | [
176
] | [
null
] | [
33
] | [
46
] | |
2024-11-19T01:56:46.870445+00:00 | 1,565,385,306,000 | ab801ea25da9b422075d507e6a41161d50ca2498 | 3 | {
"blob_id": "ab801ea25da9b422075d507e6a41161d50ca2498",
"branch_name": "refs/heads/master",
"committer_date": 1565385306000,
"content_id": "4a174fe5ebe1ba944c8b6c0ff5f27a4b88054e2c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8ca24ab351a4885794e4dd2897ea9a5dcf3f69e6",
"extension": "py"... | 2.9375 | stackv2 | #!/usr/bin/env python3
from nornir import InitNornir
def my_task(task):
print("Hello ")
host = task.host
print(host.hostname)
#printing vaue from data of the host. Nornir select host -> group1 -> group2 -> defaults
print(host["dns1"])
print(host["dns2"])
if __name__ == "__main__":
nr = I... | 33 | 23.55 | 92 | 12 | 205 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9e20dff922a515e7_8efd5642", "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."
] | [
30
] | [
null
] | [
15
] | [
45
] | |
2024-11-19T02:10:34.139406+00:00 | 1,552,423,071,000 | abd78751de24532afe4c2ad0261d18859a51f8c9 | 3 | {
"blob_id": "abd78751de24532afe4c2ad0261d18859a51f8c9",
"branch_name": "refs/heads/master",
"committer_date": 1552423071000,
"content_id": "733799e384fafd5d06e9ecdc3749cd577c9edf91",
"detected_licenses": [
"MIT"
],
"directory_id": "40c96ffa98d20d5440b20ddb8853ddd0cabdacbf",
"extension": "py",
"fi... | 2.5625 | stackv2 | #atmombasa/ussd.py
import os
from flask import Flask, request
app = Flask(__name__)
#endpoint
@app.route('/', methods=['POST', 'GET'])
def ussd_callback():
session_id = request.values.get('sessionId', None)
service_code = request.values.get('serviceCode', None)
phone_number = request.values.get('phoneNumber', None)... | 37 | 28.14 | 58 | 12 | 301 | python | [{"finding_id": "codeql_py/reflective-xss_ba46892368904005_a245a6fb", "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)."
] | [
32
] | [
null
] | [
9
] | [
17
] | |
2024-11-19T02:45:37.107921+00:00 | 1,489,264,675,000 | f45a5ac3d02a8e59c3f42af397f50e51083f7e37 | 3 | {
"blob_id": "f45a5ac3d02a8e59c3f42af397f50e51083f7e37",
"branch_name": "refs/heads/master",
"committer_date": 1489264675000,
"content_id": "93c35e82e3070b5dcaa7b5ce0646c0a3d9c9b51e",
"detected_licenses": [
"MIT"
],
"directory_id": "a0155f76350bb204cf1d30c3151d8fa375c09247",
"extension": "py",
"fi... | 2.765625 | stackv2 | # -*- coding: utf-8 -*-
"""Utility file for the HASYv2 dataset.
See https://arxiv.org/abs/1701.08380 for details.
"""
from __future__ import absolute_import
from keras.utils.data_utils import get_file
from keras import backend as K
import numpy as np
import scipy.ndimage
import os
import tarfile
import shutil
import... | 180 | 31 | 78 | 19 | 1,453 | python | [{"finding_id": "codeql_py/tarslip_08d388513143bc9d_1ddbfd02", "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)."
] | [
100
] | [
null
] | [
13
] | [
18
] | |
2024-11-19T02:57:21.247765+00:00 | 1,689,695,611,000 | b136b2799851c638e8cfd5ded8ee4928ed643c95 | 2 | {
"blob_id": "b136b2799851c638e8cfd5ded8ee4928ed643c95",
"branch_name": "refs/heads/master",
"committer_date": 1689708119000,
"content_id": "b0b8db0000edb77420d2fe12f35cd6c55d2e11ff",
"detected_licenses": [
"BSD-3-Clause",
"NIST-Software"
],
"directory_id": "08c641176796cb81cb81806e0f0302d10df604e... | 2.3125 | stackv2 | """ Views for the Bucket REST API
"""
from django.http import Http404
from django.utils.decorators import method_decorator
from rest_framework import status
from rest_framework.exceptions import ValidationError
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest... | 354 | 27.68 | 78 | 16 | 1,952 | python | [{"finding_id": "codeql_py/stack-trace-exposure_f03e356a6e67d65f_1760f05c", "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.", "... | 7 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
71,
117,
174,
210,
263,
346,
353
] | [
null,
null,
null,
null,
null,
null,
null
] | [
17,
17,
17,
17,
17,
29,
17
] | [
24,
24,
24,
24,
24,
36,
24
] | |
2024-11-19T03:12:17.923161+00:00 | 1,548,151,579,000 | b59a5dd14af88576f173db96115214350de8ce04 | 3 | {
"blob_id": "b59a5dd14af88576f173db96115214350de8ce04",
"branch_name": "refs/heads/master",
"committer_date": 1548151579000,
"content_id": "b9af70a000882d3270b654ca9f6c79c137e53862",
"detected_licenses": [
"MIT"
],
"directory_id": "1c0214bec5b77802c5701349e0d6522bf208ac1f",
"extension": "py",
"fi... | 2.984375 | stackv2 | import pandas as pd
import re
import requests
import pickle
class LinkBuilder:
def __init__(self, tweets, href):
self.tweets = tweets
self.href = href
self.unprocessed = []
self.next = []
self.data = list(pd.read_pickle(tweets)[2])
for e in self.data:
... | 94 | 21.96 | 114 | 15 | 596 | python | [{"finding_id": "codeql_py/overly-large-range_dfcc09428cb5478f_7a1efa40", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", "rem... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
18
] | [
null
] | [
65
] | [
68
] | |
2024-11-19T01:33:43.089009+00:00 | 1,331,322,269,000 | 79743974a67ffb795dfa5d33af9822edb3bee645 | 3 | {
"blob_id": "79743974a67ffb795dfa5d33af9822edb3bee645",
"branch_name": "refs/heads/master",
"committer_date": 1331322269000,
"content_id": "77a216e8dfd7de2fb2b2beeee564c0927bcca962",
"detected_licenses": [
"MIT"
],
"directory_id": "4b0937ba0ac59141f09df19040952e41de632898",
"extension": "py",
"fi... | 2.546875 | stackv2 | from dexy.dexy_filter import DexyFilter
from dexy.dexy_filter import DexyFilterException
from dexy.filters.templating_plugins import *
from jinja2.exceptions import TemplateSyntaxError
from jinja2.exceptions import UndefinedError
import jinja2
import sys
import re
import traceback
class TemplateFilterException(DexyFil... | 163 | 35.58 | 172 | 19 | 1,282 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_23ff9061ccd34146_1a42283d", "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."
] | [
84,
94
] | [
92,
96
] | [
19,
19
] | [
18,
14
] | |
2024-11-19T01:33:43.637049+00:00 | 1,485,400,384,000 | 32403c97f3991b085621f000f8fc1ddb13183867 | 2 | {
"blob_id": "32403c97f3991b085621f000f8fc1ddb13183867",
"branch_name": "refs/heads/master",
"committer_date": 1485400384000,
"content_id": "55358204eefda0827264493a40b11956fa8a685e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7a1ed798d57eda7b257c63f705723a34f772322a",
"extension": "p... | 2.46875 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
import jinja2
import argparse
import os
import fnmatch
import numpy as np
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('filename')
args = parser.parse_args()
dirname = os.path.dirname(args.filename)
ba... | 27 | 27.85 | 69 | 12 | 181 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ef9379c44cbffc77_cd80bf2c", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
18
] | [
null
] | [
11
] | [
70
] | |
2024-11-19T01:33:45.158181+00:00 | 1,666,673,340,000 | 9cf110360fdf587ba84ca948d32ef492e050a3da | 3 | {
"blob_id": "9cf110360fdf587ba84ca948d32ef492e050a3da",
"branch_name": "refs/heads/master",
"committer_date": 1666673340000,
"content_id": "3063d31705cae03d6ee906cb4e0ab6af6d0becdd",
"detected_licenses": [
"MIT"
],
"directory_id": "b5d83477e601e7485799dd9f86d762358f2fa6fb",
"extension": "py",
"fi... | 2.6875 | stackv2 | from typing import List
import sys
import zipfile
import hashlib
import requests
from pathlib import Path
import tarfile
import numpy as np
import os
import shutil
def any2unicode(text, encoding='utf8', errors='strict'):
"""Convert `text` (bytestring in given encoding or unicode) to unicode.
Parameters
--... | 165 | 26.3 | 97 | 19 | 1,098 | python | [{"finding_id": "codeql_py/tarslip_0f0e35b972d26293_9121e0ae", "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)."
] | [
60
] | [
null
] | [
9
] | [
15
] | |
2024-11-19T01:33:48.672302+00:00 | 1,689,606,196,000 | a8800477a96a7d141d1464080e55a6d0c4d1f2e9 | 2 | {
"blob_id": "a8800477a96a7d141d1464080e55a6d0c4d1f2e9",
"branch_name": "refs/heads/master",
"committer_date": 1689606196000,
"content_id": "4f36326d1f5c97734ca71ededd5817ab7d77cb91",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c539ac8931502675e90197477235598d36710a6d",
"extension": "py"... | 2.46875 | stackv2 | #!flask/bin/python
from flask import Flask, jsonify
import os
app = Flask(__name__)
@app.route('/')
def index():
return "Welcome to the Rdf Graph Service"
@app.route('/graph_creation/<path:config_file>', methods=['GET','POST'])
def rdfgraph(config_file):
os.system("python3 /app/rdfizer/run_rdfizer.py /" + confi... | 17 | 26.18 | 72 | 10 | 130 | python | [{"finding_id": "codeql_py/command-line-injection_88cc41ef3d1ee4d7_7d817929", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 2 | true | [
"CWE-078",
"CWE-079"
] | [
"py/command-line-injection",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
13,
14
] | [
null,
null
] | [
12,
9
] | [
65,
67
] | |
2024-11-19T01:57:24.230593+00:00 | 1,540,264,477,000 | 5c5a007eaf9221e72cbb60aee02ce8db4aa82fcc | 3 | {
"blob_id": "5c5a007eaf9221e72cbb60aee02ce8db4aa82fcc",
"branch_name": "refs/heads/master",
"committer_date": 1540264477000,
"content_id": "b38947c4e8891c728aa0a6a7f3cc0f1f3511332b",
"detected_licenses": [
"MIT"
],
"directory_id": "e3d4a0a56b83095cb4723feae465590f77ecf688",
"extension": "py",
"fi... | 2.8125 | stackv2 | #!/usr/bin/python
import sys, getopt
import progressbar
import time
import pandas as pd
import datetime
def main(argv):
dbname = 'import'
inputfile = 'data.csv'
outputfile = 'import.txt'
usage = 'csv2line.py -d <dbname> -i <inputfile> -o <outputfile>'
try:
opts, args = getopt.getopt(argv,"hd:i:o:... | 101 | 29.79 | 135 | 28 | 897 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7ae520f4a3dd282d_2bb55399", "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."
] | [
88
] | [
null
] | [
25
] | [
38
] | |
2024-11-19T01:57:26.229852+00:00 | 1,612,148,303,000 | ba786cd269850ae9c960a259b7e6cfee57f40c61 | 3 | {
"blob_id": "ba786cd269850ae9c960a259b7e6cfee57f40c61",
"branch_name": "refs/heads/main",
"committer_date": 1612148303000,
"content_id": "10e7e413c981b8c1cb105b356fa36153b8a99cde",
"detected_licenses": [
"MIT"
],
"directory_id": "eda2fcebb0f3ae513464f967c90e52c33d6a785c",
"extension": "py",
"file... | 2.828125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Sat Jan 30 11:32:25 2021
@author: rob
"""
from flask import Flask, jsonify, render_template
from flask_restful import Api
from flask_cors import cross_origin
from Controllers import registro_color
import json
import sqlite3
import pandas as pd
app = Flask(__name__)
api = Api... | 122 | 23.85 | 70 | 16 | 685 | python | [{"finding_id": "codeql_py/sql-injection_ac9002c259ac75c2_bb08db8e", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 1 | true | [
"CWE-089"
] | [
"py/sql-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1)."
] | [
88
] | [
null
] | [
24
] | [
36
] | |
2024-11-19T02:10:47.682861+00:00 | 1,587,396,447,000 | d7896f585346d6cfc5cea7cd2e64e944c5234063 | 2 | {
"blob_id": "d7896f585346d6cfc5cea7cd2e64e944c5234063",
"branch_name": "refs/heads/master",
"committer_date": 1587396447000,
"content_id": "2052b2c8897a591bca164029c125f16b4f9cb04f",
"detected_licenses": [
"MIT"
],
"directory_id": "2a037c1878129558e35d1722358f45eab90ae838",
"extension": "py",
"fi... | 2.359375 | stackv2 | # Author: Vikas Shitole
# Product: vCenter server/EVC (Enhanced Compatibility Mode): Applicable to vSphere 6.0 and 6.5 (Not applicable for vSphere 5.5 EVC clusters)
# Description: Script to check whether EVC cluster and its hosts are patched or not : vCenter/ESXi patches for Spectre vulnerability.
# Reference: https://... | 117 | 29.47 | 140 | 12 | 795 | python | [{"finding_id": "codeql_py/insecure-protocol_5010be18c706f16e_c51d1b84", "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)."
] | [
73
] | [
null
] | [
3
] | [
37
] | |
2024-11-19T02:11:17.668922+00:00 | 1,495,066,368,000 | ef068f014a0a8d7aafd341cb894acde8a005810b | 3 | {
"blob_id": "ef068f014a0a8d7aafd341cb894acde8a005810b",
"branch_name": "refs/heads/master",
"committer_date": 1495066368000,
"content_id": "e4256834104b0bf927be8118ebf206874896f421",
"detected_licenses": [
"MIT"
],
"directory_id": "5af1df23901d5d598640cd8780e9f3c9af4167c2",
"extension": "py",
"fi... | 2.546875 | stackv2 | from flask import Flask
from flask import request
import json
import base64
import os
app = Flask(__name__)
stored_files = {}
@app.route('/profile/<type>', methods=['GET'])
def get_dummy_files(type):
if type == 'lawyer':
zip_address = 'zipfiles/SC_Cases.zip'
elif type == 'doctor':
zip_address... | 48 | 22.77 | 67 | 13 | 308 | python | [{"finding_id": "codeql_py/reflective-xss_ddcf3e3c71e86a49_0c3b8cc5", "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)."
] | [
44
] | [
null
] | [
12
] | [
16
] | |
2024-11-19T02:11:18.439139+00:00 | 1,376,421,860,000 | 2ce48d3fcafdc24673e88f6bc8f512753cdfdb9e | 2 | {
"blob_id": "2ce48d3fcafdc24673e88f6bc8f512753cdfdb9e",
"branch_name": "refs/heads/master",
"committer_date": 1376421860000,
"content_id": "09e74c1eee3b769f414062e627cc62e29af263b6",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "e503ed48393444d7b5662d4b096ca8deb7e55204",
"exten... | 2.359375 | stackv2 | # functions for tasks
import os
import jinja2
import logging
import math
from apiclient import errors
import time, threading
from datetime import datetime, timedelta
from google.appengine.ext import deferred
import util
TIMELINE_ITEM_TEMPLATE_URL = '/templates/card.html'
#DEFAULT_REFRESH_TIME = 10.0
DEFAULT_REFRE... | 103 | 32.16 | 110 | 15 | 812 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4398713afff04d51_59aa5d82", "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."
] | [
21
] | [
22
] | [
21
] | [
63
] | |
2024-11-19T02:11:20.062134+00:00 | 1,540,787,863,000 | 607afec1159e35b8789cee25e193805b2960735f | 2 | {
"blob_id": "607afec1159e35b8789cee25e193805b2960735f",
"branch_name": "refs/heads/master",
"committer_date": 1540787863000,
"content_id": "94f3e716b51fe7f498216e79390caabdd1444c1c",
"detected_licenses": [
"MIT"
],
"directory_id": "360403a63f4c7cd2a560027493a0b347b3b373f5",
"extension": "py",
"fi... | 2.390625 | stackv2 | from flask import Flask, request, abort
import json
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.exceptions import (
InvalidSignatureError
)
from linebot.models import (
MessageEvent, TextMessage, TextSendMessage, BeaconEvent
)
from datetime import *
app = Flask(__name__)
data = []
wi... | 115 | 24.83 | 106 | 17 | 840 | python | [{"finding_id": "codeql_py/log-injection_19f23c64cc745f5f_cccbd6c8", "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)."
] | [
44
] | [
null
] | [
21
] | [
44
] | |
2024-11-19T02:33:22.631855+00:00 | 1,608,516,298,000 | 3538caf951dce6201c8792c4de4dba6701d47410 | 3 | {
"blob_id": "3538caf951dce6201c8792c4de4dba6701d47410",
"branch_name": "refs/heads/main",
"committer_date": 1608516298000,
"content_id": "2bccb9604da5a900f323ca72c8d0d9879ddcc739",
"detected_licenses": [
"MIT"
],
"directory_id": "4a74a3a0fa4dd1046e19625a80b36e872ed6a02c",
"extension": "py",
"file... | 2.96875 | stackv2 | #!/usr/bin/env python3
import argparse
import os
import secrets
import string
import requests
import getpass
from pykeepass import PyKeePass
def parse_args():
parser = argparse.ArgumentParser(description='Keemail-pass - Create Keepass entry with Keemail alias')
api_url = os.environ.get("KEEMAILPASS_API")
... | 124 | 29.96 | 106 | 11 | 815 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c9e71e8a155d4688_009888d6", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
118,
119
] | [
null,
null
] | [
11,
11
] | [
34,
37
] | |
2024-11-19T02:33:23.898197+00:00 | 1,609,122,323,000 | 0a105d40a96489bec11e92681a188ff17c9eb97f | 3 | {
"blob_id": "0a105d40a96489bec11e92681a188ff17c9eb97f",
"branch_name": "refs/heads/main",
"committer_date": 1609122323000,
"content_id": "806e8b46561939ed93a200a2f3db6d5f041b5ec3",
"detected_licenses": [
"MIT"
],
"directory_id": "7f1b564b245f6fff981d15b5b7cfe97d35113682",
"extension": "py",
"file... | 2.546875 | stackv2 | import argparse
import os
import subprocess
import hashlib
import glob
import tarfile
from zipfile import ZipFile
from scipy.io import wavfile
from pathlib import Path
import random
from tqdm import tqdm
# Parse input arguments
parser = argparse.ArgumentParser(description="VoxCeleb downloader")
parser.add_argument('-... | 205 | 31.2 | 110 | 20 | 1,560 | python | [{"finding_id": "codeql_py/tarslip_b72fa9265ba7eb3e_626688a2", "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)."
] | [
85
] | [
null
] | [
13
] | [
16
] | |
2024-11-19T02:33:26.906716+00:00 | 1,607,098,885,000 | 338c5282f26041b1037551a85fa9abc5c5ed6bd3 | 3 | {
"blob_id": "338c5282f26041b1037551a85fa9abc5c5ed6bd3",
"branch_name": "refs/heads/main",
"committer_date": 1607098885000,
"content_id": "0196daeaf83e302be537b84d0b8faeab94b89dc3",
"detected_licenses": [
"MIT"
],
"directory_id": "afb171b437c87039ddcaaf5ecd4a035c7a505b1b",
"extension": "py",
"file... | 3.140625 | stackv2 | def register(username, password, check_password):
if password == check_password:
if 8 < len(username) < 40 and 8 < len(password) < 16:
print("Успешно")
with open("database.txt", "w") as db1:
db1.write(username + '\n' + password)
code = 1234
... | 21 | 30.95 | 62 | 17 | 187 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_43bb2c9d5212b97c_44b0ec3d", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text."
] | [
6
] | [
null
] | [
27
] | [
53
] | |
2024-11-19T02:33:43.771863+00:00 | 1,631,278,252,000 | 5f6e4425e2d2e1c2da7e020ffaae921f32555cb8 | 3 | {
"blob_id": "5f6e4425e2d2e1c2da7e020ffaae921f32555cb8",
"branch_name": "refs/heads/main",
"committer_date": 1631278252000,
"content_id": "bcf1b868a4a8b6c143f44a61213975d0cf88b939",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "073310e653d6f01fc8182dd7eb83a457af4e687c",
"extension": "py",
... | 2.578125 | stackv2 | import imaplib
import email
from email.header import decode_header
import pandas as pd
mails_df = pd.read_csv('mails.csv')
csv_values = mails_df.values
c = 1
with open('mails_with_coupons.csv', 'w', encoding='utf-8') as f:
out_row = 'EMAIL,PASS,COUPONS\n'
f.write(out_row)
for each in csv_values:
user =... | 56 | 30.84 | 85 | 19 | 463 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_fc0d0214d9179c8d_f5a08852", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text."
] | [
51
] | [
null
] | [
33
] | [
36
] | |
2024-11-19T02:46:05.607324+00:00 | 1,607,009,078,000 | 23614445fbaafcc98991e01e2152ef3efdb38b35 | 2 | {
"blob_id": "23614445fbaafcc98991e01e2152ef3efdb38b35",
"branch_name": "refs/heads/master",
"committer_date": 1607009078000,
"content_id": "2a95a4152689c5518fe8ed412a3763b6a4354d9b",
"detected_licenses": [
"MIT"
],
"directory_id": "ae3ec91f6fe90c4b6c858dfd00350ebbb86da1f7",
"extension": "py",
"fi... | 2.4375 | stackv2 | from django.shortcuts import render, redirect
import math
import requests
requests.packages.urllib3.disable_warnings()
from bs4 import BeautifulSoup
from datetime import timedelta, timezone, datetime
import os
import shutil
from .models import Headline, UserProfile
def scrape(request):
user_p = UserProfile.objects... | 57 | 29.75 | 158 | 17 | 451 | python | [{"finding_id": "codeql_py/request-without-cert-validation_12e66816f82956f0_97fbdb0f", "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)."
] | [
23,
39
] | [
null,
null
] | [
12,
8
] | [
42,
60
] | |
2024-11-19T02:59:15.143847+00:00 | 1,616,951,531,000 | 4cbbf376a4c6e520bbf5d8dc374c62e40dccadf6 | 3 | {
"blob_id": "4cbbf376a4c6e520bbf5d8dc374c62e40dccadf6",
"branch_name": "refs/heads/main",
"committer_date": 1616951531000,
"content_id": "5ac1917c7bd65846b53934adcb7e9e30bdef27a9",
"detected_licenses": [
"MIT"
],
"directory_id": "c19fa1db263098129db5d272305277e2a663f613",
"extension": "py",
"file... | 3.09375 | stackv2 | from datetime import datetime
from passgen import *
import random
import time
def loop():
time.sleep(1.5)
main()
# Cores
verm = '\u001b[31m'
verd = '\u001b[32m'
rese = '\u001b[0m'
def main():
cls()
# Pegar na hora
hora = datetime.now()
formato = hora.strftime('[%H][%M][%S]')
# Taman... | 69 | 24.84 | 117 | 18 | 492 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f5e814b5181e55e3_5ef898c2", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
53,
52
] | [
null,
null
] | [
22,
19
] | [
96,
56
] | |
2024-11-19T02:59:34.703100+00:00 | 1,552,082,795,000 | 83261be0da71e72ef48fc24b09ef085bf7b22999 | 3 | {
"blob_id": "83261be0da71e72ef48fc24b09ef085bf7b22999",
"branch_name": "refs/heads/master",
"committer_date": 1552082795000,
"content_id": "93279cde7971c73a81c62730a2860b36efd3f813",
"detected_licenses": [
"MIT"
],
"directory_id": "b75d02949bb18d95f464612ae05ea41bfab5482a",
"extension": "py",
"fi... | 2.625 | stackv2 |
import requests
import json
import random
from datetime import datetime
from flask import render_template
from flask import request
from workflow import app
@app.route('/', methods=['GET', 'POST'])
def home():
imglink = app.config['BASE_IMG']
images = []
if request.method == 'POST':
imglink=reque... | 54 | 28.2 | 125 | 15 | 358 | python | [{"finding_id": "codeql_py/request-without-cert-validation_665b727fedfab4b2_f87c050f", "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)."
] | [
24
] | [
null
] | [
16
] | [
114
] | |
2024-11-19T02:59:54.443019+00:00 | 1,657,426,087,000 | c3b93f0bc50941ded7b127c02ec128a59658eef8 | 2 | {
"blob_id": "c3b93f0bc50941ded7b127c02ec128a59658eef8",
"branch_name": "refs/heads/master",
"committer_date": 1657426087000,
"content_id": "190f180c6a54069fc287a791d574e9308dc9c733",
"detected_licenses": [
"MIT"
],
"directory_id": "8f2c06ab584e4839755df24a22eee0296bdc8a4c",
"extension": "py",
"fi... | 2.5 | stackv2 | import json
import logging
import os
import boto3
from whisper import secret
from whisper.storage import store
logger = logging.getLogger(__name__)
class s3(store):
def __init__(self, name="s3", parent=None):
self.default_config = {"bucket_name": None, "bucket_path": ""}
super().__init__(name, p... | 107 | 31.62 | 84 | 17 | 780 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e407c48ecd2f4d9e_42ef5515", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
36
] | [
null
] | [
21
] | [
55
] | |
2024-11-19T03:00:00.053957+00:00 | 1,693,416,562,000 | 53039d855bc25cd7fb483a4dac7edba4848f98ff | 3 | {
"blob_id": "53039d855bc25cd7fb483a4dac7edba4848f98ff",
"branch_name": "refs/heads/main",
"committer_date": 1693416562000,
"content_id": "6220d1056f78880cdf889cc2aad4c0d815bd7b43",
"detected_licenses": [
"MIT"
],
"directory_id": "500bca3e22bd0c30c79b74918e9847742b3c428e",
"extension": "py",
"file... | 2.59375 | stackv2 | # description: train CNN model on CIFAR-10 dataset with distributed PyTorch
# imports
import os
import urllib
import tarfile
from pathlib import Path
from azureml.core import Workspace
from azureml.core import ScriptRunConfig, Experiment, Environment, Dataset
from azureml.core.runconfig import PyTorchConfiguration
# ... | 123 | 35.53 | 119 | 11 | 1,045 | python | [{"finding_id": "codeql_py/tarslip_aa2bba9dc584177a_dc5f0b85", "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)."
] | [
40
] | [
null
] | [
9
] | [
12
] | |
2024-11-19T03:12:12.246657+00:00 | 1,449,526,879,000 | 5d6fa0564b374c5cffa07b133409fd0789982473 | 3 | {
"blob_id": "5d6fa0564b374c5cffa07b133409fd0789982473",
"branch_name": "refs/heads/master",
"committer_date": 1449526879000,
"content_id": "802a9ce052d4f88c6daaafe50962fb33232e4334",
"detected_licenses": [
"MIT"
],
"directory_id": "a42474ef9d1f1f3fc693900d313040793342c2e5",
"extension": "py",
"fi... | 2.921875 | stackv2 | from Crypto.Cipher import ARC4
def encrypt_msg(msg, key=None):
""" Performs ARC4 Stream Cipher on msg using given symmetric key """
if key == None:
key = "14384624708653"
crypter = ARC4.new(key)
encrypted = crypter.encrypt(msg)
return str(encrypted)
def decrypt_msg(msg, key=None):
if k... | 26 | 28.38 | 72 | 11 | 245 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_b79eee9ed324b9ca_9382dabb", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used.", "... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used.",
"[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used."
] | [
8,
20
] | [
null,
null
] | [
17,
17
] | [
37,
37
] | |
2024-11-19T03:35:19.067260+00:00 | 1,661,222,313,000 | 4479d73bb2b078df8e6c458956a90bb619996858 | 2 | {
"blob_id": "4479d73bb2b078df8e6c458956a90bb619996858",
"branch_name": "refs/heads/master",
"committer_date": 1661222313000,
"content_id": "c2e008b52bf1ac261ae15690e26f9e6e7982876a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f3b10cc8342d76270ded4ff3fcebacdec7da8577",
"extension": "py"... | 2.390625 | stackv2 | import flask
import sys
from sqlalchemy import exc
import data.source as source
from flask_login import login_required
from services.delete_services import delete_object, drop_view
from decorators.admin import is_admin
import data.db_session as db_session
blueprint = flask.Blueprint('delete', __name__)
@blueprint.b... | 64 | 23.89 | 66 | 13 | 390 | python | [{"finding_id": "codeql_py/url-redirection_7b718f69af48b3ba_e99fefeb", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).\nUntrusted URL redirection depends on a ... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).\nUntrusted URL redirection depends on a [user-provided value](1).\nUntrusted URL redirection depends on a [user-provided value](1).\nUntrusted URL redirection depends on a [user-provided value](1).\nUntrusted URL redirection depends on a [user-provid... | [
64
] | [
null
] | [
25
] | [
29
] | |
2024-11-19T01:26:56.898494+00:00 | 1,623,017,004,000 | 639aef7fb51d7bd28dfc2b7155460ecfeaf08bbc | 2 | {
"blob_id": "639aef7fb51d7bd28dfc2b7155460ecfeaf08bbc",
"branch_name": "refs/heads/master",
"committer_date": 1623017004000,
"content_id": "ca8f3c14fa62e66b01a0922469b883595582f193",
"detected_licenses": [
"MIT"
],
"directory_id": "acdce65754802697eefffeb37b565024c68463da",
"extension": "py",
"fi... | 2.328125 | stackv2 | import argparse
import re
# Django Email Validator Regexes (https://github.com/django/django/blob/stable/3.1.x/django/core/validators.py#L158-L165)
local_regex = re.compile(
r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z" # dot-atom
r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\... | 184 | 36.14 | 123 | 14 | 1,678 | python | [{"finding_id": "codeql_py/redos_c2a573edd70b122d_e12f8f4b", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitio... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitions of '\\\\013'."
] | [
7
] | [
null
] | [
10
] | [
85
] | |
2024-11-19T01:26:58.076052+00:00 | 1,602,792,064,000 | a90deea6564137a95470133e513293d18dc50413 | 3 | {
"blob_id": "a90deea6564137a95470133e513293d18dc50413",
"branch_name": "refs/heads/main",
"committer_date": 1602792064000,
"content_id": "2c516652862cb0c2fae2d0ea9c074ea69b396040",
"detected_licenses": [
"MIT"
],
"directory_id": "853a2cafbb98afc706907a8cbbfe425ceff6f269",
"extension": "py",
"file... | 2.71875 | stackv2 | # -*- coding: utf-8 -*-
import requests
class MusixmatchHelper():
def __init__(self, apikey):
self.apikey = apikey
def search(self, track, artist):
url = "http://api.musixmatch.com/ws/1.1/track.search&apikey="+self.apikey
if track:
track = track.strip().replace(" ", "%20")... | 41 | 27.41 | 86 | 14 | 312 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_6fa8dc2bc9504c50_079d93d7", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text."
] | [
40
] | [
null
] | [
9
] | [
13
] | |
2024-11-19T01:26:58.911000+00:00 | 1,584,344,247,000 | 7400398635311d51a9635e4fb23407b645617870 | 3 | {
"blob_id": "7400398635311d51a9635e4fb23407b645617870",
"branch_name": "refs/heads/master",
"committer_date": 1584344247000,
"content_id": "7209ff3cd0319a0eb1c2d0f8f5bda541e584a7ff",
"detected_licenses": [
"MIT"
],
"directory_id": "4dbd1795b925b5b2071c1b09c471a5c1dceb5184",
"extension": "py",
"fi... | 3.09375 | stackv2 | import jinja2
import yaml
# Where's the folder with my templates (or my folders, if multiple)
template_loader = jinja2.FileSystemLoader(searchpath="./templates")
# Instance of the Environment class. Gives the loader (above), optionally parameters like
# block strings, variable strings etc.
template_env = jinja2.Envir... | 32 | 34.81 | 89 | 12 | 269 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ef4d6fee419d9a81_18b5796e", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
9
] | [
null
] | [
16
] | [
58
] | |
2024-11-19T01:37:54.166610+00:00 | 1,497,512,447,000 | a071835f3e5a2df1649f1b4fd7405b853fce603a | 2 | {
"blob_id": "a071835f3e5a2df1649f1b4fd7405b853fce603a",
"branch_name": "refs/heads/master",
"committer_date": 1497512447000,
"content_id": "09270493b9c68aae2c531f8a752b7bdccb97465b",
"detected_licenses": [
"MIT"
],
"directory_id": "65d5a6d85acd38c6e33e91c97e242e4b066665df",
"extension": "py",
"fi... | 2.4375 | stackv2 | #-*- coding: utf-8 -*-
from flask import *
from Models import *
import hashlib
import forecastio
from datetime import datetime
import datetime
app = Flask(__name__)
#ROUTING
@app.route('/')
def index():
return render_template('basic.html')
@app.route('/notes')
def notes():
if is_logged_in():
... | 170 | 28.59 | 136 | 26 | 1,117 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_542af19044df0470_3f886485", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computational... | [
87,
122
] | [
null,
null
] | [
86,
78
] | [
123,
95
] | |
2024-11-19T01:37:56.115133+00:00 | 1,575,745,226,000 | b37a5610be25805c73bc79f4e2f11e40fa3a2f0b | 4 | {
"blob_id": "b37a5610be25805c73bc79f4e2f11e40fa3a2f0b",
"branch_name": "refs/heads/master",
"committer_date": 1575745226000,
"content_id": "28bd2e00f9896b421bb48371b1f9ccbd3854d224",
"detected_licenses": [
"MIT"
],
"directory_id": "77e7a81bb6aa86ab938b8db1a5734e765e13b01c",
"extension": "py",
"fi... | 4.03125 | stackv2 | # ---------------------------------------------------------- #
# Title: IO Classes
# Description: A module of IO classes
# ChangeLog (Who,When,What):
# ChrisPerry,12/2/19, Created started script
# ChrisPerry,12/6/19, Edits
# ChrisPerry,12/7/19, Final Editst
# ---------------------------------------------------------- #... | 81 | 30.36 | 90 | 19 | 575 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_931b8e691a1da028_91bff8d2", "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."
] | [
57
] | [
61
] | [
19
] | [
34
] | |
2024-11-19T01:38:02.220826+00:00 | 1,510,328,222,000 | b378c35b327d8ffb8af4040244efa944880a653d | 3 | {
"blob_id": "b378c35b327d8ffb8af4040244efa944880a653d",
"branch_name": "refs/heads/master",
"committer_date": 1510328222000,
"content_id": "da08cab9fea3795452f3b9cb993a44391f2282fb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "eb39e8dc17c47aa303e7bda2aaff655b80b2a94a",
"extension": "py"... | 2.546875 | stackv2 | #!/usr/bin/env python
import os
import argparse
import logging
import pandas as pd
from multiprocessing import cpu_count
import model
from appconfig import setup_logging
from download import get_data
from preprocess import preprocess, trim_and_convert
from extract_features import get_audio_descriptors, get_features
... | 75 | 43.15 | 136 | 12 | 777 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0f254d34c6730e03_d1d325ea", "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."
] | [
71
] | [
null
] | [
11
] | [
81
] | |
2024-11-19T01:38:50.143025+00:00 | 1,390,838,486,000 | a2c3a6979639148f775df377c237b7676009145c | 3 | {
"blob_id": "a2c3a6979639148f775df377c237b7676009145c",
"branch_name": "refs/heads/master",
"committer_date": 1390838486000,
"content_id": "e35164b0111e593a8fc761e7f9d87caffe305518",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "36d1e002a6ae138802c18348b8c5ebd13eee4dbc",
"extension": "p... | 2.921875 | stackv2 | # !/usr/bin/env python
# -*- coding: utf-8 -*-
from abc import abstractmethod, ABCMeta
from uuid import uuid1
from hashlib import md5
from .exceptions import (DuplicateEntityError, DuplicateSystemError,
UnmanagedEntityError, UnmanagedSystemError,
NonUniqueTagError, Dead... | 325 | 26.69 | 79 | 19 | 1,837 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_eb3ee2b4b7cb0f52_00a5724e", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
279
] | [
null
] | [
24
] | [
39
] | |
2024-11-19T01:51:59.630793+00:00 | 1,677,107,686,000 | ae6b1c18c1ddf3cabc3975a053142fe9667b52ff | 3 | {
"blob_id": "ae6b1c18c1ddf3cabc3975a053142fe9667b52ff",
"branch_name": "refs/heads/master",
"committer_date": 1677107686000,
"content_id": "bf9ba1a831db3b1cb47eae3b191065a0c1b7d55c",
"detected_licenses": [
"MIT"
],
"directory_id": "12d90a195f2ed6cff60343e3b1a31aed8a0f675f",
"extension": "py",
"fi... | 2.828125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 16 16:05:10 2017
@author: kurner
"""
from make_coasters_db import DB
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
@app.route("/coasters")
def coasters():
return all_coasters()
@app.route("/coasters/<coaster>... | 76 | 25.04 | 84 | 15 | 512 | python | [{"finding_id": "codeql_py/reflective-xss_a044ea4c279314c4_824ae835", "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)."
] | [
23
] | [
null
] | [
12
] | [
32
] | |
2024-11-19T01:52:00.489526+00:00 | 1,692,596,779,000 | fe56b89dfb2d03843407dc5857244c0a6fa87262 | 3 | {
"blob_id": "fe56b89dfb2d03843407dc5857244c0a6fa87262",
"branch_name": "refs/heads/main",
"committer_date": 1692596779000,
"content_id": "1c90f9c793c0f9c87072967a4a7a0a5a7b0752b8",
"detected_licenses": [
"MIT"
],
"directory_id": "d3897da94dae9fdc8bf0e024845399b6b2f43c5e",
"extension": "py",
"file... | 3.03125 | stackv2 | import binascii
import hashlib
from Cryptodome.Cipher import DES, PKCS1_OAEP, AES
from Cryptodome.PublicKey import RSA
from Cryptodome.Random import get_random_bytes
from cryptography.fernet import Fernet
if __name__ == '__main__':
print("hashing and encryption starting")
# md5
hashed_string = "Python r... | 107 | 29.99 | 89 | 15 | 829 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_248bbb2cd735e358_ce4da7d9", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptograph... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES](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 DES](2) is broken or weak, and should not be used."
] | [
46,
48
] | [
null,
null
] | [
22,
11
] | [
46,
38
] | |
2024-11-19T01:52:10.591068+00:00 | 1,505,890,042,000 | b747f73c483be1c1d0e0a8b53584c3288fdc3a07 | 2 | {
"blob_id": "b747f73c483be1c1d0e0a8b53584c3288fdc3a07",
"branch_name": "refs/heads/master",
"committer_date": 1505890042000,
"content_id": "db745c2fcfceb7a04a791bb64b996f5008701137",
"detected_licenses": [
"MIT"
],
"directory_id": "04e088e7e8bfe38d7ba16848555799810c8b341c",
"extension": "py",
"fi... | 2.328125 | stackv2 | #-*- coding: utf-8 -*-
# reference:
# https://github.com/zake7749/PTT-Crawler
# https://github.com/wy36101299/PTTcrawler/blob/master/pttcrawler.py
import json
import requests
import time, os, re
from bs4 import BeautifulSoup
from bs4.element import NavigableString
# setting
save_dir_path = '/crawler_save'
crawler... | 152 | 26.22 | 89 | 23 | 1,202 | python | [{"finding_id": "codeql_py/request-without-cert-validation_8380a541c5d0a258_f119b53f", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
39
] | [
41
] | [
3
] | [
32
] | |
2024-11-19T01:52:12.824091+00:00 | 1,588,062,903,000 | f97bb45f2f07b4b27195240cb16e3745974a7149 | 2 | {
"blob_id": "f97bb45f2f07b4b27195240cb16e3745974a7149",
"branch_name": "refs/heads/master",
"committer_date": 1588062903000,
"content_id": "1d33a03056616c6b01cd6c58fdef935f204c7a9c",
"detected_licenses": [
"MIT"
],
"directory_id": "4cb8446603877b5801d934531d55082ab2666ac1",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/python
import asyncio
import socket
import struct
import sys
import logging
from factorio_status_ui.state import application_config
MESSAGE_TYPE_AUTH = 3
MESSAGE_TYPE_AUTH_RESP = 2
MESSAGE_TYPE_COMMAND = 2
MESSAGE_TYPE_RESP = 0
MESSAGE_ID = 0
logger = logging.getLogger(__name__)
class RconConnectionEr... | 124 | 35.73 | 120 | 16 | 927 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_09a0740858e9550b_ba05e802", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
28,
72
] | [
null,
76
] | [
18,
22
] | [
74,
10
] | |
2024-11-19T01:52:29.453599+00:00 | 1,479,160,239,000 | 5d2ceb9bc63095e8958713545ee66b6c348e13a2 | 2 | {
"blob_id": "5d2ceb9bc63095e8958713545ee66b6c348e13a2",
"branch_name": "refs/heads/master",
"committer_date": 1479160239000,
"content_id": "827549a5df6d543be17b86cf0a10064d8b191d8c",
"detected_licenses": [
"MIT"
],
"directory_id": "9144a3c3ccd5d1bdaa18a3df763963d244a0df15",
"extension": "py",
"fi... | 2.375 | stackv2 | import os
from flask import Flask, request, redirect, url_for, render_template, flash
from werkzeug.utils import secure_filename
from flask import send_from_directory
from datetime import datetime
from prosupadm import ProSupADM
UPLOAD_FOLDER = '/home/pocs/Documents/usp/tcc/webapp/files'
IMAGES_FOLDER = '/home/pocs/Do... | 65 | 35.92 | 77 | 18 | 545 | python | [{"finding_id": "codeql_py/url-redirection_b0193f7d14e593e1_6b1b1cf8", "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_... | 3 | true | [
"CWE-601",
"CWE-601",
"CWE-022"
] | [
"py/url-redirection",
"py/url-redirection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
27,
33,
52
] | [
null,
null,
null
] | [
29,
29,
27
] | [
40,
40,
35
] | |
2024-11-19T02:04:22.980764+00:00 | 1,589,281,396,000 | 00cb09ea3beeb4046398b40c4ec37666e78e1c13 | 3 | {
"blob_id": "00cb09ea3beeb4046398b40c4ec37666e78e1c13",
"branch_name": "refs/heads/master",
"committer_date": 1589281396000,
"content_id": "e725967404f5f2e79f41e13546f72eb7fece7207",
"detected_licenses": [
"MIT"
],
"directory_id": "4973e0791370a7f51dbfaf60e51ec995d6e65a96",
"extension": "py",
"fi... | 2.90625 | stackv2 | import sys
import numpy as mp
import pandas as pd
from sqlalchemy import create_engine
import re
import joblib
import nltk
nltk.download(['punkt', 'stopwords', 'wordnet'])
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize, sent_tokenize
from nltk.stem import WordNetLemmatizer
from sklearn.fea... | 169 | 29.43 | 107 | 17 | 1,225 | python | [{"finding_id": "codeql_py/overly-large-range_46c578376ca5a2dc_ec77350f", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
52
] | [
null
] | [
48
] | [
51
] | |
2024-11-19T02:04:28.161761+00:00 | 1,616,093,091,000 | fb22dff54049771957807e8de3a0c767aa89ef93 | 3 | {
"blob_id": "fb22dff54049771957807e8de3a0c767aa89ef93",
"branch_name": "refs/heads/main",
"committer_date": 1616093091000,
"content_id": "6b831f73b3139281f5e82eaf8481bfcfa6d3c112",
"detected_licenses": [
"MIT"
],
"directory_id": "1c3f695d939dfd8bb5f3671648c7f538c6f4d01f",
"extension": "py",
"file... | 2.8125 | stackv2 | #!/usr/bin/env python
import paramiko
import shlex
import subprocess
def ssh_command(ip, port, user, passwd, command):
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(ip, port=port, username=user, password=passwd)
ssh_session = client.get_tran... | 38 | 29.47 | 69 | 16 | 254 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_b3ed028af436fca0_473fef52", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
9
] | [
null
] | [
5
] | [
65
] | |
2024-11-19T02:04:45.102531+00:00 | 1,496,239,466,000 | 287f092fbd15d5c2136d0eb4e52020d41de79887 | 3 | {
"blob_id": "287f092fbd15d5c2136d0eb4e52020d41de79887",
"branch_name": "refs/heads/master",
"committer_date": 1496239466000,
"content_id": "36ce1182f83a715c30a84cbb37070ae5f08137d1",
"detected_licenses": [
"MIT"
],
"directory_id": "67d70d8dae250f715fe42d6a1aa27ff579da39a8",
"extension": "py",
"fi... | 2.578125 | stackv2 | from flask import Flask, render_template, request, json, session, redirect
import db
DEBUG = True
PORT = 5000
HOST = "0.0.0.0"
app = Flask(__name__)
app.secret_key = 'your_desired_secret_key_here'
@app.route("/")
def index():
flightDetails = db.getFlight()
return render_template("index.html", flight = flight... | 183 | 30.72 | 125 | 17 | 1,277 | python | [{"finding_id": "codeql_py/stack-trace-exposure_b3c867c26d433a94_f992fb31", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-215"
] | [
"py/stack-trace-exposure",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
122,
180
] | [
null,
null
] | [
20,
5
] | [
54,
53
] | |
2024-11-19T02:04:46.199445+00:00 | 1,584,039,962,000 | c3969ba3b5389dcce7721a51e7844eebd1a6aeeb | 3 | {
"blob_id": "c3969ba3b5389dcce7721a51e7844eebd1a6aeeb",
"branch_name": "refs/heads/master",
"committer_date": 1584039962000,
"content_id": "c0e8bb9e3fceb3dc61f1046d98e97080a802afa8",
"detected_licenses": [
"MIT"
],
"directory_id": "144c7f85bc52d5e5656eb0a89730326d2c0ea78f",
"extension": "py",
"fi... | 3.171875 | stackv2 | dictionary = {'level': '1', 'points': 10}
print(dictionary['level'])
print(dictionary['points'])
player_0 = {'level': 'novice'}
player_level = player_0.get('level')
player_points = player_0.get('points', 0)
print(player_level)
print(player_points)
# Start with an empty list.
profiles = []
# Make a new profile, and a... | 84 | 23.26 | 60 | 11 | 582 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_60b1900608c72784_25684960", "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."
] | [
52
] | [
null
] | [
11
] | [
40
] | |
2024-11-19T02:04:55.706210+00:00 | 1,682,636,052,000 | f0f2fcb1501316a0b6dfc3e3db6d0aa8b494d571 | 3 | {
"blob_id": "f0f2fcb1501316a0b6dfc3e3db6d0aa8b494d571",
"branch_name": "refs/heads/master",
"committer_date": 1682636052000,
"content_id": "c05e1d403a7ac67bedad427beea5ab25c1c7aec4",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "e5ba883c7ae6761e119e245d66b01efc41631d97",
"extension": "p... | 2.890625 | stackv2 |
# This challenge is super big, and it's impossible to solve with IDA alone.
# However, we are sure that most of the code is just garbage - you can't have
# a 100-point challenge with that much non-garbage code. Therefore the idea is
# to use GDB along with hardware breakpoints to find out where each byte is
# verif... | 195 | 37.29 | 113 | 13 | 3,219 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_84151a7d4c76ec5c_b4d2cff8", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw... | [
186
] | [
null
] | [
11
] | [
37
] | |
2024-11-19T02:04:59.174003+00:00 | 1,602,362,023,000 | b7bd4b4021cf1ead1abc9234b7942cb3f8ad8ea2 | 2 | {
"blob_id": "b7bd4b4021cf1ead1abc9234b7942cb3f8ad8ea2",
"branch_name": "refs/heads/master",
"committer_date": 1602362023000,
"content_id": "d1d02f115c8cd0c8d6f620da46eabadc385e93e8",
"detected_licenses": [
"MIT"
],
"directory_id": "a2534140fef4c5ce8fafedad5b6f5bb89b422708",
"extension": "py",
"fi... | 2.4375 | stackv2 | import json
import re
from typing import List, Dict
import requests
from flask_socketio import emit
from requests.auth import HTTPBasicAuth
from home.core.models import get_device
from home.web.utils import ws_login_required
from home.web.web import socketio, app
_ACTIVE_CLIENTS_REGEX = re.compile(r"(([0-9A-Fa-f]{1,... | 84 | 31.63 | 118 | 17 | 706 | python | [{"finding_id": "codeql_py/request-without-cert-validation_68e58eb7a9f08e83_3bb9da51", "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
] | [
53
] | [
13
] | [
83
] | |
2024-11-19T02:28:09.959204+00:00 | 1,596,502,671,000 | ecb204c0ced04fe80c21a72c44715fb24de6f268 | 2 | {
"blob_id": "ecb204c0ced04fe80c21a72c44715fb24de6f268",
"branch_name": "refs/heads/master",
"committer_date": 1596502671000,
"content_id": "ed54869233f8ba2d1242a0c083d2acce1a17174b",
"detected_licenses": [
"MIT"
],
"directory_id": "832a3d35ddb24ee01e61423b2a8e40ac3cc8999b",
"extension": "py",
"fi... | 2.375 | stackv2 | import pymongo
import os
from dotenv import load_dotenv
from pdb import set_trace as breakpoint
load_dotenv()
DB_USER = os.getenv("MONGO_USER", default="OOPS")
DB_PASSWORD = os.getenv("MONGO_PASSWORD", default="OOPS")
CLUSTER_NAME = os.getenv("MONGO_CLUSTER_NAME", default="OOPS")
connection_uri = f"mongodb+srv://{DB... | 34 | 24.53 | 120 | 8 | 194 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2887d9dc62d7dce1_32482c19", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
14
] | [
null
] | [
15
] | [
29
] | |
2024-11-19T02:28:14.284309+00:00 | 1,581,974,365,000 | d6aa20413a2f18a675a8a0c9ef005c0dd070ea4f | 3 | {
"blob_id": "d6aa20413a2f18a675a8a0c9ef005c0dd070ea4f",
"branch_name": "refs/heads/master",
"committer_date": 1581974365000,
"content_id": "9ebe7921714f7bd6b7b9fac50697dd8f1435d684",
"detected_licenses": [
"MIT"
],
"directory_id": "3e92b0676c96745e76318701ab5a60515c50dc46",
"extension": "py",
"fi... | 2.78125 | stackv2 | import socket
import struct
import textwrap
#Unpack etehrnet packet
def ether_frame(data):
dest_mac,src_mac,proto=struct.unpack('! 6s 6s H',data[:14])
print("***********")
print(dest_mac,src_mac)
return get_mac_addr(dest_mac),get_mac_addr(src_mac),socket.htons(proto),data[:20]
# Obtain Mac Addresses f... | 123 | 35.2 | 141 | 17 | 1,160 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a2d1a00b88ce05f0_40b918b0", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 9 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (priva... | [
28,
30,
35,
36,
37,
38,
39,
40,
72
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
15,
15,
29,
35,
25,
30,
28,
28,
11
] | [
19,
93,
36,
48,
28,
35,
31,
34,
15
] | |
2024-11-19T02:28:19.342245+00:00 | 1,558,748,387,000 | 86df0734cf4e90d5997e521786234ac9eb5cc6ac | 2 | {
"blob_id": "86df0734cf4e90d5997e521786234ac9eb5cc6ac",
"branch_name": "refs/heads/master",
"committer_date": 1558748387000,
"content_id": "e11b11a60917de38b2b9cc4cf73c25582ff20677",
"detected_licenses": [
"MIT"
],
"directory_id": "aa340fe042e74558356fb6f7b46bd57baeca1a90",
"extension": "py",
"fi... | 2.328125 | stackv2 | import logging
import random
from threading import Thread, Lock
import requests
from LosmliProxyPool.client.dbclient import RedisClient
from LosmliProxyPool.settings import default_settings
from LosmliProxyPool.settings.default_settings import MAX_CONCURRENT
logger = logging.getLogger(__name__)
# 检测ip可用线程
class Ch... | 71 | 36.89 | 136 | 16 | 646 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d78a0c7886342448_961cfbd9", "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)."
] | [
42
] | [
null
] | [
24
] | [
106
] | |
2024-11-19T02:37:27.184331+00:00 | 1,661,535,702,000 | 072699f6d080030913c4c987b0c1fb8bab7af339 | 3 | {
"blob_id": "072699f6d080030913c4c987b0c1fb8bab7af339",
"branch_name": "refs/heads/master",
"committer_date": 1661535702000,
"content_id": "6123d8584c26667b96d3a01b0d52672d59ed6c9f",
"detected_licenses": [
"MIT"
],
"directory_id": "2ac0f2d5335b5f9a27a1211d9fa9c4f8b44fc5ba",
"extension": "py",
"fi... | 2.75 | stackv2 | # -*- coding: utf-8 -*-
from hashlib import sha256
from hurry.filesize import size
import time
import math
import enum
from main import PASSWORD_SALT
def generate_password_hash(password):
password = sha256(password.encode("utf-8")).hexdigest()
password = "".join([password, PASSWORD_SALT])
return sha256(... | 54 | 27.44 | 76 | 15 | 505 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_6295a60cdea3c32d_d46eaa06", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational... | [
13,
15
] | [
null,
null
] | [
23,
19
] | [
47,
43
] | |
2024-11-19T02:37:30.238912+00:00 | 1,685,572,594,000 | 9c59cb86f630bde683bcc13846e8d19eb52783ab | 3 | {
"blob_id": "9c59cb86f630bde683bcc13846e8d19eb52783ab",
"branch_name": "refs/heads/master",
"committer_date": 1685572594000,
"content_id": "035aefbde32041ca27ad9647da77426a92c73268",
"detected_licenses": [
"MIT"
],
"directory_id": "b2d06ad8145cbfe92835d62899f004dc207ad1b5",
"extension": "py",
"fi... | 2.546875 | stackv2 | """Review Bot tool to check for hard-coded security credentials."""
from __future__ import unicode_literals
import base64
import json
import re
from zlib import crc32
import six
from reviewbot.tools.base import BaseTool
from reviewbot.utils.text import base62_encode
class SecretScannerTool(BaseTool):
"""Revie... | 401 | 29.69 | 93 | 20 | 3,101 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_fcde0427e255a2b0_2783e75d", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'slack.com/', so it might match more... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'slack.com/', so it might match more hosts than expected."
] | [
49
] | [
null
] | [
3739
] | [
3764
] | |
2024-11-19T02:37:39.479892+00:00 | 1,622,556,503,000 | 667d6e70c4b6cfb5c297434c02449f8f87ce10cc | 3 | {
"blob_id": "667d6e70c4b6cfb5c297434c02449f8f87ce10cc",
"branch_name": "refs/heads/master",
"committer_date": 1622556503000,
"content_id": "df245bc2d503857b3bd57d2e95fbb7656457b856",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "847fb818482af471e6108406ab0be2d46bc336ac",
"extension": "py"... | 2.59375 | stackv2 | import json
import os
import re
import sys
import time
import questionary
import yaml
# global variables
email_regex = r"^(\w|\.|\_|\-)+[@](\w|\_|\-|\.)+[.]\w{2,3}$"
def load_template_config():
template_config_path = f"{os.path.dirname(__file__)}/template_config.yaml"
try:
with open(template_config_... | 191 | 37.23 | 88 | 23 | 1,433 | python | [{"finding_id": "codeql_py/redos_41a7eb50fe2574b6_b201fe4e", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '_'.", "remediati... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '_'.",
"This part of the regular expression may cause exponential backtracking on strings starting with 'a@' and containing many repetitions of '_'."
] | [
11,
11
] | [
null,
null
] | [
18,
35
] | [
32,
49
] | |
2024-11-19T02:49:12.335516+00:00 | 1,614,196,083,000 | 285b28ba26729e313e618a2d4dae8a1ac70a39aa | 3 | {
"blob_id": "285b28ba26729e313e618a2d4dae8a1ac70a39aa",
"branch_name": "refs/heads/master",
"committer_date": 1614196083000,
"content_id": "949e3492039a9439e932b3331b7e17b3c4112dca",
"detected_licenses": [
"MIT"
],
"directory_id": "1e69c1c196720b682c7027749f1f4c2149aff4f4",
"extension": "py",
"fi... | 2.609375 | stackv2 | import json
import boto3
from util import validate_config_input, validate_unique_cluster_name
import storage
SECRETS_CLIENT = boto3.client('secretsmanager')
def remove_cluster(event, context):
"""Remove cluster and all associated credentials"""
"""{ "cluster_name": "foo-prod-cluster.com" }"""
CLUSTER_... | 74 | 29.54 | 77 | 22 | 458 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_79c818b3cee7c970_d26b7dd1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text.",
"This expression logs [sensitive data (secret)](... | [
66,
73
] | [
null,
74
] | [
31,
32
] | [
67,
59
] | |
2024-11-19T02:49:17.246053+00:00 | 1,683,743,253,000 | f2efbe35bacab269caa3d58b10a6825b3b582dfe | 3 | {
"blob_id": "f2efbe35bacab269caa3d58b10a6825b3b582dfe",
"branch_name": "refs/heads/master",
"committer_date": 1683743253000,
"content_id": "ae4a28c7fc6bbf595dc4cac235e7d3aa891e05d3",
"detected_licenses": [
"MIT"
],
"directory_id": "db5cc66ffe6ce1eb4ddb056f17878ad158463732",
"extension": "py",
"fi... | 2.75 | stackv2 | """A class that gets and parse RIB data using ietf-routing yang model"""
import collections
import time
import requests
import json
import warnings
from json.decoder import JSONDecodeError
warnings.filterwarnings('ignore', message='Unverified HTTPS request')
headers = {"Content-Type": 'application/yang-data+json', '... | 187 | 40.11 | 169 | 28 | 1,557 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d3284bd546d4a40b_fe207e99", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
40
] | [
null
] | [
24
] | [
159
] | |
2024-11-19T03:00:11.000144+00:00 | 1,615,501,290,000 | 0016938f9b1ba3323413e1bae9d3c18c93b21599 | 3 | {
"blob_id": "0016938f9b1ba3323413e1bae9d3c18c93b21599",
"branch_name": "refs/heads/master",
"committer_date": 1615501290000,
"content_id": "d755398349eb1abd2fa42f91c5f1e1c7c08574c4",
"detected_licenses": [
"MIT"
],
"directory_id": "89fc945e93c9cfacaab0d3bac0071ee95c86f81d",
"extension": "py",
"fi... | 2.625 | stackv2 | """
Import BookCrossing ratings, with data cleaning for invalid characters.
Usage:
bx-import.py [-T <file>] <file>
Options:
-T FILE
Write transcript to FILE [default: bx-import.transcript]
"""
import hashlib
from bookdata import script_log, db, tracking
from docopt import docopt
import numpy as np
f... | 66 | 28 | 97 | 15 | 511 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_926f04ae22ab94c8_1e22fef0", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
61
] | [
null
] | [
23
] | [
66
] | |
2024-11-19T03:00:12.347915+00:00 | 1,680,287,406,000 | 925b63ecc6c5a472e38a2bba152be26ee0caedc8 | 3 | {
"blob_id": "925b63ecc6c5a472e38a2bba152be26ee0caedc8",
"branch_name": "refs/heads/main",
"committer_date": 1680287406000,
"content_id": "61e83e4b5ffccfda46cb0fbeb7fbe6c2363a5913",
"detected_licenses": [],
"directory_id": "dc19f4cb92b1c7cc6f9e49aa103ada02496afe99",
"extension": "py",
"filename": "metri... | 2.546875 | stackv2 | # Copyright (c) 2022 Arista Networks, Inc.
# Use of this source code is governed by the Apache License 2.0
# that can be found in the COPYING file.
import argparse
import urllib3
import requests, ssl
import json
from cloudvision.Connector.grpc_client import GRPCClient, create_query
class grpcServer(object):
""" C... | 139 | 37.97 | 108 | 18 | 1,133 | python | [{"finding_id": "codeql_py/request-without-cert-validation_74593f7ab6113481_ea070fd0", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
31
] | [
37
] | [
25
] | [
10
] | |
2024-11-19T03:00:13.729013+00:00 | 1,623,888,169,000 | 04cdab1baaa642488d3cf4356963a44104e4cbbb | 3 | {
"blob_id": "04cdab1baaa642488d3cf4356963a44104e4cbbb",
"branch_name": "refs/heads/master",
"committer_date": 1623888169000,
"content_id": "45f5a1f7ff060a56ff8dbc535183564e5ec69a59",
"detected_licenses": [
"MIT"
],
"directory_id": "598cf86dbda2f36e3d5aea9990f0f161b5af7301",
"extension": "py",
"fi... | 2.65625 | stackv2 | from flask import Flask, request, jsonify
from flask_restful import Api
from ast import literal_eval
from common_functions import common
from modify_db import New_Entry
import os
import shutil
app = Flask(__name__)
api = Api(app)
class THE_USER():
# ADDS A NEW USER TO DB AND STORAGE.
@app.route("/" , methods... | 56 | 40.29 | 111 | 20 | 560 | python | [{"finding_id": "codeql_py/flask-debug_d12667e18089e36a_22dbb637", "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)."
] | [
56,
31,
32,
52
] | [
null,
null,
null,
null
] | [
5,
36,
30,
24
] | [
40,
95,
89,
66
] | |
2024-11-19T03:00:31.426876+00:00 | 1,454,580,264,000 | 55c8b047f17512eb69ee40164f1608411cec74d0 | 2 | {
"blob_id": "55c8b047f17512eb69ee40164f1608411cec74d0",
"branch_name": "refs/heads/master",
"committer_date": 1454580264000,
"content_id": "57208d381fc1be86ec5c1449f51967d312c7d420",
"detected_licenses": [
"BSD-3-Clause",
"Apache-2.0"
],
"directory_id": "de6fb3a55196b6bd36a4fda0e08ad658679fb7a1",... | 2.4375 | stackv2 | """SecureXMLRPCServer.py - simple XML RPC server supporting SSL.
Based on this article: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81549
For windows users: http://webcleaner.sourceforge.net/pyOpenSSL-0.6.win32-py2.4.exe
Imported from http://code.activestate.com/recipes/496786-simple-xml-rpc-server-over-... | 173 | 45.13 | 155 | 25 | 1,493 | python | [{"finding_id": "codeql_py/insecure-protocol_fc83d8a9007f84b6_f638f345", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version SSLv2 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol ve... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version SSLv2 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version SSLv3 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version TLSv1 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to SSL.Context](1)."
] | [
38
] | [
null
] | [
38
] | [
41
] | |
2024-11-19T03:11:42.955135+00:00 | 1,250,610,992,000 | 940093647d4175b96d43d428dd75c519c394dd1a | 3 | {
"blob_id": "940093647d4175b96d43d428dd75c519c394dd1a",
"branch_name": "refs/heads/master",
"committer_date": 1250610992000,
"content_id": "fbc9ab7f46638eea44a28a0e022fd699aa43db04",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a84b013cd995870071589cefe0ab060ff3105f35",
"extension": "py"... | 2.703125 | stackv2 | import logging
import os
import threading
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import urllib
HTML_ROOT = os.getenv("webdriver_test_htmlroot")
PORT = 8000
logger = logging.getLogger("webdriver.SimpleWebServer")
class MyHandler(BaseHTTPRequestHandler):
def do_GET(self):
try:
... | 53 | 27.94 | 68 | 15 | 342 | python | [{"finding_id": "codeql_py/path-injection_e4c5a771316f4cb0_6215342e", "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)."
] | [
15
] | [
null
] | [
22
] | [
56
] | |
2024-11-19T03:11:56.706267+00:00 | 1,595,467,354,000 | d4c3f7577010b5b8c2fa507d459e6619da27be0b | 3 | {
"blob_id": "d4c3f7577010b5b8c2fa507d459e6619da27be0b",
"branch_name": "refs/heads/master",
"committer_date": 1595467354000,
"content_id": "79726fe6d42cd51e2efa7c8266af720497672700",
"detected_licenses": [
"MIT"
],
"directory_id": "9a515daa382592e85d17f821168fb53f01ccea49",
"extension": "py",
"fi... | 3.03125 | stackv2 | import sys
import os
import re
import pickle
import nltk
nltk.download('punkt')
nltk.download('stopwords')
nltk.download('wordnet')
import pandas as pd
import numpy as np
from sqlalchemy import create_engine
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.stem.wordnet import Word... | 246 | 30.13 | 118 | 16 | 1,860 | python | [{"finding_id": "codeql_py/overly-large-range_eafc5a98e8333b33_368d7996", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
67
] | [
null
] | [
48
] | [
51
] | |
2024-11-19T03:12:28.138111+00:00 | 1,675,721,556,000 | 2f7106afb7445b2c4e58e61b3a7f82923fc3d300 | 3 | {
"blob_id": "2f7106afb7445b2c4e58e61b3a7f82923fc3d300",
"branch_name": "refs/heads/main",
"committer_date": 1675721556000,
"content_id": "fe7a47f4bb4fcc2410ad256bbbf3af0a5ef3e5d8",
"detected_licenses": [
"MIT"
],
"directory_id": "aaea93da3e9453ad0cf4cd23a9bb782bf6790e5f",
"extension": "py",
"file... | 2.859375 | stackv2 | import json
import os
from dataclasses import dataclass
from enum import Enum
from typing import Dict, List, Optional
import hvac
class Verb(Enum):
ADD = 1
REMOVE = 2
@dataclass
class Keyset:
"""Contains "accessor" and "id" tokens for a Vault path."""
accessor: str
id: str
@dataclass
class E... | 152 | 29.41 | 78 | 18 | 1,104 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_23bc6767979be132_af66bd8b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text.\nThis expression logs [sensitive data (secret)](5) a... | [
141
] | [
142
] | [
17
] | [
66
] | |
2024-11-19T03:12:40.594006+00:00 | 1,539,863,170,000 | e1d548c89d5efccc05357ea6d7b8735060aa5853 | 3 | {
"blob_id": "e1d548c89d5efccc05357ea6d7b8735060aa5853",
"branch_name": "refs/heads/master",
"committer_date": 1539863170000,
"content_id": "7bb94b71a540fb394b77bb41fa3db0394322b78b",
"detected_licenses": [
"MIT"
],
"directory_id": "315c83cc8ef1bab0cb33d4d1b9635a19ca03a94d",
"extension": "py",
"fi... | 2.53125 | stackv2 | import requests
import fuzion
import hashlib
import hmac
import time
import base64
from fuzion.exceptions import (
BadRequestError,
UnautorizedError,
NotFoundError,
PayloadTooLargeError,
TooManyRequestsError,
InternalServerError,
ResourceUnavailableError,
)
class Resource(dict):
host =... | 203 | 32.89 | 97 | 17 | 1,461 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_03c91e8825556ec5_ab3b0390", "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."
] | [
70
] | [
null
] | [
25
] | [
40
] | |
2024-11-19T03:35:58.177002+00:00 | 1,622,741,119,000 | 0ae6a5721bf1fc66c2524ae8faa317def0509d2a | 2 | {
"blob_id": "0ae6a5721bf1fc66c2524ae8faa317def0509d2a",
"branch_name": "refs/heads/main",
"committer_date": 1622741119000,
"content_id": "12cd361b6dee27f8827ca964f4879b12e50014c0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f05c5d0108cdd3ee5a5c08a76c1647383405a80b",
"extension": "py",
... | 2.359375 | stackv2 | import subprocess
import sys
from subprocess import Popen, PIPE
from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
# print(subprocess.run(['pylint', 'api.py'], text=True).stdout)
@app.route('/')
def index():
return render_template('home.html')
app.config['UPLOAD_FOLDER'] = '/rules'... | 46 | 27.07 | 113 | 13 | 314 | python | [{"finding_id": "codeql_py/path-injection_3d6c01549be568dd_98e61d99", "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)."
] | [
21
] | [
null
] | [
17
] | [
25
] | |
2024-11-19T03:35:59.693124+00:00 | 1,587,044,260,000 | 23e8d882ca514280f1c8aee05a93970e78645dc0 | 2 | {
"blob_id": "23e8d882ca514280f1c8aee05a93970e78645dc0",
"branch_name": "refs/heads/master",
"committer_date": 1587044260000,
"content_id": "54a36474c8c10810676dd88f61b10e6ef121ea39",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "64954397c3d7945fb47c86ebf79cd2620ed5fb61",
"extension": "py"... | 2.359375 | stackv2 | # Copyright (C) 2008 Abiquo Holdings S.L.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 56 | 45.2 | 97 | 16 | 593 | python | [{"finding_id": "codeql_py/request-without-cert-validation_0967f0df258721aa_50dde592", "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)."
] | [
34
] | [
37
] | [
9
] | [
26
] | |
2024-11-19T03:36:00.291473+00:00 | 1,509,580,906,000 | b7d5cbda4a8eae9fee8e1806317a393693372fcf | 2 | {
"blob_id": "b7d5cbda4a8eae9fee8e1806317a393693372fcf",
"branch_name": "refs/heads/master",
"committer_date": 1509580906000,
"content_id": "5a1765258065ba530edd69dfa6528ad6e017aae3",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e224714acd2db7d9326544ca64e25536f55fda0d",
"extension": "p... | 2.4375 | stackv2 | """Generate the Altair interface for Vega-Lite Version 1"""
import os
import shutil
from datetime import datetime
from itertools import chain
from collections import defaultdict
import copy
import jinja2
from schemapi import JSONSchema, JSONSchemaPlugin
from schemapi.utils import load_dynamic_module, save_module
f... | 289 | 36.91 | 169 | 19 | 2,319 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_49fbc5e9a3f9a487_72d84d61", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
126,
158,
242
] | [
null,
null,
null
] | [
20,
20,
20
] | [
61,
59,
64
] | |
2024-11-19T03:36:03.084579+00:00 | 1,526,519,013,000 | e3320d169b30a707926452df9b0f41c0f0385f1e | 3 | {
"blob_id": "e3320d169b30a707926452df9b0f41c0f0385f1e",
"branch_name": "refs/heads/master",
"committer_date": 1526519013000,
"content_id": "498bfabb781eff91852f64b776328eb670455619",
"detected_licenses": [
"MIT"
],
"directory_id": "cc277e057f8b7bcf69e84519af8581746d958fbe",
"extension": "py",
"fi... | 2.65625 | stackv2 | try:
from tkinter import *
from tkinter import ttk
except ImportError:
from Tkinter import *
import ttk
import Tkinter as tki
import json
import tkFileDialog
##pycrypto
import base64
import hashlib
from Crypto import Random
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self... | 414 | 27.77 | 119 | 19 | 2,778 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_4c81fcb17e9b338e_2a05985a", "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... | [
22
] | [
null
] | [
35
] | [
47
] | |
2024-11-19T01:28:44.415726+00:00 | 1,522,735,463,000 | aafbd2616beb5db2f09b1ff3ac8e830682839b4b | 3 | {
"blob_id": "aafbd2616beb5db2f09b1ff3ac8e830682839b4b",
"branch_name": "refs/heads/master",
"committer_date": 1522735463000,
"content_id": "6c49f71fd853e8e920e9f1f59cb4390d1a7b922b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b16433d7b8c504c3d1c3b54f2bcc61eddc2827a8",
"extension": "py"... | 2.59375 | stackv2 | # -*- coding: utf-8 -*-
import os
import time
import datetime
import logging
import flask
import werkzeug
import optparse
import tornado.wsgi
import tornado.httpserver
import urllib
parser = optparse.OptionParser()
parser.add_option(
'-p', '--port',
help="which port to serve content on",
type='int', defaul... | 75 | 25.69 | 91 | 18 | 494 | python | [{"finding_id": "codeql_py/path-injection_27dc99e274515ec7_88088736", "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)."
] | [
51
] | [
null
] | [
19
] | [
79
] | |
2024-11-19T01:29:15.052271+00:00 | 1,679,503,963,000 | fd206592e650e5b1e0d020d764c3294984e13621 | 3 | {
"blob_id": "fd206592e650e5b1e0d020d764c3294984e13621",
"branch_name": "refs/heads/master",
"committer_date": 1679503963000,
"content_id": "153b2374b304e687aa5de6fbc71b9303e8f09095",
"detected_licenses": [
"MIT"
],
"directory_id": "5621aee96d52e8d12d943f5ba6410efa995a4c38",
"extension": "py",
"fi... | 2.640625 | stackv2 | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import re
import getpass
from instagrambot.model import get_gecko
from instagrambot.comment_bot.commenter import Commenter
class InstagramBot:
def __init__(self, username, password):
self.username = username
... | 157 | 30.34 | 109 | 16 | 1,090 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_a0db941893aefc5d_77bf786a", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'instagram.com/p', so it might match... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'instagram.com/p', so it might match more hosts than expected."
] | [
85
] | [
null
] | [
31
] | [
60
] | |
2024-11-19T01:29:29.881558+00:00 | 1,530,626,691,000 | f8620796bcb467d90c58d38e6b5b85f0696aaf0c | 2 | {
"blob_id": "f8620796bcb467d90c58d38e6b5b85f0696aaf0c",
"branch_name": "refs/heads/master",
"committer_date": 1530626691000,
"content_id": "f3056948033d4ad905d09c1c4cd11ea0ef6cb1c2",
"detected_licenses": [
"MIT"
],
"directory_id": "d34d43466c48e823fbba775f4871ee2d5be58cbf",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf8 -*-
import subprocess
from subprocess import PIPE
from pathlib import Path
from collections import deque
import hashlib
import re
import os
import sys
import zlib
import github3
# This should be a static class to collect all git method
class Git(object):
def git_helper(... | 148 | 38.19 | 114 | 26 | 1,119 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a5394d22092658cd_692b5bda", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com](1) may be at an arbitrary position in the ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [github.com](1) may be at an arbitrary position in the sanitized URL."
] | [
63
] | [
null
] | [
28
] | [
47
] | |
2024-11-19T01:29:54.926394+00:00 | 1,471,436,754,000 | 2871dda116cfc8fd141560b94b0ae0c60cc29117 | 3 | {
"blob_id": "2871dda116cfc8fd141560b94b0ae0c60cc29117",
"branch_name": "refs/heads/master",
"committer_date": 1471436754000,
"content_id": "0f14a43a57c9e2b3ae821fbcf2a792cd2abf93a4",
"detected_licenses": [
"MIT"
],
"directory_id": "2aeb407f341f78f1bba121aaaff7fcbfedcd67a7",
"extension": "py",
"fi... | 2.890625 | stackv2 | import os
# We'll render HTML templates and access data sent by POST
# using the request object from flask. Redirect and url_for
# will be used to redirect the user once the upload is done
# and send_from_directory will help us to send/show on the
# browser the file that the user just uploaded
from flask import Flask, ... | 49 | 43.08 | 96 | 18 | 439 | python | [{"finding_id": "codeql_py/url-redirection_9a7f29ffb279407b_5fd4bd48", "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_... | 3 | true | [
"CWE-601",
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
26,
33,
42
] | [
null,
null,
null
] | [
33,
33,
33
] | [
44,
44,
44
] | |
2024-11-19T01:30:07.489698+00:00 | 1,554,078,488,000 | dbfa3566b449512fb0b12f86d099fe06fd6e3adc | 2 | {
"blob_id": "dbfa3566b449512fb0b12f86d099fe06fd6e3adc",
"branch_name": "refs/heads/master",
"committer_date": 1554078488000,
"content_id": "c25def94ef9bd125ec5e3e1c63d490642bd5bea0",
"detected_licenses": [
"Zlib"
],
"directory_id": "92cebc85a12057aa5314d52fe1b37512c0a19639",
"extension": "py",
"f... | 2.421875 | stackv2 | import requests
import json
with open("config.json", "r") as configFile:
config=json.load(configFile)
deviceHost = config["deviceAccess"][0]["deviceHost"]
devicePort = config["deviceAccess"][0]["devicePort"]
deviceUser = config["deviceAccess"][0]["deviceUser"]
devicePass = config["deviceAccess"][0]["devicePass"]
... | 107 | 42.69 | 174 | 19 | 1,182 | python | [{"finding_id": "codeql_py/request-without-cert-validation_a6d697dbbaf9bbd9_871a94ca", "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]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
21,
68,
96
] | [
null,
null,
null
] | [
13,
14,
13
] | [
92,
93,
92
] | |
2024-11-19T01:54:56.879642+00:00 | 1,584,584,720,000 | 7940a684cbb38bd2c47c485f641e2c8bbf7101db | 4 | {
"blob_id": "7940a684cbb38bd2c47c485f641e2c8bbf7101db",
"branch_name": "refs/heads/master",
"committer_date": 1584584720000,
"content_id": "c6a4c2e433b8e16db1642cf3e3ee6c0f9c5fd0bd",
"detected_licenses": [
"MIT"
],
"directory_id": "7548cce61d2ce9d0983d9a530b636753ad88f013",
"extension": "py",
"fi... | 4.21875 | stackv2 | class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
def friend(self, friend_name):
return Student(friend_name, self.school)
anna = Student("Anna", "Oxford... | 52 | 22.9 | 53 | 11 | 332 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4a815382805ab6d1_5b1c4d26", "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.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
28,
52
] | [
null,
null
] | [
7,
7
] | [
17,
17
] | |
2024-11-19T01:55:13.337243+00:00 | 1,690,339,143,000 | cb3866d92e18efd9e774ea7a35e49c8292b8bb5d | 3 | {
"blob_id": "cb3866d92e18efd9e774ea7a35e49c8292b8bb5d",
"branch_name": "refs/heads/master",
"committer_date": 1690339143000,
"content_id": "c15c3d9a61447a256031eb07d4da640b4b25519b",
"detected_licenses": [
"MIT"
],
"directory_id": "ba606a47412f37ddd6e6b7b19651820f2dcade92",
"extension": "py",
"fi... | 2.84375 | stackv2 | from flask import Flask, request
import os
import requests
import logging
app = Flask(__name__)
def config(key):
'''
Stores the configuration variables in one hashmap
'''
config_store = {
'nytimes_api_key': os.environ['NYTIMES_API_KEY'],
'nytimes_base_url': 'https://api.nytimes.com/svc... | 52 | 32.48 | 122 | 14 | 424 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_15d1a5350c5a1fe6_8b732c5a", "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-079",
"CWE-918",
"CWE-117"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/reflective-xss",
"py/partial-ssrf",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"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.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"This log entry depen... | [
47,
47,
48,
48,
47
] | [
null,
null,
null,
null,
null
] | [
63,
68,
12,
12,
63
] | [
66,
75,
83,
76,
66
] | |
2024-11-19T01:55:15.068142+00:00 | 1,430,004,149,000 | d81918b690066036a2ea156214f12cca06011092 | 3 | {
"blob_id": "d81918b690066036a2ea156214f12cca06011092",
"branch_name": "refs/heads/master",
"committer_date": 1430004149000,
"content_id": "67d62515acf611c09fc3338fa34f47b1d83880f1",
"detected_licenses": [
"MIT"
],
"directory_id": "83d28463608f6fb0a85e9f2ef5ea11936bf80f69",
"extension": "py",
"fi... | 2.609375 | stackv2 | #!/usr/bin/python
"""
This script generatess various OAuth parameters for Twitter login.
Please run the following command to generate a valid 'config.py':
>>> python config_generate.py --consumer_key=$CONSUMER_KEY --consumer_secret=$CONSUMER_SECRET
... --callback_url=$CALLBACK_URL
where ... | 39 | 38.79 | 108 | 13 | 383 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_4e08de2797b244b7_717e9e83", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text."
] | [
23
] | [
37
] | [
10
] | [
11
] | |
2024-11-19T02:06:41.075206+00:00 | 1,575,104,490,000 | 0eaca1863a25d98a503a2cb8a5c8f3548156e290 | 3 | {
"blob_id": "0eaca1863a25d98a503a2cb8a5c8f3548156e290",
"branch_name": "refs/heads/master",
"committer_date": 1575104490000,
"content_id": "b20869dd09dadd256dbfca0d46b1e90c589e5c94",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5494b36cfd207cfca642cc156667a916846bdf5b",
"extension": "py"... | 2.84375 | stackv2 | import random
import string
import urllib.parse
import urllib.request
def rand_pass(size):
# Takes random choices from
# ascii_letters and digits
generate_pass = ''.join([random.choice( string.ascii_uppercase +
string.ascii_lowercase +
string.digi... | 54 | 21.13 | 88 | 14 | 276 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_63a551ff55907f4d_777caa19", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
20
] | [
null
] | [
7
] | [
15
] | |
2024-11-19T02:06:53.300459+00:00 | 1,490,363,552,000 | ac992d3f200c92e7d5e98b19790533e078b9e6cd | 3 | {
"blob_id": "ac992d3f200c92e7d5e98b19790533e078b9e6cd",
"branch_name": "refs/heads/master",
"committer_date": 1490363552000,
"content_id": "8259cf849d2d6df5a3a3470df6844b2ce5df1f59",
"detected_licenses": [
"MIT"
],
"directory_id": "bc61aca3346eb98e41d1a54e9ac730cad7af7eb0",
"extension": "py",
"fi... | 2.546875 | stackv2 | # -*- coding: utf-8 -*-
import json
import redis
import logging
from tornado import escape
from Handlers.BaseHandler import BaseHandler
logger = logging.getLogger(__name__)
class RegisterHandler(BaseHandler):
"""Handle user register actions
"""
def initialize(self, redis_client: redis.Redis):
""... | 50 | 38.06 | 114 | 17 | 387 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_86464b79c61017f0_32d84599", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
44,
48
] | [
null,
49
] | [
32,
25
] | [
50,
44
] | |
2024-11-19T02:06:57.613022+00:00 | 1,581,585,869,000 | 555ab6f8eac5c3979e1c98eac4e89ea208cd786d | 3 | {
"blob_id": "555ab6f8eac5c3979e1c98eac4e89ea208cd786d",
"branch_name": "refs/heads/master",
"committer_date": 1581585869000,
"content_id": "d0585ea092b1b276632630c014167591b4d98597",
"detected_licenses": [
"MIT"
],
"directory_id": "8556af4be3442e6543a5d98ed71f7285fb7a784e",
"extension": "py",
"fi... | 2.53125 | stackv2 | import os
import cv2
import imgaug as ia
import numpy as np
import pandas as pd
from imgaug import augmenters as iaa
import matplotlib.pyplot as plt
from itertools import repeat
import jinja2
from jinja2 import Environment, Template
from jinja2 import FileSystemLoader
import cv2
from config import TARGET_DIR, FILL_UP_T... | 167 | 26.99 | 102 | 17 | 1,320 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f28063b6668f9c06_281a359e", "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."
] | [
103
] | [
null
] | [
16
] | [
41
] | |
2024-11-19T02:06:57.666149+00:00 | 1,606,785,762,000 | bb07acba7cfd820c649a09c94728312848e323a1 | 3 | {
"blob_id": "bb07acba7cfd820c649a09c94728312848e323a1",
"branch_name": "refs/heads/master",
"committer_date": 1606785762000,
"content_id": "6fa43d9a8b3b763c83fa2cc09b7b9a290387f175",
"detected_licenses": [
"MIT"
],
"directory_id": "37491832279c34a63f7694111242681d84e8b8aa",
"extension": "py",
"fi... | 2.703125 | stackv2 | import base64
import hashlib
import json
import urllib
import urllib.request
def verify(filePath):
dmt = DamatuApi("test", "test")
return dmt.decode(filePath, 287)
def md5str(str): # md5加密字符串
m = hashlib.md5(str.encode(encoding="utf-8"))
return m.hexdigest()
def md5(byte): # md5加密byte
return ... | 130 | 31.88 | 128 | 17 | 1,279 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_6e18cbc4424ae422_1a59dd73", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
13,
18
] | [
null,
null
] | [
21,
24
] | [
49,
28
] | |
2024-11-19T02:07:16.935182+00:00 | 1,440,947,603,000 | 02937f5f7c285b88ae6ad84f43d024c629a9ea8b | 2 | {
"blob_id": "02937f5f7c285b88ae6ad84f43d024c629a9ea8b",
"branch_name": "refs/heads/master",
"committer_date": 1440947603000,
"content_id": "b70600534666b80757386e0a9534bdad739ee7e3",
"detected_licenses": [
"MIT"
],
"directory_id": "305cfe3a1f16555509d6b63b1955cbfd2c667344",
"extension": "py",
"fi... | 2.4375 | stackv2 | # -*- coding: utf-8 -*-
import logging
from blogs.models import Blog
from django.contrib.auth import logout as django_logout, authenticate, login as django_login
from django.contrib.auth.models import User
from django.shortcuts import render, redirect
from users.forms import LoginForm, UserCreateForm
from django.views.... | 103 | 30.35 | 92 | 19 | 637 | python | [{"finding_id": "codeql_py/url-redirection_1e20987ec4f47e42_d46f0624", "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)."
] | [
39
] | [
null
] | [
37
] | [
73
] | |
2024-11-19T02:07:22.734326+00:00 | 1,606,486,264,000 | 19ff683d317c2ead4c3fbbddee99e2c461125468 | 3 | {
"blob_id": "19ff683d317c2ead4c3fbbddee99e2c461125468",
"branch_name": "refs/heads/master",
"committer_date": 1606486264000,
"content_id": "4f6f908f7a34e05df2c73d74255a70f022943629",
"detected_licenses": [
"MIT"
],
"directory_id": "94816ed7566b3f54227c176ae20e0e334643fa39",
"extension": "py",
"fi... | 2.921875 | stackv2 | import logging
from abc import abstractmethod
from datetime import datetime
from typing import Union
import numpy as np
import pandas as pd
from pandas import Timestamp
from wetterdienst.dwd.metadata.column_names import DWDMetaColumns
from wetterdienst.dwd.util import parse_datetime
from wetterdienst.exceptions impor... | 163 | 31.1 | 88 | 15 | 1,077 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ae79b574ebbbfd19_d65c3b29", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text."
] | [
125
] | [
126
] | [
17
] | [
51
] | |
2024-11-19T02:32:09.939117+00:00 | 1,553,397,909,000 | 8c2371bb73264fcefc2d70e35616ee2471cbda6d | 3 | {
"blob_id": "8c2371bb73264fcefc2d70e35616ee2471cbda6d",
"branch_name": "refs/heads/master",
"committer_date": 1553397909000,
"content_id": "72c2261e4ae4ee52a1c7b71692e7df5e8d2d0db6",
"detected_licenses": [
"MIT"
],
"directory_id": "d0fa8b08a47eac7860e71d5a218f8fd9d520fb7a",
"extension": "py",
"fi... | 2.96875 | stackv2 | #!/usr/local/bin/python3
# Mox Inventory -- A Scryfall powered opensource MTG invetory utility.
import json # Handles JSON data.
import sqlite3 # Backend DB for MOXI.
import card_util # A utility for creating and handling magic cards.
import requests # Handles even more web reqs.
import flask # Awesome microservice fo... | 182 | 31.38 | 139 | 15 | 1,432 | python | [{"finding_id": "codeql_py/reflective-xss_496a1c883d3df729_d8ed5cc4", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability d... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2).\nCross-site scripting vulnerability due to a [user-provided value](3)."
] | [
156
] | [
null
] | [
9
] | [
72
] | |
2024-11-19T02:32:43.366729+00:00 | 1,463,359,397,000 | 9e3610a5957cfc1f24af6ea12c2cd48aeaeafa72 | 3 | {
"blob_id": "9e3610a5957cfc1f24af6ea12c2cd48aeaeafa72",
"branch_name": "refs/heads/master",
"committer_date": 1463359397000,
"content_id": "78c1463e4d3cd569764b17b764dec754ddb51853",
"detected_licenses": [
"MIT"
],
"directory_id": "91ae189ba10e5a17e4119fdff27f6f912dd5d9cb",
"extension": "py",
"fi... | 2.53125 | stackv2 | # -*- coding:utf-8 -*-
import hashlib
import json
import sys
from time import time, localtime, strftime
try:
import requests
except Exception as e:
print('缺少requests库,请安装requests库: pip3 install requests')
raise e
DEFAULT_SMS_SEND_API_URL = 'http://gw.api.taobao.com/router/rest'
__VERSION__ = '0.1.7'
__aut... | 231 | 35.37 | 106 | 15 | 2,123 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_9be9a4318fdc96a8_556c7965", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](2) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](3) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](4) is used in a hashing algorithm ... | [
47
] | [
null
] | [
28
] | [
42
] | |
2024-11-19T02:32:53.726605+00:00 | 1,598,603,108,000 | c1ec9f9d854c7f38f292ca87afb672b7b9860c4a | 3 | {
"blob_id": "c1ec9f9d854c7f38f292ca87afb672b7b9860c4a",
"branch_name": "refs/heads/master",
"committer_date": 1598603108000,
"content_id": "e70479557107fb2b7dd4c4d5472de51beadecff8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6568d46065f5b89471cd06c4e9d06733aacb1988",
"extension": "py"... | 2.515625 | stackv2 | import logging
import requests
from .base import LmDriver, NotFoundException
logger = logging.getLogger(__name__)
class LmVimDriverMgmtDriver(LmDriver):
"""
Client for managing VIM Drivers
"""
def __init__(self, lm_base, lm_security_ctrl=None):
super().__init__(lm_base, lm_security_ctrl)
... | 68 | 40.15 | 107 | 15 | 612 | python | [{"finding_id": "codeql_py/request-without-cert-validation_f0246ed0918f4531_8a4ed0e5", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 4 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
27,
40,
51,
62
] | [
null,
null,
null,
null
] | [
20,
20,
20,
20
] | [
86,
71,
68,
68
] | |
2024-11-19T02:43:27.386549+00:00 | 1,626,832,378,000 | 502aaa0b9f5178c18f51c1106f2783636cef4587 | 2 | {
"blob_id": "502aaa0b9f5178c18f51c1106f2783636cef4587",
"branch_name": "refs/heads/master",
"committer_date": 1626832378000,
"content_id": "34af65254428ca311d657e127595657b7d141a64",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8f2f850604d9b05fb0d9ef858e976daff497f927",
"extension": "p... | 2.390625 | stackv2 | import argparse
import json
import os
import torch
import sys
sys.path.append("./")
from torch.utils.data import DataLoader
from tqdm import tqdm
from DNN_spec.DNNnet import DNNnet, Dnn_net_Loss
from DNN_spec.spec2load import spec2load
def load_checkpoint(checkpoint_path, model, optimizer):
assert os.path.isfile(... | 122 | 33.43 | 84 | 17 | 898 | python | [{"finding_id": "codeql_py/overly-permissive-file_b4e5e393714bb3ab_06f44038", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable."
] | [
64
] | [
null
] | [
9
] | [
42
] | |
2024-11-19T02:43:34.946096+00:00 | 1,524,150,431,000 | 10249d094916c02b156ae5de53aae9e1f9f781a7 | 2 | {
"blob_id": "10249d094916c02b156ae5de53aae9e1f9f781a7",
"branch_name": "refs/heads/master",
"committer_date": 1524150431000,
"content_id": "d43021aa73d5ab65dde51620837db55ddfedc7d1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bdfb31d372deca2c33b85837d59b7d2c8063761a",
"extension": "py"... | 2.40625 | stackv2 | import os
import sys
from jinja2 import Environment, FileSystemLoader
PATH = os.path.dirname(os.path.abspath(__file__))
TEMPLATE_ENVIRONMENT = Environment(
autoescape=False,
loader=FileSystemLoader(os.path.join(PATH, 'templates')),
trim_blocks=False)
def render_template(template_filename, context):
r... | 45 | 25.69 | 79 | 12 | 282 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ecbb1cad1fff60f9_8a5828ab", "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
] | [
24
] | [
23
] | |
2024-11-19T02:54:55.612543+00:00 | 1,532,102,053,000 | 456cce6c6f77510452aaabe16942bb869093c9b5 | 3 | {
"blob_id": "456cce6c6f77510452aaabe16942bb869093c9b5",
"branch_name": "refs/heads/master",
"committer_date": 1532102053000,
"content_id": "0a435132996e13cfe73bf0e3b11fc6408b6ebaa8",
"detected_licenses": [
"MIT"
],
"directory_id": "1ff674f1a983f779184912d04a42264bf788b9e7",
"extension": "py",
"fi... | 2.625 | stackv2 | from utils import cnll
from heapq import *
from math import log, pi, sin, cos, exp
import random
import copy
import numpy as np
import os
from pyquil.api import QVMConnection
from pyquil.quil import Program
# private keys
from wo3kie_private import API_KEY, USER_ID
# config
PYQUIL_CONFIG = f"""
[Rigetti Forest]
... | 528 | 19.53 | 117 | 18 | 3,100 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_2bc0a38c157709ed_88be092d", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text."
] | [
403
] | [
null
] | [
13
] | [
26
] | |
2024-11-19T02:55:02.025629+00:00 | 1,582,088,219,000 | deeb78fe3e30c3662f25f3777c74dfdea11eaab5 | 3 | {
"blob_id": "deeb78fe3e30c3662f25f3777c74dfdea11eaab5",
"branch_name": "refs/heads/master",
"committer_date": 1582088219000,
"content_id": "f6caec54f16bc7f9905f4e99b2c87bbfadf58732",
"detected_licenses": [
"MIT"
],
"directory_id": "07622a0fb38e843ab0eef4f69bb8fb25d107c06d",
"extension": "py",
"fi... | 2.953125 | stackv2 | """
Downloading QM9/ DECAGON data to args.path (set by default to be "./data/")
command: python data_download QM9 DECAGON -p path
"""
import argparse
import os
import wget
import zipfile
import tarfile
from utils.file_utils import *
def download_decagon_data(dir_path='./data/'):
"""
Step 0: Download P... | 153 | 31.93 | 79 | 16 | 1,309 | python | [{"finding_id": "codeql_py/tarslip_8fdcaa532d9dc432_deeb42c3", "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)."
] | [
103
] | [
null
] | [
13
] | [
20
] | |
2024-11-19T02:55:03.417537+00:00 | 1,676,139,610,000 | b46c15a7ce33f41d4d8d01360c9d7899218ec537 | 3 | {
"blob_id": "b46c15a7ce33f41d4d8d01360c9d7899218ec537",
"branch_name": "refs/heads/master",
"committer_date": 1676139610000,
"content_id": "55b684f31f1473d52c2fa0b7b7a62c290add4a30",
"detected_licenses": [
"MIT"
],
"directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9",
"extension": "py",
"fi... | 3.28125 | stackv2 | import sys
import unittest
import jinja2
# sys._getframe works on CPython and PyPy. Not tested elsewhere
rs = lambda text: text.format(**sys._getframe(1).f_locals)
def rj(text):
template = jinja2.Template(text)
return template.render(sys._getframe(1).f_locals)
class TestRubyStringFormat(unittest.TestCase):... | 53 | 28.55 | 87 | 12 | 393 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_c850e12a5dabd426_39671d60", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
10
] | [
null
] | [
16
] | [
37
] | |
2024-11-19T02:55:48.364348+00:00 | 1,681,395,714,000 | 3cb961bf178ab64be487bde19733cb8d1751ffd8 | 3 | {
"blob_id": "3cb961bf178ab64be487bde19733cb8d1751ffd8",
"branch_name": "refs/heads/master",
"committer_date": 1681395714000,
"content_id": "44fb1a0ab4819bed60fb6ed545db41be2235b80a",
"detected_licenses": [
"Unlicense"
],
"directory_id": "6433efd7c687e735054d5ea1ac4d98949d2296e6",
"extension": "py",... | 3.15625 | stackv2 | import argparse
import hashlib
from getpass import getpass
HASH = "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
def ask_pass():
clear_password = getpass()
hashed_password = hashlib.sha256(clear_password.encode())
return hashed_password.hexdigest()
def main():
global HASH
pa... | 30 | 25.13 | 81 | 13 | 220 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_04d7b94753ba4c97_2ccf5e32", "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."
] | [
10
] | [
null
] | [
38
] | [
61
] | |
2024-11-19T02:55:53.292913+00:00 | 1,639,111,919,000 | 337eaad9fe013a5b612d294cf7d71498635c6be8 | 3 | {
"blob_id": "337eaad9fe013a5b612d294cf7d71498635c6be8",
"branch_name": "refs/heads/master",
"committer_date": 1639111919000,
"content_id": "482cc4f47d8b8d0dcca00547e7c10c5371ad6158",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ca593f5a272ce0478ba6f52d2670cb9dd8564b00",
"extension": "py"... | 2.828125 | stackv2 | # Copyright 2017 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 189 | 29.48 | 88 | 16 | 1,310 | python | [{"finding_id": "codeql_py/overly-permissive-file_2e8b4f6ba492a0c5_d1e8eeb3", "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": ... | 2 | true | [
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable.",
"Overly permissive mask in chmod sets file to world writable."
] | [
59,
79
] | [
null,
null
] | [
9,
9
] | [
39,
30
] | |
2024-11-19T02:56:09.321520+00:00 | 1,557,749,514,000 | d71def2d01c9c7283ddc3dc5ca8aef6dfba37708 | 2 | {
"blob_id": "d71def2d01c9c7283ddc3dc5ca8aef6dfba37708",
"branch_name": "refs/heads/master",
"committer_date": 1557749514000,
"content_id": "c4802fdb5e049f87da9d607f894af584a3c8a620",
"detected_licenses": [
"MIT"
],
"directory_id": "07ef91bbb0d6ee50ef8be238a0c8e23acb81b925",
"extension": "py",
"fi... | 2.46875 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .models import Order, Delivery
import json
import requests
import datetime
class QR:
def __init__(self, code):
self.code = code
self.url = "https://zxing.org/w/chart?cht=qr&chs=350x350&chld=L&choe=UTF-8&chl=%s" % self.code
... | 92 | 40.79 | 124 | 22 | 823 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b3927890e854d7cb_0610e068", "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."
] | [
36
] | [
null
] | [
19
] | [
22
] | |
2024-11-19T03:10:23.683804+00:00 | 1,542,245,677,000 | b49b5a915c1cdcdaca1da5f5c274b29c2bdbc451 | 3 | {
"blob_id": "b49b5a915c1cdcdaca1da5f5c274b29c2bdbc451",
"branch_name": "refs/heads/master",
"committer_date": 1542245677000,
"content_id": "091939acaa17314a102b8de3410ce53e2e496b59",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3c1639bccf3fc0abc9c82c00ab92ac3f25cf105e",
"extension": "py"... | 2.828125 | stackv2 | # coding:utf-8
from flask import Flask, render_template, make_response, request
app = Flask(__name__)
@app.route('/')
def index():
resp = make_response('返回给网页的内容')
# 1.设置cookie,默认有效期是临时cookie,浏览器关闭之后就失效
resp.set_cookie('cookie_name1','jack1')
resp.set_cookie('cookie_name2','jack2')
# 2.max_age 设置有... | 34 | 24.53 | 113 | 10 | 286 | python | [{"finding_id": "codeql_py/flask-debug_f5e98dee9b21df0b_0525bbcb", "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)."
] | [
33,
22
] | [
null,
null
] | [
3,
11
] | [
51,
12
] | |
2024-11-19T03:21:45.492859+00:00 | 1,583,338,224,000 | 1b44b3f01925a7795b2e521a639a58badf6b4575 | 2 | {
"blob_id": "1b44b3f01925a7795b2e521a639a58badf6b4575",
"branch_name": "refs/heads/master",
"committer_date": 1583338224000,
"content_id": "427e9ca13c6fa9d5b0be38f25dd4fa2cf2a2e482",
"detected_licenses": [
"MIT"
],
"directory_id": "6dfcc8a4cc04b2fe9f862016107656f4bdd1eeed",
"extension": "py",
"fi... | 2.34375 | stackv2 | import os
import shutil
import zipfile
import pathlib
from hashlib import sha256
from flask import Flask, render_template, url_for, request, flash, redirect, abort, send_from_directory
from werkzeug.exceptions import HTTPException
from werkzeug.utils import secure_filename
app = Flask(__name__, static_folder="static")... | 91 | 38.11 | 107 | 23 | 782 | python | [{"finding_id": "codeql_py/flask-debug_7be133ea47f7a697_5892659d", "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.", ... | 6 | true | [
"CWE-215",
"CWE-601",
"CWE-601",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/url-redirection",
"py/url-redirection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"... | [
91,
24,
27,
37,
64,
73
] | [
null,
null,
null,
null,
null,
null
] | [
5,
29,
29,
36,
32,
29
] | [
24,
40,
40,
87,
70,
67
] | |
2024-11-19T03:22:18.480382+00:00 | 1,361,604,521,000 | dd69d2c6c6b2c882bf1a131015fc1d3227118628 | 3 | {
"blob_id": "dd69d2c6c6b2c882bf1a131015fc1d3227118628",
"branch_name": "refs/heads/master",
"committer_date": 1361604521000,
"content_id": "37cb6d5d0065011c02a220db026422de0116d7aa",
"detected_licenses": [
"MIT"
],
"directory_id": "9dfa58a59da5e206836fcffc869f85b9e2a21196",
"extension": "py",
"fi... | 2.53125 | stackv2 | #-*- coding:utf-8 -*-
"""
django_debug_html_store views module
"""
from django.conf import settings
from django.core.cache import cache
from django.http import HttpResponse, HttpResponseRedirect
import random
def read_response(request, **kwargs):
"""
Read Debug HTML File or cache data and return response.
... | 66 | 29.45 | 77 | 15 | 440 | python | [{"finding_id": "codeql_py/stack-trace-exposure_e9b4016bb51e4445_7fb90eea", "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."
] | [
39
] | [
null
] | [
33
] | [
42
] | |
2024-11-19T03:22:19.862695+00:00 | 1,461,575,493,000 | 6ebcef4ee1ec39664ce1d3702a8e7975892717ac | 3 | {
"blob_id": "6ebcef4ee1ec39664ce1d3702a8e7975892717ac",
"branch_name": "refs/heads/master",
"committer_date": 1461575493000,
"content_id": "76c875d19c40bd6e68215685818eb980ee00d30f",
"detected_licenses": [
"MIT"
],
"directory_id": "2d285ee903237eb55475d6298a57bfc4bf9f5c30",
"extension": "py",
"fi... | 2.671875 | stackv2 | # -*- coding: UTF-8 -*-
#!/usr/bin/env python3.4
from __future__ import (unicode_literals, print_function)
# ----------------------------------------------------------------------------
# Name: Parser Geocoder from Excel file
# Purpose: todo
#
# Author: Julien Moura (https://twitter.com/geojulien)
#... | 319 | 25.38 | 118 | 14 | 2,345 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_70de7d6d6d98ab29_8e141a8d", "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... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (p... | [
155,
159,
296,
299
] | [
null,
null,
null,
null
] | [
16,
16,
16,
16
] | [
53,
53,
53,
53
] | |
2024-11-19T03:22:22.457581+00:00 | 1,576,230,117,000 | 322b042204d41460f0b334736872c0573b44cc6c | 3 | {
"blob_id": "322b042204d41460f0b334736872c0573b44cc6c",
"branch_name": "refs/heads/master",
"committer_date": 1576230117000,
"content_id": "6df774d5589b5429318a558f0471f64fc1b8e97b",
"detected_licenses": [
"MIT"
],
"directory_id": "7b4067febfec35880bc1f52bf7ed6ae2a8fa7999",
"extension": "py",
"fi... | 2.78125 | stackv2 | import csv
from codecs import *
from unicodecsv import *
from tkinter import messagebox
class Converter:
def __init__(self, file, out):
self.file = file
self.out = out
def convert(self):
print("Starting Conversion from csv to vcf!")
try:
with open(self.file, 'r',en... | 128 | 28.96 | 114 | 18 | 975 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_11ebceaac3f86ea0_c13038a3", "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."
] | [
78
] | [
null
] | [
20
] | [
41
] | |
2024-11-19T03:43:51.288437+00:00 | 1,377,788,948,000 | 50a66c82b9ca528b20a02498bb8508168b3f1c9c | 3 | {
"blob_id": "50a66c82b9ca528b20a02498bb8508168b3f1c9c",
"branch_name": "refs/heads/master",
"committer_date": 1377788948000,
"content_id": "28176e8b704060169607b7e8355032d61af875f6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "faec159ae7dd564f2111f871c68dcb1b386a7f84",
"extension": "p... | 2.5625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Install PythonTeX
This installation script should work with most TeX distributions. It is
primarily written for TeX Live. It should work with other TeX distributions
that use the Kpathsea library (such as MiKTeX), though with reduced
functionality in some cases. ... | 343 | 41.41 | 108 | 18 | 3,559 | python | [{"finding_id": "codeql_py/overly-permissive-file_abafa7efecd158ab_7d7aacdf", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 4 | true | [
"CWE-732",
"CWE-732",
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file",
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable."
] | [
285,
291,
312,
317
] | [
null,
null,
null,
null
] | [
13,
13,
17,
17
] | [
31,
31,
35,
35
] | |
2024-11-19T03:43:59.634724+00:00 | 1,422,774,125,000 | b142059c002b388886ef172802aa5d99fb300954 | 3 | {
"blob_id": "b142059c002b388886ef172802aa5d99fb300954",
"branch_name": "refs/heads/master",
"committer_date": 1422774125000,
"content_id": "8da3c134305bf412f40116ca2c82571e041b3b05",
"detected_licenses": [
"MIT"
],
"directory_id": "c510744f57992016875b6a1e340e851222a23358",
"extension": "py",
"fi... | 2.921875 | stackv2 | from flask import current_app as app
from flask.ext.zodb import Object, List, Dict, ZODB
from hashlib import sha256
class User():
def __init__(self, username, password, userid):
self.username = username
self.passwordHash = sha256(password).hexdigest()
self.id = userid
self.offset = 0
self.restid_to_good_co... | 104 | 20.68 | 110 | 14 | 685 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_13823f99cdbfe94d_bd2299de", "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."
] | [
9
] | [
null
] | [
30
] | [
38
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.