added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T20:23:15.939472+00:00 | 1,614,106,266,000 | 3b8e52b741d3901e99f08aa2041c107cb9131335 | 3 | {
"blob_id": "3b8e52b741d3901e99f08aa2041c107cb9131335",
"branch_name": "refs/heads/main",
"committer_date": 1614106266000,
"content_id": "6ce42f5b325a71eaa968d66866b867d7c12a9f59",
"detected_licenses": [
"MIT"
],
"directory_id": "5e0686aedf22c9831a2fc802d77fad346c0bab82",
"extension": "py",
"file... | 2.765625 | stackv2 | import requests
import xmltodict
import flask
from flask import jsonify
import urllib
app = flask.Flask(__name__)
app.config["DEBUG"] = True
# ideally, this should come from and environment variable
API_KEY="3b5b3beb"
@app.route("/", methods=['GET'])
def index():
return "Implemented route: /api/v1/movies/<title>... | 42 | 21.64 | 58 | 11 | 252 | python | [{"finding_id": "codeql_py/partial-ssrf_03aa9a3948f56435_13ec09bb", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
27
] | [
null
] | [
12
] | [
40
] | |
2024-11-18T20:23:40.843883+00:00 | 1,595,579,001,000 | b20fd6195627a8aa03a1c888d3b2277f40fac337 | 3 | {
"blob_id": "b20fd6195627a8aa03a1c888d3b2277f40fac337",
"branch_name": "refs/heads/master",
"committer_date": 1595579001000,
"content_id": "33c966dfdeb7cde71fd3eb4030a29b0818c08258",
"detected_licenses": [
"MIT"
],
"directory_id": "e9419c59c6ca6092ad56baa2460c26b614eb1440",
"extension": "py",
"fi... | 2.53125 | stackv2 | from django.db import models
import re
#from django.forms import Field
from django import forms
from django.forms import ValidationError
import hashlib
# Create your models here.
class Subject(models.Model):
"""学科"""
no = models.IntegerField(primary_key=True, verbose_name='编号')
name = models.CharField(max... | 93 | 34.56 | 107 | 12 | 766 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_685b248f8d9a536e_f0029b5c", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
79
] | [
null
] | [
24
] | [
40
] | |
2024-11-18T21:22:30.320751+00:00 | 1,508,146,380,000 | 8eeeec93a5aa612e6d67607ccdead51a4f1f7c19 | 2 | {
"blob_id": "8eeeec93a5aa612e6d67607ccdead51a4f1f7c19",
"branch_name": "refs/heads/master",
"committer_date": 1508146380000,
"content_id": "395d8e47a4c3df7c5d1e35d2799a346aa5fbb69a",
"detected_licenses": [
"MIT"
],
"directory_id": "e68c54c6ad6d135864e9576f8feea1564eb1d990",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Ryan Fan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, c... | 75 | 33.32 | 78 | 16 | 544 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_626ad14a96ef0f0f_d805d273", "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."
] | [
50
] | [
55
] | [
15
] | [
10
] | |
2024-11-18T21:22:35.864384+00:00 | 1,590,125,076,000 | cd563926e5003eee39ed7eca3b8bb5e2caff25b7 | 3 | {
"blob_id": "cd563926e5003eee39ed7eca3b8bb5e2caff25b7",
"branch_name": "refs/heads/master",
"committer_date": 1590126655000,
"content_id": "b87da9dd2856ad43e7e898dc1d69131c8327eff8",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "18db57de14193d932f9fa634dabaae6388a76a27",
"extension": "p... | 2.578125 | stackv2 | #!/usr/bin/env python
"""
See description of argument parser
"""
import argparse
import json
import boto3
import subprocess as sbp
parser = argparse.ArgumentParser(description='''
Get git creds from secrets manager
Please configure git like in the following example, replacing "example.com", "us-east-1", and "accou... | 53 | 31.51 | 148 | 17 | 397 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c2a1c29568a75bfd_3799db31", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
52,
53
] | [
null,
null
] | [
11,
11
] | [
48,
48
] | |
2024-11-18T21:22:45.566119+00:00 | 1,559,864,548,000 | b9dda32ff5acc7a130e0ca42cb85e107572821f1 | 3 | {
"blob_id": "b9dda32ff5acc7a130e0ca42cb85e107572821f1",
"branch_name": "refs/heads/master",
"committer_date": 1559864548000,
"content_id": "023cacec04b6aaf1b5be8e3bffa642be6285e7f0",
"detected_licenses": [
"MIT"
],
"directory_id": "823038b2f85a9177eeb98472d913062275c8fc19",
"extension": "py",
"fi... | 2.65625 | stackv2 | import json
import requests
def currenGameBySumId(_reg, _summonerId, _apiKey):
"""Get current game information for the given summoner id"""
response = requests.get("https://" + _reg + ".api.riotgames.com/lol/spectator/v4/active-games/by-summoner/"+ _summonerId + "?api_key=" + _apiKey)
data = json.loads(re... | 18 | 34.44 | 149 | 14 | 177 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ae6bcabf6610ac64_b5384f8a", "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."
] | [
10,
18
] | [
null,
null
] | [
11,
11
] | [
37,
37
] | |
2024-11-18T21:23:11.410118+00:00 | 1,650,052,516,000 | 39e6ab1526597a0bf33f3a73f77fefa5bf04a04e | 3 | {
"blob_id": "39e6ab1526597a0bf33f3a73f77fefa5bf04a04e",
"branch_name": "refs/heads/master",
"committer_date": 1650052516000,
"content_id": "9faf91674ad163f41748b1dd2f598932565c20ad",
"detected_licenses": [
"MIT"
],
"directory_id": "9aae726a537662311d1126895b01286968654031",
"extension": "py",
"fi... | 3 | stackv2 | from iptools import IpRangeList
import sys
import re
import random
CIDR_REGEX = "^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"
URL_REGEX = "^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$"
HOST_REGEX = "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*" \
... | 69 | 31.9 | 100 | 17 | 593 | python | [{"finding_id": "codeql_py/redos_9574f96d6b6ad42e_bbda2777", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '-.' and containing many repetitio... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '-.' and containing many repetitions of '-.'."
] | [
8
] | [
null
] | [
45
] | [
53
] | |
2024-11-18T21:23:11.584650+00:00 | 1,564,513,843,000 | 10d3cf3a384a10808eac1952b449f0fc708b788b | 3 | {
"blob_id": "10d3cf3a384a10808eac1952b449f0fc708b788b",
"branch_name": "refs/heads/master",
"committer_date": 1564513843000,
"content_id": "fcb0e58cd41a6ec9bae7889002a6fe2da6f7d6c5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0abf57fb7f446f4379b55edd535206500e8cbfb4",
"extension": "py"... | 2.59375 | stackv2 |
from websocket import create_connection
import json
import time
import ssl
from interfaces_esp.eeg.eegInterfaz import EegInterfaz
class EmotivAdapter(EegInterfaz):
"""
Clase para conectar Cognidron con el headset de Emotiv implementando el API de Emotiv Cortex V2.0
Fecha: Miércoles 19 de Junio 2019
... | 246 | 32.87 | 149 | 16 | 1,908 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c05c389665b1a156_1138415b", "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."
] | [
81
] | [
null
] | [
19
] | [
26
] | |
2024-11-18T21:23:20.573884+00:00 | 1,506,170,943,000 | 132c9c994f80abcf853b5c0bf2153e05988fb329 | 2 | {
"blob_id": "132c9c994f80abcf853b5c0bf2153e05988fb329",
"branch_name": "refs/heads/master",
"committer_date": 1506170943000,
"content_id": "c3e36e574173e847fc5df3315fbe43f71c676d7f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b93d61c2844fc762323075712c10ed3fbdc8245e",
"extension": "py"... | 2.4375 | stackv2 | # Copyright 2017 Aidan Holmes
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, softwa... | 144 | 30.4 | 100 | 20 | 1,040 | python | [{"finding_id": "codeql_py/flask-debug_c459b20dfa932295_ee232813", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
144,
121
] | [
null,
null
] | [
5,
18
] | [
67,
42
] | |
2024-11-18T21:51:12.039826+00:00 | 1,589,310,907,000 | fda774afa515ac66b04639324ac4524b41cc3e9f | 2 | {
"blob_id": "fda774afa515ac66b04639324ac4524b41cc3e9f",
"branch_name": "refs/heads/master",
"committer_date": 1589310907000,
"content_id": "5e065bf6d217b0b055318bfdd716e8513a552e3a",
"detected_licenses": [
"MIT"
],
"directory_id": "26e6e41caa45f926b48586bb4b4f59e29400c641",
"extension": "py",
"fi... | 2.453125 | stackv2 | import os, sys, json, logging
import argparse
import requests
import yaml
import warnings
import logging
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
parser = argparse.ArgumentParser(description="d42_enc_fetcher")
# d42 wil... | 142 | 30.87 | 135 | 14 | 1,048 | python | [{"finding_id": "codeql_py/request-without-cert-validation_cb55a3b828fbc00c_cf3c1ce2", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2).\nThis request may run without certificate validation because [it is disabled](1) by [this value](3)."
] | [
101
] | [
104
] | [
16
] | [
33
] | |
2024-11-18T21:51:12.946761+00:00 | 1,495,729,035,000 | b42632663a84b6eb3c16ca55cb6fe9d8a39a7209 | 3 | {
"blob_id": "b42632663a84b6eb3c16ca55cb6fe9d8a39a7209",
"branch_name": "refs/heads/master",
"committer_date": 1495729035000,
"content_id": "48c12f385e5763b399f13490f8b42073ab62d6e4",
"detected_licenses": [
"MIT"
],
"directory_id": "16a9982c7c513f4a1501e0b395924e1b0f43c3a8",
"extension": "py",
"fi... | 2.671875 | stackv2 | from builtins import object
import jinja2
from os.path import join
from os import environ
class Template(object):
def __init__(self, search_path):
if not isinstance(search_path, list):
search_path = [search_path]
self.env = jinja2.Environment(loader=jinja2.FileSystemLoader(search_path),... | 29 | 33.59 | 116 | 14 | 206 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1fb863e501f8fd6a_928ade8f", "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."
] | [
10,
17
] | [
null,
null
] | [
20,
28
] | [
117,
60
] | |
2024-11-18T21:51:16.291463+00:00 | 1,451,989,881,000 | f0312572a28020b0570c8652b5fb8fabc0f8e011 | 3 | {
"blob_id": "f0312572a28020b0570c8652b5fb8fabc0f8e011",
"branch_name": "refs/heads/master",
"committer_date": 1451989881000,
"content_id": "59d120bd4f19ba809cf45d5752649c80df1f76d6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3e69872c3a71bb2fdc9046f5e524b8b9b8660055",
"extension": "py"... | 2.8125 | stackv2 | from gifts import loadGifts
def gisSubmission(inputFile, outputFile, gifts):
trips = {}
output = open(outputFile, 'w')
output.write("tripID;wkt\n")
firstLine = True
# open the file
with open(inputFile) as infile:
# read line by line
for line in infile: ... | 49 | 27.33 | 92 | 17 | 330 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_18558c3991f5b895_e5a8cfa0", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
39
] | [
null
] | [
26
] | [
78
] | |
2024-11-18T21:51:25.450437+00:00 | 1,610,267,259,000 | e217da9549ccb011946e18a3a7994f4d59a2eb4c | 3 | {
"blob_id": "e217da9549ccb011946e18a3a7994f4d59a2eb4c",
"branch_name": "refs/heads/main",
"committer_date": 1610267259000,
"content_id": "ee9dc9fd4dbc8b16035ccb917f116c2e6a15efaa",
"detected_licenses": [
"MIT"
],
"directory_id": "db0c1394d375d226b2281acc866b7bbe28e9d699",
"extension": "py",
"file... | 2.578125 | stackv2 |
import sys
sys.path.insert(0, "./modules")
from flask import Flask, jsonify, request
app = Flask(__name__)
@app.route("/")
def index():
return "Hello Flask"
@app.route("/users")
def users():
users = [{'name': 'test1'}, {'name': 'test2'}]
return jsonify(data=users)
@app.route("/users/<id>")
def user(id):... | 30 | 18.53 | 50 | 12 | 156 | python | [{"finding_id": "codeql_py/reflective-xss_12897ec4e31ce1f4_be8676a6", "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)."
] | [
28
] | [
null
] | [
9
] | [
51
] | |
2024-11-18T21:51:35.752402+00:00 | 1,601,494,926,000 | 7892041af41207aee551ef0cf241059ab0b3d95f | 3 | {
"blob_id": "7892041af41207aee551ef0cf241059ab0b3d95f",
"branch_name": "refs/heads/master",
"committer_date": 1601494926000,
"content_id": "6f55453153a9d4c29adba8db6af823a7a6790ec6",
"detected_licenses": [
"MIT"
],
"directory_id": "63f875a2ac948dfecef20080648f80695e2f625d",
"extension": "py",
"fi... | 2.953125 | stackv2 | from blocks.BasicBlock import BasicBlock
import re
class InputProgram:
def __init__(self, code):
self.instructions = self.make_instructions(code)
self.basic_blocks = self.divide_into_basic_blocks(self.instructions)
def make_instructions(self, code):
code = code.split('\n')
ins... | 126 | 38.38 | 109 | 18 | 1,003 | python | [{"finding_id": "codeql_py/redos_40738c0ec5b0322d_8e481eaf", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '_'.", "remediati... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '_'."
] | [
126
] | [
null
] | [
33
] | [
41
] | |
2024-11-18T21:51:39.407587+00:00 | 1,582,403,690,000 | 67fe79e039d9348b3c0734b1dd123d8d1a9652d1 | 2 | {
"blob_id": "67fe79e039d9348b3c0734b1dd123d8d1a9652d1",
"branch_name": "refs/heads/master",
"committer_date": 1582403690000,
"content_id": "d3cda858af1a553b06cb8a4cf9e2a562826f3f82",
"detected_licenses": [
"MIT"
],
"directory_id": "332ed1089174906e09094f80dc0e1374678065be",
"extension": "py",
"fi... | 2.375 | stackv2 | from util import MonitorUtility as Mu
from util import MonitorConst as Mc
import paramiko
class LinuxOperator:
"""Operations for Linux, root class for RedHat and SUSE"""
def __init__(self):
# get logging
self.__logger = Mu.get_logger(Mc.LOGGER_OS_LINUX)
def open_ssh_connection(self, serve... | 114 | 43.76 | 120 | 18 | 1,169 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_6a5b9ca7cddd8b28_5892a86b", "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."
] | [
16
] | [
null
] | [
13
] | [
70
] | |
2024-11-18T21:52:10.232714+00:00 | 1,560,800,132,000 | b243045f08307fb27faa8132d0e83e8b8a3cbf27 | 4 | {
"blob_id": "b243045f08307fb27faa8132d0e83e8b8a3cbf27",
"branch_name": "refs/heads/master",
"committer_date": 1560800132000,
"content_id": "586ad94d5bd76f1b1d97ebb93dce2b9562afad60",
"detected_licenses": [
"MIT"
],
"directory_id": "75a24b030a0d745de6609b435acdbdce52a47fcc",
"extension": "py",
"fi... | 4.03125 | stackv2 | # password generator
# requires at least python 3.6 to use secrets
import string
from secrets import choice
from pyperclip import copy
def password_gen_init():
"""Initialize generating password process.
Ask user about password parameters (length and strength) and
initializes process of generating passwo... | 172 | 30.52 | 104 | 17 | 1,143 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6a581576469a472b_993acd6b", "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)](3) as clear text.\nThis expression logs [sensitive data (passw... | [
172
] | [
null
] | [
11
] | [
26
] | |
2024-11-18T22:02:44.721724+00:00 | 1,527,334,824,000 | 9feae4fa5c8e9ec18f17e0a26ab48b917ac3be08 | 2 | {
"blob_id": "9feae4fa5c8e9ec18f17e0a26ab48b917ac3be08",
"branch_name": "refs/heads/master",
"committer_date": 1527334824000,
"content_id": "0a2452cb3c8e8a3ccbe1f481db3f0e94632b31de",
"detected_licenses": [
"MIT"
],
"directory_id": "7b2319dfbd544867fb8a2a8ade84d9a0bbf4e7f7",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 422 | 32.96 | 130 | 20 | 2,899 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ebfcd35a0794fb2d_73d39537", "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."
] | [
26
] | [
null
] | [
16
] | [
79
] | |
2024-11-18T22:27:43.749984+00:00 | 1,598,529,356,000 | e63f51b667b4fdf4a798ae422e60859f6b16a9d0 | 3 | {
"blob_id": "e63f51b667b4fdf4a798ae422e60859f6b16a9d0",
"branch_name": "refs/heads/master",
"committer_date": 1598529356000,
"content_id": "b0fd9ee7036e82c88b63a412172873635c446aed",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "56a8c1060e59d69d99f24891d830795375418907",
"extension": "p... | 2.78125 | stackv2 | import requests
import sys
def test_internet():
test_url = 'https://cxd.cisco.com/home'
response = None
print("Checking internet connectivity.")
try:
response = requests.get(test_url, verify=False)
except Exception as e:
print("Unable to connect to internet. Make sure you have connectivity, and you have set t... | 44 | 37.2 | 137 | 13 | 420 | python | [{"finding_id": "codeql_py/request-without-cert-validation_f2f87f0a93bb4b99_f4f5bd60", "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)."
] | [
9
] | [
null
] | [
14
] | [
50
] | |
2024-11-18T22:27:52.243446+00:00 | 1,618,025,757,000 | af8b4d3fc9a188cbbbd1e002371bc8e81372d072 | 3 | {
"blob_id": "af8b4d3fc9a188cbbbd1e002371bc8e81372d072",
"branch_name": "refs/heads/main",
"committer_date": 1618025757000,
"content_id": "1026743d16dc6a5d7f807e04f7b0dcdc55eb4b4c",
"detected_licenses": [
"MIT"
],
"directory_id": "734cb66acd68309caaf2585f1f1917e3b0a6686a",
"extension": "py",
"file... | 2.75 | stackv2 | #A very simple example ldap authentication client
#this client reads the basic auth from the incoming request
#and verifies that the user exist.
from flask import Flask
from flask import request
from flask import Response
from ldap3 import Server, Connection
import json
import base64
ERROR_MSG_FORBIDDEN = "forbidden"... | 68 | 35.6 | 123 | 20 | 565 | python | [{"finding_id": "codeql_py/ldap-injection_b8f43d8956b64f4b_f5e45e46", "tool_name": "codeql", "rule_id": "py/ldap-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "LDAP query parameter (DN) depends on a [user-provided value](1).", "remediation": "", "location": {"file_pa... | 4 | true | [
"CWE-090",
"CWE-090",
"CWE-090",
"CWE-090"
] | [
"py/ldap-injection",
"py/ldap-injection",
"py/ldap-injection",
"py/ldap-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"LDAP query parameter (DN) depends on a [user-provided value](1).",
"LDAP query parameter (filter) depends on a [user-provided value](1).",
"LDAP query parameter (DN) depends on a [user-provided value](1).",
"LDAP query parameter (filter) depends on a [user-provided value](1)."
] | [
34,
34,
41,
41
] | [
null,
null,
null,
null
] | [
24,
33,
24,
32
] | [
31,
55,
31,
122
] | |
2024-11-18T22:27:55.317986+00:00 | 1,628,684,988,000 | e5f51c867a7346a49656d5148b95f1cf82969fcd | 3 | {
"blob_id": "e5f51c867a7346a49656d5148b95f1cf82969fcd",
"branch_name": "refs/heads/main",
"committer_date": 1628684988000,
"content_id": "37e4c8737c492d5fab15eca0223121cfbce79423",
"detected_licenses": [
"MIT"
],
"directory_id": "6ad98daf436bef8b1ddd1a785c73b81d937738d8",
"extension": "py",
"file... | 2.65625 | stackv2 | import json
import base64
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.fernet import Fernet
import getpass
# STORE CRYPTOGRAPHY VARIABLES
with open("SALT.txt", 'rb') as read... | 225 | 39.36 | 159 | 24 | 1,762 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c5ec1587ef181a9f_4ff545fd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text."
] | [
157,
174
] | [
null,
null
] | [
23,
27
] | [
46,
50
] | |
2024-11-18T22:28:14.167477+00:00 | 1,541,993,474,000 | 3aab9f481da8714dc330a1b0ab639ab2149eeedb | 2 | {
"blob_id": "3aab9f481da8714dc330a1b0ab639ab2149eeedb",
"branch_name": "refs/heads/master",
"committer_date": 1541993474000,
"content_id": "e3125d885453abd790bf1db93e0f541795e60b0d",
"detected_licenses": [
"MIT"
],
"directory_id": "ba60d4f6112f81dca785d9f4e832c52a6a667e6f",
"extension": "py",
"fi... | 2.34375 | stackv2 | import os
from flask import Flask, send_from_directory
app = Flask(__name__, static_folder='bookapp/build')
# Serve React App
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def serve(path):
if path != "" and os.path.exists("bookapp/build/" + path):
return send_from_directory('bookapp/bu... | 21 | 25.62 | 65 | 12 | 140 | python | [{"finding_id": "codeql_py/path-injection_0b5c12fb6cc23dbe_6066fa46", "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)."
] | [
10
] | [
null
] | [
38
] | [
61
] | |
2024-11-18T22:28:16.576359+00:00 | 1,530,410,856,000 | 7daf4620f1e4cd06332b31af11c508b571314858 | 3 | {
"blob_id": "7daf4620f1e4cd06332b31af11c508b571314858",
"branch_name": "refs/heads/master",
"committer_date": 1530410856000,
"content_id": "885f54f4cb9d81d4e4d05605f0ca7883b4956d3b",
"detected_licenses": [
"MIT"
],
"directory_id": "91d931581891ca2f21403090f8192296f11bf6f4",
"extension": "py",
"fi... | 3.015625 | stackv2 | """
Style module
"""
import re
import inspect
import functools
import random
from plugins import rainbow
COLOR_EXTRACT = re.compile("""(^|.*?) # start of sentence or some stuff preceding the color code
(\x03 # color code identifier
(?:\d\D|\d{2}) # either ... | 198 | 32.27 | 118 | 23 | 1,863 | python | [{"finding_id": "codeql_py/redos_e0d96e2d9c9712d1_70936471", "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 'x02'.", "remedia... | 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 'x02'.",
"This part of the regular expression may cause exponential backtracking on strings starting with 'x03' and containing many repetitions of '9x03'."
] | [
138,
178
] | [
null,
null
] | [
25,
53
] | [
70,
56
] | |
2024-11-18T22:44:00.394918+00:00 | 1,549,471,582,000 | bcb31b6f941354262c827f1fcefd2ba30d4d8c22 | 3 | {
"blob_id": "bcb31b6f941354262c827f1fcefd2ba30d4d8c22",
"branch_name": "refs/heads/master",
"committer_date": 1549471582000,
"content_id": "6102e94cca24d45b5182120393e137a6fee91b4f",
"detected_licenses": [
"MIT"
],
"directory_id": "47edc7cc820e6464737a240b5da227c4415f33f6",
"extension": "py",
"fi... | 2.84375 | stackv2 | # --------------
#Header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#path of the data file- path
#Code starts here
data=pd.read_csv('/opt/greyatom/kernel-gateway/data/executor/attachments/account/b93/2a7f53f8-19f6-45c7-9d74-560da9338b1a/b81/cf538c6b-cf03-44f6-8e6a-34ee54be92d2/file... | 84 | 18.74 | 173 | 8 | 501 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_41ecb93381cc24bb_873f810c", "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."
] | [
17
] | [
null
] | [
7
] | [
19
] | |
2024-11-18T22:44:07.450384+00:00 | 1,622,570,263,000 | daf51cf10dcfb3fd39a11f049ab42e001d42f9db | 2 | {
"blob_id": "daf51cf10dcfb3fd39a11f049ab42e001d42f9db",
"branch_name": "refs/heads/master",
"committer_date": 1622570263000,
"content_id": "28f7c051713ea68e67d0c64853c21cb9e760c347",
"detected_licenses": [
"MIT"
],
"directory_id": "82db28555377ca5272b6ca9ba7d6ea9d45d29938",
"extension": "py",
"fi... | 2.40625 | stackv2 | import requests
import os
import sys
import json
import math
import pathlib
from tqdm import tqdm
with open("models.json", "r") as f:
model_urls = json.load(f)["model_urls"]
# TODO maybe make models.json a parameter and use it's location as the root/my_path
my_path = os.getcwd()
if __name__ == "__main__":
p... | 75 | 41.77 | 163 | 24 | 709 | python | [{"finding_id": "codeql_py/tarslip_12d23a73f425d5dc_fef8e044", "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)."
] | [
55
] | [
null
] | [
37
] | [
45
] | |
2024-11-18T22:44:13.828693+00:00 | 1,513,015,016,000 | 3de33fd9e0e156ea3acaefd1ca0bf6e497fc4bf7 | 3 | {
"blob_id": "3de33fd9e0e156ea3acaefd1ca0bf6e497fc4bf7",
"branch_name": "refs/heads/master",
"committer_date": 1513015016000,
"content_id": "fc82f28e471bd880b069651d2624f81f6c700770",
"detected_licenses": [
"Unlicense"
],
"directory_id": "a3093d40d970ca8f54fce7bdb88d8f1d32cd29c7",
"extension": "py",... | 2.8125 | stackv2 | """Parameters for the mortgage worksheet
"""
import io
import logging
import os
import ipywidgets
import yaml
logger = logging.getLogger(__name__) # pylint: disable=C0103
class ParamMetadata:
"""Metadata required to build a parameter widget
widgetid a widget's ID (ParameterIds.WIDGET_NAME)
la... | 163 | 37.55 | 98 | 19 | 1,406 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4d4a7cc5e188710a_12b94b42", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
128,
130
] | [
null,
null
] | [
30,
30
] | [
88,
87
] | |
2024-11-18T22:44:22.885518+00:00 | 1,430,402,267,000 | 9eb59d8c09aa48ee903de4470795693a9919ada0 | 3 | {
"blob_id": "9eb59d8c09aa48ee903de4470795693a9919ada0",
"branch_name": "refs/heads/master",
"committer_date": 1430402267000,
"content_id": "b7fc883e2a430b9c97d5d6a2f5acd2f4f6e13313",
"detected_licenses": [
"MIT"
],
"directory_id": "4616881ef9ebbaa77bb9459f026943e9b2b6d8b4",
"extension": "py",
"fi... | 2.65625 | stackv2 | """
If the article is from Western media and mentions some other country, find a source for that country
and search for the similar article on that source
Otherwize, look at the source of the article and find an opposite source,
and search for the similar article on that source
"""
from .models import Source,... | 130 | 34.05 | 100 | 17 | 1,023 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_eb02fdd8315a5197_abf48cb9", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [co.uk](1) may be at an arbitrary position in the sanit... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [co.uk](1) may be at an arbitrary position in the sanitized URL."
] | [
51
] | [
null
] | [
8
] | [
32
] | |
2024-11-18T20:59:43.374277+00:00 | 1,605,558,624,000 | 79dd346e26f0a011ac9fdb82dd0d254e0a639ca3 | 2 | {
"blob_id": "79dd346e26f0a011ac9fdb82dd0d254e0a639ca3",
"branch_name": "refs/heads/master",
"committer_date": 1605558624000,
"content_id": "ea3b09d73486e65ded1cc5f700e77cf818ffad14",
"detected_licenses": [
"MIT"
],
"directory_id": "0fd89c6868c881147a0328fd58c2b4c180c7bab5",
"extension": "py",
"fi... | 2.390625 | stackv2 | from hashlib import sha1
import re
from html.entities import name2codepoint
def checksum(data):
if isinstance(data, str):
data = data.encode("utf-8")
return sha1(data).hexdigest()
def field_checksum(data):
# 32 bit unsigned number from first 8 digits of sha1 hash
return int(checksum(data)[:8... | 92 | 25.65 | 77 | 21 | 697 | python | [{"finding_id": "codeql_py/bad-tag-filter_418af7c68447aec3_e5fa2415", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match script end tags like </script >.", "remediation": "", "location": {"file_... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match script end tags like </script >."
] | [
19
] | [
null
] | [
24
] | [
52
] | |
2024-11-18T21:00:04.356542+00:00 | 1,683,466,882,000 | 7070725d6a17bcc9cc647e5d1585de8f448292ff | 3 | {
"blob_id": "7070725d6a17bcc9cc647e5d1585de8f448292ff",
"branch_name": "refs/heads/master",
"committer_date": 1683466882000,
"content_id": "c0c4e51fc3665f95133fd9df272a1471b9fbc029",
"detected_licenses": [
"MIT"
],
"directory_id": "9431bba2d148f8aef9c0a8f3ca16fcf875890757",
"extension": "py",
"fi... | 2.640625 | stackv2 | from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "Hello, World with Flask"
@app.route('/user/<name>')
def user(name):
#example: access http://127.0.0.1:5000/user/dave
return '<h1> Hello, %s </h1>' % name
def main():
app.run(port=5000, debug=False, host='0.0.0.0')
i... | 19 | 17.79 | 52 | 9 | 116 | python | [{"finding_id": "codeql_py/reflective-xss_7d50559725ecaa65_a1718226", "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)."
] | [
13
] | [
null
] | [
12
] | [
41
] | |
2024-11-18T21:00:38.029864+00:00 | 1,626,698,232,000 | 7a52633af7a4901b790240233d9bc79841cccc02 | 3 | {
"blob_id": "7a52633af7a4901b790240233d9bc79841cccc02",
"branch_name": "refs/heads/main",
"committer_date": 1626698232000,
"content_id": "4e20bcae253748bec145ce1c013513db715d1ca4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6fa80abde38b23e49a6ee48be91ace7cb5c55f44",
"extension": "py",
... | 2.609375 | stackv2 | #!/usr/bin/python3
import json
import os
import sys, yaml, base64, re
from operator import attrgetter
from typing import List
import pdfkit as pdfkit
import requests
from jinja2 import Environment, FileSystemLoader
import cve_searchsploit as CS
def decode_base64_string(base64_string):
base64_bytes = base64_string... | 178 | 34.67 | 160 | 16 | 1,777 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1babbe182af1b405_1b027a39", "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."
] | [
150
] | [
null
] | [
19
] | [
53
] | |
2024-11-18T21:00:53.509476+00:00 | 1,448,461,903,000 | ce8ab9c7226c6c819be5adf102ec6f7eea208779 | 2 | {
"blob_id": "ce8ab9c7226c6c819be5adf102ec6f7eea208779",
"branch_name": "refs/heads/master",
"committer_date": 1448461903000,
"content_id": "01da645f3cbf1ee2ed3bea6a81043de32250a8fd",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "a8a35aacda4ab3d9eb77d470a8fd7770c8e72387",
"extension": "p... | 2.328125 | stackv2 | # Copyright (c) <2015> <Sergi Delgado Segura>
# Distributed under the BSD software license, see the accompanying file LICENSE
import urllib2
import ConfigParser
from base64 import b64decode
from M2Crypto import X509, EC
from flask import Flask, request, json
from utils.bitcoin.transactions import reputation_transfer
... | 133 | 33.16 | 127 | 21 | 1,070 | python | [{"finding_id": "codeql_py/partial-ssrf_319fd70635c4bd8f_71e5101b", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
31
] | [
null
] | [
20
] | [
92
] | |
2024-11-18T21:01:00.115024+00:00 | 1,633,418,610,000 | d5ea10843824ebc93c187d1cb9a905b6da46fc7b | 2 | {
"blob_id": "d5ea10843824ebc93c187d1cb9a905b6da46fc7b",
"branch_name": "refs/heads/main",
"committer_date": 1633418610000,
"content_id": "357b13bdcae4474af7192352ea6a9fa759438949",
"detected_licenses": [
"MIT-0"
],
"directory_id": "e0f835d866f8539fa121fc105e860256ccb6b3ea",
"extension": "py",
"fi... | 2.3125 | stackv2 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import boto3
import os
import subprocess
import shutil
import yaml
import logging
from botocore.exceptions import ClientError
import pandas as pd
import time
import psutil
import tarfile
import sys
import time
def p... | 300 | 30.89 | 159 | 16 | 2,367 | python | [{"finding_id": "codeql_py/tarslip_d6ffb59abdea0e48_b1cc1f90", "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)."
] | [
41
] | [
null
] | [
9
] | [
12
] | |
2024-11-18T21:01:05.913455+00:00 | 1,570,643,854,000 | 98d8f7f135521d8b848acbc44871196ac152758a | 3 | {
"blob_id": "98d8f7f135521d8b848acbc44871196ac152758a",
"branch_name": "refs/heads/master",
"committer_date": 1570643854000,
"content_id": "a838ab44b4702be33f78ec487088cbd035b4d44b",
"detected_licenses": [
"MIT"
],
"directory_id": "8ac8ddfbd5475a61ec6687c70380aa710ba727b3",
"extension": "py",
"fi... | 2.96875 | stackv2 | from hashlib import sha512
from sanic.exceptions import InvalidUsage
from quizard_backend.config import PASSWORD_SALT
def hash_password(password: str) -> str:
salted = password + PASSWORD_SALT
return sha512(salted.encode("utf8")).hexdigest()
def validate_password_strength(password: str):
"""
Valid... | 31 | 23.84 | 77 | 12 | 172 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_45b24244f8db6e51_996b7c50", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally e... | [
10
] | [
null
] | [
19
] | [
40
] | |
2024-11-18T21:01:14.034186+00:00 | 1,521,861,182,000 | 04b9040c15915486e539a040efd622fb9d9a4944 | 3 | {
"blob_id": "04b9040c15915486e539a040efd622fb9d9a4944",
"branch_name": "refs/heads/master",
"committer_date": 1521861182000,
"content_id": "96d9f153f673a053d4dde8922b6e28d249d73e17",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "dcb5b4cf393a0c30683675c983717358be127757",
"extension": "py"... | 3.28125 | stackv2 | #!/usr/bin/env python3
# vim: set fileencoding=utf-8:
import string
import argparse
import secrets
import random
def main():
parser = argparse.ArgumentParser(description = "ランダムパスワード生成")
parser.add_argument('-d', '--digits', action = 'store_true', help = '数値を使う')
parser.add_argument('-l', '--lower', action... | 56 | 27.86 | 89 | 15 | 455 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b76df13db40d79e8_fceda8ed", "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."
] | [
51
] | [
null
] | [
11
] | [
26
] | |
2024-11-18T21:01:26.188240+00:00 | 1,523,199,574,000 | 52499db3ab42c41b6345db7584f7907f9408e36c | 3 | {
"blob_id": "52499db3ab42c41b6345db7584f7907f9408e36c",
"branch_name": "refs/heads/master",
"committer_date": 1523199574000,
"content_id": "a2e29ebc4e3c00c060d29cbd0ed2d2f856693352",
"detected_licenses": [
"MIT"
],
"directory_id": "0838322a4d7ccb20719f8784600ca7bfc6280c85",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/env python
'''Laplacian structural decomposition viewer'''
from argparse import ArgumentParser
import sys
from datetime import datetime
import os
import re
import mimetypes
import flask
import json
import segmenter
def process_arguments(args):
parser = ArgumentParser(description=__doc__)
parse... | 109 | 25.54 | 109 | 12 | 642 | python | [{"finding_id": "codeql_py/polynomial-redos_c76605693e508c4a_864cf6dc", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with ma... | 1 | true | [
"CWE-1333"
] | [
"py/polynomial-redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of '9'."
] | [
60
] | [
null
] | [
34
] | [
46
] | |
2024-11-18T22:00:13.932628+00:00 | 1,629,867,643,000 | 8f62d2e7c76fdfc80c99e7bdcb4460518bf99e73 | 3 | {
"blob_id": "8f62d2e7c76fdfc80c99e7bdcb4460518bf99e73",
"branch_name": "refs/heads/master",
"committer_date": 1629867643000,
"content_id": "427449bea5fc9b7856feaba2cd8be452bf172d2b",
"detected_licenses": [
"MIT"
],
"directory_id": "76622af95e93f15cba3cc242ddabf54ef2d90a7c",
"extension": "py",
"fi... | 2.953125 | stackv2 | import os
import urllib.request,json
from .models import Source,Article
# Getting api key
api_key = None
# Getting the news base url
base_url=None
#getting articles base url
article_url=None
def configure_request(app):
global api_key,base_url,article_url
# api_key = app.config['NEWS_API_KEY']
api_key ... | 124 | 31.74 | 112 | 12 | 826 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a1f9c550c5be46c1_e4cf71a7", "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."
] | [
69
] | [
null
] | [
11
] | [
29
] | |
2024-11-18T22:00:52.830827+00:00 | 1,394,769,783,000 | 28fe4ff1289afe3acbe8e91a762276fd4ff6244c | 2 | {
"blob_id": "28fe4ff1289afe3acbe8e91a762276fd4ff6244c",
"branch_name": "refs/heads/master",
"committer_date": 1394769783000,
"content_id": "acd4cf434221f9275be35dc59056c19f51f648a3",
"detected_licenses": [
"MIT"
],
"directory_id": "eb8ac4fae63f527c00d4d154be15b05b3f457b56",
"extension": "py",
"fi... | 2.4375 | stackv2 | from whirlwind.core.request import BaseRequest
from whirlwind.db.mongo import Mongo
from application.models.user import User
import datetime, hashlib
from tornado.web import authenticated
from whirlwind.view.decorators import route
@route('/logout')
class LogoutHandler(BaseRequest):
def get(self):
self.ses... | 119 | 36.11 | 109 | 16 | 845 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e3ce5a3124587ea0_f615d4a0", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
34
] | [
null
] | [
27
] | [
35
] | |
2024-11-18T22:01:01.770749+00:00 | 1,511,678,782,000 | dc0a2f103989918c790a4d3abae93ec1e15379ca | 3 | {
"blob_id": "dc0a2f103989918c790a4d3abae93ec1e15379ca",
"branch_name": "refs/heads/master",
"committer_date": 1511678782000,
"content_id": "107fde2ba245d754adb1c1ddab4d8399b1055e9e",
"detected_licenses": [
"MIT"
],
"directory_id": "3ab8c828d30eb9d3cf4cc2926074cccfbd473464",
"extension": "py",
"fi... | 2.59375 | stackv2 | """View for search results."""
from django.views.generic import ListView, TemplateView
import re # Regular expression for search matching
from django.db.models import Max
from account.models import Tutor
from scheduler.models import Session
from datetime import datetime, timedelta
class IndexView(TemplateView):
... | 113 | 43.74 | 102 | 19 | 1,081 | python | [{"finding_id": "codeql_py/code-injection_545f64c007fed162_99dacd93", "tool_name": "codeql", "rule_id": "py/code-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This code execution depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "... | 2 | true | [
"CWE-094",
"CWE-730"
] | [
"py/code-injection",
"py/regex-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This code execution depends on a [user-provided value](1).",
"This regular expression depends on a [user-provided value](1) and is executed by [re.search](2)."
] | [
50,
73
] | [
null,
null
] | [
45,
34
] | [
84,
41
] | |
2024-11-18T22:15:01.884097+00:00 | 1,579,777,608,000 | 5104417e6d8a652eb01d60491d34fade7d8f5ff3 | 3 | {
"blob_id": "5104417e6d8a652eb01d60491d34fade7d8f5ff3",
"branch_name": "refs/heads/master",
"committer_date": 1579777608000,
"content_id": "e635e226e16189ee07677ca01be74d6bffa52adc",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "178b1fc546ce9bf396e723487de80d5d298fd594",
"extension": "p... | 2.71875 | stackv2 | #!/usr/bin/env python
import stellar_sdk
import click
import requests
def create_Keypair(name=''):
print('Creating \'{name}\' keypair'.format(name=name))
kp = stellar_sdk.Keypair.random()
print("Key: {}".format(kp.secret))
print("Address: {}".format(kp.public_key))
return kp
def activate_account(... | 29 | 26.72 | 80 | 11 | 202 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_69bb803d06c96f13_6b6d1d77", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
10
] | [
null
] | [
11
] | [
38
] | |
2024-11-18T22:15:11.143029+00:00 | 1,677,482,146,000 | 880f3fee4577fb889308b1c7da5047a1adeac49b | 2 | {
"blob_id": "880f3fee4577fb889308b1c7da5047a1adeac49b",
"branch_name": "refs/heads/master",
"committer_date": 1677482146000,
"content_id": "2d44745417d5d2681a03a616c7937581575c98ee",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "84bb8ae62d9d8a8a59499d0e68965366cce459de",
"extension": "py"... | 2.359375 | stackv2 | import os
import requests
import zipfile
from datetime import datetime
from flask import Flask, render_template, request, redirect, send_from_directory, jsonify
from werkzeug.utils import secure_filename
from client import process_image
from database import db_session, init_db
from dbmodels import Image, Model
app = F... | 138 | 28.91 | 89 | 16 | 917 | python | [{"finding_id": "codeql_py/flask-debug_a803e24cfcb3ba4b_36f0cc10", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 5 | true | [
"CWE-215",
"CWE-918",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/full-ssrf",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"The full URL of this request depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path dep... | [
138,
95,
98,
124,
126
] | [
null,
null,
null,
null,
null
] | [
5,
16,
15,
26,
19
] | [
55,
34,
29,
38,
28
] | |
2024-11-18T22:26:04.292636+00:00 | 1,683,202,571,000 | 3ccc9726fbbc77a170afbac69bed87e26001eddb | 2 | {
"blob_id": "3ccc9726fbbc77a170afbac69bed87e26001eddb",
"branch_name": "refs/heads/master",
"committer_date": 1683202571000,
"content_id": "d09af4e4233371ad9fdfe1133e58dddca0180e98",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "169a0e9f82a8145a77632afed21d11ed53860217",
"extension": "py"... | 2.421875 | stackv2 | # Copyright 2017-2020 Mateusz Klos
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 158 | 29.85 | 83 | 14 | 1,021 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_994230e9fdcd9a42_84603fce", "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."
] | [
145
] | [
151
] | [
15
] | [
10
] | |
2024-11-18T22:26:09.140726+00:00 | 1,423,591,240,000 | af816e265582ddf9481d02209cf650ef77476ff7 | 3 | {
"blob_id": "af816e265582ddf9481d02209cf650ef77476ff7",
"branch_name": "refs/heads/master",
"committer_date": 1423591240000,
"content_id": "04da79cdc54eebdb9b88243788c24c0d6160d6f1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9607a678d6986bf2dd36e367bddbf4965a722cdc",
"extension": "py"... | 2.609375 | stackv2 | from flask import Flask
from flask import request
from flask import render_template
from flask import url_for
from flask import redirect
from flask import jsonify
from flask import session
from flask import flash
import hashlib, binascii
import sqlite3
app = Flask(__name__)
conn = None
# Get the current connection
d... | 107 | 25.81 | 107 | 14 | 679 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_61d2aba726f7a2e4_23dafe9c", "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 (RIPEMD160) that is... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (RIPEMD160) 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 (RIPEMD160) that is insecure for password hashing, since it is not a computation... | [
53
] | [
null
] | [
12
] | [
20
] | |
2024-11-18T21:08:20.197346+00:00 | 1,523,152,192,000 | 326b9166a716ce62a9faa48450bc57a62533747b | 2 | {
"blob_id": "326b9166a716ce62a9faa48450bc57a62533747b",
"branch_name": "refs/heads/master",
"committer_date": 1523152192000,
"content_id": "eddb6411351732e95467558238f5ae1706cb39b0",
"detected_licenses": [
"MIT"
],
"directory_id": "5c7d0b52af64798073653bd3e9e2deafa1d99016",
"extension": "py",
"fi... | 2.484375 | stackv2 | from flask import Flask, render_template,request,session,flash,redirect,url_for
from functools import wraps
import sqlite3
import pandas as pd
app = Flask(__name__)
######### Create InMemory DB in SQLite ############
conn=sqlite3.connect(':memory:',check_same_thread=False)
c=conn.cursor()
c.execute("""create table log... | 100 | 29.31 | 178 | 16 | 714 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_795a46290651df43_475b3bce", "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-215"
] | [
"py/clear-text-logging-sensitive-data",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
65,
99
] | [
null,
null
] | [
19,
2
] | [
29,
21
] | |
2024-11-18T21:31:56.524477+00:00 | 1,691,410,173,000 | a620f9feebad2cd0dd38e33f2b8097b65da4e8bc | 3 | {
"blob_id": "a620f9feebad2cd0dd38e33f2b8097b65da4e8bc",
"branch_name": "refs/heads/master",
"committer_date": 1691410173000,
"content_id": "f552f9ec53d79c1b39883d66bbc2e71dda7dc668",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "028cb07e35bac5a176b69bab2aca19cb94f5b045",
"extension": "p... | 2.796875 | stackv2 |
import configparser
import os
def setenv(args):
sysusername=args['sysusername']
syspassword=args['syspassword']
username=args['username']
sid=args['sid']
hostname=args['hostname']
port=args['port']
try:
import oracledb
except Exception as e:
print(str(e))
try:
... | 73 | 20.37 | 91 | 17 | 339 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b796c09aef071f8b_008c0f16", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
32
] | [
null
] | [
15
] | [
57
] | |
2024-11-18T21:32:17.538469+00:00 | 1,627,924,131,000 | a7199ad40c62f255820433a7b20ac337a2c22daa | 4 | {
"blob_id": "a7199ad40c62f255820433a7b20ac337a2c22daa",
"branch_name": "refs/heads/master",
"committer_date": 1627924131000,
"content_id": "d9067c46a43e281a745e213573b0bb72b631af0d",
"detected_licenses": [
"MIT"
],
"directory_id": "5a3fce8895e24abee73fca54bec0275d2092bf22",
"extension": "py",
"fi... | 4.1875 | stackv2 | import random
"""
I've seen the task of implementing a password generator as a practice for developers.
Here is my implementation of this task.
1. I deliberately removed the following characters 0, 1, I, O, o.
Due to the fact that in some fonts they are very similar to each other and this can cause difficulties for ... | 51 | 33 | 116 | 15 | 380 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b9010af98ab36a4f_700f99ec", "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."
] | [
42
] | [
null
] | [
19
] | [
64
] | |
2024-11-18T21:33:04.869419+00:00 | 1,593,609,912,000 | 5ce75b883851610e4b21244111ebe55a79958700 | 2 | {
"blob_id": "5ce75b883851610e4b21244111ebe55a79958700",
"branch_name": "refs/heads/master",
"committer_date": 1593609912000,
"content_id": "5a3885e9511d0c3d7c8994875e3b31eb506f9904",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "30462c1818d1c37a1d840110e1464b05c4933d69",
"extension": "p... | 2.40625 | stackv2 | import os
import click
import logging
import unicodedata
import tarfile
import io
import shutil
import sonosco.common.audio_tools as audio_tools
import sonosco.common.path_utils as path_utils
from tqdm import tqdm
from sonosco.datasets.download_datasets.create_manifest import create_manifest
from sonosco.common.utils ... | 160 | 33.48 | 115 | 23 | 1,302 | python | [{"finding_id": "codeql_py/tarslip_8f40bc45c957cf77_c0377d08", "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)."
] | [
50
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T22:42:15.599685+00:00 | 1,553,246,946,000 | 17a4e32b174f2c53b144c1db096879a8faacd318 | 3 | {
"blob_id": "17a4e32b174f2c53b144c1db096879a8faacd318",
"branch_name": "refs/heads/master",
"committer_date": 1553246946000,
"content_id": "fc85a9b8259d93d08597879fe399a0234cb891ed",
"detected_licenses": [
"MIT"
],
"directory_id": "ea06b386e24186cae7b2de65a0693937745a746c",
"extension": "py",
"fi... | 2.875 | stackv2 | #!~/Git/Cloudoftwits/ python
#import pycrypto as pc
import pyfiglet
from Crypto.Cipher import AES
from Crypto import Random
#class APIcred:
"""
attributes of an API key:
name - to identify what type of key it is
input_data - to assign a plain text value to the key
encrypted key - the result of encrypting the key
whe... | 235 | 29.1 | 160 | 16 | 2,175 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fceb3de0f0051ac0_3e3e001d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
108,
134
] | [
null,
null
] | [
33,
30
] | [
48,
43
] | |
2024-11-18T20:31:26.957965+00:00 | 1,461,335,006,000 | 948967722026eb5d54bf38073159fa3610192017 | 3 | {
"blob_id": "948967722026eb5d54bf38073159fa3610192017",
"branch_name": "refs/heads/master",
"committer_date": 1461335006000,
"content_id": "427c8ba008938c5b20699e7d69af4d74c2b151b4",
"detected_licenses": [
"MIT"
],
"directory_id": "5176b2bff13827e360d97c66cf49eaf75129214e",
"extension": "py",
"fi... | 2.53125 | stackv2 | """Generate an HTML viewer for frame pairs."""
import argparse
import json
import jinja2
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('frame_pairs_directory',
default=None,
help='Directory containing output of dump_frame_pairs.py')
args = parser.pa... | 26 | 32.38 | 78 | 13 | 172 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4ef13b3256bb825a_c58ced43", "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."
] | [
16
] | [
17
] | [
17
] | [
60
] | |
2024-11-18T20:31:35.838313+00:00 | 1,675,328,685,000 | 2f46c62686aa364d980e49b375724e029895e8b1 | 3 | {
"blob_id": "2f46c62686aa364d980e49b375724e029895e8b1",
"branch_name": "refs/heads/main",
"committer_date": 1675329503000,
"content_id": "e01b3dcb5c1d024d62df65291329884d7e07b639",
"detected_licenses": [
"MIT"
],
"directory_id": "27122019ac5412da015ae71a09854a667d81badb",
"extension": "py",
"file... | 3.140625 | stackv2 | """GbibCheckAuthors
List authors that are possibly stored in more than one way.
Specifically, the algorithm finds those authors that are written in exactly
the way after parsing such that first names are abbreviated.
Usage:
GbibCheckAuthors [options] <input>
Arguments:
input Input BibTeX-f... | 157 | 28.12 | 100 | 18 | 1,143 | python | [{"finding_id": "codeql_py/overly-large-range_3c1674c535673962_3f4b8525", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\w in the same character class.", "remediation": "", "loc... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with \\w in the same character class."
] | [
40
] | [
null
] | [
42
] | [
45
] | |
2024-11-18T20:31:36.953088+00:00 | 1,566,787,834,000 | bc465e646e0ceb5d6b604c5e73a5f0e27df33433 | 3 | {
"blob_id": "bc465e646e0ceb5d6b604c5e73a5f0e27df33433",
"branch_name": "refs/heads/master",
"committer_date": 1566787834000,
"content_id": "f2a41e98ee8e791ef125093cef514bb74827b998",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "56428b39ddf622fd91426670671b85138794a423",
"extension": "py"... | 2.609375 | stackv2 | import os
import click
from jinja2 import FileSystemLoader, Environment
@click.group()
def cli():
pass
@cli.command()
@click.argument('name', metavar='<name>')
@click.argument('gcloud_project', metavar='<gcloud_project>')
@click.option('database',
'--database',
prompt="Which databas... | 72 | 31.26 | 86 | 16 | 517 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_7cc5498bc619a243_2e1fad12", "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."
] | [
30
] | [
null
] | [
11
] | [
37
] | |
2024-11-18T20:31:45.794082+00:00 | 1,607,244,748,000 | d141510e81db906699543d5b936f098fc83c4ad4 | 3 | {
"blob_id": "d141510e81db906699543d5b936f098fc83c4ad4",
"branch_name": "refs/heads/master",
"committer_date": 1607244748000,
"content_id": "1b462eaedbe4fb4ae1aae534005646655c651c01",
"detected_licenses": [
"MIT"
],
"directory_id": "caf7197747c8ceb78063a725ee6d8e3d626e9ec3",
"extension": "py",
"fi... | 2.578125 | stackv2 | #from com_cheese_api.usr.model.user_dto import UserDto
#from com_cheese_api.usr.model.user_dao import UserDao
from com_cheese_api.usr.user.model.user_dto import UserDto
from com_cheese_api.usr.user.model.user_dao import UserDao
#from com_cheese_api.util.file import FileReader
from com_cheese_api.cmm.utl.file import Fi... | 150 | 28.01 | 95 | 15 | 1,070 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_25725134155d098f_ec29ee30", "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."
] | [
101
] | [
null
] | [
15
] | [
49
] | |
2024-11-18T21:10:23.612932+00:00 | 1,593,444,731,000 | f96e167680179f9b4c98086ffd3eba0ce35eba3d | 3 | {
"blob_id": "f96e167680179f9b4c98086ffd3eba0ce35eba3d",
"branch_name": "refs/heads/master",
"committer_date": 1593444731000,
"content_id": "2f4f23fcebdea4fe1b7218a17d103c823377f999",
"detected_licenses": [
"MIT"
],
"directory_id": "b5b4ae49a88dfcf477cdce0ddcceb2224fc46a3b",
"extension": "py",
"fi... | 2.625 | stackv2 | '''
Copyright (c) 2019 Aria-K-Alethia@github.com / xindetai@Beihang University
Description:
text cleaner for removing noise in text
Licence:
MIT
THE USER OF THIS CODE AGREES TO ASSUME ALL LIABILITY FOR THE USE OF THIS CODE.
Any use of this code should display all the info above.
'''
import re
class TextClean... | 29 | 31.59 | 79 | 13 | 359 | python | [{"finding_id": "codeql_py/overly-large-range_e13d72fac68459c9_de03a3c3", "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\\\\[\\\\\\\\]^_\\]."
] | [
22
] | [
null
] | [
14
] | [
18
] | |
2024-11-18T21:10:35.464689+00:00 | 1,578,800,411,000 | 8e53aa590531807f9a70279c60cf9667c99b7b21 | 4 | {
"blob_id": "8e53aa590531807f9a70279c60cf9667c99b7b21",
"branch_name": "refs/heads/master",
"committer_date": 1578800411000,
"content_id": "1ad875b90351866e4951b9e263b1252f832a8332",
"detected_licenses": [
"MIT"
],
"directory_id": "1cb22ce903921cf67e71838dc5509e493c566132",
"extension": "py",
"fi... | 4.0625 | stackv2 | # password validation using a regular expression.
import re
def password_validation():
i = 0
while i == 0:
try:
pattern = re.compile(r"[a-zA-Z\d!@#$%^&*]{8,}")
first_password = input("\nEnter a new password \nValid characters are A-Z, a-z, 0-9, $%*!@&#^ : ")
second... | 35 | 34.94 | 110 | 19 | 287 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_92ed9aae7df9204b_c85a9b54", "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."
] | [
28
] | [
null
] | [
39
] | [
53
] | |
2024-11-18T21:11:15.226350+00:00 | 1,586,235,037,000 | 9fd9bc4fd207a5d172f737d73734d77538cf4428 | 2 | {
"blob_id": "9fd9bc4fd207a5d172f737d73734d77538cf4428",
"branch_name": "refs/heads/master",
"committer_date": 1586235037000,
"content_id": "b7761a97708991f2ade244beb947e7a8fe40910f",
"detected_licenses": [
"MIT"
],
"directory_id": "47da6f675cc253b991c126feea47d5b8f1ad50b4",
"extension": "py",
"fi... | 2.328125 | stackv2 | import logging
import requests
from coreutils.logdecorator import logwrap
@logwrap
def post_call(username, password, url, payloadlocation):
'''
post_call --> interact with nso-server to create resource
'''
logging.debug("username is:%s"% username)
logging.debug("password is:%s"% password)
logging.debug("url is:%... | 92 | 34.38 | 140 | 14 | 758 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_89c9008280ec3eb8_6e5e152c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
11,
36,
61,
83
] | [
null,
null,
null,
null
] | [
16,
16,
16,
16
] | [
42,
42,
42,
42
] | |
2024-11-18T21:11:16.448182+00:00 | 1,596,618,724,000 | be69b60fee939f621a192047400cb335dd0847ff | 2 | {
"blob_id": "be69b60fee939f621a192047400cb335dd0847ff",
"branch_name": "refs/heads/master",
"committer_date": 1596618724000,
"content_id": "f0340e9b622398ae8fb557f894bad5796c9ce19d",
"detected_licenses": [
"MIT"
],
"directory_id": "2ac39acf13c1cd636c25e6742040888775f27fe4",
"extension": "py",
"fi... | 2.40625 | stackv2 | import paho.mqtt.client as mqtt
import ssl
import json
import utils
#=======================================================================
# program that replaces te physical potentiometer
# it sends a value between 0 and 255 that emulates the signal from potentiometer
# to the topic sub_topic defined in the general ... | 119 | 39.45 | 141 | 13 | 984 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_204d56880254c1ef_bbdd77e8", "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."
] | [
116
] | [
null
] | [
11
] | [
85
] | |
2024-11-18T21:47:35.315784+00:00 | 1,572,251,084,000 | c7260530299792815117f1b492ee6e4609231342 | 2 | {
"blob_id": "c7260530299792815117f1b492ee6e4609231342",
"branch_name": "refs/heads/master",
"committer_date": 1572251084000,
"content_id": "e32fda8be5298f77a085d4a0436cbebe4f846fcc",
"detected_licenses": [
"MIT"
],
"directory_id": "a47a52834ffe2bb45294e16268dc9b262b5eadbf",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/python3 -W ignore
import os, requests, json, time, datetime, multiprocessing, datetime, subprocess
from pprint import pprint
#create date wise directories inside json and data directories to hold json dump and minute wise data
dirname = datetime.datetime.now().strftime("%d%B") #ex: 27October
#create direc... | 109 | 32.03 | 104 | 21 | 1,025 | python | [{"finding_id": "codeql_py/request-without-cert-validation_b3db3a1f2f5bad16_df478e8b", "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)."
] | [
22
] | [
null
] | [
11
] | [
41
] | |
2024-11-18T21:47:38.798277+00:00 | 1,616,024,076,000 | 1c948c721eb37ecb713af294eac307dd5aaf91b5 | 2 | {
"blob_id": "1c948c721eb37ecb713af294eac307dd5aaf91b5",
"branch_name": "refs/heads/main",
"committer_date": 1616024076000,
"content_id": "1c181fda3dadcce0ec26cbc0468891166a6b9457",
"detected_licenses": [
"MIT"
],
"directory_id": "ff8dc752c29214bf183e22723c93e4c7a7fbf8dd",
"extension": "py",
"file... | 2.5 | stackv2 | import requests
import re
from urllib.parse import urljoin
from eudract.utils import json_handler
class Eudract:
def __init__(self):
self._BASE_URL = "https://www.clinicaltrialsregister.eu/"
self._SEARCH = urljoin(self._BASE_URL, "/ctr-search/search")
self._DOWNLOAD = urljoin(self._BASE_U... | 73 | 41.12 | 114 | 19 | 703 | python | [{"finding_id": "codeql_py/request-without-cert-validation_bb873cf9e5199aa9_d0641356", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 5 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
47,
55,
64,
69,
66
] | [
null,
56,
null,
70,
null
] | [
17,
17,
21,
21,
26
] | [
102,
43,
88,
47,
90
] | |
2024-11-18T21:47:39.529197+00:00 | 1,533,267,105,000 | 9e9ab984e422d306f8c61d620adac4383a713bf5 | 3 | {
"blob_id": "9e9ab984e422d306f8c61d620adac4383a713bf5",
"branch_name": "refs/heads/master",
"committer_date": 1533267105000,
"content_id": "12040d4b32ebac387e7740638adc5158249c38b3",
"detected_licenses": [
"MIT"
],
"directory_id": "5564d74bf4849269864e7aeca7d5e49606c28164",
"extension": "py",
"fi... | 2.53125 | stackv2 | # coding:utf-8
import datetime
from flask import render_template, redirect, url_for, request,flash
from config.manager import app
# from models.models import db
from models.template import Template,db
from route.func import user_login_required
from route.templateForms import TemplateEditForm,TemplateForm
# 发布文章
@app... | 100 | 29.01 | 85 | 17 | 772 | python | [{"finding_id": "codeql_py/url-redirection_a78c4807da5c406e_edc53ab3", "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)."
] | [
52,
70,
86
] | [
null,
null,
null
] | [
25,
21,
21
] | [
85,
81,
81
] | |
2024-11-18T21:47:41.822323+00:00 | 1,623,095,363,000 | b2ee88bd49697f7d8c26e7a4de3cf10eb57fe2f6 | 3 | {
"blob_id": "b2ee88bd49697f7d8c26e7a4de3cf10eb57fe2f6",
"branch_name": "refs/heads/main",
"committer_date": 1623095363000,
"content_id": "afe90b972331eeb4352d7ed33e88b44437d793ac",
"detected_licenses": [
"MIT"
],
"directory_id": "47356c09a12ed17808fca8dfa911c7a64e267d2e",
"extension": "py",
"file... | 3.28125 | stackv2 | import re
class ResourceItem:
title = None
url = None
mini_description = None
def __init__(self, title, url, mini_description=None):
self.title = title
self.url = url
self.mini_description = mini_description
self._validate_title(title)
self._validate_url(url)
... | 36 | 28.83 | 111 | 13 | 273 | python | [{"finding_id": "codeql_py/overly-large-range_7e9baeb513fda4e1_415412d1", "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\\\\[\\\\\\\\]^_\\]."
] | [
35
] | [
null
] | [
56
] | [
59
] | |
2024-11-18T22:28:47.997361+00:00 | 1,624,188,701,000 | b13539bf756e5e6c8cdb1f571faa1acc187ea936 | 3 | {
"blob_id": "b13539bf756e5e6c8cdb1f571faa1acc187ea936",
"branch_name": "refs/heads/master",
"committer_date": 1624188701000,
"content_id": "326e337c5023ad04d6963b31851f332b95664f99",
"detected_licenses": [
"MIT"
],
"directory_id": "aad9633d7a9795f7c87d25b3ed58e8dd876fdd02",
"extension": "py",
"fi... | 2.90625 | stackv2 | # helper db functions
import boto.dynamodb2
from boto.dynamodb2.table import Table
from boto.s3.connection import S3Connection
from Crypto.Cipher import AES
import base64
def parseConnectionString(connectionString):
"""
Parses the table connection string. Returns a dict of parameters found.
"""
retur... | 82 | 29.89 | 94 | 13 | 504 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_f3a5f20177b7a9b8_387a57b5", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
70,
81
] | [
null,
null
] | [
18,
22
] | [
58,
51
] | |
2024-11-18T22:29:36.589227+00:00 | 1,625,392,852,000 | c2a8086812939399b3950fd838dbac754a2620ec | 2 | {
"blob_id": "c2a8086812939399b3950fd838dbac754a2620ec",
"branch_name": "refs/heads/main",
"committer_date": 1625392852000,
"content_id": "9293f7e7434fec6ba56d28538a3178a5f610e1f4",
"detected_licenses": [
"MIT"
],
"directory_id": "13197e7fc0c0b1a50f312e10d7515c0f64977398",
"extension": "py",
"file... | 2.3125 | stackv2 | #!/usr/bin/env python3
# Exploit Author: Emre ÖVÜNÇ
# PoC code by @faisalfs10x [https://github.com/faisalfs10x]
# Reference:
# 1) https://nvd.nist.gov/vuln/detail/CVE-2019-14322
# 2) https://palletsprojects.com/blog/werkzeug-0-15-5-released
""" $ pip3 install colorama==0.3.3, argparse, requests, urllib3
$ python... | 119 | 29.92 | 102 | 19 | 1,168 | python | [{"finding_id": "codeql_py/request-without-cert-validation_522364df4f621eb2_b5ba082a", "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)."
] | [
81
] | [
null
] | [
11
] | [
54
] | |
2024-11-18T22:40:27.973930+00:00 | 1,463,669,744,000 | cf1726cd06d1ab63858228585f92f1759052b565 | 3 | {
"blob_id": "cf1726cd06d1ab63858228585f92f1759052b565",
"branch_name": "refs/heads/master",
"committer_date": 1463669744000,
"content_id": "62f098284cad9f7dfdad047901384957917d1149",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c92f2aa7505c1ddf1f5176ed66fa0f7a42a79bba",
"extension": "py"... | 3.3125 | stackv2 | # /usr/local/bin/python3
# --*-- coding: utf-8 --*--
# __Author__ = 'Jieer'
poem = '''There was a young lady named Bright,
Whose speed was far faster than light;
She started one day
In a relative way,
And returned on the previous night.'''
print(len(poem))
fout = open('relativity','wt')
fout.write(poem)
fout.close(... | 412 | 15.33 | 90 | 12 | 2,038 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9e1950466e1642d9_d07c21d4", "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... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
258,
266,
270,
276
] | [
null,
null,
null,
null
] | [
7,
7,
7,
7
] | [
25,
25,
25,
25
] | |
2024-11-18T22:40:28.144830+00:00 | 1,529,993,739,000 | cd613a967eebb38bf53e63ce680669d0da5407c3 | 4 | {
"blob_id": "cd613a967eebb38bf53e63ce680669d0da5407c3",
"branch_name": "refs/heads/master",
"committer_date": 1529993739000,
"content_id": "889f306d0575c7a4356020afa367b648b1e68eab",
"detected_licenses": [
"MIT"
],
"directory_id": "0fee0a8a9add1898293b1eb4c6233e6353ff8319",
"extension": "py",
"fi... | 3.875 | stackv2 | from sys import argv
print("How old are you?",end='')
age=input()
print("How tall are you?",end='')
height=input()
print("How much do you weight?",end='')
weight=input()
print(f"So,you're {age} old,{height} tall and {weight} heavy")
script ,filename=argv
txt=open(filename)
print("Here's your life {filename}:")
print(tx... | 56 | 31.52 | 159 | 9 | 492 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_452dbe6e7e7c0de2_5efb605e", "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."
] | [
34
] | [
null
] | [
7
] | [
67
] | |
2024-11-18T22:40:36.059489+00:00 | 1,578,146,404,000 | 3c26c21e7680f435f090326c0d54812dd7de4dc4 | 3 | {
"blob_id": "3c26c21e7680f435f090326c0d54812dd7de4dc4",
"branch_name": "refs/heads/master",
"committer_date": 1578146404000,
"content_id": "52b4790df654802b7052e711c3504c6bb99809b2",
"detected_licenses": [
"MIT"
],
"directory_id": "baab0f455e4c1d0aab97728c5c9ca56d675c607b",
"extension": "py",
"fi... | 2.578125 | stackv2 | import sys
import re
from bs4 import BeautifulSoup
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QUrl
from PyQt5.QtWebEngineWidgets import QWebEnginePage
BASE_URL = 'https://www.crunchbase.com'
companies = []
pages = []
class Page(QWebEnginePage):
def __init__(self, url):
self.app =... | 162 | 26.54 | 124 | 17 | 1,114 | python | [{"finding_id": "codeql_py/redos_c127307237de8463_d46d492e", "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 'http://' and containing many repe... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with 'http://' and containing many repetitions of '00.'."
] | [
52
] | [
null
] | [
46
] | [
58
] | |
2024-11-18T22:40:36.561943+00:00 | 1,613,358,975,000 | 2f593ea95ca683c0a24dcd5e7ac43613b9677de3 | 3 | {
"blob_id": "2f593ea95ca683c0a24dcd5e7ac43613b9677de3",
"branch_name": "refs/heads/master",
"committer_date": 1613358975000,
"content_id": "62550cf618756c68ef621430c19e20e4ef0084a2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e73d35c15798c58ad912d3d20e6ce0d5833974c6",
"extension": "py"... | 3.046875 | stackv2 | """
Utility functions to make it easier to work with Kubernetes, primarily
just a wrapper around kubectl commands
"""
from hypermodel import sh
import os
import base64
import yaml
import re
def secret_from_env(env_var: str, namespace: str) -> bool:
"""
Create a Kubernetes secret in the provided ``name... | 86 | 33.36 | 116 | 15 | 704 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_9c4ef25f502d65d7_c352a8cf", "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."
] | [
58
] | [
null
] | [
21
] | [
28
] | |
2024-11-18T22:41:16.291337+00:00 | 1,561,986,701,000 | 6dfb4bacf288fda2bc914d88ff5a51ea70d23f0a | 2 | {
"blob_id": "6dfb4bacf288fda2bc914d88ff5a51ea70d23f0a",
"branch_name": "refs/heads/master",
"committer_date": 1561986701000,
"content_id": "6e2a3fa6afe800d4d741f054f5be8e2a1f1b5077",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "04f505d6b82c34b2be977f881803563e0044cf85",
"extension": "py"... | 2.359375 | stackv2 | import json
import requests
from flask import Flask, Response, request
import os
import logger
import cherrypy
from requests.auth import HTTPBasicAuth
app = Flask(__name__)
logger = logger.Logger('mips-userprojects-service')
url = os.environ.get("baseurl")
expand_property_name = os.environ.get("expand_property_name")
... | 191 | 34.09 | 121 | 19 | 1,432 | python | [{"finding_id": "codeql_py/reflective-xss_ed9517d4fe39a1e7_e9d95c3b", "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... | 5 | true | [
"CWE-079",
"CWE-079",
"CWE-918",
"CWE-918",
"CWE-918"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of... | [
132,
168,
49,
129,
165
] | [
null,
null,
null,
null,
null
] | [
71,
67,
24,
24,
20
] | [
84,
80,
103,
122,
95
] | |
2024-11-18T22:41:16.352971+00:00 | 1,525,352,561,000 | 0e9dfbc6a33204063b4febb16e74f08494292d28 | 3 | {
"blob_id": "0e9dfbc6a33204063b4febb16e74f08494292d28",
"branch_name": "refs/heads/master",
"committer_date": 1525352561000,
"content_id": "a2be36ed4e2b315e69b387db6b5adbc27c4cbcb1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "17d45303aa16ae48b633a5fe2b45771f2983faec",
"extension": "py"... | 2.859375 | stackv2 | from jinja2 import Environment, FileSystemLoader
import os.path
from utils import log
# __file__就是本文件的名字
# 得到用于加载模板的目录
path = '{}/templates/'.format(os.path.dirname(__file__))
log('path, ', path)
# 创建一个加载器,jinja2从这个目录中加载模板
loader = FileSystemLoader(path)
# 用加载器创建一个环境,有了它才能读取模板文件
env = Environment(loader=loader)
# ... | 35 | 17.69 | 56 | 9 | 203 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_746252c20800dd68_e549369c", "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."
] | [
15
] | [
null
] | [
7
] | [
33
] | |
2024-11-18T22:41:17.467461+00:00 | 1,487,072,437,000 | 461a257ecee3a41ed14c541b9f7030029f7a5500 | 3 | {
"blob_id": "461a257ecee3a41ed14c541b9f7030029f7a5500",
"branch_name": "refs/heads/master",
"committer_date": 1487072437000,
"content_id": "30cdfabaa3288d6af47739411f3a6a789d606f5a",
"detected_licenses": [
"MIT"
],
"directory_id": "edb58ca3113b8c6146729a96910747965ca84476",
"extension": "py",
"fi... | 2.765625 | stackv2 |
import logging
import re
from re import search
from jinja2 import Template
from slugify import slugify
LOG = logging.getLogger(__name__)
class Event:
DEFAULT_PATTERN = r":\s?(\S*['-]*|\w*.+|'[^']+')"
def __init__(self, bot, backend, body):
self.bot = bot
self.backend = backend
sel... | 120 | 26.64 | 80 | 18 | 747 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2a5eba0a279c0a23_e55fbd0f", "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."
] | [
43
] | [
null
] | [
24
] | [
37
] | |
2024-11-18T22:41:23.195734+00:00 | 1,590,917,654,000 | 30dfc9d35888f5a86de31ae148876d048bc3b6b2 | 3 | {
"blob_id": "30dfc9d35888f5a86de31ae148876d048bc3b6b2",
"branch_name": "refs/heads/master",
"committer_date": 1590917654000,
"content_id": "015bb0b18d3d48647ab745d30d39fb18b9f4413b",
"detected_licenses": [
"MIT"
],
"directory_id": "a1e0047ecef21e68e864decfbc78e66885d97113",
"extension": "py",
"fi... | 2.578125 | stackv2 | # -*- coding: utf-8 -*-
"""JSON_BERT.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1B5DoXVrfZ9vB-lyVNNDXPPS1ZenglsSD
"""
import pandas as pd
import glob
from tqdm import tqdm
import re
#path = r'JSON_Files/' # use your path
all_files = glob.gl... | 176 | 29.76 | 154 | 13 | 1,363 | python | [{"finding_id": "codeql_py/overly-large-range_e032d3e15af501f8_625f3a6f", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
75
] | [
null
] | [
76
] | [
79
] | |
2024-11-18T22:54:13.914496+00:00 | 1,572,079,789,000 | a790c372d14d7d14c8ac05ab0f55cf95b7ce2403 | 2 | {
"blob_id": "a790c372d14d7d14c8ac05ab0f55cf95b7ce2403",
"branch_name": "refs/heads/master",
"committer_date": 1572079789000,
"content_id": "5b07254f1f8ea15ade238d373712b42c3873be67",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "47a11366dc077ebcc92db6c69eaa2029de5145b5",
"extension": "p... | 2.375 | stackv2 | import base64
from pathlib import Path
from jinja2 import Environment, PackageLoader
from jinja2 import Markup
loader = PackageLoader("report_generator.exporter", "data")
env = Environment(loader=loader)
def generate(data=None, yaml=None, attendee_obj=None, sponsors=None, output_path="/tmp"):
def include_file(... | 123 | 39.58 | 101 | 18 | 1,149 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2ef1e5514530756c_b6a35525", "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
] | [
7
] | [
33
] | |
2024-11-18T22:54:26.889504+00:00 | 1,584,570,956,000 | a1db70873a2222fea2d70d67a6a5ef6fb890f818 | 3 | {
"blob_id": "a1db70873a2222fea2d70d67a6a5ef6fb890f818",
"branch_name": "refs/heads/master",
"committer_date": 1584570956000,
"content_id": "059cab22fbcf0946e9f7c6b578e8d8aabe2c0552",
"detected_licenses": [
"MIT"
],
"directory_id": "16d73ff8e6daebe8c52071e495aa5ea05ae4b76a",
"extension": "py",
"fi... | 2.671875 | stackv2 | #rpg_mongo.py
import pymongo
import os
from dotenv import load_dotenv
import sqlite3
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_USER}:{DB... | 55 | 20.36 | 117 | 10 | 294 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1784f0ff7e82f849_9301c5e1", "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."
] | [
16
] | [
null
] | [
15
] | [
29
] | |
2024-11-18T20:55:05.558902+00:00 | 1,307,719,406,000 | b78e603615c626caa7dd4345a3eeb930cb7d6baf | 3 | {
"blob_id": "b78e603615c626caa7dd4345a3eeb930cb7d6baf",
"branch_name": "refs/heads/master",
"committer_date": 1307719406000,
"content_id": "25c38a6dd8c3fb963ea437b796bcfa92ea66867d",
"detected_licenses": [
"MIT"
],
"directory_id": "8f0f5a1d92312998cfe67c19cb7920c3a53afe24",
"extension": "py",
"fi... | 2.6875 | stackv2 | # -*- coding: utf-8 -*-
"""
An rfc5424/rfc5425 syslog server implementation
Copyright © 2011 Evax Software <contact@evax.fr>
"""
import ssl
import SocketServer
from loggerglue.rfc5424 import SyslogEntry
class SyslogHandler(SocketServer.BaseRequestHandler):
"""
Handler for syslog connections. An instance of thi... | 117 | 32.56 | 102 | 18 | 797 | python | [{"finding_id": "codeql_py/insecure-default-protocol_8079cb364b0fc025_8fbb9c8b", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
114
] | [
115
] | [
20
] | [
52
] | |
2024-11-18T20:55:13.333732+00:00 | 1,556,100,774,000 | 0547c1801da3b50b18f32ff085a20a042457a9aa | 2 | {
"blob_id": "0547c1801da3b50b18f32ff085a20a042457a9aa",
"branch_name": "refs/heads/master",
"committer_date": 1556100774000,
"content_id": "93a837f46440b74ea1dd7d8af4fe605893dad661",
"detected_licenses": [
"MIT"
],
"directory_id": "3c28de407e759e0632d049402c8d33dfa76626be",
"extension": "py",
"fi... | 2.375 | stackv2 | """
Eden SDK for client python interface
"""
import urllib
import requests
import os
import base64
import uuid
import json
import asyncio
import eth_keys
import binascii
from Crypto.Hash import keccak
from .config import EdenConfig
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# ... | 408 | 28.52 | 123 | 16 | 2,714 | python | [{"finding_id": "codeql_py/request-without-cert-validation_f71be44bfbdf8eb0_d1d6d814", "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)."
] | [
25,
31
] | [
null,
null
] | [
12,
12
] | [
77,
80
] | |
2024-11-18T20:55:13.550227+00:00 | 1,581,972,531,000 | 246eea4937b67c6bf85c11926bb4261d97c8f901 | 2 | {
"blob_id": "246eea4937b67c6bf85c11926bb4261d97c8f901",
"branch_name": "refs/heads/master",
"committer_date": 1581972531000,
"content_id": "b673d3ea77421fc6f982b521130f360c4c64352d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8b8d6561616d893ca7e173d36674e5c861750a1d",
"extension": "py"... | 2.40625 | stackv2 | from flask import Flask, jsonify, request
from flask_restful import Api, Resource
from pymongo import MongoClient
import bcrypt
import requests
import subprocess
import json
app = Flask(__name__)
api = Api(app)
client = MongoClient("mongodb://db:27017")
#client = MongoClient("mongodb://localhost:27017")
db = client.i... | 118 | 39.1 | 133 | 16 | 1,127 | python | [{"finding_id": "codeql_py/full-ssrf_822d5836f64f315a_d0be343f", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 1 | true | [
"CWE-918"
] | [
"py/full-ssrf"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1)."
] | [
52
] | [
null
] | [
17
] | [
34
] | |
2024-11-18T21:07:43.039443+00:00 | 1,613,595,375,000 | 0cd08ae0f6012595941fee206a749031518795e8 | 3 | {
"blob_id": "0cd08ae0f6012595941fee206a749031518795e8",
"branch_name": "refs/heads/main",
"committer_date": 1613595375000,
"content_id": "02cdb4ef611376c0ff7fcab3f41988c375b495a3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1106e4a43db94c727136679e56e688322b9524d9",
"extension": "py",
... | 2.734375 | stackv2 | import os
import shutil
from ._temporarydirectory import TemporaryDirectory
from ._shellscript import ShellScript
from jinja2 import Template
import numpy as np
def sphere_scat(nnx = 21, nny = 22, nnz = 23):
# Creates a temporary) working directory (will get cleaned up even if exception is raised)
# if remove ... | 44 | 37.68 | 103 | 14 | 473 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_0f895639782ae427_cb34e979", "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
] | [
null
] | [
33
] | [
51
] | |
2024-11-18T21:33:01.338206+00:00 | 1,416,687,210,000 | a295160bb6038be63893904ef634ba618c0680c6 | 2 | {
"blob_id": "a295160bb6038be63893904ef634ba618c0680c6",
"branch_name": "refs/heads/master",
"committer_date": 1416687210000,
"content_id": "ce4f270db202e2d44660779bc609208dd61e0ab5",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "5337b117298a2f422ca6e60177926fdbef0a7127",
"extension": "py",
... | 2.484375 | stackv2 | #! /usr/bin/python
import BaseHTTPServer
import hashlib
import base64
import ssl
# Change this:
USER = "admin"
# Generate using SHA256
PASSWORD = "ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f"
KEYFILE = "key.key"
CERTFILE = "cert.crt"
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def ... | 53 | 29.58 | 98 | 15 | 421 | python | [{"finding_id": "codeql_py/insecure-default-protocol_2c618d7f0bf21128_023cf0cf", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
50
] | [
null
] | [
16
] | [
99
] | |
2024-11-18T21:33:15.438301+00:00 | 1,623,336,384,000 | 94f35576060e9a51afb2f7f20605597238969fe5 | 4 | {
"blob_id": "94f35576060e9a51afb2f7f20605597238969fe5",
"branch_name": "refs/heads/master",
"committer_date": 1623336384000,
"content_id": "7e91699d44fe0e1b788165a56598e06585df971e",
"detected_licenses": [
"MIT"
],
"directory_id": "48ac9fb92e0891b5ea7268f7cd33d718963ee9b7",
"extension": "py",
"fi... | 3.796875 | stackv2 |
import sys
import app
import random #for generating characters
import string #for generating random strings
from app import Credentials
class Menu:
'''
Class for the Menu items
'''
def __init__(self):
self.accountdata = Credentials() #imported class from app module
self.choices = { #menu ... | 141 | 21.81 | 85 | 17 | 689 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ad4a9a9e434d4647_8ddabd8a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
77
] | [
null
] | [
50
] | [
66
] | |
2024-11-18T21:33:17.298580+00:00 | 1,606,778,788,000 | 00f8af3014e9ace7dd0b5650713249bf133c8eed | 3 | {
"blob_id": "00f8af3014e9ace7dd0b5650713249bf133c8eed",
"branch_name": "refs/heads/master",
"committer_date": 1606778788000,
"content_id": "8b3bf59df5606ee6e0906be6d9b0ef4ca3c37c1b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a298190b5b65051a1ba0d227fcf7428a3c1c22f1",
"extension": "p... | 2.828125 | stackv2 | from code.main import app
from flask import request, redirect, flash, render_template, jsonify
from werkzeug.utils import secure_filename
import os
import pandas
import time
def has_allowed_ext(filename, extensions):
# print(filename.rsplit('.', 1))
return '.' in filename and filename.rsplit('.', 1)[1].lower()... | 61 | 33.51 | 90 | 19 | 465 | python | [{"finding_id": "codeql_py/url-redirection_6c6a9e26d7570d9b_ff31fb97", "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)."
] | [
61
] | [
null
] | [
21
] | [
37
] | |
2024-11-18T21:33:26.452442+00:00 | 1,573,937,969,000 | e1c8f67c262b911109be98e104fa9d3a1ffb5a71 | 3 | {
"blob_id": "e1c8f67c262b911109be98e104fa9d3a1ffb5a71",
"branch_name": "refs/heads/master",
"committer_date": 1573937969000,
"content_id": "f3ed393ff0a47c00951446cbe38f514e78c018f0",
"detected_licenses": [
"MIT"
],
"directory_id": "f14981ba74390cb97feea81b08e7650e6ef01204",
"extension": "py",
"fi... | 3.109375 | stackv2 | """
This module contains the app and app factory.
"""
import flask
import requests
def create_app(requester=requests, host="localhost", port="8079"):
"""
This is the app factory. It returns an instance of the app.
The app is the intermediary between the API and the end-user's
web browser.
Par... | 558 | 27.78 | 72 | 19 | 3,445 | python | [{"finding_id": "codeql_py/partial-ssrf_f7100d1acab95c2b_2aa6a4e5", "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... | 6 | true | [
"CWE-918",
"CWE-918",
"CWE-918",
"CWE-918",
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the... | [
106,
202,
251,
347,
396,
506
] | [
108,
204,
253,
349,
398,
508
] | [
24,
28,
24,
28,
24,
32
] | [
14,
18,
14,
18,
14,
18
] | |
2024-11-18T21:33:31.572247+00:00 | 1,523,719,186,000 | 2b895d5ddda201d4cd79602cecf89e18334914d3 | 2 | {
"blob_id": "2b895d5ddda201d4cd79602cecf89e18334914d3",
"branch_name": "refs/heads/master",
"committer_date": 1523719186000,
"content_id": "2233d7421aa53cf33b29589c1288c658867317d8",
"detected_licenses": [
"MIT"
],
"directory_id": "816235f09a819099bff4aa27100851f5116f7d45",
"extension": "py",
"fi... | 2.421875 | stackv2 | from flask import render_template, flash, redirect, url_for, request
from app import app
from app.forms import SubmissionForm, LoginForm, RegistrationForm
from app.models import Post, User
from app import db
from flask_login import login_user, logout_user, current_user, login_required
@app.route('/')
@app.route('/ind... | 78 | 36.05 | 97 | 16 | 589 | python | [{"finding_id": "codeql_py/url-redirection_ecf1c292f854cdfd_57cd313b", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
56
] | [
null
] | [
25
] | [
34
] | |
2024-11-18T21:55:44.044020+00:00 | 1,569,279,314,000 | c30f19a6dffe44a6822b755aed015d8b6df96fe3 | 3 | {
"blob_id": "c30f19a6dffe44a6822b755aed015d8b6df96fe3",
"branch_name": "refs/heads/master",
"committer_date": 1569279314000,
"content_id": "13747384d05c383b60d8da9b3f3d6c25b4ffa805",
"detected_licenses": [
"MIT"
],
"directory_id": "b72238e9efe2c9971880ab3aea84202ce5e10ae8",
"extension": "py",
"fi... | 2.71875 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from operator import itemgetter, attrgetter, methodcaller
import csv
import os
import re
genders = dict(men=0, woman=0)
womens = ["SUSAN", 'MRS. MACREADY', "LUCY AND TUMNUS", 'END OF LINE OF LUCY', 'WITCH',
'MRS. BEAVER', 'SUSAN AND LUCY', 'DRYAD', 'JADIS', 'WHITE WITCH', "L... | 40 | 30.82 | 89 | 16 | 358 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ea837e3ef2d9d26d_1b5464b9", "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."
] | [
37
] | [
null
] | [
22
] | [
50
] | |
2024-11-18T22:54:57.037678+00:00 | 1,475,021,323,000 | 0b42722052df02f8fcabf1d5e10950bb4750d8dd | 3 | {
"blob_id": "0b42722052df02f8fcabf1d5e10950bb4750d8dd",
"branch_name": "refs/heads/master",
"committer_date": 1475021323000,
"content_id": "60d9c13a66cc1282fe0a0fdfc871b36c063ff2d1",
"detected_licenses": [
"MIT"
],
"directory_id": "a9c8c57239768a2fd8f760e6f1d196cb4ef9539e",
"extension": "py",
"fi... | 2.71875 | stackv2 | import click
from collections import OrderedDict
from jinja2 import Environment, PackageLoader
from merle.fetched_resource import FetchedResource
from slugify import slugify as string_slugify
DEFAULT_TEMPLATE = 'yaml.jinja2.txt'
BRIEF_TEMPLATE = 'brief.yaml.jinja2.txt'
def dumper(obj, template_name=DEFAULT_TEMPLATE)... | 64 | 26.44 | 74 | 17 | 464 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_3c5a3d5eb12ef649_e7e601c5", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
12
] | [
13
] | [
11
] | [
60
] | |
2024-11-18T22:55:01.109552+00:00 | 1,626,452,755,000 | 311e347f4c52775f687156e3bd55536a23c86dda | 3 | {
"blob_id": "311e347f4c52775f687156e3bd55536a23c86dda",
"branch_name": "refs/heads/main",
"committer_date": 1626452755000,
"content_id": "4af3e328579b92ebe85e7fe291a18171d4cff81b",
"detected_licenses": [
"MIT"
],
"directory_id": "196e3b3fec5f0f4e5c23edf5ce3de86a1f218ee0",
"extension": "py",
"file... | 3.09375 | stackv2 | import os
import glob
import argparse
import tarfile
### global variables
rename_file = './rename.txt'
def rename_img_files(topic_dir):
'''
Input Arguments:
topic_dir - file address of a topic containing 'documents', 'images', 'references', 'videos'
Function renames the images in numerical order... | 57 | 30.91 | 134 | 18 | 454 | python | [{"finding_id": "codeql_py/tarslip_706b9e4838b4f29d_d8c1bde1", "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)."
] | [
35
] | [
null
] | [
9
] | [
16
] | |
2024-11-18T22:55:08.302038+00:00 | 1,527,728,878,000 | 0df27a759fd8f4ee956a9714c4470e823d8164c6 | 3 | {
"blob_id": "0df27a759fd8f4ee956a9714c4470e823d8164c6",
"branch_name": "refs/heads/master",
"committer_date": 1527728878000,
"content_id": "22b19979e05c071587ae4041dcd338b01a17c524",
"detected_licenses": [
"MIT"
],
"directory_id": "de6901fe7ffe7a495e70262c7aff8b3696deb58c",
"extension": "py",
"fi... | 2.984375 | stackv2 | # ################################################################################################################
#
# Title: SimpleHTTPSServer
# Author: Joey Lane
# Description: A simple Python 2.7 HTTPS server module, which mimics the standard SimpleHTTPServer module.
# Tested on Kali Linux
#
# Save this script anywh... | 80 | 38.04 | 168 | 12 | 735 | python | [{"finding_id": "codeql_py/insecure-default-protocol_33a19949ab78bf47_326c200e", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
56
] | [
null
] | [
20
] | [
86
] | |
2024-11-18T23:06:22.192566+00:00 | 1,528,296,923,000 | 0a1ac0cc155c52661952df47f7ba28faa772059e | 3 | {
"blob_id": "0a1ac0cc155c52661952df47f7ba28faa772059e",
"branch_name": "refs/heads/master",
"committer_date": 1528296923000,
"content_id": "ac32166451e59192e9ed611e40328194d28a1db4",
"detected_licenses": [
"MIT"
],
"directory_id": "b593f152dc7d43b725a3ea8d13f3d3f0915c72ec",
"extension": "py",
"fi... | 3.171875 | stackv2 | from jinja2 import Template
def main():
return SomeProcessor(model, view, update)
class Msg:
Increment = "INCREMENT"
Decrement = "DECREMENT"
class Model(object):
def __init__(self, count):
"""Initialize a counter.
args: count (Int)
"""
self.count = count
def mo... | 65 | 15.46 | 72 | 10 | 253 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_6f38f474d9f64cfb_612f4aba", "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."
] | [
64
] | [
null
] | [
16
] | [
34
] | |
2024-11-18T20:56:52.944420+00:00 | 1,414,950,935,000 | 87d96abe04614af5c050f334944d11703322120b | 2 | {
"blob_id": "87d96abe04614af5c050f334944d11703322120b",
"branch_name": "refs/heads/master",
"committer_date": 1414950935000,
"content_id": "e58a4574754b9ad74596663f73956c36c9395058",
"detected_licenses": [
"MIT"
],
"directory_id": "ae73c0daa66c1ea3be5f6c2e4ba69a1e70f14981",
"extension": "py",
"fi... | 2.359375 | stackv2 | import docker
import os
import json
import tarfile
from werkzeug.wrappers import Request, Response
from paramiko import SSHClient, AutoAddPolicy
from scp import SCPClient
from .utils import (
create_container,
start_container,
stop_containers,
get_containers,
create_image,
remove_image)
SERVE... | 105 | 31.43 | 77 | 18 | 735 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_6b28f796964bb347_8b12c5af", "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... | 2 | true | [
"CWE-295",
"CWE-022"
] | [
"py/paramiko-missing-host-key-validation",
"py/tarslip"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe.",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
86,
95
] | [
null,
null
] | [
5,
9
] | [
53,
10
] | |
2024-11-18T20:56:54.076575+00:00 | 1,618,417,004,000 | cb8dfddb7183ceb898fa1146c108c84ca09569da | 3 | {
"blob_id": "cb8dfddb7183ceb898fa1146c108c84ca09569da",
"branch_name": "refs/heads/master",
"committer_date": 1618417004000,
"content_id": "22e648caa19e88872cb7be1ee969331bb2179a8b",
"detected_licenses": [
"MIT"
],
"directory_id": "bae6093d6213713328c3b05e67d8728cd8a4581a",
"extension": "py",
"fi... | 2.515625 | stackv2 | import pprint
import logging
from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from webapp import settings
from zenslackchat.models import SlackApp
from zenslackchat.models import ZendeskApp
class BaseWebHook(APIView):
"""Handle Zendesk Event... | 80 | 30.65 | 79 | 20 | 515 | python | [{"finding_id": "codeql_py/log-injection_1d2608337efec539_87b44a87", "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)."
] | [
57
] | [
58
] | [
25
] | [
73
] | |
2024-11-18T22:43:24.645849+00:00 | 1,554,757,176,000 | f1313e245a58e838e284915919ecaac0b830951b | 3 | {
"blob_id": "f1313e245a58e838e284915919ecaac0b830951b",
"branch_name": "refs/heads/master",
"committer_date": 1554757176000,
"content_id": "cfeb654cfd973fca0bec3a4184884d4875682452",
"detected_licenses": [
"MIT"
],
"directory_id": "1bca0e3d129b6545b5a360b9c992d9a3e812ecfc",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python
import sys
import SoupXPath
import json
import re
import uuid
import os
import requests
import urllib3
from os.path import basename
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
# availa... | 140 | 27.64 | 80 | 17 | 978 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9050eb16793e30c8_a5d29e82", "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)."
] | [
63
] | [
null
] | [
9
] | [
58
] | |
2024-11-18T22:44:06.238601+00:00 | 1,626,033,839,000 | 7c5b156a5923d109287d48e47d82d91e9119eaae | 3 | {
"blob_id": "7c5b156a5923d109287d48e47d82d91e9119eaae",
"branch_name": "refs/heads/main",
"committer_date": 1626033839000,
"content_id": "a0e22e89d4975fed7a7e15dadf9d9a1acb46edc9",
"detected_licenses": [
"MIT"
],
"directory_id": "7c8f62edc91547750bc1911b209e28f66383fa96",
"extension": "py",
"file... | 2.78125 | stackv2 | from flask import Flask, flash, request, render_template, redirect, url_for
import pandas as pd
import os
import json
UPLOAD_FOLDER = os.sep + "static" + os.sep
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.secret_key = 'hellohello'
@app.route("/")
def home():
return render_template("uplo... | 57 | 32.19 | 89 | 14 | 475 | python | [{"finding_id": "codeql_py/flask-debug_c73c444a0e98cf67_26af1449", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
57,
22
] | [
null,
null
] | [
5,
19
] | [
69,
31
] | |
2024-11-18T22:44:06.652810+00:00 | 1,479,057,120,000 | 14d62916f5b1731ded4f2ccc983cae99ea9d29dd | 2 | {
"blob_id": "14d62916f5b1731ded4f2ccc983cae99ea9d29dd",
"branch_name": "refs/heads/master",
"committer_date": 1479057120000,
"content_id": "b1fba130a5d164b540350fbae18f66c963183542",
"detected_licenses": [
"MIT"
],
"directory_id": "e0ee1823b1ce6b84dad9e4d52812a91d73e8d22b",
"extension": "py",
"fi... | 2.34375 | stackv2 | import time
import datetime
import codecs
import json
import urllib
from urllib import request
from markupsafe import Markup
#from future.standard_library import install_aliases
#install_aliases()
from urllib.parse import urlparse, urlencode
with open('data.json', 'r') as data_file:
data = json.load(data_fi... | 37 | 26.27 | 130 | 12 | 273 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_191a5c98e2338c52_4aa38067", "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."
] | [
34
] | [
null
] | [
16
] | [
42
] | |
2024-11-18T22:44:13.282579+00:00 | 1,563,762,106,000 | 413df337e9e9ff93d4db5bc886f6c4986e22a046 | 3 | {
"blob_id": "413df337e9e9ff93d4db5bc886f6c4986e22a046",
"branch_name": "refs/heads/master",
"committer_date": 1563762106000,
"content_id": "2187b6fcecb73eb8e71ddde7c11ca025afc3ed42",
"detected_licenses": [
"MIT"
],
"directory_id": "bcd5331dd53f98ca83986929a20b28fd87e0c2f4",
"extension": "py",
"fi... | 3.4375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
script to filter specific patterns from the crawled url endpoints
1) Instantiates the Mine class
2) Call methods to read and log some info
3) Use function with standard regex lib to find an endpoint pattern
script para filtrar os dados gerados por crawlers em .txt
1) ... | 68 | 32.38 | 96 | 13 | 543 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_566c4d2a18e55f64_c58d6293", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This string, which is used as a regular expression [here](1), has an unescaped '.' befor... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This string, which is used as a regular expression [here](1), has an unescaped '.' before 'epocacosmeticos.com', so it might match more hosts than expected."
] | [
44
] | [
null
] | [
20
] | [
64
] | |
2024-11-18T23:10:47.757970+00:00 | 1,612,905,393,000 | a71903bebf2043f9fa7a39fc3176d09356685d5a | 3 | {
"blob_id": "a71903bebf2043f9fa7a39fc3176d09356685d5a",
"branch_name": "refs/heads/main",
"committer_date": 1612905393000,
"content_id": "1a5f22fc1fe69a71ed1570b1d9daf9903fc27dfb",
"detected_licenses": [
"MIT"
],
"directory_id": "cadfd5f28649b035087ffcf426b8a822aba7c634",
"extension": "py",
"file... | 2.546875 | stackv2 | import os
from flask import Flask, request, flash, redirect, send_file
from werkzeug.utils import secure_filename
from models.model0 import Classifier
from img_func import save_bbox
app = Flask(__name__)
# Set up the directory where the files are to stored
UPLOAD_FOLDER = './images'
app.config['UPLOAD_FOLDER'] = UPLO... | 45 | 30.02 | 143 | 13 | 307 | python | [{"finding_id": "codeql_py/flask-debug_ec809bb214ecd326_86f9f08e", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-601",
"CWE-601"
] | [
"py/flask-debug",
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
45,
26,
30
] | [
null,
null,
null
] | [
5,
25,
25
] | [
24,
36,
36
] | |
2024-11-18T22:29:37.829715+00:00 | 1,556,623,002,000 | 060f0d102f6575911efd33d3c74d92455f3ec452 | 3 | {
"blob_id": "060f0d102f6575911efd33d3c74d92455f3ec452",
"branch_name": "refs/heads/master",
"committer_date": 1556623002000,
"content_id": "af26bdbc828b706ec8f8f48e1b15c9d96ece6e1e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "be9be885e02e1c41b4d7996d955ee856a98acb96",
"extension": "py"... | 2.796875 | stackv2 | #!/usr/bin/env python3
#_*_ coding: utf-8 _*_
import socket
import ssl
import pprint
SSL_PORT = 443
SSL_HOST = 'www.verisign.com'
REQUEST_DATA = "GET /this/is/encrypted/uri HTTP/1.1\r\n\r\n"
class DemoHttpsSslEncryptParts(object):
def __init__(self):
self.tcp_socket = None
self.ssl_socket = Non... | 67 | 33.55 | 120 | 16 | 544 | python | [{"finding_id": "codeql_py/insecure-protocol_9084f5ae831bef11_98d179bf", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.create_default_context](1)."
] | [
29
] | [
null
] | [
27
] | [
34
] | |
2024-11-18T22:29:53.363700+00:00 | 1,484,672,645,000 | 724dbb7776329c0bcdaa3131f2e8394f973f6083 | 3 | {
"blob_id": "724dbb7776329c0bcdaa3131f2e8394f973f6083",
"branch_name": "refs/heads/master",
"committer_date": 1484672645000,
"content_id": "c00c080ef193fdfa2fd8217413647e630cd503df",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c590407c3474a5e7b6ba8ea18810a373a02d4ba7",
"extension": "py"... | 2.921875 | stackv2 | __author__ = 'cdumitru'
import sys
from Crypto.Cipher import ARC4
import numpy
import string
import itertools
from multiprocessing import Pool
from time import time
import cProfile
#ALPHABET = string.digits
ALPHABET = string.ascii_lowercase
#ALPHABET = string.ascii_uppercase
#ALPHABET = string.letters + string.digit... | 88 | 21.75 | 93 | 13 | 531 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_eaad09f763462ef3_4d12083e", "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.", "... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used."
] | [
38
] | [
null
] | [
12
] | [
39
] | |
2024-11-18T22:29:53.757479+00:00 | 1,481,788,989,000 | 2c6f378c36756a780910985e373d0e76c8808a6d | 2 | {
"blob_id": "2c6f378c36756a780910985e373d0e76c8808a6d",
"branch_name": "refs/heads/master",
"committer_date": 1481788989000,
"content_id": "4045a47f0ae6a442950ff25d7a7905aa1ad89ce2",
"detected_licenses": [
"MIT"
],
"directory_id": "fee9fa7bef5cd8f4226f407cf5f54960f1a9e5e9",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python2
# coding: utf-8
import sys
import json
import hashlib
import hmac
import logging
import redis
from flask import Flask, request, current_app
app = Flask(__name__)
app.config.from_pyfile('ci_settings.py')
def get_stdout_logger(name, fd=sys.stdout, level=logging.DEBUG):
logger = logging.ge... | 62 | 26.11 | 78 | 12 | 412 | python | [{"finding_id": "codeql_py/flask-debug_cabe47b06a7f707b_5c595f0a", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-117",
"CWE-117"
] | [
"py/flask-debug",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
59,
45,
52
] | [
null,
null,
null
] | [
5,
17,
17
] | [
63,
67,
63
] | |
2024-11-18T23:10:11.511083+00:00 | 1,437,071,472,000 | 9a96d330f8eb6c5e9e7e24a3599db95f9a3abd18 | 2 | {
"blob_id": "9a96d330f8eb6c5e9e7e24a3599db95f9a3abd18",
"branch_name": "refs/heads/master",
"committer_date": 1437071472000,
"content_id": "6d87eedb51ea1c7001791927b92d0c848fb953b3",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "465547f5d91132b1c0fb5943345f4e833fb353de",
"extension": "p... | 2.5 | stackv2 | """Base models."""
import os
import subprocess
import shutil
from django.db import models
from django.utils.text import slugify
from django.core.urlresolvers import reverse
from django.core.validators import RegexValidator
from django.core.urlresolvers import reverse
from django.db.models.signals import post_save
fr... | 338 | 38.37 | 154 | 22 | 2,856 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_033746788ec8791d_dee2a06a", "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."
] | [
192
] | [
null
] | [
20
] | [
96
] | |
2024-11-18T21:33:39.051723+00:00 | 1,446,900,142,000 | ac429237ce4368f4a32f72091ddae908d4030607 | 4 | {
"blob_id": "ac429237ce4368f4a32f72091ddae908d4030607",
"branch_name": "refs/heads/master",
"committer_date": 1446900142000,
"content_id": "2d7d36217d5983828d51a562f30a6393925e52b8",
"detected_licenses": [
"MIT"
],
"directory_id": "c9d4d4c78703d009da11999e4e59b6a168a454a2",
"extension": "py",
"fi... | 3.578125 | stackv2 | """
Author: Kelly Chan
Date: July 14 2014
Project: Extracting attributes from the html contents (Yelp)
- url: http://www.yelp.com/search?find_desc=%s&find_loc=Los+Angeles&ns=1
- %s: the name of a specific restaurant
steps:
- 1. getting the html contents
- 2. parsing attributes by regexes
- 3. saving the data(.txt) t... | 151 | 26.09 | 105 | 14 | 1,102 | python | [{"finding_id": "codeql_py/overly-large-range_feaf3877e1fad36d_67f10d91", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\w in the same character class, and is equivalent to \\[+... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with \\w in the same character class, and is equivalent to \\[+,\\-.\\/0-9:;<=>?\\]."
] | [
51
] | [
null
] | [
41
] | [
44
] | |
2024-11-18T21:33:41.677975+00:00 | 1,682,309,314,000 | 23f16a221a7d8f17c171a2502cfbde292d031a40 | 3 | {
"blob_id": "23f16a221a7d8f17c171a2502cfbde292d031a40",
"branch_name": "refs/heads/master",
"committer_date": 1683874069000,
"content_id": "ee67a428b47518af94cf90350a6856b62525276e",
"detected_licenses": [
"MIT"
],
"directory_id": "7efe08063fd383640455cc709ef04c889b8ebc42",
"extension": "py",
"fi... | 2.703125 | stackv2 | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from argparse import ArgumentParser
from base64 import urlsafe_b64encode
from binascii import hexlify
fro... | 46 | 33.26 | 134 | 11 | 388 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ada2d492a34ebd3a_f7bc510b", "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.\nThis expression logs [sensitive data (password)](3) as clear text."
] | [
42,
43
] | [
null,
null
] | [
11,
11
] | [
75,
54
] | |
2024-11-18T22:30:37.499999+00:00 | 1,630,524,868,000 | 7a5f47728eedc4a57c47d935d2b3a71e11ab1f02 | 2 | {
"blob_id": "7a5f47728eedc4a57c47d935d2b3a71e11ab1f02",
"branch_name": "refs/heads/master",
"committer_date": 1630524868000,
"content_id": "9f630209e1e10b2de3ee215155f070e00266850c",
"detected_licenses": [
"MIT"
],
"directory_id": "9cd7a504922f455e81461026cadaf0bca0d5bce4",
"extension": "py",
"fi... | 2.484375 | stackv2 | """
This file acts as repository for all users registered on the site
and allows easy access to specific user data and management tools
such as deletion/creation of new users.
"""
import json
import hashlib
import datetime
import configuration
from .User import User, UserWebQuery
from .user_report import UserReport
f... | 317 | 29.68 | 87 | 15 | 2,113 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_3e9beb4d70d70440_897d9dcc", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally e... | [
24
] | [
null
] | [
33
] | [
55
] | |
2024-11-18T23:37:01.990431+00:00 | 1,603,160,690,000 | dd7fc722e56fb1be683dca6e30f4af2230de76b3 | 2 | {
"blob_id": "dd7fc722e56fb1be683dca6e30f4af2230de76b3",
"branch_name": "refs/heads/master",
"committer_date": 1603160690000,
"content_id": "40a2c894b648899a197bdbcf5a81f68e522b30a0",
"detected_licenses": [
"MIT",
"Unlicense"
],
"directory_id": "a0e725f965306b140bb28e50c779873257c037cb",
"extens... | 2.4375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This script replaces magic links.
The following parameters are required:
-config The page title that has the JSON config (object).
The following parameters are supported:
-always Don't prompt to save changes.
¶ms;
"""
# Author : JJMC89
# Li... | 260 | 28.79 | 79 | 18 | 1,867 | python | [{"finding_id": "codeql_py/redos_a060accdaa98f2d5_8a39ca3a", "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 '<a a=' and containing many repeti... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<a a=' and containing many repetitions of '\"\" a='."
] | [
117
] | [
null
] | [
45
] | [
49
] | |
2024-11-18T23:37:03.485925+00:00 | 1,573,376,432,000 | 1ca0112fdc422fcc4cd36d7cbdf27295aa9e7702 | 3 | {
"blob_id": "1ca0112fdc422fcc4cd36d7cbdf27295aa9e7702",
"branch_name": "refs/heads/master",
"committer_date": 1573376432000,
"content_id": "b28d595167d1d3ffbf00a5f5b045bd2b4d7b01b5",
"detected_licenses": [
"MIT"
],
"directory_id": "236a4c7e9fb165acb33a8c791ea92ab56c055b46",
"extension": "py",
"fi... | 3.0625 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import binascii
import base58
import secp256k1
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
class CipherException(Exception):
pass
class AESCipher(object):
BS = AES.block_size
@classmethod
def _pad(cls, buf):
pad_ch = chr(cls... | 97 | 30.79 | 79 | 17 | 827 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_1fd6ef6a810ebcd2_aaa5eaa5", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
34,
39
] | [
null,
null
] | [
16,
27
] | [
35,
46
] | |
2024-11-18T21:14:04.868900+00:00 | 1,618,831,633,000 | d4971a1a8b8d8ccb86fd3faa365dbd3d49178eb0 | 2 | {
"blob_id": "d4971a1a8b8d8ccb86fd3faa365dbd3d49178eb0",
"branch_name": "refs/heads/main",
"committer_date": 1618831633000,
"content_id": "325f607bab04419cdc4606078c16b614134779bd",
"detected_licenses": [
"MIT"
],
"directory_id": "ceeea27fddee32f76d138e5a9b135c9686147676",
"extension": "py",
"file... | 2.390625 | stackv2 | import time
import uuid
import hashlib
import json
import requests
from exceptions import PyiCloudFailedLoginException
from services import (
FindMyiPhoneServiceManager,
CalendarService,
UbiquityService,
ContactsService,
)
class PyiCloudService(object):
"""
A base authentication class for the... | 133 | 32.11 | 82 | 15 | 997 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_3d2b362c870c2be2_fa3473df", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
68
] | [
null
] | [
28
] | [
64
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.