added stringlengths 32 32 | created int64 1,236B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.03 | source stringclasses 1
value | text stringlengths 330 19.3k | num_lines int64 16 648 | avg_line_length float64 15.5 59.3 | max_line_length int64 37 179 | ast_depth int64 8 38 | length int64 102 3.79k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.11k 276k | sast_codeql_findings_count int64 1 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 33 | rule_ids listlengths 1 33 | confidences listlengths 1 33 | severities listlengths 1 33 | messages listlengths 1 33 | line_starts listlengths 1 33 | line_ends listlengths 1 33 | column_starts listlengths 1 33 | column_ends listlengths 1 33 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-19T03:10:39.286667+00:00 | 1,628,895,577,000 | 8dfefe217c50353c970c7200c39211457e915a75 | 3 | {
"blob_id": "8dfefe217c50353c970c7200c39211457e915a75",
"branch_name": "refs/heads/main",
"committer_date": 1628895577000,
"content_id": "368a3cc5e18f865586589fdbfb0753467b41c039",
"detected_licenses": [
"MIT"
],
"directory_id": "ec78295f7659bd557b2e062c7821cf5cf8300e2b",
"extension": "py",
"file... | 2.75 | stackv2 | import sys
from time import sleep
import urllib.request as urllib2
API_KEY_TEMPERATURE = "M9KG1Q4VUPKGNTL4"
baseURL = 'http://api.thingspeak.com/update?api_key=' + str(API_KEY_TEMPERATURE) + '&field1='
class ThingSpeakSender:
def __init__(self, _API_KEY):
self.API_KEY = str(_API_KEY)
self.URL = "http://api.thi... | 38 | 28 | 100 | 15 | 320 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a51ec4c05b3570b5_810a1e05", "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."
] | [
20
] | [
null
] | [
9
] | [
32
] | |
2024-11-19T03:10:55.286459+00:00 | 1,672,350,517,000 | eba3882e3bbd48bce67c20192ee821b41bd62445 | 3 | {
"blob_id": "eba3882e3bbd48bce67c20192ee821b41bd62445",
"branch_name": "refs/heads/main",
"committer_date": 1672350517000,
"content_id": "51deccf7588ba89123fb2d947456400923bc23a1",
"detected_licenses": [
"MIT"
],
"directory_id": "3401bfd5554ec7b07d10786b0420824fef7d3f15",
"extension": "py",
"file... | 3.421875 | stackv2 | import hashlib
import sys
def load_data(path):
with open(path) as f:
return f.read().strip()
def generate_password(key, position=False):
prefix = "0" * 5
i = 0
count = 0
password = [None] * 8
while count < 8:
hash_ = hashlib.md5(f"{key}{i}".encode())
if (h := hash_.he... | 41 | 21.78 | 55 | 19 | 253 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8207a7618ead7c28_7156650e", "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."
] | [
40,
41
] | [
null,
null
] | [
11,
11
] | [
35,
35
] | |
2024-11-19T03:21:48.600266+00:00 | 1,535,304,852,000 | eb8909e5395c9ec62f6e0fcdd86bfe86bf1e2bd6 | 2 | {
"blob_id": "eb8909e5395c9ec62f6e0fcdd86bfe86bf1e2bd6",
"branch_name": "refs/heads/master",
"committer_date": 1535304852000,
"content_id": "eaa1ddba978cac7f8bf0bb97a5ae7fcd5533b81d",
"detected_licenses": [
"MIT"
],
"directory_id": "f3112b665558b6095bbbbce557dc74149a20de73",
"extension": "py",
"fi... | 2.34375 | stackv2 | # -*- coding: utf-8 -*-
# python standard
import sys
import os
import re
import string
import logging
from collections import namedtuple
from random import choice
# third-party imports
from sqlalchemy import create_engine
# local imports
from utils.config_helper import ConfigHelper
#################################... | 179 | 33.39 | 79 | 15 | 1,297 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_85a4761da40a6b9d_78bfe593", "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.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text."
] | [
140
] | [
null
] | [
25
] | [
26
] | |
2024-11-19T03:22:06.976087+00:00 | 1,586,019,415,000 | e0de410e93f25f3812df32ef45f2f1ed15fd8041 | 2 | {
"blob_id": "e0de410e93f25f3812df32ef45f2f1ed15fd8041",
"branch_name": "refs/heads/master",
"committer_date": 1586019415000,
"content_id": "a7a1b268673667aa61585f9debf7933d297f2006",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9489ab0cb4214428969eed183c27b185a8155ecc",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/env python
"""
Collects statistics from the Couchbase REST API and forwards them to a 3rd party
monitoring server.
Dependencies
* python-requests
"""
import argparse
import json
import logging as log
import logging.config
import numbers
import operator
import os
import requests
import sys
# Basic se... | 459 | 33.15 | 129 | 23 | 3,754 | python | [{"finding_id": "codeql_py/request-without-cert-validation_6ff4bbc52875876a_3333ea00", "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)."
] | [
395
] | [
null
] | [
13
] | [
107
] | |
2024-11-19T03:22:09.210320+00:00 | 1,622,897,795,000 | ee1cc382b8d0128e0a29f6c9c217fe204362ded9 | 2 | {
"blob_id": "ee1cc382b8d0128e0a29f6c9c217fe204362ded9",
"branch_name": "refs/heads/master",
"committer_date": 1622897795000,
"content_id": "0d6df462cdb88a548e3e13c974465136258566cb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "32860cd2b44e93b4326d1fab2d12d8758f2c2c4e",
"extension": "py"... | 2.34375 | stackv2 | from application import app, db
from flask import jsonify, request
from application.model import User, Records
import subprocess
import os
db.create_all()
# curl -d '{"token":"123456","ip":"10.0.0.1","zone":"test.dyn.example.com"}' -H "Content-Type: application/json" -X POST -i http://localhost:5000/dyn/api/update
S... | 53 | 26.17 | 160 | 13 | 383 | python | [{"finding_id": "codeql_py/command-line-injection_76eb6f608c99e2e1_bf0fc9b6", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 1 | true | [
"CWE-078"
] | [
"py/command-line-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1)."
] | [
46
] | [
null
] | [
30
] | [
37
] | |
2024-11-19T03:44:25.722234+00:00 | 1,469,064,169,000 | 38f995b9af9254ae4de5744ced967029c2947e31 | 2 | {
"blob_id": "38f995b9af9254ae4de5744ced967029c2947e31",
"branch_name": "refs/heads/master",
"committer_date": 1469064169000,
"content_id": "f83306b519c6dc61658cb20b838452effe607d3d",
"detected_licenses": [
"MIT"
],
"directory_id": "54999240702d9e28935020dbbe9456392c7ba58f",
"extension": "py",
"fi... | 2.375 | stackv2 |
import json
import logging
import urllib
import webapp2
from google.appengine.api import memcache, urlfetch
from google.appengine.ext import ndb
from helper import write_mako_template
# API related constants
TMDB_API_SEARCH_URL = 'https://api.themoviedb.org/3/search/movie'
TMDB_API_VIDEO_URL = 'https://api.themovie... | 197 | 33.83 | 91 | 18 | 1,483 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_61b78907c1af67c7_29fbb2ee", "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."
] | [
140
] | [
null
] | [
30
] | [
60
] | |
2024-11-19T03:44:26.759270+00:00 | 1,584,813,114,000 | a8dfabfed0c54556dd9881d5b444a1f2a51f4e27 | 2 | {
"blob_id": "a8dfabfed0c54556dd9881d5b444a1f2a51f4e27",
"branch_name": "refs/heads/master",
"committer_date": 1584813114000,
"content_id": "d79992e60eb97496e6ad3d3c95fc81227f3d8306",
"detected_licenses": [
"MIT"
],
"directory_id": "1a718643330833b5afccc836081d72a0eea3e59a",
"extension": "py",
"fi... | 2.484375 | stackv2 | import datetime, math, sys, time, os, tarfile
import numpy as np
from scipy import linalg
import glob, argparse
import pickle
from chainer import cuda
from six.moves import xrange # pylint: disable=redefined-builtin
from six.moves import urllib
DATA_URL = 'http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz'
def... | 152 | 43.81 | 112 | 18 | 1,653 | python | [{"finding_id": "codeql_py/tarslip_36a467e3210b98fa_63e65a1d", "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)."
] | [
62
] | [
null
] | [
9
] | [
39
] | |
2024-11-19T02:58:02.441163+00:00 | 1,573,406,471,000 | 36d67da24cece33f9cc1725ff851ccbea5bd9255 | 3 | {
"blob_id": "36d67da24cece33f9cc1725ff851ccbea5bd9255",
"branch_name": "refs/heads/master",
"committer_date": 1573406471000,
"content_id": "644caf96547b6040ba3de297e39f38d3a108378f",
"detected_licenses": [
"MIT"
],
"directory_id": "4b52d25f1fbe1272ec04a8fafef9709cc4ac48f9",
"extension": "py",
"fi... | 2.671875 | stackv2 | import os
from flask import Flask, flash, render_template, redirect, request, url_for, send_file
import random
from werkzeug.utils import secure_filename
app = Flask(__name__)
SECRET_KEY="supertopsecretprivatekey"
UPLOAD_FOLDER="/Users/nimesh/PycharmProjects/webApp/pngUpload/tmp/storedImgs"
LETTER_SET = list(set('ABCD... | 80 | 30.55 | 121 | 17 | 574 | python | [{"finding_id": "codeql_py/url-redirection_863b0a7a49da44f1_49966533", "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_... | 4 | true | [
"CWE-601",
"CWE-601",
"CWE-601",
"CWE-022"
] | [
"py/url-redirection",
"py/url-redirection",
"py/url-redirection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"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).",
"This path depends on a [user-provided value](1)."
] | [
39,
46,
63,
26
] | [
null,
null,
null,
null
] | [
29,
29,
33,
22
] | [
40,
40,
44,
121
] | |
2024-11-19T02:58:15.571425+00:00 | 1,540,674,961,000 | 0b292ec90df21ff0e3653d49058323325ea8a9c3 | 3 | {
"blob_id": "0b292ec90df21ff0e3653d49058323325ea8a9c3",
"branch_name": "refs/heads/master",
"committer_date": 1540674961000,
"content_id": "ee9daf9eabbf6b4fd20192fbf57c7d639d57e938",
"detected_licenses": [
"MIT"
],
"directory_id": "f1f2e2138502feaba9d3e6481cbe8d59d47a7665",
"extension": "py",
"fi... | 3 | stackv2 | import os
from datetime import datetime, timedelta
import re
from glob import glob
import email
#check to see if an email is part of chain by looking for the '-----Original Message-----' tag
#addtionally count the number of times the tag appears to get the depth of the chain
def isChain(payload):
chain_count = 0
is... | 63 | 32.32 | 113 | 15 | 537 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_26319881a150a264_d276a021", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [enron.com](1) may be at an arbitrary position in the s... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [enron.com](1) may be at an arbitrary position in the sanitized URL."
] | [
50
] | [
null
] | [
5
] | [
33
] | |
2024-11-19T03:10:19.728360+00:00 | 1,693,477,536,000 | 63939bcb8bec496b652d07789be725c3910f67ea | 2 | {
"blob_id": "63939bcb8bec496b652d07789be725c3910f67ea",
"branch_name": "refs/heads/master",
"committer_date": 1693477536000,
"content_id": "4483b6a0b8531d0b5417860d2d9908958f80afb7",
"detected_licenses": [
"MIT"
],
"directory_id": "c9500ad778b8521aaa85cb7fe3239989efaa4799",
"extension": "py",
"fi... | 2.484375 | stackv2 | import komand
from .schema import ConnectionSchema
# Custom imports below
import requests
class Connection(komand.Connection):
def __init__(self):
super(self.__class__, self).__init__(input=ConnectionSchema())
self.api_prefix = None
self.username = None
self.secret = None
... | 34 | 34.29 | 94 | 15 | 248 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c283d426c1b0b723_10a4e883", "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)."
] | [
26
] | [
28
] | [
31
] | [
14
] | |
2024-11-19T03:10:21.169852+00:00 | 1,630,023,812,000 | 8f0c15f2119919941d105e2a09efc50a889ccc29 | 3 | {
"blob_id": "8f0c15f2119919941d105e2a09efc50a889ccc29",
"branch_name": "refs/heads/master",
"committer_date": 1630023812000,
"content_id": "eda11a2c7a7dbe25969099f700be83114633d6ba",
"detected_licenses": [
"MIT"
],
"directory_id": "af4c6f0b6f1bac14abc09666aadd6c7fe1b1b881",
"extension": "py",
"fi... | 2.640625 | stackv2 | import os
from pathlib import Path
from typing import List
from flask import Flask, abort, request
from linebot import LineBotApi, WebhookHandler
from linebot.exceptions import InvalidSignatureError
from linebot.models import (ImageMessage, ImageSendMessage, MessageEvent,
TextMessage, TextS... | 94 | 28.16 | 87 | 13 | 647 | python | [{"finding_id": "codeql_py/log-injection_8ab2eaef54019411_d447fdab", "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)."
] | [
35
] | [
null
] | [
21
] | [
44
] | |
2024-11-19T03:22:47.557240+00:00 | 1,435,864,172,000 | 3740d7bd6100bbaa09490e3d0517660940de4b81 | 2 | {
"blob_id": "3740d7bd6100bbaa09490e3d0517660940de4b81",
"branch_name": "refs/heads/master",
"committer_date": 1435864172000,
"content_id": "ae7a076c730fa3760cbbdef328f2b15963f62b3c",
"detected_licenses": [
"MIT"
],
"directory_id": "bfdd866591475d3992d3e2417988bb36814cab32",
"extension": "py",
"fi... | 2.5 | stackv2 | # Simple form project using flask
__author__ = 'Fredrik A. Madsen-Malmo'
from flask import Flask
from flask import render_template
from flask import redirect
from flask import url_for
from flask import make_response
from flask import request
from flask import flash
import json
from options import DEFAULTS
app = Flask... | 50 | 23.88 | 79 | 14 | 314 | python | [{"finding_id": "codeql_py/cookie-injection_9932a5dc1ba4eb38_16e38323", "tool_name": "codeql", "rule_id": "py/cookie-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cookie is constructed from a [user-supplied input](1).", "remediation": "", "location": {"file_path": "... | 2 | true | [
"CWE-020",
"CWE-215"
] | [
"py/cookie-injection",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cookie is constructed from a [user-supplied input](1).",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
47,
50
] | [
null,
null
] | [
32,
null
] | [
54,
47
] | |
2024-11-19T03:22:52.435487+00:00 | 1,499,842,569,000 | 1f0eea765999cd9f3639e0118e15f11a5a91b1f0 | 2 | {
"blob_id": "1f0eea765999cd9f3639e0118e15f11a5a91b1f0",
"branch_name": "refs/heads/master",
"committer_date": 1499842569000,
"content_id": "698b063a0b776379c446c9abf4c6b92340b3abd1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3ce7ffdf0edcf47e2bc974f6ae9a37e54e8dbc59",
"extension": "py"... | 2.375 | stackv2 | #!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwar... | 287 | 36.14 | 119 | 19 | 2,155 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d8815eb56c682418_d51cda81", "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."
] | [
232
] | [
null
] | [
23
] | [
56
] | |
2024-11-19T03:22:55.397895+00:00 | 1,592,638,446,000 | 34fcf37c2b57e78c01eb48e509f492307d540b98 | 3 | {
"blob_id": "34fcf37c2b57e78c01eb48e509f492307d540b98",
"branch_name": "refs/heads/master",
"committer_date": 1592638446000,
"content_id": "e48d900d0fdefc88aa328b6477e8c0460fc7dc48",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0d45bc184ef67eb463440da26b00a0b9d1833f85",
"extension": "py"... | 3.125 | stackv2 | from tkinter import *
root = Tk()
root.geometry("644x540")
root.title('travel form using Check buttons')
def submitval():
print('Your data has been successfully submitted. The details are:')
print(f"NAME = {nameval.get()}")
print(f"Phone number = {phoneval.get()}")
print(f"Gender = {genderval.get()}")
... | 56 | 33.05 | 142 | 11 | 549 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_94b9218618a06816_a665bb03", "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."
] | [
10
] | [
null
] | [
11
] | [
40
] | |
2024-11-19T03:44:11.887843+00:00 | 1,508,914,078,000 | bddfc54d6e32854d20beb3d5f8c92615b3ce2a4b | 3 | {
"blob_id": "bddfc54d6e32854d20beb3d5f8c92615b3ce2a4b",
"branch_name": "refs/heads/master",
"committer_date": 1508914078000,
"content_id": "d5e9ad1525e7e9f6aaa73f4fde64e1bc64dbef74",
"detected_licenses": [
"MIT"
],
"directory_id": "cf6b238fe7b87eeaee90735ddcbed5613c552dc9",
"extension": "py",
"fi... | 2.953125 | stackv2 | #coding:utf-8
import errno
import fcntl
import os
class LockError(Exception):
def __init__(self, message):
Exception.__init__(self, message)
def __repr__(self):
return self.__class__.__name__ + '(' + repr(self.args[0]) + ')'
class LocalMutex(object):
def __init__(self, path, wait = Fals... | 99 | 26.97 | 72 | 25 | 591 | python | [{"finding_id": "codeql_py/overly-permissive-file_1f7496c091032149_b80fcc00", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world writable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world writable."
] | [
24
] | [
null
] | [
18
] | [
63
] | |
2024-11-19T03:44:14.207855+00:00 | 1,618,993,520,000 | d7196c585774bab1fda8ab731fd6de690c63b84d | 2 | {
"blob_id": "d7196c585774bab1fda8ab731fd6de690c63b84d",
"branch_name": "refs/heads/main",
"committer_date": 1618993520000,
"content_id": "a41db44e4a36904453f2b369c37c70ba36d3307d",
"detected_licenses": [
"MIT"
],
"directory_id": "2dc135f6e14630834c0197b06a4eb6855ba9c187",
"extension": "py",
"file... | 2.4375 | stackv2 | import json
import logging
from tornado import websocket
from tornado.log import app_log
from tornado.web import RequestHandler, HTTPError
class BaseHandler(RequestHandler):
@property
def pdf_creator(self):
return self.application.pdf_creator
def get_json_body(self):
"""Return the body o... | 135 | 29.73 | 104 | 20 | 787 | python | [{"finding_id": "codeql_py/reflective-xss_6ee0cdad8a0ae25d_c8515470", "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... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
74,
85,
95
] | [
78,
90,
99
] | [
21,
25,
25
] | [
22,
26,
26
] | |
2024-11-19T01:35:02.418615+00:00 | 1,605,590,342,000 | 2bda4dad547cfe70699737e017aed3dc0d081ba1 | 2 | {
"blob_id": "2bda4dad547cfe70699737e017aed3dc0d081ba1",
"branch_name": "refs/heads/master",
"committer_date": 1605590342000,
"content_id": "ba346cba200ee15255bef6f1ec80bbd3f9716540",
"detected_licenses": [
"MIT"
],
"directory_id": "75ee7b4af6538fd26c1b131830a8e604826a1361",
"extension": "py",
"fi... | 2.453125 | stackv2 | """
do sql search on hsc data base
this is modified from hscSspQuery.py version 20160120.1 by ALS on 2017/05/11
--------------------------------------------------------------------------------
Original Instructions:
https://hscdata.mtk.nao.ac.jp/hsc_ssp/dr1/common/cas_script.html
https://hsc-gitlab.mtk.nao.a... | 274 | 29.43 | 137 | 16 | 2,054 | python | [{"finding_id": "codeql_py/insecure-protocol_172269c59415c113_c4671037", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1).", "remediation": "", "lo... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)."
] | [
167
] | [
null
] | [
25
] | [
59
] | |
2024-11-19T01:35:03.267306+00:00 | 1,545,927,512,000 | 4e35eb5f560637491b9a4f186ae23d72a893126d | 3 | {
"blob_id": "4e35eb5f560637491b9a4f186ae23d72a893126d",
"branch_name": "refs/heads/master",
"committer_date": 1545927512000,
"content_id": "8b626518377447d9d22f07c139a9b2b55edd9b34",
"detected_licenses": [
"MIT"
],
"directory_id": "ac9c393dd397184fbac4f15c8b23b4a9b7427bf2",
"extension": "py",
"fi... | 2.765625 | stackv2 | # Lights web interface
# Phil Hansen, 22 October 2016
# Copyright Notice
from flask import Flask, g, render_template, request
import config
try:
from lights import LightsController, patterns
except RuntimeError:
# a RuntimeError occurs when the GPIO interface could not be loaded
# (e.g. if not running on ... | 139 | 31.84 | 118 | 19 | 1,076 | python | [{"finding_id": "codeql_py/flask-debug_0e5725a53982790c_d61aca93", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
135,
85
] | [
139,
null
] | [
5,
12
] | [
10,
30
] | |
2024-11-19T01:35:07.989943+00:00 | 1,595,681,955,000 | 1842e811e85118389e37fb7bc7ff71ab55759807 | 2 | {
"blob_id": "1842e811e85118389e37fb7bc7ff71ab55759807",
"branch_name": "refs/heads/master",
"committer_date": 1595681955000,
"content_id": "cb6bc2d8f39e7debe553f9bf001a4a3cb816e69c",
"detected_licenses": [
"MIT"
],
"directory_id": "0125ec0880eb20c28b08a23cf41767899816a791",
"extension": "py",
"fi... | 2.390625 | stackv2 | from scapy.contrib.coap import *
from scapy.contrib.mqtt import *
hw = rdpcap("homework3.pcap")
COAP_CONTENT = 69
LOCALHOST = "127.0.0.1"
MQTT_TYPE_CONNECT = 1
MQTT_TYPE_CONNACK = 2
MQTT_TYPE_PUBLISH = 3
MQTT_TYPE_PUBACK = 4
MQTT_TYPE_SUBSCRIBE = 8
MQTT_WILLFLAG_ENABLE = 1
# Question 1
def question1():
f1 = lambd... | 202 | 35.13 | 138 | 18 | 2,425 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_e43d7a19e957c3ab_e4770545", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [broker.hivemq.com](1) may be at an arbitrary position ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [broker.hivemq.com](1) may be at an arbitrary position in the sanitized URL."
] | [
66
] | [
null
] | [
33
] | [
71
] | |
2024-11-19T01:35:29.998233+00:00 | 1,236,482,172,000 | 7aea935d37ea5b2670e235e09a918758f2deff26 | 2 | {
"blob_id": "7aea935d37ea5b2670e235e09a918758f2deff26",
"branch_name": "refs/heads/master",
"committer_date": 1236482172000,
"content_id": "e5305e0d34e968354173e9cfac3feca53e2a5851",
"detected_licenses": [
"MIT"
],
"directory_id": "b28b5e75f0aac0c202f0a3d7e763c68edd08247d",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/python
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 272 | 33.93 | 80 | 22 | 2,200 | python | [{"finding_id": "codeql_py/cookie-injection_bc1cacdc9c9fd67e_f8a48f6a", "tool_name": "codeql", "rule_id": "py/cookie-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cookie is constructed from a [user-supplied input](1).\nCookie is constructed from a [user-supplied inp... | 4 | true | [
"CWE-020",
"CWE-113",
"CWE-113",
"CWE-022"
] | [
"py/cookie-injection",
"py/http-response-splitting",
"py/http-response-splitting",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is constructed from a [user-supplied input](1).\nCookie is constructed from a [user-supplied input](2).\nCookie is constructed from a [user-supplied input](3).\nCookie is constructed from a [user-supplied input](4).\nCookie is constructed from a [user-supplied input](5).",
"This HTTP header is constructed... | [
241,
236,
241,
228
] | [
null,
null,
null,
null
] | [
38,
40,
38,
20
] | [
67,
50,
67,
35
] | |
2024-11-19T01:55:39.297603+00:00 | 1,609,885,988,000 | a6696f09e9646b7a6defa17c85a6e23d30ea2fea | 3 | {
"blob_id": "a6696f09e9646b7a6defa17c85a6e23d30ea2fea",
"branch_name": "refs/heads/master",
"committer_date": 1609885988000,
"content_id": "961e5203d3d494ae7891731578eafae7a39ef2dc",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "356b5455a4fb86c49c800a6181323b7fabef2b08",
"extension": "p... | 2.890625 | stackv2 | """ Helper to assemble code from a web page. """
import flask
import subprocess
import tempfile
main_html = r"""
<!DOCTYPE html>
<html><head>
<title>Online compiler</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
<script s... | 71 | 24.61 | 88 | 12 | 506 | python | [{"finding_id": "codeql_py/reflective-xss_ece1a455162374d2_39a7f5c0", "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)."
] | [
51
] | [
null
] | [
12
] | [
42
] | |
2024-11-19T02:07:50.311509+00:00 | 1,507,559,356,000 | 3458f3c8bc6c2bdbe941abd5f24434d891ff0f00 | 2 | {
"blob_id": "3458f3c8bc6c2bdbe941abd5f24434d891ff0f00",
"branch_name": "refs/heads/master",
"committer_date": 1507559356000,
"content_id": "cf8089b7feb35f8962c648f62c6c2fe361e364b3",
"detected_licenses": [
"MIT"
],
"directory_id": "85671f7fbca2258312a4650ed391774cfb37645e",
"extension": "py",
"fi... | 2.34375 | stackv2 | """Taobao Authentication Views"""
from hashlib import md5
import time
from pyramid.httpexceptions import HTTPFound
from pyramid.security import NO_PERMISSION_REQUIRED
import requests
from ..api import (
AuthenticationComplete,
AuthenticationDenied,
register_provider,
)
from ..exceptions import ThirdParty... | 141 | 34.66 | 78 | 19 | 993 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_30d8d93e56dff13a_f349ae5d", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](2) is used in a hashing algorithm (MD5) that is insecure."
] | [
119
] | [
null
] | [
30
] | [
33
] | |
2024-11-19T02:07:52.558519+00:00 | 1,442,957,326,000 | c52de42d57a9dd71e97b57ac1d79dcbec804528b | 2 | {
"blob_id": "c52de42d57a9dd71e97b57ac1d79dcbec804528b",
"branch_name": "refs/heads/master",
"committer_date": 1442957326000,
"content_id": "be2e39cfc02f16a1b59c3325cd21d2f7909e1790",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9153c53ab749cde1ebca68889ed942ab1e7b3b05",
"extension": "py"... | 2.375 | stackv2 | # Standard lib imports
from http import client
from functools import wraps
# Third-party imports
from flask import request, jsonify, make_response
# Project-level imports
from pywebhooks import DEFAULT_ACCOUNTS_TABLE
from pywebhooks.database.rethinkdb.interactions import Interactions
def validate_pagination_params(... | 93 | 28.1 | 79 | 23 | 502 | python | [{"finding_id": "codeql_py/stack-trace-exposure_4907fadab0eecd09_e39e5257", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 1 | true | [
"CWE-209"
] | [
"py/stack-trace-exposure"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
86
] | [
null
] | [
29
] | [
42
] | |
2024-11-19T02:07:54.110355+00:00 | 1,680,460,946,000 | 5577b639d6728ef49f9f9077804b029c61a3ddb2 | 3 | {
"blob_id": "5577b639d6728ef49f9f9077804b029c61a3ddb2",
"branch_name": "refs/heads/main",
"committer_date": 1680460946000,
"content_id": "01f18c3a4b15d6b75dda5252ec4e6448bdbdb01d",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "168faa31153797d034bc7413dd732bb5830bb5c5",
"extension": "py"... | 2.734375 | stackv2 | r"""
=================
Shield Middleware
=================
Middleware to shield application handlers by method or URL.
Usage
=====
.. code-block:: python
from aiohttp import web
from aiohttp_middlewares import (
NON_IDEMPOTENT_METHODS,
shield_middleware,
)
# Basic usage (shield by h... | 184 | 29.05 | 79 | 15 | 1,158 | python | [{"finding_id": "codeql_py/log-injection_b7086d0bcd229378_6c6b6240", "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... | 3 | true | [
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
167,
172,
179
] | [
null,
null,
null
] | [
66,
71,
69
] | [
75,
80,
78
] | |
2024-11-19T02:17:16.184507+00:00 | 1,481,878,120,000 | 85ba3c5bb16f9797d524584a9c165d338c9bee6d | 3 | {
"blob_id": "85ba3c5bb16f9797d524584a9c165d338c9bee6d",
"branch_name": "refs/heads/master",
"committer_date": 1481878181000,
"content_id": "b18cf488b33c7b5c0a89b67c2cad9fe7f6ff7a88",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "139c6d58e2ba47801b67727ed5c02d4ebaa5fea0",
"extension": "py"... | 2.625 | stackv2 | #!/usr/bin/env python2
# pylint: disable=missing-docstring,invalid-name
# XXX: Refactor to a comand line tool and remove pylint disable
"""Decompress and format genome index files."""
import argparse
import os
import shutil
import tarfile
parser = argparse.ArgumentParser(description='Decompress and format genome index... | 39 | 34.69 | 89 | 15 | 321 | python | [{"finding_id": "codeql_py/tarslip_2f7f39d103055737_8f47964b", "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)."
] | [
21
] | [
null
] | [
5
] | [
8
] | |
2024-11-19T02:17:29.845673+00:00 | 1,496,013,721,000 | f716d1581271d376ef7833a40cae6004b3ad3c6c | 3 | {
"blob_id": "f716d1581271d376ef7833a40cae6004b3ad3c6c",
"branch_name": "refs/heads/master",
"committer_date": 1496013721000,
"content_id": "05a0c305373a4dcd184d62afdf572bafd87964c1",
"detected_licenses": [
"MIT"
],
"directory_id": "ed6adc9115966022deccf526ba0e30d240758929",
"extension": "py",
"fi... | 2.75 | stackv2 | """Tools used across the project."""
import hashlib
import random
import time
import string
import functools
from oslo_log import log as logging
import redis
from asciipic.common import constant
from asciipic.common import exception
from asciipic import config as asciipic_config
CONFIG = asciipic_config.CONFIG
LO... | 185 | 32.36 | 78 | 18 | 1,274 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_51227c62b4936c8b_04aebfbd", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
41,
59
] | [
null,
null
] | [
38,
38
] | [
55,
55
] | |
2024-11-19T02:18:13.933213+00:00 | 1,596,141,690,000 | 2242c28993b4fff06aadcafd151bfda2a3674ce6 | 2 | {
"blob_id": "2242c28993b4fff06aadcafd151bfda2a3674ce6",
"branch_name": "refs/heads/master",
"committer_date": 1596141690000,
"content_id": "011bb1a29d2b0df303942a35cf5d77993328fb0a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "72deee10e7e50ceaab4c88dc64f7db92696d3236",
"extension": "p... | 2.359375 | stackv2 | from flask import Flask, request, json, jsonify
from jsonschema import validate
from collections import defaultdict
from brickschema.namespaces import RDF, RDFS, BRICK
import reasonable
import resolver
import logging
import rdflib
import re
import time
from contextlib import contextmanager
import sqlite3
def preproces... | 150 | 29.44 | 113 | 17 | 1,129 | python | [{"finding_id": "codeql_py/stack-trace-exposure_344084d40c1b4bb6_b33e247f", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 1 | true | [
"CWE-209"
] | [
"py/stack-trace-exposure"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
115
] | [
null
] | [
29
] | [
46
] | |
2024-11-19T02:18:14.038765+00:00 | 1,431,283,993,000 | e7ef8c8a681006780886a0e6f0fd04b407d0a18f | 2 | {
"blob_id": "e7ef8c8a681006780886a0e6f0fd04b407d0a18f",
"branch_name": "refs/heads/master",
"committer_date": 1431283993000,
"content_id": "6b71c561ec7250384db941c869877490da6e3903",
"detected_licenses": [
"MIT"
],
"directory_id": "09e71fa1cc73bd2107abbbba8f942444b9131416",
"extension": "py",
"fi... | 2.390625 | stackv2 | import json, math, time, sys, os, datetime, random, hashlib
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import *
Base = declarative_base()
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
username = Column(String)
... | 444 | 32.39 | 173 | 21 | 3,218 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_92de3109ede12809_85e05984", "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... | [
32
] | [
null
] | [
37
] | [
62
] | |
2024-11-19T02:29:55.740926+00:00 | 1,692,789,337,000 | 396d6cb77bc5ccd67b87719228f834222c0b1f6c | 2 | {
"blob_id": "396d6cb77bc5ccd67b87719228f834222c0b1f6c",
"branch_name": "refs/heads/master",
"committer_date": 1692789337000,
"content_id": "dae3909b26edd749632913485407331507648843",
"detected_licenses": [
"Apache-2.0",
"BSD-3-Clause"
],
"directory_id": "b4cbdad3d0efbe9899fbaebd31765e9f6b704cb3",... | 2.5 | stackv2 | import gradio as gr
from easygui import msgbox
import subprocess
from .common_gui import get_folder_path, add_pre_postfix
import os
from library.custom_logging import setup_logging
# Set up logging
log = setup_logging()
def caption_images(
train_data_dir,
caption_extension,
batch_size,
general_thres... | 219 | 28.72 | 142 | 15 | 1,339 | python | [{"finding_id": "codeql_py/command-line-injection_0f24595961205b0d_5e813b20", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).\nThis command line depends on a [u... | 2 | true | [
"CWE-078",
"CWE-078"
] | [
"py/command-line-injection",
"py/command-line-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).\nThis command line depends on a [user-provided value](2).\nThis command line depends on a [user-provided value](3).\nThis command line depends on a [user-provided value](4).\nThis command line depends on a [user-provided value](5).\nThis command line depends... | [
66,
68
] | [
null,
null
] | [
19,
24
] | [
26,
31
] | |
2024-11-19T02:29:58.998308+00:00 | 1,569,065,087,000 | 9b5c0827ca525c87535884610536901be512f475 | 3 | {
"blob_id": "9b5c0827ca525c87535884610536901be512f475",
"branch_name": "refs/heads/master",
"committer_date": 1569065087000,
"content_id": "f084e2338902ad24c7f317ecd291748e6ad9bef2",
"detected_licenses": [
"MIT"
],
"directory_id": "3de07ab88a343417754d9267a8170b3d5b47ebf6",
"extension": "py",
"fi... | 2.78125 | stackv2 | import json
import re
import warnings
import os
import requests
from bs4 import BeautifulSoup
from app.util.config_util import config
__plugin__ = "Technology Scanner"
SEQUENCE = 5
APP_FILE_PATH = os.path.join(config.base_dir, "plugin", "data", "apps.json")
DEFAULT_ICON_IMAGE = ""
class WebPage(object):
"""... | 308 | 29.45 | 141 | 20 | 1,985 | python | [{"finding_id": "codeql_py/request-without-cert-validation_fe66c4331481923c_77622cbb", "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)."
] | [
72
] | [
null
] | [
20
] | [
68
] | |
2024-11-19T02:30:01.164630+00:00 | 1,533,576,103,000 | 6b64a509fc1327edccd54379cda68ee750062612 | 3 | {
"blob_id": "6b64a509fc1327edccd54379cda68ee750062612",
"branch_name": "refs/heads/master",
"committer_date": 1533576103000,
"content_id": "320590f300dab83ff393864dbef70385d368adbc",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bc2b2eb589df3f7a1b70a71f988d999fc058106a",
"extension": "p... | 2.75 | stackv2 | import uuid
import hashlib
from django.db.models import Q
from django.conf import settings
from django.utils import timezone
from django.utils.http import int_to_base36
def _create_token(user):
"""
Create a unique token for a user.
The token is created from the user id and a unique id generated
from ... | 92 | 30.11 | 79 | 14 | 664 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_936d92ed0c6d7ae1_3779970f", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
17
] | [
null
] | [
24
] | [
42
] | |
2024-11-19T02:30:15.233337+00:00 | 1,634,919,254,000 | bf40bb7a18d054422801a15a05581629aa3382c1 | 3 | {
"blob_id": "bf40bb7a18d054422801a15a05581629aa3382c1",
"branch_name": "refs/heads/main",
"committer_date": 1634919254000,
"content_id": "180379097e0bcd1cf6c2a184a249eca81b06ba7e",
"detected_licenses": [
"MIT"
],
"directory_id": "ee0fc788f5f70926596e7232dadf5459cd6007f4",
"extension": "py",
"file... | 2.53125 | stackv2 | """
Create the ``showyourwork`` stylesheet.
This script is called from the ``stylesheet`` rule.
"""
import jinja2
import json
# Params defined in `../rules/stylesheet.smk`
WORKFLOW = snakemake.params["WORKFLOW"]
TEMP = snakemake.params["TEMP"]
TEX = snakemake.params["TEX"]
# Generate the stylesheet
env = jinja2.En... | 32 | 25.5 | 73 | 12 | 229 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f6eb8039286de783_80a28bc7", "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."
] | [
17
] | [
27
] | [
7
] | [
2
] | |
2024-11-19T02:30:30.316860+00:00 | 1,555,812,000,000 | 080345eaa1590e15bc303e45c8f5a3f115dde5d8 | 3 | {
"blob_id": "080345eaa1590e15bc303e45c8f5a3f115dde5d8",
"branch_name": "refs/heads/master",
"committer_date": 1555812000000,
"content_id": "9f3ad8db6cabf8fabc833558f7829866b69599fd",
"detected_licenses": [
"MIT"
],
"directory_id": "165d4d13c27670a8b43f5504f711d78fd8ead764",
"extension": "py",
"fi... | 2.734375 | stackv2 | from tbans.models.notifications.notification import Notification
class VerificationNotification(Notification):
""" Verification notification - used for webhooks to ensure the proper people are in control
Attributes:
url (string): The URL to send the notification payload to.
secret (string): T... | 50 | 32.34 | 96 | 13 | 328 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a4fbae747d2e2131_926120e3", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (secret)](2) is used in a hashing algorithm (SHA1) that is insecure."
] | [
36
] | [
null
] | [
19
] | [
30
] | |
2024-11-19T02:30:33.266947+00:00 | 1,502,798,750,000 | aeaae48a95d3ae57d9a8c646a213b0515d7bda21 | 3 | {
"blob_id": "aeaae48a95d3ae57d9a8c646a213b0515d7bda21",
"branch_name": "refs/heads/master",
"committer_date": 1502798750000,
"content_id": "53d1b953ed27a91e598cdacc7a1d1e2c5f3fe600",
"detected_licenses": [
"MIT"
],
"directory_id": "99acfedc720c874631f76c1c1582c5f312ee3039",
"extension": "py",
"fi... | 2.59375 | stackv2 | #!/usr/bin/env python
import atexit
import requests
import ssl
import sys
import time
from tools import cli
from pyVmomi import vim
from pyVim.connect import SmartConnect, Disconnect
from array import array
# disable urllib3 warnings
if hasattr(requests.packages.urllib3, 'disable_warnings'):
requests.packages.u... | 236 | 33.3 | 137 | 22 | 1,917 | python | [{"finding_id": "codeql_py/insecure-protocol_55f49183c44fa950_95c6b9b0", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1).", "remediation": "", "lo... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)."
] | [
83
] | [
null
] | [
15
] | [
49
] | |
2024-11-19T02:41:38.505901+00:00 | 1,693,928,169,000 | a44ce9520903d8b267e0d3b6c375445c11010a4c | 3 | {
"blob_id": "a44ce9520903d8b267e0d3b6c375445c11010a4c",
"branch_name": "refs/heads/main",
"committer_date": 1693928169000,
"content_id": "f93067e36dbbaaab628e7277e17e09b79b4d5b59",
"detected_licenses": [
"MIT"
],
"directory_id": "091a6200be74bf6577c86f623665bcc24e16b02b",
"extension": "py",
"file... | 2.625 | stackv2 | # SPDX-FileCopyrightText: 2021 Eva Herrada for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import random
import ssl
import gc
import wifi
import socketpool
import adafruit_requests as requests
from adafruit_magtag.magtag import MagTag
# Get wifi details and more from a secrets.py file
try:
from secrets i... | 189 | 32.37 | 98 | 21 | 1,621 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e8bd8d5974aacb72_c6cf2c2d", "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."
] | [
27
] | [
null
] | [
7
] | [
41
] | |
2024-11-19T02:41:39.110589+00:00 | 1,617,619,979,000 | 86c513a550769bb9029615a8637c89782b38215f | 3 | {
"blob_id": "86c513a550769bb9029615a8637c89782b38215f",
"branch_name": "refs/heads/main",
"committer_date": 1617619979000,
"content_id": "dd08425d8b4b8c4eafea1f6bc5a9bf75cbdd1bc5",
"detected_licenses": [
"MIT"
],
"directory_id": "a674f3e3261828806de41771832983189099c976",
"extension": "py",
"file... | 2.765625 | stackv2 |
from credentials import SECRET_KEY
try:
from Crypto.Cipher import AES
_enc = AES.new(SECRET_KEY, AES.MODE_ECB)
_dec = AES.new(SECRET_KEY, AES.MODE_ECB)
except ImportError as ie:
import ucryptolib
_enc = ucryptolib.aes(SECRET_KEY, 1)
_dec = ucryptolib.aes(SECRET_KEY, 1)
def is_encrypted(msg):... | 35 | 23.66 | 49 | 13 | 266 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_4e7ac4eaa6187aa5_c8f3ca57", "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."
] | [
25,
29
] | [
null,
null
] | [
12,
14
] | [
39,
50
] | |
2024-11-19T02:41:45.474967+00:00 | 1,506,444,380,000 | 1fe0239bb9215817e056acb05e8566b190ed98f8 | 3 | {
"blob_id": "1fe0239bb9215817e056acb05e8566b190ed98f8",
"branch_name": "refs/heads/master",
"committer_date": 1506444380000,
"content_id": "4b3806c22657f43847c82b02371379e436ba79cc",
"detected_licenses": [
"MIT"
],
"directory_id": "e89733e7c6c4854aa3b1d97fdb60fa1da0cdcd8e",
"extension": "py",
"fi... | 2.84375 | stackv2 | """ A neural chatbot using sequence to sequence model with
attentional decoder.
This is based on Google Translate Tensorflow model
https://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/
Sequence to sequence model by Cho et al.(2014)
Created by Chip Huyen as the starter code for assignment 3,
cla... | 276 | 31.64 | 87 | 24 | 2,386 | python | [{"finding_id": "codeql_py/overly-large-range_25871ed7d37ecb42_453387f7", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\['()*+,\\-.\\/0-9:;<\\].", "remediation": "", "locati... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\['()*+,\\-.\\/0-9:;<\\]."
] | [
111
] | [
null
] | [
37
] | [
40
] | |
2024-11-19T02:41:49.780780+00:00 | 1,575,637,281,000 | bfd69bb65252f4c56f306c82773821485b707b9d | 2 | {
"blob_id": "bfd69bb65252f4c56f306c82773821485b707b9d",
"branch_name": "refs/heads/master",
"committer_date": 1575637281000,
"content_id": "f213890adbc3e097c0a1d0a896e48f3ca351b3e1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "56554c73385eda38cc6b5dc4a24204c449224ce3",
"extension": "py"... | 2.359375 | stackv2 | #!/usr/bin/env python3
"""
Data_provider script: Given list of not started process_id in
SELECTADB_PRODUCTION.process_stages fetch corresponding fastqs
from the Pathogen portal
"""
import re
import os
import base64
import sys
import argparse
import subprocess
import pymysql as MySQLdb
from selectadb import properties
f... | 371 | 36.93 | 121 | 25 | 2,865 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ab27d49fb02dd339_71c9b855", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (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.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive dat... | [
157,
182,
204
] | [
null,
null,
null
] | [
15,
15,
36
] | [
53,
22,
43
] | |
2024-11-19T02:41:52.158115+00:00 | 1,545,046,587,000 | 9c0fecf09677565e4c5a12e5ad06ea8417b84839 | 3 | {
"blob_id": "9c0fecf09677565e4c5a12e5ad06ea8417b84839",
"branch_name": "refs/heads/master",
"committer_date": 1545046587000,
"content_id": "55f45ac68677c960d9882a0fbab1e84c14cd70df",
"detected_licenses": [
"MIT"
],
"directory_id": "bf370c05ce5404f417292a968b5b1f90b6303293",
"extension": "py",
"fi... | 2.578125 | stackv2 | # -*- encoding:utf-8 -*-
# ===================================================================== #
# 特征编码
# gender、province、age、city、country、continent
# ===================================================================== #
import pandas as pd
dire = '../../data/'
orderHistory_train = pd.read_csv(dire + 'train/orderH... | 63 | 49.21 | 101 | 14 | 746 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_291202562652db53_a662009e", "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."
] | [
16
] | [
null
] | [
7
] | [
21
] | |
2024-11-19T02:41:58.106726+00:00 | 1,630,343,914,000 | a321683787270db00fd55f233b4fc65b381c616c | 3 | {
"blob_id": "a321683787270db00fd55f233b4fc65b381c616c",
"branch_name": "refs/heads/main",
"committer_date": 1630343914000,
"content_id": "05d83bfa19f22aac8e6d52d188dc3b477ee39537",
"detected_licenses": [
"MIT"
],
"directory_id": "ab442048d1ba219c7ca904d5b2c2ffc1146e4a9c",
"extension": "py",
"file... | 2.84375 | stackv2 | from flask import Flask, render_template, request
import requests
app = Flask(__name__)
API_KEY = 'Enter API Key'
@app.route('/', methods=['GET', 'POST'])
def home():
if request.method == 'POST':
try:
amount = request.form['amount'] #input amount
amount = float(amount) ... | 47 | 41.62 | 140 | 16 | 446 | python | [{"finding_id": "codeql_py/stack-trace-exposure_783b4033dc9690fa_bc13a64c", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-215",
"CWE-918"
] | [
"py/stack-trace-exposure",
"py/flask-debug",
"py/partial-ssrf"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
40,
47,
19
] | [
null,
null,
null
] | [
20,
5,
24
] | [
57,
24,
45
] | |
2024-11-19T02:41:59.616242+00:00 | 1,560,150,430,000 | 1fe4234a09bbc724757d6b97f8c2fbb1638154b5 | 2 | {
"blob_id": "1fe4234a09bbc724757d6b97f8c2fbb1638154b5",
"branch_name": "refs/heads/master",
"committer_date": 1560150430000,
"content_id": "8b365792224108df594e21d83ba684754a7e12e7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b4598b8bff1150686a6d45f24e2aa126a7b5bff7",
"extension": "py"... | 2.46875 | stackv2 | import os
from google.cloud import kms_v1
from google.cloud import firestore
from flask import jsonify
def execute(request):
request_json = request.get_json()
if request_json:
if 'access_key' in request_json:
key_provided = request_json['access_key']
key_saved = os.environ.get(... | 77 | 35.66 | 116 | 17 | 644 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4695085da9d41b2f_d9336534", "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."
] | [
51
] | [
null
] | [
11
] | [
26
] | |
2024-11-19T02:42:00.384122+00:00 | 1,616,439,264,000 | 8d287c387b13ce9b0940a012d2061ce7b00d9785 | 3 | {
"blob_id": "8d287c387b13ce9b0940a012d2061ce7b00d9785",
"branch_name": "refs/heads/main",
"committer_date": 1616439264000,
"content_id": "27ef4c4e153af86101040b663f7530942e3d5ed4",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "ee9ea53684d23e8299d6aa9e49a05dade29edc5f",
"extension": "py"... | 2.875 | stackv2 | #!/usr/bin/python3
import requests
from urllib3.exceptions import InsecureRequestWarning
# site: https://revoked.badssl.com
# state should be: bad, revoked certificate
# verification: disabled
# comment: suppress warning about disabled verification via package configuration
badssl_startsite = "https://revoked.badssl... | 35 | 32.29 | 122 | 13 | 239 | python | [{"finding_id": "codeql_py/request-without-cert-validation_45902679dc45946b_7ff08648", "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)."
] | [
25
] | [
null
] | [
9
] | [
69
] | |
2024-11-19T02:42:24.384045+00:00 | 1,642,969,052,000 | ce833b986b6d654161aca2787aa7167468519926 | 3 | {
"blob_id": "ce833b986b6d654161aca2787aa7167468519926",
"branch_name": "refs/heads/master",
"committer_date": 1642969052000,
"content_id": "9710d32b7d961fbcb9e4881b8b5a1e3a0096cf58",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "da8d759758421794f03fc91a7999744f7d5fd6a4",
"extension": "py"... | 2.875 | stackv2 | from plyer import notification
import requests
import urllib3
from bs4 import BeautifulSoup
import time
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def getData(url):
r=requests.get(url,verify=False)
return r.text
def notifyme(title,message):
notification.notify(
title=titl... | 40 | 28.9 | 120 | 13 | 330 | python | [{"finding_id": "codeql_py/request-without-cert-validation_1a224a9903ecd501_31a387f9", "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)."
] | [
10
] | [
null
] | [
7
] | [
37
] | |
2024-11-18T18:05:47.811049+00:00 | 1,517,584,592,000 | 5a30d8be55bb9b08118a2e7fd6114953aaff4266 | 3 | {
"blob_id": "5a30d8be55bb9b08118a2e7fd6114953aaff4266",
"branch_name": "refs/heads/master",
"committer_date": 1517584592000,
"content_id": "ac25cf67ac4230375943accdea5d3148821421ab",
"detected_licenses": [
"MIT"
],
"directory_id": "ce0cc28e62ab1da5b59ed6e952c1831d2bfe755f",
"extension": "py",
"fi... | 2.953125 | stackv2 | #!/usr/bin/python2
import os
import sys
from Crypto.Cipher import AES
flag = open("flag", "r").read().strip()
key = open("key", "r").read().strip()
welcome = """
{{welcome_message}}
"""
def encrypt():
cipher = AES.new(key.decode('hex'), AES.MODE_ECB)
return cipher.encrypt(flag).encode("hex")
# flush output imm... | 22 | 19.23 | 51 | 11 | 122 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_180bc15dd0e5608e_e5890d32", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
16
] | [
null
] | [
10
] | [
30
] | |
2024-11-18T18:05:54.047987+00:00 | 1,514,858,125,000 | 9aa2ff813b95a64942e465b247707a090bcecd6d | 2 | {
"blob_id": "9aa2ff813b95a64942e465b247707a090bcecd6d",
"branch_name": "refs/heads/master",
"committer_date": 1514858125000,
"content_id": "ab7d98f2e694869d7d067eff12c0fd7103f2fc15",
"detected_licenses": [
"MIT"
],
"directory_id": "b3b1748877980183d790b234574848062339ad76",
"extension": "py",
"fi... | 2.359375 | stackv2 | # coding:utf-8
import requests
import urllib
api_key = 's2IG3y4DsQerQLs1IEELI7Xd'
secret_key = 'bb592a6ae6aa1a6086e6b8baca5da67b'
mp3_save_path = 'test.mp3'
token_url = 'https://openapi.baidu.com/oauth/2.0/token'
tts_url = 'http://tsn.baidu.com/text2audio'
token_request = requests.post(token_url, data = {'grant_typ... | 27 | 35.33 | 142 | 12 | 304 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6dc7192bc046ab86_3836a0c0", "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."
] | [
18
] | [
null
] | [
11
] | [
37
] | |
2024-11-18T18:05:54.120424+00:00 | 1,618,953,050,000 | 23fbaea6ac80089ff0400392e27c9630a67d8713 | 3 | {
"blob_id": "23fbaea6ac80089ff0400392e27c9630a67d8713",
"branch_name": "refs/heads/main",
"committer_date": 1618953050000,
"content_id": "4cfefa694f5e52af2b5422640ab543ac304ee371",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2a5226b13fd9bf7a2313c6d1b4615242344fff48",
"extension": "py",
... | 2.796875 | stackv2 | #!/usr/bin/env python
#################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 ... | 163 | 27.5 | 89 | 14 | 912 | python | [{"finding_id": "codeql_py/overly-permissive-file_9e411d0b629d01a1_1db1dfae", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable."
] | [
36
] | [
null
] | [
9
] | [
34
] | |
2024-11-18T18:05:55.414738+00:00 | 1,408,954,931,000 | b886281d9a9921798c772caf5b790a09fd977a8f | 3 | {
"blob_id": "b886281d9a9921798c772caf5b790a09fd977a8f",
"branch_name": "refs/heads/master",
"committer_date": 1408954931000,
"content_id": "7fad635d62de997dba814185f23bff99ccaa500f",
"detected_licenses": [
"MIT"
],
"directory_id": "885931244f21e360d42dee7e35a198394b847583",
"extension": "py",
"fi... | 2.96875 | stackv2 | """
tornado web server
Implements a REST server that
1. servers the staic assests for the app /static/index.html
2. server the API endpoint at /facility
"""
import json
import logging
from operator import itemgetter
import tornado.ioloop
import tornado.web
import tornado.gen
from data.sql_orm import MobileFoodFacili... | 111 | 29.77 | 102 | 17 | 787 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_36a4cb7f14d51309_4f036384", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
65,
65
] | [
null,
null
] | [
83,
93
] | [
91,
102
] | |
2024-11-18T18:16:10.003771+00:00 | 1,603,958,478,000 | ac2f626695de2e790ee12302e12c8e3346348df6 | 3 | {
"blob_id": "ac2f626695de2e790ee12302e12c8e3346348df6",
"branch_name": "refs/heads/master",
"committer_date": 1603958478000,
"content_id": "5049056f3d092060249d9c0b1a3987a90cb40073",
"detected_licenses": [
"MIT"
],
"directory_id": "959b91154aa5be6362f156139adee44e678c61c6",
"extension": "py",
"fi... | 2.953125 | stackv2 | import paho.mqtt.client as mqtt #import the client1
import time
import sys
import threading
def takePatientInput():
while(1):
patientName = input("Enter Patient Name: ")
patientAge = input("Enter Patient Age: ")
patientGender = input("Enter Patient Gender, M for Male, F for Female: ")
... | 84 | 31.68 | 119 | 16 | 586 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b1eae2ce2fe98a4f_e7ce372b", "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."
] | [
13
] | [
null
] | [
15
] | [
44
] | |
2024-11-18T18:16:10.641866+00:00 | 1,541,158,933,000 | 361d4704a408515a44329617b222c430e299ca17 | 3 | {
"blob_id": "361d4704a408515a44329617b222c430e299ca17",
"branch_name": "refs/heads/master",
"committer_date": 1541158933000,
"content_id": "a311d3ed07f9e6103b8f7179d9211b94ebecb269",
"detected_licenses": [
"MIT"
],
"directory_id": "ebf12c9e6456313c4067aa9fc6ceb5deec15d9b1",
"extension": "py",
"fi... | 2.828125 | stackv2 | """
# NOTE (for Sam): Run on "QSTrader" Conda Virtual Enviroment
> "source activate QSTrader"
> Run via "python coincap_ERC-20_ranker.py"
Summary of script
1) Open Top ERC-20 file & create a DataFrame with the info
2) Get ID's for all ERC-20 tokens using Global API
3) Use Ticker(Specific Currency)... | 225 | 32.8 | 142 | 15 | 1,858 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4d16e53fa37ead69_19eed181", "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."
] | [
112,
112
] | [
null,
null
] | [
25,
37
] | [
29,
43
] | |
2024-11-18T20:08:54.541857+00:00 | 1,297,484,520,000 | db89e8b7fe03828e82a9bbb020dc169861d0c0f8 | 3 | {
"blob_id": "db89e8b7fe03828e82a9bbb020dc169861d0c0f8",
"branch_name": "refs/heads/master",
"committer_date": 1297484520000,
"content_id": "88e832086a52812dfd6110241c1907e343c46674",
"detected_licenses": [
"MIT"
],
"directory_id": "589fe71200d5f28b37a280841557aaa05fddfb5d",
"extension": "py",
"fi... | 3.078125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2007, 2008 Torsten Bronger <bronger@physik.rwth-aachen.de>
#
# This file is part of the Bobcat program.
#
# Bobcat is free software; you can use it, redistribute it and/or modify it
# under the terms of the MIT license.
#
# You should have rec... | 101 | 36.68 | 87 | 18 | 910 | python | [{"finding_id": "codeql_py/overly-large-range_54111a6cef5d6aa8_cfcc94a6", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[.\\/0-9:;<=>?@\\].", "remediation": "", "location": ... | 2 | true | [
"CWE-020",
"CWE-1333"
] | [
"py/overly-large-range",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[.\\/0-9:;<=>?@\\].",
"This part of the regular expression may cause exponential backtracking on strings starting with '<' and containing many repetitions of '0'."
] | [
48,
48
] | [
null,
null
] | [
66,
40
] | [
69,
73
] | |
2024-11-18T18:59:41.096462+00:00 | 1,550,523,073,000 | 5d05226fb059d9467935c5a7bd9a6bffe2b4a127 | 2 | {
"blob_id": "5d05226fb059d9467935c5a7bd9a6bffe2b4a127",
"branch_name": "refs/heads/master",
"committer_date": 1550523073000,
"content_id": "361a1c570f7c2ef003fb1b4fcf0bcffd9b3d0509",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e2467cdc3792a2679f19fb16f618b68e54732a0e",
"extension": "py"... | 2.359375 | stackv2 | # vim: set expandtab:
import asyncio
import binascii
import logging
import socket
import ssl
import sys
import time
from scrampy import scram_lib
if sys.version_info > (3,):
buffer = memoryview
def authenticate(username, password, connection, retries = 0):
logging.debug('Scram authentication initiated, numb... | 220 | 28.86 | 138 | 17 | 1,445 | python | [{"finding_id": "codeql_py/insecure-protocol_1456f111a8abd6af_def07ebb", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1).", "remediation": "", "l... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1)."
] | [
192
] | [
null
] | [
22
] | [
75
] | |
2024-11-18T19:11:53.134789+00:00 | 1,587,735,682,000 | 031a6ceddbf5a53211b54fefdab254ddfadd8b5b | 2 | {
"blob_id": "031a6ceddbf5a53211b54fefdab254ddfadd8b5b",
"branch_name": "refs/heads/master",
"committer_date": 1587735682000,
"content_id": "fd6f4f7355b689e7811601999919bd51ec4c5ffa",
"detected_licenses": [
"MIT"
],
"directory_id": "a8a8bc58023cef67a9ee19e5cdde2efb51711591",
"extension": "py",
"fi... | 2.4375 | stackv2 | import inspect
import mimetypes
import urllib
import socket
from socketserver import ThreadingMixIn
from http.server import SimpleHTTPRequestHandler, HTTPServer
import nest_asyncio
PORT = 5000
HOST = socket.gethostname()
class DataTransfer:
""" TODO: stuff"""
pass
DATA = DataTransfer()
class HTTPResponse:... | 222 | 28.42 | 105 | 19 | 1,370 | python | [{"finding_id": "codeql_py/http-response-splitting_86fecd0ed1eefe2b_4f87d58e", "tool_name": "codeql", "rule_id": "py/http-response-splitting", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This HTTP header is constructed from a [user-provided value](1).", "remediation": "", "lo... | 5 | true | [
"CWE-113",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/http-response-splitting",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This HTTP header is constructed from a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
91,
64,
69,
107,
112
] | [
null,
null,
null,
null,
null
] | [
42,
23,
23,
23,
23
] | [
50,
57,
57,
57,
57
] | |
2024-11-18T19:11:54.501717+00:00 | 1,521,697,391,000 | 8322436f25613dae9a40cb1eeac02a75e0e09eac | 2 | {
"blob_id": "8322436f25613dae9a40cb1eeac02a75e0e09eac",
"branch_name": "refs/heads/master",
"committer_date": 1521697391000,
"content_id": "19daebdde39a8242bd5c69c4d679871a3a06b6f6",
"detected_licenses": [
"MIT"
],
"directory_id": "c5c18828ee008ea1bac4f2b4a1c76b7518887cf9",
"extension": "py",
"fi... | 2.40625 | stackv2 | import requests
from urllib.parse import urljoin
from bs4 import BeautifulSoup
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
@api_view(['GET', 'POST'])
def get_input_data(request):
if request.method == 'POST':
_url = request.d... | 27 | 34.33 | 78 | 19 | 198 | python | [{"finding_id": "codeql_py/full-ssrf_9c9535288d23f478_bc1d72da", "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)."
] | [
14
] | [
null
] | [
20
] | [
38
] | |
2024-11-18T19:23:48.629523+00:00 | 1,602,668,331,000 | ff335bf87e474a82367f44bc743a5cacbc541a6d | 2 | {
"blob_id": "ff335bf87e474a82367f44bc743a5cacbc541a6d",
"branch_name": "refs/heads/main",
"committer_date": 1602668331000,
"content_id": "a8d0884482771290a5a73b8b9417f524d4faae66",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ac5e7429803257e709101dc47c5bfbc69d9d5c04",
"extension": "py",
... | 2.390625 | stackv2 | #!/usr/bin/env python3
import argparse
import fnmatch
import getpass
import json
import logging
import os
import requests
import sys
import time
import urllib3
urllib3.disable_warnings()
# constant variables
IMPORT_RESOURCE = "rest/confapi/1/backup/import"
terminate_script = [444, 403, 401]
# global variables
batch... | 230 | 29.33 | 119 | 16 | 1,499 | python | [{"finding_id": "codeql_py/request-without-cert-validation_11fae86d83eb24f2_eed6c87d", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 4 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
109,
132,
147,
148
] | [
null,
null,
null,
null
] | [
27,
26,
20,
20
] | [
120,
90,
82,
78
] | |
2024-11-18T19:23:59.957284+00:00 | 1,540,492,160,000 | 08ef5a0e486372121b6319b6f9544bd2b90448e1 | 3 | {
"blob_id": "08ef5a0e486372121b6319b6f9544bd2b90448e1",
"branch_name": "refs/heads/master",
"committer_date": 1540492160000,
"content_id": "307e71b6fa96c4ac5949d6b3840d296cca979231",
"detected_licenses": [
"MIT"
],
"directory_id": "05baaf14a8c9618b15385db57b514abae0c31de0",
"extension": "py",
"fi... | 2.75 | stackv2 | from flask import Flask, request, make_response, jsonify, render_template
from pprint import pprint
VERIFICATION_TOKEN = "YOUR VERIFICATION TOKEN FOR THE FACEBOOK APP"
app = Flask(__name__)
@app.route('/')
def hello_world():
return render_template('index.html')
@app.route('/callback', methods=['GET', 'POST'])
de... | 31 | 24.71 | 73 | 14 | 194 | python | [{"finding_id": "codeql_py/reflective-xss_4e1ab90223c1dbf2_6dcf7191", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
23
] | [
null
] | [
10
] | [
23
] | |
2024-11-18T19:58:18.240301+00:00 | 1,544,244,710,000 | cfaf1105b70c6b69b300b095a91b829513e3d227 | 3 | {
"blob_id": "cfaf1105b70c6b69b300b095a91b829513e3d227",
"branch_name": "refs/heads/master",
"committer_date": 1544244710000,
"content_id": "e1f78f6f731b5b9d32352f93aeaa395e79b847bd",
"detected_licenses": [
"Unlicense"
],
"directory_id": "c2b720e6c0c8e5d969df48e648734e2d3c063480",
"extension": "py",... | 2.8125 | stackv2 | #!/usr/bin/env python3.6
## Import libs
from OpenSSL import SSL
from socket import socket
from datetime import datetime
import idna, requests, json, sys
## Fuction to get expire certificate date
def get_expire_date(hostname):
## Encode in domains with IDN compilance
hostname_idna = idna.encode(hostname)
... | 145 | 28.02 | 141 | 16 | 1,032 | python | [{"finding_id": "codeql_py/insecure-protocol_53428b23b5743ef2_ec292277", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version SSLv2 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol ve... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version SSLv2 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version SSLv3 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version TLSv1 allowed by [call to SSL.Context](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to SSL.Context](1)."
] | [
25
] | [
null
] | [
31
] | [
37
] | |
2024-11-18T19:58:33.276098+00:00 | 1,532,573,756,000 | 1c47a6792a3390f5c4e41e041710610f9a3c1809 | 3 | {
"blob_id": "1c47a6792a3390f5c4e41e041710610f9a3c1809",
"branch_name": "refs/heads/master",
"committer_date": 1532573756000,
"content_id": "ea4eeb9e1ce4a1892d206e46c691f2eb2b22eeae",
"detected_licenses": [
"Unlicense"
],
"directory_id": "e816ef755caa1a62ca00c392fd390124bcf1b63d",
"extension": "py",... | 3.328125 | stackv2 | #! python3
# Regex Example: Phone and Email Scraper
#PDF: http://cdm266101.cdmhost.com/cdm/ref/collection/p266101coll7/id/25785
#Directory of Arkansas higher education personnel, 2015
print("First, we'll start by scraping the PDF \"Directory of Arkansas higher education personnel, 2015\"")
import re, pyperclip
# Cr... | 70 | 37.63 | 106 | 9 | 693 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0cda332a45c53d12_46fc0eb4", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (p... | [
63,
64,
69
] | [
null,
null,
null
] | [
7,
7,
7
] | [
21,
23,
14
] | |
2024-11-18T19:58:35.310712+00:00 | 1,657,140,795,000 | 835627118c5fe829669f4417960a7ff1d66d84ed | 2 | {
"blob_id": "835627118c5fe829669f4417960a7ff1d66d84ed",
"branch_name": "refs/heads/master",
"committer_date": 1657140795000,
"content_id": "be48ae8e4ef68d23305f6642195ddb6ca379912c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1d42f73775b5e50ab17806ca99ad4479cccb25fa",
"extension": "py"... | 2.40625 | stackv2 | #!/usr/bin/env python3
# Copyright 2016 Netfishers
#
# 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... | 326 | 44.71 | 124 | 21 | 3,420 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_37eb77e963901786_68d20bec", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
118
] | [
null
] | [
33
] | [
41
] | |
2024-11-18T18:39:58.563579+00:00 | 1,538,120,410,000 | 390d6d14471bb5a65581d9569d5684c5331f4c5f | 2 | {
"blob_id": "390d6d14471bb5a65581d9569d5684c5331f4c5f",
"branch_name": "refs/heads/master",
"committer_date": 1538120410000,
"content_id": "e3cdeec75779055092940b96ffde9aa50823b9e9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c3683283a7b4553bf2a4ddccbf2827e406238ab2",
"extension": "py"... | 2.453125 | stackv2 | #!/usr/bin/env python
# encoding: utf-8
import os
import json
import requests
import urllib.request
mp3_path = '/home/shengan/audio/mp3'
lyr_path = '/home/shengan/audio/lyric'
def search(keyword):
url = 'http://songsearch.kugou.com/song_search_v2?keyword={keyword}&page=1&pagesize=1&platform=WebFilter'.format(k... | 50 | 27.06 | 141 | 11 | 400 | python | [{"finding_id": "codeql_py/request-without-cert-validation_63a8ffeeed1d7986_1cd974fc", "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)."
] | [
16,
27
] | [
null,
null
] | [
9,
9
] | [
40,
40
] | |
2024-11-18T18:47:01.632715+00:00 | 1,526,569,474,000 | 72da2244678daff740d629746e80184c9269d18c | 2 | {
"blob_id": "72da2244678daff740d629746e80184c9269d18c",
"branch_name": "refs/heads/master",
"committer_date": 1526569474000,
"content_id": "9e98a4e0b447f60582b76d30e4f450081452b6f7",
"detected_licenses": [
"MIT"
],
"directory_id": "4e546e9396abe034cd09841bcf2bba80abfc2c80",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import smtplib, os
from email.mime.multipart import MIMEMultipart
from email.mime.image import MIMEImage
from email.mime.text import MIMEText
from email.header import Header
from baseq.mgt import config
class Client:
def __init__(self):
# 邮件信息
self.ser... | 69 | 34.55 | 95 | 20 | 640 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_52e5ad80f939c666_a1d83bbb", "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."
] | [
56
] | [
null
] | [
32
] | [
45
] | |
2024-11-18T18:47:06.239647+00:00 | 1,620,806,128,000 | 7deca74f34194249779512e987900a4425b64a6a | 3 | {
"blob_id": "7deca74f34194249779512e987900a4425b64a6a",
"branch_name": "refs/heads/master",
"committer_date": 1620806128000,
"content_id": "62d9358d924a0fdb661209334154ef79b4f103d3",
"detected_licenses": [
"MIT"
],
"directory_id": "574915481c4a4689791e4f3c683a5344824bb576",
"extension": "py",
"fi... | 2.640625 | stackv2 | import json
import os
from flask import Flask, request
from IPProxyPool.core.db.mongo_pool import MongoPool
from IPProxyPool.settings import PROXIES_MAX_COUNT
from max_toolbox.max_logging import MaxLogging
log_name = 'App'
log_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../logs', 'app.log')
Max... | 93 | 32.3 | 138 | 18 | 766 | python | [{"finding_id": "codeql_py/reflective-xss_81a6afc6d7f6e583_5210efd8", "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)."
] | [
41
] | [
null
] | [
24
] | [
75
] | |
2024-11-18T20:15:45.203219+00:00 | 1,545,043,848,000 | f391273732f2f3f7d21161bbefb73d52860b15bc | 3 | {
"blob_id": "f391273732f2f3f7d21161bbefb73d52860b15bc",
"branch_name": "refs/heads/master",
"committer_date": 1545043848000,
"content_id": "5d34b17e18da230d89454cee75a3612c5bbf9208",
"detected_licenses": [
"MIT"
],
"directory_id": "6fd748ddadd7e1d6f5ea02aa2eac1e78cad4ed6d",
"extension": "py",
"fi... | 2.75 | stackv2 | from __future__ import print_function
import paramiko
import glob
import os
import logging
import datetime
class Data(object):
def __init__(self, config):
"""
This module implements the methods to transfer data between the local
machine and remote clusters.
Attributes:
... | 70 | 36.51 | 89 | 17 | 548 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_7599ac1a80197b53_05c384b1", "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-295"
] | [
"py/paramiko-missing-host-key-validation",
"py/paramiko-missing-host-key-validation"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe.",
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
30,
52
] | [
null,
null
] | [
13,
13
] | [
70,
70
] | |
2024-11-18T20:15:57.441367+00:00 | 1,552,037,567,000 | a9744ab9792d2b917f30e7b6a023a54515637fe6 | 2 | {
"blob_id": "a9744ab9792d2b917f30e7b6a023a54515637fe6",
"branch_name": "refs/heads/master",
"committer_date": 1552037567000,
"content_id": "bb0b30213238e5c3ac7726b39ccec7cabd45bec0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5dec5438d6e4df47b26de7e33daf0288d3921b03",
"extension": "py"... | 2.5 | stackv2 | from hashlib import md5
from django.conf import settings
def multi_encrypt(s, phone):
if not phone:
num = 10
else:
num = int(phone[-2:])
for i in range(num):
s = '%s%s' % (s, settings.SECRET_KEY)
s = md5(s.encode('utf-8')).hexdigest()
return s
def send_sms_code(phone,... | 19 | 22.32 | 51 | 15 | 135 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a84e43a42964ab0f_fed49ffa", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
12
] | [
null
] | [
17
] | [
34
] | |
2024-11-18T20:56:42.724148+00:00 | 1,607,928,478,000 | 1eb2f5d410dc2017b7f7f07483ebd21cc0ec630b | 3 | {
"blob_id": "1eb2f5d410dc2017b7f7f07483ebd21cc0ec630b",
"branch_name": "refs/heads/master",
"committer_date": 1607928478000,
"content_id": "20c098d85fbc71f6f821362a73de02e909d92941",
"detected_licenses": [
"MIT"
],
"directory_id": "237578f6078c71baa737bd1aff86e56052699a2b",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/local/env python
import sys
import hashlib
import getpass
import sqlite3
def user_info():
info = []
user_name = raw_input('Please Enter a User Name: ')
password = hashlib.sha224(getpass.getpass('Please Enter a Password: ')).hexdigest()
info.append((user_name, password))
return info
def mai... | 30 | 21.97 | 87 | 13 | 152 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_82a6d57c4afba283_3c61ef37", "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 (SHA224) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA224) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
11
] | [
null
] | [
31
] | [
75
] | |
2024-11-18T19:38:01.039899+00:00 | 1,553,243,321,000 | 58bf07ae783c6097e379e1e0b1c49e55569836aa | 2 | {
"blob_id": "58bf07ae783c6097e379e1e0b1c49e55569836aa",
"branch_name": "refs/heads/master",
"committer_date": 1553243321000,
"content_id": "af46801ab627eeb8b8f008e7274e9fd76ae5a7eb",
"detected_licenses": [
"MIT"
],
"directory_id": "f104066a1a2ebf1a83ca2fc0638358dbaef2dd8f",
"extension": "py",
"fi... | 2.5 | stackv2 | """
Server script to grab real time traffic data from AMAP API, save data to csv files and publish in realtime to thingspeak
"""
from datetime import datetime
import time, sys, pytz, requests, urllib2, traceback, os
apiKey1 = '...' # AMAP API Key 1
apiKey2 = '...' # AMAP API Key 2
thingSpeakAPI = '...' # Thingspeak... | 112 | 38.99 | 135 | 22 | 1,317 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_701c0d10ef2ba5a2_44328e18", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensiti... | [
40,
60
] | [
null,
null
] | [
28,
28
] | [
94,
94
] | |
2024-11-18T19:38:17.032543+00:00 | 1,570,204,776,000 | d6ec9c93eb81ab8e6b4d14fdf27aa3698f676b88 | 3 | {
"blob_id": "d6ec9c93eb81ab8e6b4d14fdf27aa3698f676b88",
"branch_name": "refs/heads/master",
"committer_date": 1570204776000,
"content_id": "fbabbbc46a71e3255aa68c0525438260ca561d29",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "c7f13a9e9c36f8bf8b1e7a99946730bb8770e4a3",
"extension": "p... | 2.5625 | stackv2 | ########################################################
##### Markdown to HTML Converter for Documentation #####
##### by Chris Pyles #####
########################################################
import markdown2 as md
import sys
# import glob
import re
import argparse
import yaml
from ... | 188 | 23.51 | 109 | 16 | 1,308 | python | [{"finding_id": "codeql_py/redos_7df28bb591f704c0_f3177eb7", "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 '<p>|' and containing many repetit... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<p>|' and containing many repetitions of '|'."
] | [
43
] | [
null
] | [
26
] | [
28
] | |
2024-11-18T19:38:38.912796+00:00 | 1,690,523,857,000 | b40b38d5c5190490ccf93c38cef4c5614aaae88a | 2 | {
"blob_id": "b40b38d5c5190490ccf93c38cef4c5614aaae88a",
"branch_name": "refs/heads/master",
"committer_date": 1690523857000,
"content_id": "69e6288eb58919dbb4cec07783c2ad5d040cc1c0",
"detected_licenses": [
"MIT"
],
"directory_id": "70dc4e55406762c925b654b1d945f58b8cce956e",
"extension": "py",
"fi... | 2.46875 | stackv2 |
from django.conf import settings
from django.http import HttpResponseNotFound,HttpResponseForbidden
import os
import random
import requests
from bs4 import BeautifulSoup
from rvsite.models import RVLink
from webpreview import webpreview
from datetime import datetime
MONTH_LIST = ["X","January","February","March","Ap... | 180 | 24.39 | 128 | 22 | 964 | python | [{"finding_id": "codeql_py/request-without-cert-validation_b13cc4ae7dcb6c55_28493ee7", "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)."
] | [
153
] | [
null
] | [
14
] | [
56
] | |
2024-11-18T20:10:46.946661+00:00 | 1,622,024,762,000 | ad297208f824852a2c463141a5cf2ece1374c2a9 | 3 | {
"blob_id": "ad297208f824852a2c463141a5cf2ece1374c2a9",
"branch_name": "refs/heads/master",
"committer_date": 1622024762000,
"content_id": "94494dc0bff68a32523bec0fdc10b4d98c1b32f3",
"detected_licenses": [
"MIT"
],
"directory_id": "bd48d1204bbcad9a05077b7118b467025c8c139b",
"extension": "py",
"fi... | 2.6875 | stackv2 | from PIL import Image
import os
import argparse
DELIMETER = "#|#|#|#|#|"
class SizeOverError(Exception):
pass
def list_imagepath(dr):
imagenames = list(filter(lambda x: x.endswith(".png"), os.listdir(dr)))
imagepaths = []
for imagename in imagenames:
imagepath = dr + "/" + imagename
i... | 244 | 29.33 | 152 | 25 | 1,751 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_af526371876c6eb5_0b00b50f", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
172
] | [
null
] | [
16
] | [
33
] | |
2024-11-18T20:10:55.529211+00:00 | 1,687,338,230,000 | c67bfdbd2aa5df2edfee009e15bd6d5072d6057a | 2 | {
"blob_id": "c67bfdbd2aa5df2edfee009e15bd6d5072d6057a",
"branch_name": "refs/heads/master",
"committer_date": 1687338230000,
"content_id": "7b4540c61ea5c82aae251893ea0784bf6c719489",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2bd65d65dccc396d6112fa31011a584fad8e4566",
"extension": "py"... | 2.328125 | stackv2 | #run this with splunk cmd python3 or python3
import requests
import json
base_url="https://localhost:8089"
url = base_url + "/services/cluster/master/buckets?filter=meets_multisite_replication_count=false&output_mode=json&count=0"
auth=('admin','changeme')
res=requests.get(url,auth=auth,verify=False)
dict = json.loads... | 35 | 48.66 | 123 | 17 | 442 | python | [{"finding_id": "codeql_py/request-without-cert-validation_2cf9ac05aaf3ff80_ef96d345", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
7,
25,
33
] | [
null,
null,
null
] | [
5,
13,
13
] | [
45,
79,
81
] | |
2024-11-18T20:10:57.326149+00:00 | 1,469,868,769,000 | d806bb16e23d8b051125c488035d4f9010180209 | 3 | {
"blob_id": "d806bb16e23d8b051125c488035d4f9010180209",
"branch_name": "refs/heads/master",
"committer_date": 1469868769000,
"content_id": "495325683697dcfc7dc2407b56c762cb7e8df32b",
"detected_licenses": [
"MIT"
],
"directory_id": "6a4f8637e379e5b9e7c9321824d3ac91bf7b0878",
"extension": "py",
"fi... | 2.59375 | stackv2 | from peewee import CharField, DateTimeField
from flask_login import UserMixin
from hashlib import sha1
from time import mktime
import datetime
from models.base import BaseModel
class User(BaseModel, UserMixin):
created = DateTimeField(default=datetime.datetime.now)
email = CharField(max_length=50)
passwo... | 32 | 27.09 | 74 | 15 | 198 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_80fddc00a55afa47_5e09333c", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expen... | [
22,
25
] | [
null,
null
] | [
30,
38
] | [
54,
62
] | |
2024-11-18T20:26:03.207658+00:00 | 1,508,355,399,000 | d27fcab1e1855d2b1e285ef4ac22c2012c8d3ae4 | 2 | {
"blob_id": "d27fcab1e1855d2b1e285ef4ac22c2012c8d3ae4",
"branch_name": "refs/heads/master",
"committer_date": 1508355399000,
"content_id": "71530790e5d8968846313fd76dfd9b5a0ce17ff3",
"detected_licenses": [
"MIT"
],
"directory_id": "1c002b0ab71153ce3ed8558eeb46e476958ea068",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
import glob
import yaml
from jinja2 import Environment, FileSystemLoader
try:
from ansible.utils.module_docs import get_docstring
except Exception:
from ansible.utils.plugin_docs import get_docstring
NAME = 'ansible-kubernetes... | 93 | 30.45 | 105 | 26 | 691 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bd92540d94081819_b2de143a", "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."
] | [
25
] | [
null
] | [
12
] | [
61
] | |
2024-11-18T20:26:21.738791+00:00 | 1,663,676,965,000 | 639d50846b4590b3fb48ddde96e77851aed457f4 | 2 | {
"blob_id": "639d50846b4590b3fb48ddde96e77851aed457f4",
"branch_name": "refs/heads/master",
"committer_date": 1663678234000,
"content_id": "2ba64e6050ee54372d0521c9f015ac2958a87829",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "6ed0fb8f24adea16bfbb1dade7e6c668001bd53f",
"extension": "p... | 2.453125 | stackv2 | import datetime
import logging
import math
import re
from airflow import DAG
from airflow.executors import get_default_executor
from airflow.models import Variable
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from airflow.operators.subdag_opera... | 269 | 33.46 | 107 | 18 | 2,300 | python | [{"finding_id": "codeql_py/redos_05f9ef117c3d00bc_3c916fb5", "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 'operationaOR\\[A, ' and containin... | 3 | true | [
"CWE-1333",
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with 'operationaOR\\[A, ' and containing many repetitions of 'AA, '.",
"This part of the regular expression may cause exponential backtracking on strings starting with 'operationaATLEAST(0)\\[A, ' and containing many repet... | [
88,
97,
111
] | [
null,
null,
null
] | [
60,
69,
75
] | [
66,
75,
81
] | |
2024-11-18T20:26:47.658808+00:00 | 1,691,432,288,000 | e596a66dfbd79b4170dbd0f6065466420eddb897 | 3 | {
"blob_id": "e596a66dfbd79b4170dbd0f6065466420eddb897",
"branch_name": "refs/heads/main",
"committer_date": 1691432288000,
"content_id": "895d4ebf1285c2f3abcac2b0f902c798468f9048",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "20e540ed4812842a7f60bd5ec43ce2dc2739f56e",
"extension": "py",
... | 3.21875 | stackv2 | """
The following Python implementation of Shamir's Secret Sharing is
released into the Public Domain under the terms of CC0 and OWFa:
https://creativecommons.org/publicdomain/zero/1.0/
http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0
See the bottom few lines for usage. Tested on Python 2 and 3.
... | 128 | 30.34 | 76 | 15 | 1,095 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_adece332fd0ca504_33be8315", "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.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (s... | [
116,
120,
123,
125
] | [
null,
null,
null,
null
] | [
11,
25,
11,
11
] | [
17,
30,
37,
38
] | |
2024-11-18T20:52:04.658118+00:00 | 1,620,908,891,000 | b2e736c2be6a92c865b66a271a0dda5bbf7738a6 | 4 | {
"blob_id": "b2e736c2be6a92c865b66a271a0dda5bbf7738a6",
"branch_name": "refs/heads/main",
"committer_date": 1620908891000,
"content_id": "1d745ce1f195bf3d3920ece430faaabcd5addee1",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a51d7e5537dcf2e51c92942ab2a309fa1441ed5e",
"extension": "py"... | 4.21875 | stackv2 | import secrets
def do_fibonacci():
""" Do fibonacci """
fib_length = int(input("How Long? ( ͡° ͜ʖ ͡°) "))
b, a = 0, 1
for i in range(fib_length):
print(b)
sum = a + b
a = b
b = sum
def create_random_int(n: int = 1000):
"""
Create random int based on the parame... | 102 | 25.91 | 88 | 19 | 715 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_66f129891a7d8b9b_6a30bbf0", "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."
] | [
81
] | [
null
] | [
11
] | [
24
] | |
2024-11-18T20:52:11.029173+00:00 | 1,681,205,860,000 | a25c148d1924856620f2263664b0797545a2d653 | 3 | {
"blob_id": "a25c148d1924856620f2263664b0797545a2d653",
"branch_name": "refs/heads/master",
"committer_date": 1681205860000,
"content_id": "ca2b13a73d58a7c8f198413587f107767ef8258d",
"detected_licenses": [
"MIT"
],
"directory_id": "674caa0d07acfa73a49a8762ca48eccef22e68d8",
"extension": "py",
"fi... | 2.59375 | stackv2 | #!/usr/bin/env python3
# CFB encryption - for AngeCryption
import sys
import os
import hashlib
import binascii
from Crypto.Cipher import AES
MODE = AES.MODE_ECB
if __name__=='__main__':
fname = sys.argv[1]
with open(fname, "rb") as f:
lines = f.readlines()
for line in lines:
line = line.strip()
l = line.... | 52 | 23.1 | 76 | 14 | 425 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_cd4b6399bb04f130_4ab926d1", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
31
] | [
null
] | [
15
] | [
37
] | |
2024-11-18T20:52:14.487507+00:00 | 1,558,328,024,000 | aab272157cabf951875dd6851ed17b3a2150f14e | 2 | {
"blob_id": "aab272157cabf951875dd6851ed17b3a2150f14e",
"branch_name": "refs/heads/master",
"committer_date": 1558328024000,
"content_id": "0093b90435bcacd3b26196fe382de797ddb1657f",
"detected_licenses": [
"MIT"
],
"directory_id": "18f74ab392507495cb1795356abd9576384a8366",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : facecompare.py
import base64, urllib, json
import http.client as httplib
APPID="user"
APPSECRET="12345"
class Face():
def http_post(self,url, post):
headers = {"Content-type": "application/x-www-form-urlencoded", 'Accept': "text/plain"}
... | 81 | 33.88 | 161 | 18 | 762 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b73891b84100c5a6_c878db94", "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."
] | [
46
] | [
null
] | [
19
] | [
30
] | |
2024-11-18T20:52:25.348236+00:00 | 1,599,053,689,000 | 4954b263f4f12843e3392945f74e20b5887bb3e1 | 3 | {
"blob_id": "4954b263f4f12843e3392945f74e20b5887bb3e1",
"branch_name": "refs/heads/master",
"committer_date": 1599053689000,
"content_id": "a876dc9926383f53266bf59df67bf8c9f7d5cf1e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5fe72bb13baf3649058ebe11aa86ad4fc56c69ed",
"extension": "py"... | 2.671875 | stackv2 | import sys
import win32com.client
openedDoc = win32com.client.Dispatch("Excel.Application")
filename= sys.argv[1]
password_file = open ( 'wordlist.lst', 'r' )
passwords = password_file.readlines()
password_file.close()
passwords = [item.rstrip('\n') for item in passwords]
results = open('results.txt', 'w')
for pass... | 23 | 23.61 | 70 | 11 | 139 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f39b49a875b5303d_6f071e99", "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.\... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive d... | [
19,
15,
18
] | [
null,
null,
null
] | [
17,
8,
9
] | [
25,
16,
42
] | |
2024-11-18T20:52:35.772896+00:00 | 1,575,120,447,000 | e166af6f5ec65afb0cde72939e35e0c758b9848e | 4 | {
"blob_id": "e166af6f5ec65afb0cde72939e35e0c758b9848e",
"branch_name": "refs/heads/master",
"committer_date": 1575120447000,
"content_id": "f7405aca876088f9dd2150aa791d233b606a8a83",
"detected_licenses": [
"MIT"
],
"directory_id": "5b85541e5f8bee1b07df9d33266b25c4d0c80c23",
"extension": "py",
"fi... | 4.0625 | stackv2 | #####
#
# Les 12 - Make the "Guess the secret number" game more modular
#
# Use functions to make the game more modular. Also try to add another while loop so the user can play
# many rounds of the game without having to re-run the program each time.
#
# You can let the user choose the level of the game: 'Easy' of 'Har... | 162 | 32.85 | 110 | 19 | 1,433 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ec6d73a5b096b5a6_6c4a94c7", "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.", ... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [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."
] | [
116,
79,
107
] | [
null,
81,
null
] | [
34,
19,
19
] | [
56,
95,
86
] | |
2024-11-18T20:52:50.149044+00:00 | 1,551,043,686,000 | 0dc1456d133be9d2de256de1891a37b368d9594e | 3 | {
"blob_id": "0dc1456d133be9d2de256de1891a37b368d9594e",
"branch_name": "refs/heads/master",
"committer_date": 1551043686000,
"content_id": "403ccd3c8b468571969caddcecfa59d9351abd92",
"detected_licenses": [
"MIT"
],
"directory_id": "19d1980475f379bbda1dd0dc88ddf4fb0b639d9c",
"extension": "py",
"fi... | 2.703125 | stackv2 | from Crypto.Util import asn1
import ssl
import socket
import OpenSSL
def getModulus(address, timeout):
'''
Gets SSL cert from 'address' and returns (n, e) as tuple of long.
Raises exception if cert contains no RSA key.
'''
getAddress = address
getPort = 443
if ":" in address:
getAddress = address.split(":")... | 36 | 32.33 | 75 | 14 | 318 | python | [{"finding_id": "codeql_py/insecure-protocol_53b616725aa97279_7cd480e6", "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)."
] | [
35
] | [
null
] | [
12
] | [
19
] | |
2024-11-18T19:02:54.426996+00:00 | 1,574,441,849,000 | 32eb57914cf4aec65e42221a9ec4b005695fc7f5 | 3 | {
"blob_id": "32eb57914cf4aec65e42221a9ec4b005695fc7f5",
"branch_name": "refs/heads/master",
"committer_date": 1574441849000,
"content_id": "1bdee4feea3baea79f2f21224ceadbe2d4862387",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f3397e31e27dbbffe24386bb4150b6d135bc5103",
"extension": "py"... | 2.703125 | stackv2 | import json
import xml.etree.ElementTree as elementTree
from abc import ABC
from abc import abstractmethod
from base64 import urlsafe_b64encode
from typing import Tuple
from xml.etree.ElementTree import ParseError
import xmltodict
from jinja2 import BaseLoader
from jinja2 import Environment
from jinja2.exceptions impo... | 429 | 36.95 | 122 | 29 | 3,128 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ac92790130cf1d44_f5145cfb", "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."
] | [
164
] | [
null
] | [
13
] | [
43
] | |
2024-11-18T19:03:02.684534+00:00 | 1,676,522,890,000 | 670d8440f692a9ef17a978c9f7338533aff834f9 | 3 | {
"blob_id": "670d8440f692a9ef17a978c9f7338533aff834f9",
"branch_name": "refs/heads/master",
"committer_date": 1676522890000,
"content_id": "37f9264c72564c7bcbac5224bcfcd8a767997246",
"detected_licenses": [
"MIT"
],
"directory_id": "718d44cf2e5ea2f822872dee6c97c498d76586a5",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask
app = Flask(__name__)
from flask import jsonify, abort, request, make_response
from hashlib import md5
import os
SecretKey = 'Qi3mnN9b3UougbpqFvsGruSir0tKPlhc'
ALLOW_LIST = ['nduytg','cloudcraft']
COMMAND = 'echo Hello World'
@app.route("/")
def hello():
return "Hello World from Flask ... | 58 | 29.16 | 100 | 18 | 480 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_4a27f4b131956a32_8791b288", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
33
] | [
null
] | [
22
] | [
79
] | |
2024-11-18T19:14:29.117468+00:00 | 1,371,370,816,000 | 69b8def7c33b41a71b482f0f99c4e6b71ff36daf | 2 | {
"blob_id": "69b8def7c33b41a71b482f0f99c4e6b71ff36daf",
"branch_name": "refs/heads/master",
"committer_date": 1371370816000,
"content_id": "d6cc1921e746a2a7cde2d35a7aef8bd93d4c4949",
"detected_licenses": [
"MIT"
],
"directory_id": "26e25abc036f417a7493a96ad9232d1fa546006c",
"extension": "py",
"fi... | 2.3125 | stackv2 | import requests
from urlparse import urljoin
import re
import logging
log = logging.getLogger(__name__)
LAUNCHER_INFO = 'http://client.eveonline.com/patches/win_launcherinfoTQ_inc.txt'
class LoginFailed(Exception):
pass
def do_login(username, password):
log.debug("Using cached SSO login URL")
#logi... | 85 | 31.15 | 128 | 12 | 682 | python | [{"finding_id": "codeql_py/request-without-cert-validation_91d86d18ec7a0c16_98514b67", "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)."
] | [
60,
78
] | [
64,
81
] | [
19,
16
] | [
6,
6
] | |
2024-11-18T19:14:35.690972+00:00 | 1,657,171,003,000 | aa6e084c61b1248cba40726bd82482c09d2625d8 | 3 | {
"blob_id": "aa6e084c61b1248cba40726bd82482c09d2625d8",
"branch_name": "refs/heads/master",
"committer_date": 1657171003000,
"content_id": "c495b9c049061edcb098013e6d8a20c15e127086",
"detected_licenses": [
"MIT"
],
"directory_id": "bf1d4cf83e663e102cbaf77681aeee27f0fd57b1",
"extension": "py",
"fi... | 2.640625 | stackv2 | import gzip
import os
import shutil
import tarfile
import urllib
import zipfile
import gdown
import requests
class DownloadUtil:
"""
Helper function for downloading external dependency
>>> from nlpaug.util.file.download import DownloadUtil
"""
@staticmethod
def download_word2vec(dest_dir: s... | 153 | 35.2 | 110 | 21 | 1,451 | python | [{"finding_id": "codeql_py/tarslip_294d70191850a719_9ca503bb", "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... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
136,
140
] | [
null,
null
] | [
13,
13
] | [
16,
16
] | |
2024-11-18T19:38:26.515521+00:00 | 1,507,222,062,000 | 6d29c8ed9811006dfb5193a16857e1693c34eb72 | 3 | {
"blob_id": "6d29c8ed9811006dfb5193a16857e1693c34eb72",
"branch_name": "refs/heads/master",
"committer_date": 1507222062000,
"content_id": "53d5759a42358e1809a2420911592d1eadfe7745",
"detected_licenses": [
"MIT"
],
"directory_id": "c42ce0aec3cef2812d96d54dd28c6324b89fe043",
"extension": "py",
"fi... | 3.453125 | stackv2 | '''Model a User object
'''
import hashlib
import csv
import functions
DATASTORE = 'users.csv'
class User:
'''A user on trello'''
def __init__(self, firstname, lastname, email, password):
self.firstname = firstname
self.lastname = lastname
self.email = email
self.password = sel... | 36 | 26.03 | 104 | 14 | 205 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_04bd3213ee5fa371_aac55a14", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
24
] | [
null
] | [
31
] | [
39
] | |
2024-11-18T19:38:37.409096+00:00 | 1,595,940,207,000 | cfee82c5b1548b95df8d6462dc26f7d37d7b4609 | 2 | {
"blob_id": "cfee82c5b1548b95df8d6462dc26f7d37d7b4609",
"branch_name": "refs/heads/master",
"committer_date": 1595940207000,
"content_id": "d1713f86b490012fc99c812b960f166873db60c7",
"detected_licenses": [
"MIT"
],
"directory_id": "4da3dec4330615c38828561f795441a0d802422d",
"extension": "py",
"fi... | 2.421875 | stackv2 | # -*- coding: utf-8 -*-
'''
脚本使用方式:
python3 qiniu_cdn_ssl_cert_auto_renew.py xxx.yyy.com
'''
from qiniu import Auth
import os
import sys
import requests
import datetime
# 从命令行参数列表中读取cdn域名
cert_domain = sys.argv[1]
access_key = ''
secret_key = ''
if len(sys.argv) < 3:
#从环境变量中获取 Access Key 和 Secret Key
acces... | 86 | 25.86 | 104 | 9 | 714 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e1f65fddb7a50dba_a6d5da3d", "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."
] | [
29
] | [
null
] | [
7
] | [
40
] | |
2024-11-18T19:38:48.346858+00:00 | 1,474,472,979,000 | ff429e697ada0b492d9fbcc09ded2dcd9f181e52 | 3 | {
"blob_id": "ff429e697ada0b492d9fbcc09ded2dcd9f181e52",
"branch_name": "refs/heads/master",
"committer_date": 1474472979000,
"content_id": "d0ef369f70c114d1cb052673da95ccea15189e84",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "75c4c6178d34ce927807253567382344f8d38d8f",
"extension": "p... | 2.515625 | stackv2 | """
PyPI tool
"""
import sys
from subprocess import Popen
import distutils.core # pylint: disable=no-name-in-module, import-error
import os
import importlib.machinery
import requests
PYPI_URL = os.environ.get('PYPI_URL', 'https://pypi.python.org/pypi/')
while PYPI_URL.endswith('/'):
PYPI_URL = PYPI_URL[:-1]
# pyl... | 120 | 28.29 | 78 | 13 | 889 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_d57ac4c306eb2a56_b8c69c1c", "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."
] | [
92
] | [
null
] | [
26
] | [
30
] | |
2024-11-18T20:06:24.347728+00:00 | 1,570,830,734,000 | 45dec1d71ab546f0628675a1dbd1ecb5ed94e94d | 2 | {
"blob_id": "45dec1d71ab546f0628675a1dbd1ecb5ed94e94d",
"branch_name": "refs/heads/master",
"committer_date": 1570830734000,
"content_id": "865d7b5c3bcee2590bc508a4cc31bf416bb01c35",
"detected_licenses": [
"MIT"
],
"directory_id": "5db7ffaafa7eb6bc0a93d3cf51f76344cb06215d",
"extension": "py",
"fi... | 2.375 | stackv2 | import weather
import requests
from bs4 import BeautifulSoup
import datetime
import pickle
import copy
import math
import csv
import numpy as np
from weather import convert_to_fahrenheit, windToXY, makeFloats
def balloon_scraper(YEAR, MONTH, DAY, HOUR, directory='./', save=False,
locations=None, ... | 356 | 37.09 | 101 | 24 | 3,678 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ef2dd2228c18370e_f17ac09c", "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."
] | [
119
] | [
120
] | [
33
] | [
51
] | |
2024-11-18T20:06:31.546012+00:00 | 1,620,733,623,000 | 0ce6b2b0cd69ef6e54e14995ab7c8b1a41e0f704 | 3 | {
"blob_id": "0ce6b2b0cd69ef6e54e14995ab7c8b1a41e0f704",
"branch_name": "refs/heads/main",
"committer_date": 1620733623000,
"content_id": "cf3816cdc8f469f970bbea1373af8862d0103063",
"detected_licenses": [
"MIT"
],
"directory_id": "f9d971901ab3b73f540b87ef6545409e67db4f79",
"extension": "py",
"file... | 2.78125 | stackv2 | import speech_recognition as sr
import pyttsx3
import datetime
import wikipedia
import webbrowser
import os
import time
import subprocess
import pyjokes
# from ecapture import ecapture as ec ----------> not yet installed
import wolframalpha
import json
import requests
import randfacts
from deep_translator import Google... | 254 | 38.22 | 139 | 26 | 2,293 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4b92b87750c78ac2_f80187cc", "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)](1) as clear text."
] | [
152
] | [
157
] | [
23
] | [
47
] | |
2024-11-18T20:18:21.422772+00:00 | 1,631,008,268,000 | d123a72450353ca5fc43939d2ef14ba3677626ff | 3 | {
"blob_id": "d123a72450353ca5fc43939d2ef14ba3677626ff",
"branch_name": "refs/heads/main",
"committer_date": 1631008268000,
"content_id": "629ee0662af9b90de93ca0942c8558bc4d40152a",
"detected_licenses": [
"MIT"
],
"directory_id": "3bde386adbd0545e328741f316787788e89e6814",
"extension": "py",
"file... | 2.53125 | stackv2 | import requests
import pandas as pd
import json
import sys
import argparse
import itertools
from tabulate import tabulate
import pprint
import warnings
from requests.packages.urllib3.exceptions import InsecureRequestWarning
warnings.simplefilter('ignore',InsecureRequestWarning)
pp = pprint.PrettyPrinter(width=150, com... | 156 | 32.25 | 107 | 13 | 1,276 | python | [{"finding_id": "codeql_py/request-without-cert-validation_b8086ab38eec315a_0e62a05a", "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)."
] | [
85
] | [
88
] | [
9
] | [
37
] | |
2024-11-18T20:31:34.694917+00:00 | 1,589,555,227,000 | e39c885245c2232e2b458460df0df98f4a7a7979 | 3 | {
"blob_id": "e39c885245c2232e2b458460df0df98f4a7a7979",
"branch_name": "refs/heads/master",
"committer_date": 1589555227000,
"content_id": "7cbf71cbe3189095474dd00ef34782659ab39d8c",
"detected_licenses": [
"MIT"
],
"directory_id": "f7c5272316be92019aa2b6b7e7c1eaaf66516062",
"extension": "py",
"fi... | 2.640625 | stackv2 | # -*- coding: utf-8 -*-
import os
import logging
import paramiko
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
class SSHAgent:
def __init__(self, ip, password, username='root', port=22):
self.ip = ip
self.username... | 108 | 34.7 | 130 | 21 | 912 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_256e844e1d30ce5a_beb2b049", "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."
] | [
18
] | [
null
] | [
9
] | [
71
] | |
2024-11-18T20:43:39.008030+00:00 | 1,614,435,306,000 | 2989014f401e0e890676231e47116e18b417292e | 3 | {
"blob_id": "2989014f401e0e890676231e47116e18b417292e",
"branch_name": "refs/heads/master",
"committer_date": 1614435306000,
"content_id": "a689df3638c956208a7c4ebb7c1d83fbeaef7bf7",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "f13a7cbdb4bdd9514134aadbf60dfa71cbf7349f",
"extension": "p... | 2.640625 | stackv2 | #!/usr/bin/env python
import os
import sys
import json
# pip install requests
import requests
ZABBIX_URL = 'http://192.168.122.201/zabbix/api_jsonrpc.php'
ZABBIX_API_USER = 'testzabapiuser'
ZABBIX_API_PASS = 'testzabapipass'
class MyZabbixApi(object):
serverurl = ''
username = ''
password = ''
token ... | 185 | 23.77 | 77 | 17 | 1,072 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cd48e4c046697341_bf67a7ae", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
42
] | [
null
] | [
19
] | [
26
] | |
2024-11-18T20:44:03.013327+00:00 | 1,511,752,414,000 | 3d61e3f56630a634a17dbd48ce5a08e64968ce33 | 2 | {
"blob_id": "3d61e3f56630a634a17dbd48ce5a08e64968ce33",
"branch_name": "refs/heads/master",
"committer_date": 1511752414000,
"content_id": "b68187e2a9161e7696059fd5119d14ad4cdf0c36",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "d3fa8ded9d393ba9b03388ba7f05fc559cf31d1e",
"extension": "p... | 2.484375 | stackv2 | # 3p
import ntplib
import socket
import requests
from datetime import datetime
import time
# project
from checks import AgentCheck
from utils.ntp import get_ntp_args, set_user_ntp_settings
from config import get_config
DEFAULT_OFFSET_THRESHOLD = 60 # in seconds
class NtpCheck(AgentCheck):
DEFAULT_MIN_COLLECTIO... | 96 | 34.51 | 130 | 19 | 760 | python | [{"finding_id": "codeql_py/request-without-cert-validation_0e60c0c847713de4_d8bc7c0b", "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)."
] | [
68
] | [
null
] | [
18
] | [
53
] | |
2024-11-18T20:44:08.860658+00:00 | 1,632,081,793,000 | e7f03211e4d45fb383402606a3d10983709f43d3 | 2 | {
"blob_id": "e7f03211e4d45fb383402606a3d10983709f43d3",
"branch_name": "refs/heads/main",
"committer_date": 1632081793000,
"content_id": "a00b09cbdfdc20e9b35855717fe875542e0c0702",
"detected_licenses": [
"MIT"
],
"directory_id": "4195dc9a373f782cbd7c7d5b10a9072076868725",
"extension": "py",
"file... | 2.453125 | stackv2 | from flask import Flask, jsonify, make_response, request
import service.fastFoodService as service
app = Flask(__name__)
service.setRepository() # Create a dataBase if not exists
@app.route("/all", methods=["GET"])
def API_findAll():
return jsonify(service.findAll())
@app.route("/<id>", methods=["GET"])
de... | 62 | 21.44 | 67 | 17 | 323 | python | [{"finding_id": "codeql_py/reflective-xss_0e7fb781d0eaca62_f75d9e87", "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... | 4 | true | [
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
22,
41,
54,
56
] | [
null,
null,
null,
null
] | [
30,
30,
38,
34
] | [
53,
53,
61,
57
] | |
2024-11-18T20:57:39.598115+00:00 | 1,573,014,412,000 | 3d111abe5c12724ed0ef989a5c61950a063420c2 | 2 | {
"blob_id": "3d111abe5c12724ed0ef989a5c61950a063420c2",
"branch_name": "refs/heads/master",
"committer_date": 1573014412000,
"content_id": "148908b3abe7cb8078167f71e88730049c9c900b",
"detected_licenses": [
"MIT"
],
"directory_id": "894e6cefc6476b9d60b69520be9678910732cf4c",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Convert Markdown file to html, which is embeded in html template.
"""
from __future__ import (print_function, with_statement, unicode_literals,
absolute_import)
import os
import os.path
import io
import copy
import re
import traceback
import war... | 450 | 33.68 | 110 | 19 | 3,357 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_09e24b2e4c32531e_4ab4d34e", "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."
] | [
54
] | [
56
] | [
20
] | [
10
] | |
2024-11-18T20:57:40.648566+00:00 | 1,604,291,743,000 | 3ce2bb5456a8e3f25f27753ee579c80d5cb2a196 | 4 | {
"blob_id": "3ce2bb5456a8e3f25f27753ee579c80d5cb2a196",
"branch_name": "refs/heads/master",
"committer_date": 1604291743000,
"content_id": "aa8f6d8dfdf3cf564ad92a6352816035c30eb7ac",
"detected_licenses": [
"MIT"
],
"directory_id": "5667bf4684436b6e2856ddc96691bbd04e561747",
"extension": "py",
"fi... | 3.59375 | stackv2 | # --------------
#Header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Reading of the file
data=pd.read_csv(path)
# Code starts here
# In the column Gender, replace '-' with 'Agender' using "replace()" function
data['Gender'].replace('-','Agender', inplace= True)
gender_count = data[... | 136 | 19.24 | 89 | 9 | 732 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6933269726d7aa25_f1791a81", "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."
] | [
16
] | [
null
] | [
7
] | [
19
] | |
2024-11-18T20:57:42.255361+00:00 | 1,619,596,854,000 | d92a6d010180a24b329e8bcf6c1b797169247e4e | 4 | {
"blob_id": "d92a6d010180a24b329e8bcf6c1b797169247e4e",
"branch_name": "refs/heads/main",
"committer_date": 1619596854000,
"content_id": "de0f384d306567f1a81285a4a665a269d087c33a",
"detected_licenses": [
"MIT"
],
"directory_id": "81655d51d70d0b539bd0edf41e62592f786db2e3",
"extension": "py",
"file... | 4.21875 | stackv2 | """
This program generates a password based on user's need. The program asks user for the number of letters, symbols,
and numbers to create the password. This password is not saved anywhere so feel free to use it.
"""
import random
from time import perf_counter
from time import process_time
# Time Tracking Start
tic1... | 60 | 35.28 | 120 | 10 | 606 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1aacc0ec3bf78f70_556912e5", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw... | [
51
] | [
null
] | [
7
] | [
50
] | |
2024-11-18T20:57:54.882967+00:00 | 1,479,881,726,000 | 582caf4a084c27c841836a0b1a89bc3c73b323a3 | 2 | {
"blob_id": "582caf4a084c27c841836a0b1a89bc3c73b323a3",
"branch_name": "refs/heads/master",
"committer_date": 1479881726000,
"content_id": "402d6cd07b30d0c6ea11bae292f08b6121a13dd0",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f37c88f51344789b14d77dcf456ca0e2b1966d61",
"extension": "p... | 2.4375 | stackv2 | import json
import os.path
LANG = None
ANDROID_ID = None
GOOGLE_LOGIN = None
GOOGLE_PASSWORD = None
AUTH_TOKEN = None
# separator used by search.py, categories.py, ...
SEPARATOR = ";"
def raw_input_with_default(name, default):
print "{}[{}]: ".format(name, default)
value = raw_input()
r... | 52 | 31.52 | 83 | 16 | 421 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_e784d6ab99745a0b_0834f0d2", "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."
] | [
31
] | [
38
] | [
15
] | [
10
] | |
2024-11-18T20:58:04.025346+00:00 | 1,533,019,517,000 | 4e6e2cbe8b3ac9fc186d251ee1148aaa4f393645 | 3 | {
"blob_id": "4e6e2cbe8b3ac9fc186d251ee1148aaa4f393645",
"branch_name": "refs/heads/master",
"committer_date": 1533019517000,
"content_id": "a728d18be1d15293153f13ae1aaece5c2c8d62c7",
"detected_licenses": [
"MIT"
],
"directory_id": "61c8f58ebfce9cbd718ac862fc9cc0cfcffa5a13",
"extension": "py",
"fi... | 3.3125 | stackv2 | import json
import re
from ..enum.srecordtype import SRecordType
"""
List File
Represents the output from the assembler that contains all of the instructions and where in the
destination memory they should end up.
"""
MAX_MEMORY_LOCATION = 16777216 # 2^24
class ListFile:
"""
Represents assembled instructio... | 257 | 32.64 | 144 | 14 | 1,950 | python | [{"finding_id": "codeql_py/overly-large-range_3082402e49106d4c_bf82f4c7", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
98,
98
] | [
null,
null
] | [
31,
39
] | [
34,
42
] | |
2024-11-18T20:58:07.001416+00:00 | 1,587,911,379,000 | b4d9ffc2165ea063cef1146b728a34a97c9b2b1a | 3 | {
"blob_id": "b4d9ffc2165ea063cef1146b728a34a97c9b2b1a",
"branch_name": "refs/heads/master",
"committer_date": 1587911379000,
"content_id": "b9f33ec0a7fba82a26408f04e0ecb7d91495bc3c",
"detected_licenses": [
"MIT"
],
"directory_id": "3f326610c1674ca52a4e70c22af84826f501b164",
"extension": "py",
"fi... | 2.75 | stackv2 | """
;==========================================
; Title: Pascal-5i Dataset for Few-shot Object Segmentation
; Author: Mennatullah Siam
; Company: Huawei Technologies
; Date: 18 March 2020
;==========================================
"""
import os
import json
import glob
import h5py
from PIL import Image, ImageOps
fro... | 262 | 35.84 | 116 | 21 | 2,205 | python | [{"finding_id": "codeql_py/tarslip_995041d18632df33_2a124499", "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)."
] | [
242
] | [
null
] | [
21
] | [
22
] | |
2024-11-18T20:58:10.062097+00:00 | 1,559,716,394,000 | 592da04c5a1d9eeb78b91aad0b2caa7ff441977f | 3 | {
"blob_id": "592da04c5a1d9eeb78b91aad0b2caa7ff441977f",
"branch_name": "refs/heads/master",
"committer_date": 1559716394000,
"content_id": "e5e46dd39f027ebd6e3f16272f229c7ba14e5c5e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3ce17f7165ea9fb4ea9cb510d1d8dd2857b4142d",
"extension": "py"... | 2.71875 | stackv2 | #!/usr/bin/env python3
# Copyright 2018 Christian Henning
#
# 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 l... | 389 | 38.03 | 82 | 19 | 3,417 | python | [{"finding_id": "codeql_py/tarslip_f362c55d56a02ce9_493479c5", "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)."
] | [
116
] | [
null
] | [
17
] | [
20
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.