added stringlengths 32 32 | created int64 1,236B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.03 | source stringclasses 1
value | text stringlengths 330 19.3k | num_lines int64 16 648 | avg_line_length float64 15.5 59.3 | max_line_length int64 37 179 | ast_depth int64 8 38 | length int64 102 3.79k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.11k 276k | sast_codeql_findings_count int64 1 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 33 | rule_ids listlengths 1 33 | confidences listlengths 1 33 | severities listlengths 1 33 | messages listlengths 1 33 | line_starts listlengths 1 33 | line_ends listlengths 1 33 | column_starts listlengths 1 33 | column_ends listlengths 1 33 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T20:18:00.654649+00:00 | 1,459,062,918,000 | 3da7cf21373ef101d5d6c2599e579bb9bba3b726 | 2 | {
"blob_id": "3da7cf21373ef101d5d6c2599e579bb9bba3b726",
"branch_name": "refs/heads/master",
"committer_date": 1459062918000,
"content_id": "32d638be58472b2733c42cbefabccca29066780f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b1a8d0628dc8844e85cac73247cb224655c16314",
"extension": "py"... | 2.4375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: ilsvrc.py
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
import os
import tarfile
from ...utils.fs import mkdir_p, download
__all__ = ['ILSVRCMeta']
CAFFE_URL = "http://dl.caffe.berkeleyvision.org/caffe_ilsvrc12.tar.gz"
class ILSVRCMeta(object):
def __init__(self, ... | 34 | 29.06 | 76 | 15 | 285 | python | [{"finding_id": "codeql_py/tarslip_27c3e6ba40e2480d_0d1313dd", "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)."
] | [
30
] | [
null
] | [
9
] | [
36
] | |
2024-11-18T20:18:31.341618+00:00 | 1,578,023,147,000 | 0cdef879214a3110e1b2ee7fd365e21afd26ae41 | 2 | {
"blob_id": "0cdef879214a3110e1b2ee7fd365e21afd26ae41",
"branch_name": "refs/heads/master",
"committer_date": 1578023147000,
"content_id": "256ced7d0441084cc91de0889485e72e68a87e12",
"detected_licenses": [
"MIT"
],
"directory_id": "c333c5520c8e14d36b9d57c48a179cdc20073ec4",
"extension": "py",
"fi... | 2.453125 | stackv2 | """Skrate application and routes for serving skateboarding data REST API."""
import typing
import logging
from json import JSONEncoder
from flask import Flask, session, render_template
from flask_session import Session
from skrate import models
from skrate import tricks
# Flask application and session
app = Flask("s... | 194 | 34.45 | 93 | 13 | 1,548 | python | [{"finding_id": "codeql_py/log-injection_1649085f1381b5de_1d8ed4dc", "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)."
] | [
112,
139,
140
] | [
null,
null,
null
] | [
51,
65,
21
] | [
55,
73,
27
] | |
2024-11-18T20:18:36.673871+00:00 | 1,607,077,595,000 | 11ca71f196be882de08f9f9dcc6bee4651748cab | 3 | {
"blob_id": "11ca71f196be882de08f9f9dcc6bee4651748cab",
"branch_name": "refs/heads/main",
"committer_date": 1607077595000,
"content_id": "9d82cd7bd58a0a345a1f3f0da44fd74f9495cb2e",
"detected_licenses": [
"MIT"
],
"directory_id": "c02385f40228127c113946f227ba04895e9f452c",
"extension": "py",
"file... | 3.140625 | stackv2 | """this module collects current news headlines from the API"""
import logging
import requests
from extract_json import get_key
from extract_json import get_location
from extract_json import get_urls
logging.basicConfig(filename='pysys.log',level=logging.INFO, format='%(asctime)s %(levelname)-8s %(message)s', datefmt=... | 37 | 33.3 | 139 | 13 | 293 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_53d4fccabb41046f_7aaeb1c3", "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."
] | [
36
] | [
null
] | [
11
] | [
21
] | |
2024-11-18T20:18:57.929926+00:00 | 1,623,250,211,000 | 92cf7a67df0b46ef08ebc7d38cc173e2429fd779 | 3 | {
"blob_id": "92cf7a67df0b46ef08ebc7d38cc173e2429fd779",
"branch_name": "refs/heads/main",
"committer_date": 1623250211000,
"content_id": "fbcf630af3b23027e0d44f08e775c9bfe1d87701",
"detected_licenses": [
"MIT"
],
"directory_id": "f3266550b9c40f64b0d682a5051fa7f6740fed71",
"extension": "py",
"file... | 2.5625 | stackv2 | """fake data helper."""
import time
import os
import fnmatch
from typing import Optional
from pydantic import BaseModel
from fastapi import FastAPI, Request, APIRouter
from src.config import ROOT_DIR
router = APIRouter()
class SnipetForm(BaseModel):
# 标题
title: str
# 语言
language: str
# 代码内容
... | 54 | 16.89 | 76 | 13 | 250 | python | [{"finding_id": "codeql_py/path-injection_6032faefea75516e_41cd4181", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
33
] | [
null
] | [
15
] | [
23
] | |
2024-11-18T20:29:33.538266+00:00 | 1,617,065,947,000 | 3bf57dc66160b2da256b394378e0bc3c2ec8ef24 | 3 | {
"blob_id": "3bf57dc66160b2da256b394378e0bc3c2ec8ef24",
"branch_name": "refs/heads/main",
"committer_date": 1617065947000,
"content_id": "242d6c0c38f8ed9ea43fbfa0fd706b9845112b1e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0c4d0435cf86759a09fc65a40181de6fb2cbfcfc",
"extension": "py",
... | 2.609375 | stackv2 | from flask import Flask, request, render_template, redirect
from datetime import datetime
from models import db, Student
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///students2.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db.init_app(app)
@app.before_first_request
def create_ta... | 101 | 26.61 | 92 | 15 | 622 | python | [{"finding_id": "codeql_py/reflective-xss_7cda6caa5501ee68_b8e73386", "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)."
] | [
58,
69,
97
] | [
null,
null,
null
] | [
12,
16,
16
] | [
56,
60,
60
] | |
2024-11-18T20:29:36.543879+00:00 | 1,579,786,108,000 | 82131e532b213260ee7e27ae40d0f615cbaa5359 | 3 | {
"blob_id": "82131e532b213260ee7e27ae40d0f615cbaa5359",
"branch_name": "refs/heads/master",
"committer_date": 1579786108000,
"content_id": "b8c5faaf9f0a8d885123be6878a94b8aed39c571",
"detected_licenses": [
"MIT"
],
"directory_id": "e9f01caf19704c57a9d6d8858719dc6d31f16ea8",
"extension": "py",
"fi... | 3.015625 | stackv2 | from flask import Flask, request
import json
app = Flask(__name__)
@app.route('/')
def online():
return 'on-line!'
artists = ['Bruno Mars','Jack Johnson','Adele'];
@app.route('/artists', methods=['GET'])
def get_all():
return json.dumps(artists)
@app.route('/artists/<int:index>', methods=['GET'])
def get_b... | 35 | 22.11 | 54 | 9 | 187 | python | [{"finding_id": "codeql_py/reflective-xss_16d5c9b9011ae76f_42b8bfd6", "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)."
] | [
29
] | [
null
] | [
12
] | [
31
] | |
2024-11-18T20:29:36.877547+00:00 | 1,634,642,555,000 | 25fddf1ff7db6ba2791951bf755697dd2281394b | 3 | {
"blob_id": "25fddf1ff7db6ba2791951bf755697dd2281394b",
"branch_name": "refs/heads/master",
"committer_date": 1634642555000,
"content_id": "01264319a0aca4875565919d0cce5196c2d6ce31",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "49fd6f43e57e6d5e61d36ae2aa2bd45909fcf7b8",
"extension": "py"... | 2.609375 | stackv2 | import time
from threading import Timer
import logging
from andinopy.base_devices import terminal
class door_open:
terminal: terminal.terminal = None
inputMode = False
inputString = ""
check_pass: str = None
password_len: int = 6
timer: Timer = None
# Enter your custom rfid cards here
... | 99 | 36.92 | 96 | 19 | 840 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_36f5d7e985d33db8_074c38e2", "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."
] | [
40
] | [
null
] | [
23
] | [
86
] | |
2024-11-18T20:29:40.054011+00:00 | 1,502,384,436,000 | fb55c95c6c6e042aa1e0bf683621e5a1fd95070b | 3 | {
"blob_id": "fb55c95c6c6e042aa1e0bf683621e5a1fd95070b",
"branch_name": "refs/heads/master",
"committer_date": 1502384436000,
"content_id": "4ebb5894074177bb59225aaae58cecf97f633967",
"detected_licenses": [
"MIT"
],
"directory_id": "106db0372588b6193fc42c38b82c2dda723d9abf",
"extension": "py",
"fi... | 2.71875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Extract simulated camera images from a simtel file.
Inspired by ctapipe/examples/read_hessio_single_tel.py
"""
import argparse
import sys
import ctapipe
from ctapipe.io.hessio import hessio_event_source
from matplotlib import pyplot as plt
# histogram types : [‘... | 124 | 32.48 | 104 | 12 | 907 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5c916df2886b68ef_143303e2", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
43
] | [
null
] | [
15
] | [
90
] | |
2024-11-18T20:29:43.286877+00:00 | 1,572,691,053,000 | b3e1b7e97f9dd4afb9b7bd3434a5e7ea43c8e3d6 | 3 | {
"blob_id": "b3e1b7e97f9dd4afb9b7bd3434a5e7ea43c8e3d6",
"branch_name": "refs/heads/master",
"committer_date": 1572691053000,
"content_id": "700517fb95fa0af277af480a087b74d601ea8305",
"detected_licenses": [
"MIT"
],
"directory_id": "43263214e6228185f39ffbd077601dc2fc61c2e4",
"extension": "py",
"fi... | 2.5625 | stackv2 | import os
from flask import Flask, flash, request, redirect, url_for, send_from_directory
from werkzeug.utils import secure_filename
UPLOAD_FOLDER = '/home/twan/iquality/Voice-Clone-Project/Real-Time-Voice-Cloning-master/Real-Time-Voice-Cloning-master/uploads'
ALLOWED_EXTENSIONS = {'wav','mp3','m4a'}
DEFAULT_OUTPUT_AU... | 69 | 45.91 | 152 | 17 | 674 | python | [{"finding_id": "codeql_py/command-line-injection_9fe9ce42d2f88a41_9ceda227", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 3 | true | [
"CWE-078",
"CWE-601",
"CWE-601"
] | [
"py/command-line-injection",
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This command line 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)."
] | [
57,
30,
36
] | [
null,
null,
null
] | [
23,
29,
29
] | [
26,
40,
40
] | |
2024-11-18T20:29:45.102167+00:00 | 1,561,179,452,000 | 0f1dbdcd8a43045edad5959e473e36c8241a3ff5 | 3 | {
"blob_id": "0f1dbdcd8a43045edad5959e473e36c8241a3ff5",
"branch_name": "refs/heads/master",
"committer_date": 1561179452000,
"content_id": "8056fb32b16ae8dc26ebad3a7688058cfa371a10",
"detected_licenses": [
"MIT"
],
"directory_id": "0754bcb7c5d9ad7a8e5fc0d8b5f79b1a9c7136c3",
"extension": "py",
"fi... | 2.671875 | stackv2 | import os
import tarfile
from iso639 import languages
from urllib.request import urlretrieve
def create_resource_folder(path):
if not os.path.exists(path):
os.mkdir(path)
return path
def download_file(url, path, download=True):
file_name = ("/tmp/" + url).split("/")[-1]
full_path = path + "/... | 35 | 22.94 | 61 | 12 | 213 | python | [{"finding_id": "codeql_py/tarslip_10846903ee32fa9c_8210caf6", "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)."
] | [
25
] | [
null
] | [
9
] | [
12
] | |
2024-11-18T20:29:46.072592+00:00 | 1,668,139,164,000 | 450c1ac82071feae1a2c5645c40851720474f99c | 3 | {
"blob_id": "450c1ac82071feae1a2c5645c40851720474f99c",
"branch_name": "refs/heads/master",
"committer_date": 1668139164000,
"content_id": "ac264173747fd57d3af6194b1e44279a6b576ccb",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "7514a08ee5d6d4c5687d8b6d73a1339819f643ac",
"extension": "p... | 3.203125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Yet another implementaion of Crypto-PAn.
This package provides a function to anonymize IP addresses keeping
their prefix consistency. This program is based on the paper
"Prefix-Preserving IP Address Anonymization: Measurement-based
Security Evaluation and a New Crypto... | 175 | 33.98 | 84 | 19 | 1,591 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_a465cad42684c404_44788f6f", "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."
] | [
69,
72
] | [
null,
null
] | [
38,
37
] | [
68,
67
] | |
2024-11-18T20:30:00.703944+00:00 | 1,629,101,939,000 | 889c31a66349cb59f93e32d9ce145327914ddd1b | 3 | {
"blob_id": "889c31a66349cb59f93e32d9ce145327914ddd1b",
"branch_name": "refs/heads/master",
"committer_date": 1629101939000,
"content_id": "618902fe2085e0b2c147be8571377767a938e9e4",
"detected_licenses": [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
],
"directory_id": "665cfb93bca4d2600eac4e8f296f7e3166... | 2.65625 | stackv2 | import simplejson
import requests
from logzero import logger
from token_api import secret
def remote_call(location, endpoint, payload=None):
""" Send HTTP request to API and return output """
url = f"https://{location}{endpoint}"
headers = {
'Content-Type': 'application/json',
'X-Auth-Token':... | 66 | 32.68 | 97 | 16 | 458 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c92fcab6c8b7cb30_04e8281a", "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)."
] | [
15,
17,
44
] | [
null,
18,
47
] | [
24,
24,
20
] | [
73,
68,
47
] | |
2024-11-18T20:51:20.479715+00:00 | 1,666,209,939,000 | eb22b297f4968e22cb0c92ff2e0d8e5ccf08b8a9 | 3 | {
"blob_id": "eb22b297f4968e22cb0c92ff2e0d8e5ccf08b8a9",
"branch_name": "refs/heads/master",
"committer_date": 1666209939000,
"content_id": "ceb63b9ac28b2a252c22c4837eadf69e9d537405",
"detected_licenses": [
"MIT"
],
"directory_id": "f10e1715a15e93d70d9f1c8ed101c19c7624a987",
"extension": "py",
"fi... | 3.171875 | stackv2 | # pylint: disable=E1135,E1136
from flask import Flask, request
import datetime
app = Flask(__name__)
@app.route('/')
def home():
datestr = datetime.datetime.now()
return f"""<html><body>Welcome!
The time is {datestr}.
<a href="/page2">Click here</a> for page 2.
</body></html>"""
@app.route('/pag... | 36 | 21.5 | 58 | 11 | 234 | python | [{"finding_id": "codeql_py/flask-debug_57670006a0a56876_c1358f39", "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)."
] | [
35,
29
] | [
null,
31
] | [
5,
12
] | [
42,
50
] | |
2024-11-18T20:51:26.814185+00:00 | 1,621,835,812,000 | 33bbbc435d76b06b36aa5c6b207951839fb4f878 | 4 | {
"blob_id": "33bbbc435d76b06b36aa5c6b207951839fb4f878",
"branch_name": "refs/heads/master",
"committer_date": 1621835812000,
"content_id": "5a7437551356a9c32549198a4a54490cdde642de",
"detected_licenses": [
"MIT"
],
"directory_id": "8d93cb4da642cbc5e12fc70a2f6d1503c4bf1550",
"extension": "py",
"fi... | 4.15625 | stackv2 | """
Given an array of intervals representing ‘N’ appointments, find out if a person can attend all the appointments.
Example 1:
Appointments: [[1,4], [2,5], [7,9]]
Output: false
Explanation: Since [1,4] and [2,5] overlap, a person cannot attend both of these appointments.
Example 2:
Appointments: [[6,7], [2,4], [8,12... | 33 | 36.88 | 112 | 14 | 380 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2fc3cffb506d3d2f_34d176e7", "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.", "... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
30,
31,
32,
33
] | [
null,
null,
null,
null
] | [
11,
11,
11,
11
] | [
103,
104,
103,
103
] | |
2024-11-18T19:07:10.734602+00:00 | 1,529,999,466,000 | 70cb258832a4fec4e97e59e26ab3df383de0d59f | 3 | {
"blob_id": "70cb258832a4fec4e97e59e26ab3df383de0d59f",
"branch_name": "refs/heads/master",
"committer_date": 1529999466000,
"content_id": "881d6b7bc69b421d22200410063345bf8a5ccd2a",
"detected_licenses": [
"MIT"
],
"directory_id": "eacbe2a55f3e5a1f9cbb396132d891791fe7055a",
"extension": "py",
"fi... | 3.328125 | stackv2 | class Animal(object):
pass
class Dog(Animal):
def __init__(self,name):
self.name=name
class Cat(Animal):
def __init__(self,name):
self.name=name
class Person(object):
def __init__(self,name):
self.name=name
self.pet=None
class Employee(Person):
def __init__(self,name,sal... | 40 | 18.05 | 42 | 11 | 215 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_51a062789c1198cb_ea243d35", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
32
] | [
null
] | [
7
] | [
12
] | |
2024-11-18T19:07:57.069739+00:00 | 1,646,300,743,000 | 70ae970e3f748f692a8866a39e1e57b7d5a2fc3f | 2 | {
"blob_id": "70ae970e3f748f692a8866a39e1e57b7d5a2fc3f",
"branch_name": "refs/heads/master",
"committer_date": 1646300743000,
"content_id": "3c5bef390f8c112d061a806981655c9bb5a5eb24",
"detected_licenses": [
"MIT"
],
"directory_id": "07d33cd6ea61ab29f1235b9b18514c7bb2c86eed",
"extension": "py",
"fi... | 2.5 | stackv2 | import re
from discord import File, Embed
from discord.ext import commands
import discord
from functools import wraps
URL_REGEX = re.compile(
r'^(?:http|ftp)s?://' # http:// or https://
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' # domain...
r'localhost|' # local... | 87 | 24.64 | 101 | 12 | 679 | python | [{"finding_id": "codeql_py/redos_93aede1eec301385_58cf1dd4", "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 'ftp://localhost' and containing m... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with 'ftp://localhost' and containing many repetitions of '//'.",
"This part of the regular expression may cause exponential backtracking on strings starting with 'ftp://localhost/' and containing many repetitions of '!/'.... | [
13,
13
] | [
null,
null
] | [
7,
17
] | [
23,
21
] | |
2024-11-18T19:18:15.612259+00:00 | 1,587,922,091,000 | f8392cf177c95afd28e1779c085c44da0f766974 | 2 | {
"blob_id": "f8392cf177c95afd28e1779c085c44da0f766974",
"branch_name": "refs/heads/master",
"committer_date": 1587922091000,
"content_id": "0ac594fe689f551db2388a2628c2b66a4133f1bf",
"detected_licenses": [
"MIT"
],
"directory_id": "02d7b7e167c70867d6a024f8600099a8468e985c",
"extension": "py",
"fi... | 2.5 | stackv2 | #!/usr/bin/env python3
# =============================================================================
# System imports
import argparse
import pprint
import logging
import logging.config
import os
import re
import yaml
from pprint import pformat
from time import sleep
from requests.exceptions import ConnectionError
... | 148 | 40.31 | 159 | 25 | 1,088 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_51add3e293d028aa_d852e105", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text."
] | [
113
] | [
null
] | [
29
] | [
95
] | |
2024-11-18T19:18:16.835041+00:00 | 1,545,036,544,000 | 1df890a3a4c7016916d1a23175802aacdc6dd8d2 | 3 | {
"blob_id": "1df890a3a4c7016916d1a23175802aacdc6dd8d2",
"branch_name": "refs/heads/master",
"committer_date": 1545036544000,
"content_id": "a60bf0ccefb4cefae8b516f3c1e757d459508be5",
"detected_licenses": [
"MIT"
],
"directory_id": "8d6a82a0bf1f26ed6df4284436a27dd125056f93",
"extension": "py",
"fi... | 3.265625 | stackv2 | #!/usr/bin/env python
import nltk
import re
import string
import json
class FileReader:
@staticmethod
def read_file(name):
""" func to read from file """
with open(name) as fl:
return fl.readlines()
class JsonWriter:
@staticmethod
def write_json(name, jsn):
with o... | 104 | 29.7 | 117 | 18 | 775 | python | [{"finding_id": "codeql_py/overly-large-range_65aafa8917cb9563_66a373cf", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 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 \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].",
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
58,
60
] | [
null,
null
] | [
58,
68
] | [
61,
71
] | |
2024-11-18T19:19:15.687951+00:00 | 1,499,272,501,000 | 03082439481d8dd609503551f06ea50b32d13a35 | 2 | {
"blob_id": "03082439481d8dd609503551f06ea50b32d13a35",
"branch_name": "refs/heads/main",
"committer_date": 1499272501000,
"content_id": "9e86bb9232a7fa553748c85bab7af814d27d70e6",
"detected_licenses": [
"MIT"
],
"directory_id": "c9092777c13c7f09a71b3439368ed2275168303d",
"extension": "py",
"file... | 2.3125 | stackv2 | """ Roosa - A RESTful Ontology Server and Applications """
__author__ = "Jaakko Salonen, Juha Nurmi"
__copyright__ = "Copyright 2012, Jaakko Salonen, Juha Nurmi"
__version__ = "0.2.0"
__license__ = "MIT"
__status__ = "Prototype"
from flask import Flask, Blueprint, url_for, render_template, Response, make_response, req... | 284 | 29.98 | 132 | 20 | 2,233 | python | [{"finding_id": "codeql_py/flask-debug_ce4765bd7afb614e_0135e31f", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
284,
39
] | [
null,
null
] | [
5,
15
] | [
56,
35
] | |
2024-11-18T19:29:41.975981+00:00 | 1,566,234,069,000 | 653b1b64fbc3273d07dbfdf19fefc3a8f715fd8f | 2 | {
"blob_id": "653b1b64fbc3273d07dbfdf19fefc3a8f715fd8f",
"branch_name": "refs/heads/master",
"committer_date": 1566234069000,
"content_id": "fc5179af599978bc25c1f5aad94e3642b7a7bec0",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "1f11157d1dc57dc21554062162fbd7fc6f7f9dd0",
"extension": "p... | 2.375 | stackv2 | #################
#### imports ####
#################
import requests
from flask import Flask, g, render_template,request,redirect,Response,flash,jsonify, make_response
import json
from time import sleep
# Create app
app = Flask(__name__)
app.secret_key = 'my unobvious secret key'
# The maximum allowed payload to 16... | 131 | 32.15 | 98 | 13 | 967 | python | [{"finding_id": "codeql_py/flask-debug_8e68dc4ae2326934_9b6e0ea2", "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.", ... | 7 | true | [
"CWE-215",
"CWE-601",
"CWE-601",
"CWE-601",
"CWE-601",
"CWE-601",
"CWE-601"
] | [
"py/flask-debug",
"py/url-redirection",
"py/url-redirection",
"py/url-redirection",
"py/url-redirection",
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided ... | [
130,
90,
94,
105,
110,
114,
127
] | [
null,
null,
null,
null,
null,
null,
null
] | [
5,
25,
25,
25,
25,
25,
25
] | [
61,
36,
36,
36,
36,
36,
36
] | |
2024-11-18T19:29:55.756563+00:00 | 1,495,573,667,000 | fdc72eebba0e1d0fcbe4d29eff5ddb528f3986ec | 2 | {
"blob_id": "fdc72eebba0e1d0fcbe4d29eff5ddb528f3986ec",
"branch_name": "refs/heads/master",
"committer_date": 1495573667000,
"content_id": "d028bbb057bcd99a43fe9fdf76359ddb3c428e9e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2f90ae0847440337d27bc3c6052703ab2c3f439f",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/env python
import logging
import os
import socket
import time
import uuid
import pg8000
from flask import Flask, jsonify, request
Version = "0.1.0"
pg8000.paramstyle = 'named'
MyHostName = socket.gethostname()
MyResolvedName = socket.gethostbyname(socket.gethostname())
logging.basicConfig(
level=lo... | 310 | 27.23 | 116 | 17 | 2,275 | python | [{"finding_id": "codeql_py/flask-debug_9f79ff546005af48_d3a9a867", "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.", ... | 7 | true | [
"CWE-215",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/flask-debug",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2).",
"This log entry depend... | [
306,
126,
221,
246,
247,
262,
281
] | [
null,
null,
null,
null,
null,
null,
null
] | [
5,
19,
19,
23,
23,
19,
19
] | [
51,
51,
66,
77,
69,
65,
75
] | |
2024-11-18T19:44:25.566587+00:00 | 1,377,441,382,000 | 0e69fc7703a459b35c1fca81335de9681e02ce81 | 2 | {
"blob_id": "0e69fc7703a459b35c1fca81335de9681e02ce81",
"branch_name": "refs/heads/master",
"committer_date": 1377441382000,
"content_id": "87028381099ee441164c9df1d640109a4832830f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "55968ea79db3148b4f8f8ec2936dd6103070ccfb",
"extension": "py"... | 2.40625 | stackv2 | __author__ = 'lwz'
# ----------- namespaced WSGIHandler used by socketio server --------
# ----------- 2013/05/01 -----------
import os
from socketio import socketio_manage
from socketio.handler import SocketIOHandler
from django.core.handlers.wsgi import WSGIHandler
class NSWSGIHandler(WSGIHandler):
"""
enha... | 72 | 35.08 | 83 | 16 | 578 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_27a688eda2b4b162_7d03d2bd", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [socket.io](1) may be at an arbitrary position in the s... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [socket.io](1) may be at an arbitrary position in the sanitized URL."
] | [
54
] | [
null
] | [
12
] | [
40
] | |
2024-11-18T19:58:01.472273+00:00 | 1,532,400,580,000 | c2a6b3a40cb5bc7519ab2220f1c02844afa8b37e | 2 | {
"blob_id": "c2a6b3a40cb5bc7519ab2220f1c02844afa8b37e",
"branch_name": "refs/heads/master",
"committer_date": 1532400580000,
"content_id": "5f9e13332db0fec9044a7133f8fddc33b479cd6d",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "d08f4fe2cee9a08ce7032d54d415512bb3db3ef7",
"extension": "p... | 2.390625 | stackv2 | import socket
import ssl
from pprint import pprint
#context = ssl.create_default_context()
#context = ssl.SSLContext()
#context = ssl.SSLContext(protocol=ssl.PROTOCOL_TLSv1_1)
#context.verify_mode = ssl.CERT_REQUIRED
#context.check_hostname = True
#pprint(context.get_ciphers())
'''
{'aead': False,
'alg_bits': 12... | 51 | 23.47 | 102 | 13 | 391 | python | [{"finding_id": "codeql_py/insecure-protocol_0486ecfa2a1a71af_bbe7411c", "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.SSLContext](1).\nInsecure SSL/TLS protocol... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.SSLContext](1)."
] | [
42
] | [
null
] | [
16
] | [
23
] | |
2024-11-18T19:58:18.684663+00:00 | 1,476,292,294,000 | d789cae20350c13c610af88d337cd151dcf7e251 | 3 | {
"blob_id": "d789cae20350c13c610af88d337cd151dcf7e251",
"branch_name": "refs/heads/master",
"committer_date": 1476292294000,
"content_id": "b411f77427866de57abd060b602eedabb5a3bd5f",
"detected_licenses": [
"MIT"
],
"directory_id": "21d2ce7453eadd0e6f27cbe32ad9b29fa1cb0268",
"extension": "py",
"fi... | 2.75 | stackv2 | __author__ = 'nc4sq'
import os.path
from Crypto.Hash import SHA256
from Crypto import Random
from Crypto.PublicKey import RSA
from Crypto.Cipher import AES
def pad(s):
return s + b"\0" * (AES.block_size - len(s) % AES.block_size)
def secret_string(input_message, enc_input_key):
message = input_message.encode... | 87 | 30.1 | 65 | 17 | 688 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c2a35fdb33237112_5c9d4031", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-326"
] | [
"py/clear-text-logging-sensitive-data",
"py/weak-crypto-key"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable."
] | [
81,
78
] | [
null,
null
] | [
7,
7
] | [
46,
43
] | |
2024-11-18T20:23:29.936035+00:00 | 1,587,409,692,000 | 764b20d921b4092ce38081210bb0c990ff64e942 | 4 | {
"blob_id": "764b20d921b4092ce38081210bb0c990ff64e942",
"branch_name": "refs/heads/master",
"committer_date": 1587409692000,
"content_id": "59d68348400f51fce2665f046150a17c2836d971",
"detected_licenses": [
"MIT"
],
"directory_id": "74a18e974de2c68e8cf6e5fe8f9bd4c996c75397",
"extension": "py",
"fi... | 3.734375 | stackv2 | #!/usr/bin/env python3.6
from user import User
def create_user(username,email,accname,password):
'''
Function to create a new user
'''
new_user = User(username,email,accname,password)
return new_user
def save_users(user):
'''
Function to save user
'''
user.save_user()
def del_user... | 105 | 33.46 | 136 | 19 | 696 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fac504e1a0bfac04_895897e3", "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."
] | [
71,
90
] | [
null,
null
] | [
28,
43
] | [
117,
83
] | |
2024-11-18T20:23:35.955642+00:00 | 1,533,745,209,000 | 895e952dac506fbc3cc64f2d7a0ee505d77430d8 | 3 | {
"blob_id": "895e952dac506fbc3cc64f2d7a0ee505d77430d8",
"branch_name": "refs/heads/master",
"committer_date": 1533745209000,
"content_id": "236d2801088e197be183628a93ccbfbec41a24e4",
"detected_licenses": [
"MIT"
],
"directory_id": "40689e36f3e3b273c64959ab825bd59734a3e2a5",
"extension": "py",
"fi... | 2.625 | stackv2 | import datetime
import hashlib
import hmac
import requests
import time
from decimal import Decimal
_API_URL = 'https://www.bitstamp.net/api/'
def dt(timestamp):
"""
Convert a unix timestamp or ISO 8601 date string to a datetime object.
"""
if not timestamp:
return None
try:
timest... | 238 | 28.43 | 77 | 17 | 1,565 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_aef81a96a1cb8fdf_f1192256", "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."
] | [
81
] | [
null
] | [
34
] | [
41
] | |
2024-11-18T20:48:52.501830+00:00 | 1,533,556,720,000 | 5b53a5b39e6a4b1913c7fed3a25d48b30f0894a3 | 3 | {
"blob_id": "5b53a5b39e6a4b1913c7fed3a25d48b30f0894a3",
"branch_name": "refs/heads/master",
"committer_date": 1533556720000,
"content_id": "ed6616b2d78f54447b8702572cdb3d39c601806d",
"detected_licenses": [
"MIT"
],
"directory_id": "9e10515283e4756744abdeb86229c4f296f1774c",
"extension": "py",
"fi... | 3.28125 | stackv2 | from telegram.ext import Filters
from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove)
from botmother.BotConstructor import BotConstructor
from botmother.Blueprint import Blueprint
from botmother.Conversation import Conversation
"""
This test shows how to construct a conversation with the bot.
Here, we have ... | 149 | 34.4 | 100 | 12 | 1,197 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c27e2054b6ef6562_ac0dcca2", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
81
] | [
82
] | [
8
] | [
29
] | |
2024-11-18T20:48:57.257219+00:00 | 1,395,756,527,000 | 12c368a345c47aaf58f785fc160ce9e3ff4cc9fb | 3 | {
"blob_id": "12c368a345c47aaf58f785fc160ce9e3ff4cc9fb",
"branch_name": "refs/heads/master",
"committer_date": 1395756527000,
"content_id": "88c7fd702e5c3ca5049961eb11052c7f5ba32b8e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ee2ca115ce76aef109f627fd7fa5e7045d11c564",
"extension": "p... | 2.75 | stackv2 | #!/usr/bin/env python
import os,time
from flask import Flask, request, render_template, url_for
import pickle
import isoweek
savefile="/data/web/savefile.p"
savedata=[]
saveLastUpdate=os.path.getmtime(savefile)
sfmt = "%H:%M"
app = Flask(__name__)
def writeSavedata():
savedata.sort()
savedata.reverse()
... | 208 | 25.05 | 95 | 19 | 1,431 | python | [{"finding_id": "codeql_py/flask-debug_1dba83b7ec3e7e0a_a969388e", "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)."
] | [
206,
170
] | [
null,
171
] | [
5,
16
] | [
70,
72
] | |
2024-11-18T20:50:11.708870+00:00 | 1,669,725,340,000 | f8caed626af3ddb130d33d941e8bfd26a13ced9a | 2 | {
"blob_id": "f8caed626af3ddb130d33d941e8bfd26a13ced9a",
"branch_name": "refs/heads/master",
"committer_date": 1669725340000,
"content_id": "a0903d469f5003ce2745b9d854e926b157eafa00",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "94235b2317c46e23c8c0c9e9307320f1a009c74f",
"extension": "py"... | 2.5 | stackv2 | from apdt.general import DataPack
import numpy as np
import pandas as pd
import time
import json
import os
import requests
from apdt.config import _config
def get_weather_history(t,lon,lat,feature='temperature',secret_key=None):
'''Get weather data in the past. This function will have 1 darksky API use.
Para... | 185 | 41.67 | 131 | 20 | 2,135 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_60f4d3ac65a5dce1_45c09731", "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... | 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 (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text.\nThis expression stores [sensitive data (secret)](3) as clear text.\nThis expression stores [sensitive data (secret)](4) as clear text.\nThis expression stores [sensitive data (sec... | [
59,
123
] | [
null,
null
] | [
31,
31
] | [
37,
37
] | |
2024-11-18T20:50:40.648833+00:00 | 1,565,951,490,000 | 9a9b04d6b7fc77343f8d87ffad2c5e04e110ec23 | 2 | {
"blob_id": "9a9b04d6b7fc77343f8d87ffad2c5e04e110ec23",
"branch_name": "refs/heads/master",
"committer_date": 1565951490000,
"content_id": "301496aa14bb3255867bcb68015fa66426705b51",
"detected_licenses": [
"MIT"
],
"directory_id": "a55c0bad9134b09c036fea7d5be9783d0e450fbf",
"extension": "py",
"fi... | 2.359375 | stackv2 | # users/app/views/auth.py
import datetime
from flask.views import MethodView
from flask import request, make_response, jsonify, current_app
from flask_jwt_extended import (
create_access_token,
get_jwt_identity, current_user,
jwt_optional, jwt_required
)
from ..models.user import User, Roles
from ..utils... | 302 | 28.63 | 101 | 20 | 1,864 | python | [{"finding_id": "codeql_py/stack-trace-exposure_f8f6ca8b53efd6c2_69e82124", "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."
] | [
278
] | [
null
] | [
42
] | [
45
] | |
2024-11-18T20:50:47.456752+00:00 | 1,508,885,149,000 | b0cafd43c11166b471a924fd5cf983108ceff114 | 2 | {
"blob_id": "b0cafd43c11166b471a924fd5cf983108ceff114",
"branch_name": "refs/heads/master",
"committer_date": 1508885149000,
"content_id": "ac85c14e557084108a34037184462af3737aebbd",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8976c0a8840174d3b656f2c027108c2c6788b874",
"extension": "py"... | 2.453125 | stackv2 | # Copyright 2011-2012 Yelp
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwa... | 296 | 28.24 | 78 | 20 | 1,997 | python | [{"finding_id": "codeql_py/overly-large-range_af6890d205954b07_d8c35f81", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[0... | 2 | true | [
"CWE-020",
"CWE-1333"
] | [
"py/overly-large-range",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_`a-f\\].",
"This part of the regular expression may cause exponential backtracking on strings starting with ''' and containing many repetitions of '\\\\&'."
] | [
44,
43
] | [
null,
null
] | [
41,
38
] | [
45,
56
] | |
2024-11-18T20:50:55.514413+00:00 | 1,666,297,565,000 | 35d6d2939f799924bb56ad18657fbdb0ed02ff0f | 2 | {
"blob_id": "35d6d2939f799924bb56ad18657fbdb0ed02ff0f",
"branch_name": "refs/heads/main",
"committer_date": 1666297565000,
"content_id": "c9b4e1445b6f97f5435a8e9b143f7bd267dc32df",
"detected_licenses": [
"MIT"
],
"directory_id": "ac5c28044dcad1331aaf11ba2112e5d18ed53472",
"extension": "py",
"file... | 2.390625 | stackv2 | import json
import os
import csv
from django.http import HttpResponse
from rest_framework.views import APIView
from rest_framework.response import Response
from EOSS.data.problem_helpers import assignation_problems, partition_problems
from EOSS.graphql.api import GraphqlClient
from auth_API.helpers import get_or_creat... | 337 | 38.94 | 173 | 24 | 2,588 | python | [{"finding_id": "codeql_py/path-injection_622cfdc595d9dbe0_f4bedd7a", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 4 | true | [
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"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)."
] | [
173,
276,
309,
314
] | [
null,
null,
null,
null
] | [
27,
23,
44,
45
] | [
36,
35,
56,
54
] | |
2024-11-18T20:51:17.337519+00:00 | 1,559,240,091,000 | 56338e926fbf404224b375f4d5ed194de8f5af38 | 3 | {
"blob_id": "56338e926fbf404224b375f4d5ed194de8f5af38",
"branch_name": "refs/heads/master",
"committer_date": 1559240091000,
"content_id": "aaa0d08928eb852c767965afb838514f9c33c9f4",
"detected_licenses": [
"MIT"
],
"directory_id": "6a79b98e1fd1b05e9857e3723b44de10d9a9e160",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Add 2-Step verification password for your openSSH service.
# Fardin Allahverdinazhand
# 0x0ptim0us@gmail.com
import shutil
import hashlib
import sys
import os
import getpass
import readline
import sqlite3
import optparse
readline.parse_and_bind("tab: complete")
__vers... | 368 | 27.82 | 131 | 19 | 2,716 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_6fb415aef98ac94c_1bb3eebb", "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... | 3 | true | [
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"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... | [
73,
165,
336
] | [
null,
null,
null
] | [
35,
37,
37
] | [
52,
75,
75
] | |
2024-11-18T20:51:22.685788+00:00 | 1,540,098,410,000 | 8be7e7985acc94478562818b898597a8399cc990 | 3 | {
"blob_id": "8be7e7985acc94478562818b898597a8399cc990",
"branch_name": "refs/heads/master",
"committer_date": 1540098410000,
"content_id": "1c313f615a5d3d57e72c3049381ae4c7671ebbf2",
"detected_licenses": [
"MIT"
],
"directory_id": "00dd9bdbc68f1525f150806133050ae9268e2ce2",
"extension": "py",
"fi... | 2.875 | stackv2 | import requests
import json
def getBudget(a, b, c):
latitude = a
longitude = b
name = c
url = "https://api.gnavi.co.jp/RestSearchAPI/20150630/?keyid=264a257d88e6a732c7195178e8f86f90&format=json&latitude=" + latitude + "&longitude="+ longitude +"&name=" + name
headers = {"content-type": "applicatio... | 28 | 28 | 175 | 12 | 268 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e39b5711ba23d27b_060b9d81", "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.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text.",
"This expression logs [sensitive data (priva... | [
19,
22
] | [
null,
null
] | [
16,
16
] | [
42,
40
] | |
2024-11-18T21:14:03.498782+00:00 | 1,572,372,086,000 | a6260f256c808d73ba36b1e9602f0eb2d76c54bb | 3 | {
"blob_id": "a6260f256c808d73ba36b1e9602f0eb2d76c54bb",
"branch_name": "refs/heads/master",
"committer_date": 1572372086000,
"content_id": "5be27e21f9e8096c2f8f843d969232624b673fb3",
"detected_licenses": [
"MIT"
],
"directory_id": "d316fb416ab2d6d62e7e4b3ce60dc7013bfa9589",
"extension": "py",
"fi... | 2.546875 | stackv2 | import os
import sys
import requests
import json
from urllib.parse import urlencode
BASE_URL = 'https://www.googleapis.com/youtube/v3/search?'
def search(search_key, playlist=False):
query = {
'q': search_key.replace(' ', '+'),
'maxResults': 10,
'safeSearch': 'none',
'part': 'id,s... | 42 | 29.9 | 92 | 14 | 312 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_31f8e4104d8f2cf8_f51b78e7", "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."
] | [
35
] | [
null
] | [
15
] | [
92
] | |
2024-11-18T21:14:09.237378+00:00 | 1,532,625,012,000 | 342a012b21eddbda9b3c7dfb4938cd9323c88e96 | 3 | {
"blob_id": "342a012b21eddbda9b3c7dfb4938cd9323c88e96",
"branch_name": "refs/heads/master",
"committer_date": 1532625012000,
"content_id": "3205e4fa79d70ee454208e50172c8035d48be22b",
"detected_licenses": [
"MIT"
],
"directory_id": "4e3c283d3820fe3a24ae89649332dfe0a2f0f5b7",
"extension": "py",
"fi... | 2.84375 | stackv2 | from flask import Flask
from flask import request
from flask import render_template
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
db = SQLAlchemy(app)
class Recipe(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = d... | 44 | 26.55 | 72 | 11 | 300 | python | [{"finding_id": "codeql_py/reflective-xss_95821715c599249a_fb5d943d", "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)."
] | [
42
] | [
null
] | [
12
] | [
37
] | |
2024-11-18T21:14:18.838085+00:00 | 1,466,112,760,000 | e3522ebbf3ef0067b135daf6c06d6835ce602a90 | 2 | {
"blob_id": "e3522ebbf3ef0067b135daf6c06d6835ce602a90",
"branch_name": "refs/heads/master",
"committer_date": 1466112760000,
"content_id": "7e46743abc7bdaa7b8546c0f6a908b065404a5c0",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3db0033d5266d73a84ab8cb0385b1b5f718f1d47",
"extension": "p... | 2.453125 | stackv2 | import hashlib
import platform
import subprocess
import tarfile
import tempfile
import shutil
from copy import deepcopy
from inspect import isgeneratorfunction
try:
from urllib2 import urlopen, HTTPError # Py2
except ImportError:
from urllib.request import urlopen, HTTPError # Py3
import imp
import os
import z... | 305 | 27.73 | 79 | 16 | 1,992 | python | [{"finding_id": "codeql_py/tarslip_9d9e3b077fd7ce30_117de8ef", "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)."
] | [
76
] | [
null
] | [
9
] | [
12
] | |
2024-11-18T21:14:20.507385+00:00 | 1,585,969,866,000 | b087ec8dc755cad044e00148d10ff9588321709e | 4 | {
"blob_id": "b087ec8dc755cad044e00148d10ff9588321709e",
"branch_name": "refs/heads/master",
"committer_date": 1585969902000,
"content_id": "62bb168eef6dcbb7bb7e826c6fb3c20751673a9c",
"detected_licenses": [
"MIT"
],
"directory_id": "93cc33805d4e95f2c7e836f23654b2ea0d35604d",
"extension": "py",
"fi... | 3.71875 | stackv2 | #!/usr/bin/env python
# coding: -utf8
import user_input as ui
import random
def validate_number(s):
return int(s)
def generate_password(num_special, num_number, num_min):
assert(num_special + num_number <= num_min)
alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
numbers = "01234... | 46 | 27.87 | 70 | 11 | 310 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_183b67a9cfd68626_fd1517c2", "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."
] | [
46
] | [
null
] | [
11
] | [
62
] | |
2024-11-18T21:14:27.745004+00:00 | 1,687,621,911,000 | a6d01b0347c71a273d71fc15586c239d719b2c3c | 3 | {
"blob_id": "a6d01b0347c71a273d71fc15586c239d719b2c3c",
"branch_name": "refs/heads/main",
"committer_date": 1687621911000,
"content_id": "0685dc8f21e29cb284d52b38d83fdd718365b308",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8214d1a655e18fd395200ffcab2c1bdec60b64da",
"extension": "py"... | 2.875 | stackv2 | import re
from py65.utils.addressing import AddressParser
class Assembler:
Statement = re.compile(r'^([A-z]{3}[0-7]?\s+'
r'\(?\s*)([^,\s\)]+)(\s*[,xXyY\s]*\)?'
r'[,xXyY\s]*)$')
Addressing = (
('zpi', "($00FF)"),
('zpx', "$00FF,X"),
... | 132 | 34.54 | 82 | 21 | 1,057 | python | [{"finding_id": "codeql_py/overly-large-range_2fa37258f04051d4_e4feaaa6", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
6
] | [
null
] | [
33
] | [
37
] | |
2024-11-18T21:14:30.532494+00:00 | 1,553,200,214,000 | f519697e86e1eb0ca261df783f87ecedd6178733 | 2 | {
"blob_id": "f519697e86e1eb0ca261df783f87ecedd6178733",
"branch_name": "refs/heads/master",
"committer_date": 1553200214000,
"content_id": "af394c21ab1e215b2b18b5af0124190f92f79cc3",
"detected_licenses": [
"MIT"
],
"directory_id": "737ead0801e2b8da30f1df31250041c1d43f9f15",
"extension": "py",
"fi... | 2.40625 | stackv2 | import re
from oversimbot.core import chat_domain
class ChatDomainParser:
def __init__(self):
print()
def parse(self, file_path):
f = open(file_path)
domain = chat_domain.ChatDomain()
last_param = ""
response_key = ""
with(f):
for line in f:
... | 30 | 36.77 | 73 | 24 | 212 | python | [{"finding_id": "codeql_py/bad-tag-filter_e2a2e0361a106ae6_e66ac088", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match comments containing newlines."
] | [
16
] | [
null
] | [
33
] | [
44
] | |
2024-11-18T21:14:38.211045+00:00 | 1,543,475,359,000 | 23c7aeba0d208f815d5cd3bf065705612bde9c51 | 3 | {
"blob_id": "23c7aeba0d208f815d5cd3bf065705612bde9c51",
"branch_name": "refs/heads/master",
"committer_date": 1543475359000,
"content_id": "88c6121ee747614d94be78b0a6480b729cc2178d",
"detected_licenses": [
"MIT"
],
"directory_id": "a0aea46bd5fe031699fe55c2630dc6085d230037",
"extension": "py",
"fi... | 2.765625 | stackv2 | from datetime import datetime, timedelta
from urllib.request import Request, urlopen
import gzip
import json
import urllib
import configparser
import db
# Parse configs
config = configparser.ConfigParser()
config.read('../resource/config.txt')
def get_file_title_with_date(target_date) :
return target_date.strft... | 169 | 30.14 | 126 | 18 | 1,132 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_fa93318aff1a2c77_a6136d9d", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com](1) may be at an arbitrary position in the ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [github.com](1) may be at an arbitrary position in the sanitized URL."
] | [
32
] | [
null
] | [
12
] | [
34
] | |
2024-11-18T20:10:46.768456+00:00 | 1,607,852,186,000 | e4d6642d56d97f0696ebe327461fb7c1c75b9aa3 | 2 | {
"blob_id": "e4d6642d56d97f0696ebe327461fb7c1c75b9aa3",
"branch_name": "refs/heads/master",
"committer_date": 1607852186000,
"content_id": "da7d23387dc9cd4a40722dfdfaeb7536d77ffdfa",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "5e79835b72abee4c53a2c7950b1c2c31bcfbd79a",
"extension": "p... | 2.328125 | stackv2 | import base64
from collections.abc import Iterable
from pathlib import Path
from jinja2 import BaseLoader, Environment, Markup, PackageLoader
loader = PackageLoader("report_generator.exporter", "data")
env = Environment(loader=loader)
def _generate_html_rows(*data, with_tr=False):
if not isinstance(data, Iterab... | 280 | 35.16 | 87 | 16 | 2,238 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_65a735f476a7d10f_d545ca2d", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
154,
8
] | [
null,
null
] | [
25,
7
] | [
55,
33
] | |
2024-11-18T20:48:18.247687+00:00 | 1,557,123,790,000 | 4a7c6c44366588c8e26074dc46d0108957b722fc | 2 | {
"blob_id": "4a7c6c44366588c8e26074dc46d0108957b722fc",
"branch_name": "refs/heads/master",
"committer_date": 1557123790000,
"content_id": "7b451eecfcd26a9471a903faeea679f623807f7f",
"detected_licenses": [
"MIT"
],
"directory_id": "d43cbf9488b3cc8211587686f941eb28f5a46342",
"extension": "py",
"fi... | 2.421875 | stackv2 | # Copyright 2019 by Sergio Valqui. All rights reserved.
# libnetscrapr library for interactions with REST api systems
# Cisco Prime, Statseeker, Infoblox
# Author: Sergio Valqui
# Created : 2015/08/09
from bs4 import BeautifulSoup
import getpass
import requests
from requests.auth import HTTPBasicAuth
UserName = getp... | 19 | 27.11 | 78 | 9 | 139 | python | [{"finding_id": "codeql_py/request-without-cert-validation_27d0121c5bc008aa_b83a1f35", "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)."
] | [
16
] | [
null
] | [
8
] | [
79
] | |
2024-11-18T21:11:33.712619+00:00 | 1,581,860,229,000 | ba1441778df08ca503ea3086ce99e0180dcebfe1 | 3 | {
"blob_id": "ba1441778df08ca503ea3086ce99e0180dcebfe1",
"branch_name": "refs/heads/master",
"committer_date": 1581860229000,
"content_id": "1dd84945b02c9a0f63188cba581d37afe04c5953",
"detected_licenses": [
"MIT"
],
"directory_id": "23e3a6b16fba7c287bd0e6dc2be5b533831f6ea8",
"extension": "py",
"fi... | 2.90625 | stackv2 | # app.py
# Required imports
import os
from flask import Flask, request, jsonify
from firebase_admin import credentials, firestore, initialize_app
import face_recognition
import base64
from PIL import Image
from io import BytesIO
# Initialize Flask app
app = Flask(__name__)
# Initialize Firestore DB
cred = credential... | 124 | 32.07 | 120 | 20 | 961 | python | [{"finding_id": "codeql_py/stack-trace-exposure_19923056260f4c64_c0116b1c", "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.", "... | 5 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
33,
52,
66,
79,
120
] | [
null,
null,
null,
null,
null
] | [
16,
16,
16,
16,
16
] | [
40,
40,
40,
40,
41
] | |
2024-11-18T21:11:35.908174+00:00 | 1,617,647,080,000 | ba4e152884b06ae1f72245a785a8d018418d5fa3 | 4 | {
"blob_id": "ba4e152884b06ae1f72245a785a8d018418d5fa3",
"branch_name": "refs/heads/main",
"committer_date": 1617647080000,
"content_id": "7d1bb1117b6ff487c5073a57709f2ca072e40fac",
"detected_licenses": [
"MIT"
],
"directory_id": "eb817a5a5fd66d00906d2ac2574e2ef749780877",
"extension": "py",
"file... | 3.75 | stackv2 | from abc import abstractmethod, ABC
class Employee:
def __init__(self, first_name, last_name, job_title):
self.first_name = first_name
self.last_name = last_name
self.job_title = job_title
def __repr__(self):
return f'{self.first_name} {self.last_name}: {self.job_title}'
cla... | 55 | 25.85 | 70 | 12 | 352 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0f9c7a65ffab1172_233533fd", "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.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text.\nThis expression logs [sensitive data (private)]... | [
48,
55
] | [
null,
null
] | [
8,
8
] | [
9,
9
] | |
2024-11-18T21:11:37.714843+00:00 | 1,624,981,432,000 | 1094733dedd09a98e85cecce73a06705d6afff5c | 3 | {
"blob_id": "1094733dedd09a98e85cecce73a06705d6afff5c",
"branch_name": "refs/heads/main",
"committer_date": 1624981432000,
"content_id": "2e1e8e12979114c186ae07b3b05d28c068c34cf7",
"detected_licenses": [
"MIT"
],
"directory_id": "e9e49fe1c1215617d1a6576bebd3ea3d41304fdf",
"extension": "py",
"file... | 3.46875 | stackv2 | # Problem Set 1, ps1a.py
# Version: 0.12.210526 (rewritten)
# Name: lcsm29
# Collaborators: None
# Time spent (hh:mm): 00:01 (time spent for previous versions excluded)
# (it's short because i rewrote ps1b.py first and made this file based on ps1b.py)
def make_float(query):
while 1:
tmp = input(f"{query}: "... | 51 | 29.82 | 85 | 15 | 449 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4bacd2eb1bbbc6be_b52550f3", "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."
] | [
51
] | [
null
] | [
11
] | [
84
] | |
2024-11-18T21:25:50.991522+00:00 | 1,463,068,908,000 | f91f488561a63b8ef670afbb1d6567a892484725 | 3 | {
"blob_id": "f91f488561a63b8ef670afbb1d6567a892484725",
"branch_name": "refs/heads/master",
"committer_date": 1463068908000,
"content_id": "d158b139f27139cc35447aab27bf0151c4850f30",
"detected_licenses": [
"MIT"
],
"directory_id": "0660f18b77375a44ff7550a5abdc9be0861dfde8",
"extension": "py",
"fi... | 2.8125 | stackv2 | """ Two1 command to join various zerotier networks """
# standard python imports
import subprocess
import logging
# 3rd party imports
import click
from tabulate import tabulate
# two1 imports
from two1.commands.util import decorators
from two1.commands.util import uxstring
from two1.commands.util import zerotier
from... | 103 | 29.59 | 101 | 17 | 708 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e9a6d60d6e9a848e_a19d7b45", "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."
] | [
53
] | [
null
] | [
25
] | [
61
] | |
2024-11-18T21:52:17.064503+00:00 | 1,602,976,098,000 | 4be963c60e9dd92cd3772121a146eb020ea6a97d | 3 | {
"blob_id": "4be963c60e9dd92cd3772121a146eb020ea6a97d",
"branch_name": "refs/heads/master",
"committer_date": 1602976098000,
"content_id": "ef84dcf3b10e5a98619c62c966deb338b9272508",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "373a2c60be74ab1b9c9fc509a6e75de383e6cd4c",
"extension": "p... | 2.859375 | stackv2 | # base page: http://www.cardiped.net/browseDogs.php?start=0&p_f=0&sortBy=name&alpha=a
# outputs are:
# FULL dataset of corgis
saveFileName = 'corgiData_countries_full.json'
# for web scraping
import bs4
from urllib.request import Request, urlopen
# pause
import time
# were are we saving data?
saveFileDir = '/Users... | 228 | 28.19 | 103 | 22 | 1,742 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_8b9a64777d857792_4df74e4c", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text."
] | [
226
] | [
null
] | [
9
] | [
31
] | |
2024-11-18T21:52:28.718018+00:00 | 1,610,143,420,000 | d5f8b85290ad3d03ea2a839a14dc4abafdd310af | 3 | {
"blob_id": "d5f8b85290ad3d03ea2a839a14dc4abafdd310af",
"branch_name": "refs/heads/main",
"committer_date": 1610143420000,
"content_id": "2a22096dcfc35ad0be1f9fde42db661caba518fa",
"detected_licenses": [
"MIT"
],
"directory_id": "239d42c827a547308b9cf639c54c9bfca24aa177",
"extension": "py",
"file... | 2.734375 | stackv2 | '''
Semih Alperen Kayaaltı
150160068
'''
import socket
import time
import random as rd
from Crypto.Cipher import AES, PKCS1_OAEP
from Crypto.PublicKey import RSA
from Crypto.Random import get_random_bytes
import os.path
def pad(s):
return s + (16 - len(s) % 16) * bytes([(16 - len(s) % 16)])
def unpad(s):
retu... | 263 | 40.48 | 123 | 23 | 2,140 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_acc26223d91502f4_635130e7", "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": ... | 5 | true | [
"CWE-327",
"CWE-327",
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is ... | [
132,
256,
158,
178,
188
] | [
null,
null,
null,
null,
null
] | [
20,
37,
37,
37,
33
] | [
43,
62,
62,
62,
58
] | |
2024-11-18T20:31:29.258112+00:00 | 1,658,741,208,000 | b805ffb5257ad4e6a9f5f856b929b1f5a1a6ac01 | 2 | {
"blob_id": "b805ffb5257ad4e6a9f5f856b929b1f5a1a6ac01",
"branch_name": "refs/heads/master",
"committer_date": 1658741208000,
"content_id": "9e0bfa12e4fc91df242ce4b6910422b3639d22ca",
"detected_licenses": [
"MIT"
],
"directory_id": "17129a158a4c1eba65dcda16033a44062df5f38a",
"extension": "py",
"fi... | 2.46875 | stackv2 | import os
#import cv2
import tensorflow as tf
import numpy as np
from keras.preprocessing import image
import json
from flask import Flask, render_template, request, jsonify,abort
from PIL import Image
app=Flask(__name__)
UPLOAD_FOLDER = os.path.basename('.')
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
... | 69 | 36.29 | 90 | 16 | 612 | python | [{"finding_id": "codeql_py/flask-debug_30ef26c58afb390a_cd4c5b6d", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
69,
60
] | [
null,
null
] | [
5,
26
] | [
24,
27
] | |
2024-11-18T20:31:29.916378+00:00 | 1,620,472,971,000 | 9fe0e13aae18240a0c6ec8ce6b736c90601de7a1 | 3 | {
"blob_id": "9fe0e13aae18240a0c6ec8ce6b736c90601de7a1",
"branch_name": "refs/heads/master",
"committer_date": 1620472971000,
"content_id": "c6e104408ee9a50f870508adc61f2fbd3904404f",
"detected_licenses": [
"MIT"
],
"directory_id": "53e8cb2987fb662d8c968f202e39812984b4644e",
"extension": "py",
"fi... | 2.578125 | stackv2 | import os
from age import detect
from os.path import dirname, join
from profanity_filter import ProfanityFilter
from flask import Flask, request, jsonify, url_for
from flask_cors import CORS, cross_origin
app = Flask(__name__)
pf = ProfanityFilter()
CORS(app, support_credentials=True)
@app.route('/')
@cross_origin(... | 56 | 25.64 | 102 | 14 | 340 | python | [{"finding_id": "codeql_py/path-injection_071500cca3e271a9_fbfece48", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
32
] | [
null
] | [
20
] | [
24
] | |
2024-11-18T20:59:40.218099+00:00 | 1,620,334,641,000 | de13f362819b9a101271e90b99b647c46d45d465 | 3 | {
"blob_id": "de13f362819b9a101271e90b99b647c46d45d465",
"branch_name": "refs/heads/main",
"committer_date": 1620334641000,
"content_id": "e01c930419c18dd7aa83121bb5f3a8c6491e3b9b",
"detected_licenses": [
"MIT"
],
"directory_id": "c8fa354aa7327286415ae5ed3ea2e443051cef36",
"extension": "py",
"file... | 2.59375 | stackv2 | from flask import Flask
from flask import request
WEB_SERVER_BIND_ADDRESS = '0.0.0.0'
WEB_SERVER_PORT = 8000
webapp = Flask('hello')
template="""
<!DOCTYPE html>\r\n
<html>\r\n<head>\r\n
<meta charset=\"utf-8\">\r\n
<title>WebHello</title>\r\n
</head>\r\n<body>\r\nHello, \"{addr}\".\r\n</body>\r\n</html>\r\n
"""
@w... | 22 | 22.23 | 65 | 10 | 155 | python | [{"finding_id": "codeql_py/reflective-xss_bc0ebd1779f05680_38c3d6c3", "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)."
] | [
19
] | [
null
] | [
10
] | [
51
] | |
2024-11-18T21:10:32.317013+00:00 | 1,620,013,822,000 | eb6527ef3423b8c8f6cfee1ffe62d38da23ec459 | 3 | {
"blob_id": "eb6527ef3423b8c8f6cfee1ffe62d38da23ec459",
"branch_name": "refs/heads/master",
"committer_date": 1620013822000,
"content_id": "5e7cbce7e49106bcf2f509b9943fba344cec0b89",
"detected_licenses": [
"MIT"
],
"directory_id": "0f9f4aac050e3b2b1ee2723eb71f9abeb4bd404b",
"extension": "py",
"fi... | 2.703125 | stackv2 | """
请注意,尽量减少使用这个爬虫,因为对服务器压力大...
"""
from time import sleep
from re import compile
from random import randint
from typing import Any, NamedTuple
from logging import getLogger
from functools import reduce
from json import dumps
from requests import Session
from bs4 import BeautifulSoup
from arrow import get
logger = ge... | 159 | 30.55 | 108 | 20 | 1,409 | python | [{"finding_id": "codeql_py/overly-large-range_daa5f6ba3de05eeb_0986eea1", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\w in the same character class.", "remediation": "", "loc... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with \\w in the same character class."
] | [
30
] | [
null
] | [
44
] | [
47
] | |
2024-11-18T21:10:33.221318+00:00 | 1,689,798,581,000 | b1a863f15e6147f0f0d44d2a4162a728d96b20af | 3 | {
"blob_id": "b1a863f15e6147f0f0d44d2a4162a728d96b20af",
"branch_name": "refs/heads/master",
"committer_date": 1689798581000,
"content_id": "eb3171252f11402cbf8c0b87c138d79df25d068a",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "ea7f16e7b81a1c191256e64a6af6be503db75ba6",
"extension": "py",
... | 2.890625 | stackv2 | # Author: o-o
# Date: 1.16.2020
# Description: Get DVR Credentials.
from collections import OrderedDict
import argparse
import requests
import json
import os
# Gets Data.
# Precondition: A String.
# Postcondition: Display Results.
def connect(header):
# Local Variables.
writer = open("data.csv","w")
# ... | 218 | 31.63 | 177 | 24 | 1,742 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_689b09c3f38da24f_f044f5be", "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."
] | [
59
] | [
null
] | [
34
] | [
133
] | |
2024-11-18T21:10:51.319765+00:00 | 1,565,899,240,000 | 95a60069a21e3160876fe70017de19a30c6a0e69 | 2 | {
"blob_id": "95a60069a21e3160876fe70017de19a30c6a0e69",
"branch_name": "refs/heads/master",
"committer_date": 1565899240000,
"content_id": "a3bb16c1e7b9f8602463d4410509e0229df050c7",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "4930a65ba63565cfa0aaa737be5af44c1eff4967",
"extension": "p... | 2.4375 | stackv2 | #!/usr/bin/env python
""" Minimal executable to the web app development server.
``__main__`` is implemented to allow for this function to be executed directly,
while ``run()`` is defined to allow for execution via ``entry_points`` defined
in the python package setup.
Note:
This should only be used for the develo... | 94 | 38.21 | 115 | 15 | 834 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_de9d36ed8c330725_71402959", "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... | 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 (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."
] | [
58,
59,
62
] | [
null,
null,
null
] | [
18,
18,
18
] | [
84,
69,
84
] | |
2024-11-18T21:10:52.366335+00:00 | 1,477,184,534,000 | 21ffeb9aac4871f9fff6c426b786f6f9e36b562c | 3 | {
"blob_id": "21ffeb9aac4871f9fff6c426b786f6f9e36b562c",
"branch_name": "refs/heads/master",
"committer_date": 1477184534000,
"content_id": "b8ca7ae261b6e683b8e11a1b6b64c60769d0ff3a",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "815061e8c4222d9fc1c419de614d8f0fb8088645",
"exten... | 2.515625 | stackv2 | """Create nice API table of contents."""
import sys
import jinja2
import pkgutil
import websauna.system
import websauna.utils
import websauna.tests
TEMPLATE="""
.. raw:: html
<style>
.toctree-wrapper ul,
.toctree-wrapper li {
list-style: none !important;
font-weight: bol... | 128 | 15.78 | 123 | 15 | 557 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_84bcbb3d79faeb9e_7236371a", "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."
] | [
97
] | [
null
] | [
12
] | [
37
] | |
2024-11-18T21:23:51.597461+00:00 | 1,689,416,579,000 | 90921f36b0e05043521eb4237dfcccd645b6ed98 | 2 | {
"blob_id": "90921f36b0e05043521eb4237dfcccd645b6ed98",
"branch_name": "refs/heads/master",
"committer_date": 1689416579000,
"content_id": "cf67476c18f69b720f32adf3b4f7b79e0deca26f",
"detected_licenses": [
"MIT"
],
"directory_id": "164d914a4fbaca989e84d51bfaf33eb8355eb2a4",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python3
from abc import ABC
from jinja2 import Environment, FileSystemLoader
from textwrap import dedent
from typing import List
import argparse
import copy
import jinja2
import json
import re
class Module(ABC):
def get_module_name(self) -> str:
return re.sub(r'^Module', '', self.__class__.... | 438 | 25.59 | 79 | 17 | 2,807 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ad87da91da55784e_808f09f9", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
376,
399
] | [
null,
null
] | [
19,
15
] | [
78,
64
] | |
2024-11-18T21:37:44.809741+00:00 | 1,465,834,740,000 | d241010621ea0197c1a89c80f5b5c77d5d2ce42d | 3 | {
"blob_id": "d241010621ea0197c1a89c80f5b5c77d5d2ce42d",
"branch_name": "refs/heads/master",
"committer_date": 1465834740000,
"content_id": "081aa439b775c2b01aab074330670b160719f224",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3f7f63bd3ae532a38544ea63a2ab2e2fea1d38d4",
"extension": "py"... | 2.890625 | stackv2 | from abc import ABCMeta
from shutil import rmtree
from subprocess import call
import os
import time
# Abstract class
class Backup(object):
__metaclass__ = ABCMeta
tmpFolder = None
subFoldersNum = None
tmpPostfix = None
tmpFolderDefault = '/tmp/pidropi'
subFoldersNumDefault = 3
def __i... | 89 | 30.7 | 77 | 16 | 624 | python | [{"finding_id": "codeql_py/overly-permissive-file_f7b1b6df0c6365d7_ff3f12a9", "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."
] | [
49
] | [
null
] | [
13
] | [
44
] | |
2024-11-18T21:37:50.914898+00:00 | 1,428,170,392,000 | ade76aed776f7001f8886742280695bbb1f8afbc | 3 | {
"blob_id": "ade76aed776f7001f8886742280695bbb1f8afbc",
"branch_name": "refs/heads/master",
"committer_date": 1428170764000,
"content_id": "79c8c4affaee78ceabaa4c356124c876ce521124",
"detected_licenses": [
"ISC"
],
"directory_id": "0f88b2bfa1bd02b97fa6d2c56995d57790308a00",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask, request, g, Response
from auth import requires_auth
import datetime, json, msgpack, os.path, sqlite3
app = Flask(__name__)
app.config.from_object('config')
insert_query = '''INSERT INTO utmp (host, user, uid, rhost, line, time, updated)
VALUES (:host, :user, :uid, :rhost, ... | 108 | 25.64 | 82 | 16 | 715 | python | [{"finding_id": "codeql_py/reflective-xss_96992a9d2e9352f8_5990a84e", "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)."
] | [
78
] | [
null
] | [
18
] | [
66
] | |
2024-11-18T21:58:56.587380+00:00 | 1,605,581,456,000 | 63f7bdf15e55f4b92b74b262c75ff7199bbd3867 | 3 | {
"blob_id": "63f7bdf15e55f4b92b74b262c75ff7199bbd3867",
"branch_name": "refs/heads/main",
"committer_date": 1605581456000,
"content_id": "99ba880b43efa9b13d2d663eb8e2ef24eab4cc93",
"detected_licenses": [
"MIT"
],
"directory_id": "37d2dab6cb8093a2a11dd3a77834e1a2d45fa36f",
"extension": "py",
"file... | 2.59375 | stackv2 | import requests
import codecs
from parsel import Selector
from models.news_model import NewsModel
import urllib3
jxust_base = 'https://www.jxust.edu.cn'
# 获取新闻列表
def get_news_list(__url__):
news_list = []
req = requests.get(
url=jxust_base + __url__,
verify=False
)
content = codecs.de... | 39 | 26.59 | 104 | 16 | 274 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9c196a77853ced92_d14bb4af", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
13
] | [
16
] | [
11
] | [
6
] | |
2024-11-18T21:59:01.315357+00:00 | 1,636,791,920,000 | 406c0a2cbf4acf6f438fc2cf89747fa3cc69d52e | 2 | {
"blob_id": "406c0a2cbf4acf6f438fc2cf89747fa3cc69d52e",
"branch_name": "refs/heads/main",
"committer_date": 1636791920000,
"content_id": "5de8727fdee8d8a8660ddd6ec5e21f4249a46b89",
"detected_licenses": [
"MIT"
],
"directory_id": "9d7ae7d6dc8b41e415fc1b1b27323f5cdca62d12",
"extension": "py",
"file... | 2.359375 | stackv2 | from django.shortcuts import render, redirect
from django.db import IntegrityError
from django.http import JsonResponse, HttpRequest, HttpResponse, HttpResponseNotFound
import json
import datetime
from .models import *
from .models import Customer
from . utils import cookie_cart, cart_data, guest_order
def store(re... | 170 | 31.32 | 105 | 16 | 1,149 | python | [{"finding_id": "codeql_py/stack-trace-exposure_5ae8036531ad0d6c_e1dabcbb", "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."
] | [
64
] | [
null
] | [
41
] | [
48
] | |
2024-11-18T21:59:01.561548+00:00 | 1,636,079,763,000 | cbe8bf9430a1259f23f4b08aaa4fbe8cef634fa2 | 3 | {
"blob_id": "cbe8bf9430a1259f23f4b08aaa4fbe8cef634fa2",
"branch_name": "refs/heads/main",
"committer_date": 1636079763000,
"content_id": "cb9a9f938d04eef36e03407a81078a1c33754d05",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "abf2ef8ea80a8b3d5d7a66552b9bfa5e61f4964e",
"extension": "py",
... | 3.234375 | stackv2 | from flask import Flask
from markupsafe import escape
from flask import url_for
from flask import request
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
# 默认只能接收get请求,也可以通过route装饰器设置请求类型
@app.route('/method', methods=['GET', 'POST'])
def method():
if request.method == 'GET':... | 59 | 16.37 | 46 | 10 | 319 | python | [{"finding_id": "codeql_py/reflective-xss_ded20a3bf06036af_958f7b00", "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)."
] | [
49
] | [
null
] | [
12
] | [
27
] | |
2024-11-18T22:11:26.542183+00:00 | 1,633,361,606,000 | 968aaaa8b5c6b10e07609c3f22d7456614a10989 | 3 | {
"blob_id": "968aaaa8b5c6b10e07609c3f22d7456614a10989",
"branch_name": "refs/heads/main",
"committer_date": 1633361606000,
"content_id": "3c6d3c2d3a6ad330c3f9dc5e4ce3a0586b35b7c9",
"detected_licenses": [
"MIT"
],
"directory_id": "c3a61a5eb5f52d393912d67fb87ea480b2272073",
"extension": "py",
"file... | 2.8125 | stackv2 | import django.contrib.auth
import string
from secrets import SystemRandom
# chars to use for password, replace ambiguous letters
CHARS = string.ascii_letters.replace("O", "").replace("l", "") + string.digits
def add_user(username, superuser=False):
password = "".join(SystemRandom().choices(CHARS, k=10))
User... | 17 | 32.24 | 78 | 12 | 128 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_27dcc54b33b42450_dfe32955", "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."
] | [
17
] | [
null
] | [
11
] | [
62
] | |
2024-11-18T22:11:28.800698+00:00 | 1,685,461,453,000 | 5b1af24942a1d8083a49e159ee347322aa9b7cbe | 2 | {
"blob_id": "5b1af24942a1d8083a49e159ee347322aa9b7cbe",
"branch_name": "refs/heads/master",
"committer_date": 1685461453000,
"content_id": "17b8068b99e46e524289791bb37520eb4c544253",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "89d2cf1a0945b750d56b516245fa73117f1c2772",
"extension": "py"... | 2.5 | stackv2 | #!/usr/bin/env python3
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#
# generate_pipeline.py
#
# Created: May 19, 2023
# Author: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
from datetime import datetime
import argparse
import req... | 90 | 36.18 | 79 | 18 | 806 | python | [{"finding_id": "codeql_py/request-without-cert-validation_a9f2b7e28c257551_815af66e", "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)."
] | [
29
] | [
null
] | [
9
] | [
58
] | |
2024-11-18T22:24:03.284683+00:00 | 1,552,183,417,000 | 7b66799b82b72c7d5b22196abc879ed695865fd5 | 2 | {
"blob_id": "7b66799b82b72c7d5b22196abc879ed695865fd5",
"branch_name": "refs/heads/master",
"committer_date": 1552183417000,
"content_id": "6a124b1bec60f357a14677dbbc21274f83f7bc97",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "fd132ba890e6f8b98d2139e366f6687fe70b7171",
"extension": "p... | 2.40625 | stackv2 | import logging
import os
import shutil
import tempfile
import textwrap
import prvsnlib
from prvsnlib.utils.file import mkdir_p
from prvsnlib.utils.zip import zipdir
class Packager:
def __init__(self, runbook, roles=None, tmpdir=None, dest=None, cleanup=True, verbose=False):
if roles is None:
... | 127 | 27.12 | 97 | 15 | 774 | python | [{"finding_id": "codeql_py/overly-permissive-file_e410f172751b9e93_0c8bed8f", "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 group readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to group readable."
] | [
102
] | [
null
] | [
9
] | [
30
] | |
2024-11-18T22:24:13.295798+00:00 | 1,487,661,896,000 | 1b69ef57a1c4bc39aa786d692382ef620eb92868 | 3 | {
"blob_id": "1b69ef57a1c4bc39aa786d692382ef620eb92868",
"branch_name": "refs/heads/master",
"committer_date": 1487661896000,
"content_id": "b919acf006d6d6e985929ffd5109bed6d54707e1",
"detected_licenses": [
"MIT"
],
"directory_id": "79259cb601bb3f943fa68a850eab15410794b0c1",
"extension": "py",
"fi... | 2.71875 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
将表结构说明转换为MySQL建表语句
输入: 文本文件(UTF-8) 格式见word文档
Table: FC_MonthlyBadDebtSummary: 月度坏账汇总
字段 类型 AutoIncr Default 说明
Id int(11) yes 主键
BusinessType tinyint(4) no 业务类型 1团购
BadDebtMonth Varchar(16) no 坏账确认月份
CompanyId Int(11) No 公司ID
Amount dec... | 99 | 24.21 | 116 | 15 | 755 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_72ba9f53ec705aca_9b9b5d1b", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
50
] | [
null
] | [
5
] | [
19
] | |
2024-11-18T22:24:13.934134+00:00 | 1,613,580,885,000 | 0d3f44faf61d1ad9742c371e5e6e9f616bdc2c8a | 2 | {
"blob_id": "0d3f44faf61d1ad9742c371e5e6e9f616bdc2c8a",
"branch_name": "refs/heads/master",
"committer_date": 1613580885000,
"content_id": "7e2b62739e064861a334fb13d512ce2d7e04ebce",
"detected_licenses": [
"MIT"
],
"directory_id": "d6f9ca1eff35358dde1a0ef0c553123d322d9c69",
"extension": "py",
"fi... | 2.3125 | stackv2 | import os
import sys
import json
import subprocess
import logging
import tarfile
from .preprocess import preprocess_infer
from .postprocess import postprocess
from .get_alignments import GetAlignments
from ..penman_utils import to_graph_line
from ...defaults import data_dir
logger = logging.getLogger(__name_... | 137 | 48.92 | 109 | 15 | 1,694 | python | [{"finding_id": "codeql_py/tarslip_09cd52ec59405703_c8d50969", "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)."
] | [
67
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T22:24:16.536314+00:00 | 1,493,935,975,000 | 78ccb5b839fe4b584c02076911538261b15b9190 | 2 | {
"blob_id": "78ccb5b839fe4b584c02076911538261b15b9190",
"branch_name": "refs/heads/master",
"committer_date": 1493935975000,
"content_id": "8613f7a3cba89f55c026751ab7fb4fb9ea103539",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c52f67979e8e485d58fc21f50500feb11bfbce5b",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
import json
import os
from flask import Flask
from flask impor... | 155 | 25.25 | 118 | 16 | 1,098 | python | [{"finding_id": "codeql_py/partial-ssrf_227d7a2f3a9e4d89_092c1e50", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
94
] | [
null
] | [
14
] | [
30
] | |
2024-11-18T22:24:16.879862+00:00 | 1,589,098,454,000 | 3c687fd3ea7750c3471e2817f99053eed23c051f | 3 | {
"blob_id": "3c687fd3ea7750c3471e2817f99053eed23c051f",
"branch_name": "refs/heads/master",
"committer_date": 1589098454000,
"content_id": "1181af8d5749cf3f13d4d27bb45c353eec08a212",
"detected_licenses": [
"Unlicense"
],
"directory_id": "97c612ef7145d8cb2d6d7c1e18d167d4bf280495",
"extension": "py",... | 2.8125 | stackv2 | import logging
from kubernetes.client import V1Secret
from k8s_client.consts import DEFAULT_NAMESPACE
from k8s_client.utils import convert_obj_to_dict, field_filter, k8s_exceptions
from k8s_client.exceptions import K8sInvalidResourceBody, K8sNotFoundException
logger = logging.getLogger(__name__)
class SecretClient(... | 196 | 36.82 | 82 | 19 | 1,470 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_51d50e873106de97_47a1edb1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](... | [
62,
123
] | [
null,
null
] | [
13,
21
] | [
73,
68
] | |
2024-11-18T22:36:06.920833+00:00 | 1,509,154,065,000 | 00d76da22f2730412b1002f3a7a765e54141cc60 | 3 | {
"blob_id": "00d76da22f2730412b1002f3a7a765e54141cc60",
"branch_name": "refs/heads/master",
"committer_date": 1509154065000,
"content_id": "2803c547f2678683fb09c619429b305ea3962269",
"detected_licenses": [
"MIT"
],
"directory_id": "a131c480e237c3642cf495e3276a60bfc0f7d7f7",
"extension": "py",
"fi... | 3.390625 | stackv2 | import json
def save(data):
#dumps是将元素为字典的列表转化成str格式,loads是将str转化成元素为字典的列表格式。
s = json.dumps(data, indent=2, ensure_ascii=False)
with open('students.txt', 'w+', encoding='utf-8') as f:
f.write(s)
def load():
with open('students.txt', 'r', encoding='utf-8') as f:
s = f.read() #s为一个字符串... | 116 | 17.64 | 70 | 12 | 653 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_40d8d0051cd178c3_9bfd3956", "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."
] | [
22
] | [
null
] | [
11
] | [
17
] | |
2024-11-18T22:36:44.032434+00:00 | 1,572,640,515,000 | 5bf6bf599781647af72f4d7e4ac03cd59e61c1c1 | 2 | {
"blob_id": "5bf6bf599781647af72f4d7e4ac03cd59e61c1c1",
"branch_name": "refs/heads/master",
"committer_date": 1572640515000,
"content_id": "053dac3456676cbd3e53e932f8077f9e1d0c4229",
"detected_licenses": [
"BSD-3-Clause",
"MIT"
],
"directory_id": "a47f19fc771e67c27cae22f114e60c5a257e92ed",
"ext... | 2.3125 | stackv2 | import nltk
import os
import requests
import sys
import tarfile
import logging
import gensim
from gensim.scripts.glove2word2vec import glove2word2vec,get_glove_info
import argparse
_aws_bucket_path = 'https://s3.amazonaws.com/mlt-word-embeddings/'
_tar_gz_extn = '.tar.gz'
_current_path = os.path.abspath(os.path.dirn... | 165 | 36.85 | 120 | 17 | 1,306 | python | [{"finding_id": "codeql_py/tarslip_c2464f064d11c984_3c8db7fa", "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)."
] | [
126
] | [
null
] | [
9
] | [
51
] | |
2024-11-18T22:36:47.119860+00:00 | 1,386,127,204,000 | cd81bdb0a34ece1db5a4349d6a7a77f7a620c699 | 2 | {
"blob_id": "cd81bdb0a34ece1db5a4349d6a7a77f7a620c699",
"branch_name": "refs/heads/master",
"committer_date": 1386127204000,
"content_id": "87ad23db712ebaa86b2b4c3776a8d969639b59b4",
"detected_licenses": [
"MIT"
],
"directory_id": "be87379ad26b39a03c99500249d49eea987e146c",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python3
from gen_help import get_backends, get_secret, get_host_map
import datetime
print("# Automatically generated VCL file -- do not edit!")
print("# Last updated: " + datetime.datetime.now().strftime("%Y-%m-%d at %H:%M"))
print("")
backends = get_backends()
for backend in backends:
print("backend... | 68 | 28.16 | 103 | 12 | 569 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a00a649a44b4a89c_72bb2bd7", "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."
] | [
21
] | [
null
] | [
7
] | [
103
] | |
2024-11-18T20:23:25.931382+00:00 | 1,533,490,315,000 | df21859d45a282730e7276d157c8d4da7573b4d2 | 3 | {
"blob_id": "df21859d45a282730e7276d157c8d4da7573b4d2",
"branch_name": "refs/heads/master",
"committer_date": 1533490315000,
"content_id": "b1ed7e838ef28a84bfc85075703d826343630e7f",
"detected_licenses": [
"MIT"
],
"directory_id": "65cc16976e2b92bf51205594f9ab535c968deaf9",
"extension": "py",
"fi... | 3.296875 | stackv2 | #!/usr/bin/env python3
"""
Very simple HTTP server in python for saving POST requests into a folder.
Body should be valid JSON.
Usage::
./collector.py [<port>] [<directory>]
Notes:
- You can pass the filename as a query parameter named `name`.
Ex: http://localhost:8080?name=en.js
"""
from http.server import... | 79 | 28.48 | 97 | 18 | 557 | python | [{"finding_id": "codeql_py/path-injection_853c155f83fd78e8_0264a97d", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 4 | true | [
"CWE-022",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/path-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
55,
32,
32,
39
] | [
null,
null,
null,
null
] | [
19,
64,
80,
35
] | [
27,
78,
97,
49
] | |
2024-11-18T20:23:27.362848+00:00 | 1,654,253,964,000 | dfbdf5e291702b69f6c95aefdd90a0117bf3c8d2 | 3 | {
"blob_id": "dfbdf5e291702b69f6c95aefdd90a0117bf3c8d2",
"branch_name": "refs/heads/master",
"committer_date": 1654253964000,
"content_id": "31990e1d91bf59fba056e758b1980f8d7d5f8025",
"detected_licenses": [
"MIT"
],
"directory_id": "aabbc9899738d3e27b3df75acef2c0730c69f256",
"extension": "py",
"fi... | 2.515625 | stackv2 | import os
import pandas as pd
import numpy as np
import pyarrow
import pyarrow.parquet as pq
import pyarrow.csv as csv
import tarfile
def unpack(tar_fp,data_root):
file = tarfile.open(tar_fp)
file.extractall(data_root)
file.close()
def check_and_load(fp,load_func=csv.read_csv,**kwargs):
if os.path.ex... | 101 | 36.41 | 126 | 13 | 1,026 | python | [{"finding_id": "codeql_py/tarslip_1b57bd9ed44b883e_a7bbe05c", "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)."
] | [
12
] | [
null
] | [
5
] | [
9
] | |
2024-11-18T20:23:36.545788+00:00 | 1,693,417,914,000 | 09e54e3434b34e05739e11cb8d128fd577b38b3a | 2 | {
"blob_id": "09e54e3434b34e05739e11cb8d128fd577b38b3a",
"branch_name": "refs/heads/master",
"committer_date": 1693417914000,
"content_id": "f7cb7f69e6ec0564bdedc43efb7a09073467ce9a",
"detected_licenses": [
"CC0-1.0",
"MIT"
],
"directory_id": "71acb7214efd91c0d327f6d8958e1798eadb4401",
"extensio... | 2.453125 | stackv2 | from scrapy import Spider
from scrapy.http import JsonRequest
from locations.hours import OpeningHours
from locations.items import Feature
class TommyHilfigerAUNZSpider(Spider):
name = "tommy_hilfiger_au_nz"
item_attributes = {"brand": "Tommy Hilfiger", "brand_wikidata": "Q634881"}
allowed_domains = ["au... | 48 | 38.08 | 111 | 31 | 424 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_9696eab276ec4855_79be328c", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [au.tommy.com](1) may be at an arbitrary position in th... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [au.tommy.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [nz.tommy.com](1) may be at an arbitrary position in the sanitized URL."
] | [
20,
22
] | [
null,
null
] | [
16,
18
] | [
46,
48
] | |
2024-11-18T21:22:12.438433+00:00 | 1,558,391,894,000 | 9c1a26bf11c960b6a1960c291d8ff58d29fa7ca5 | 3 | {
"blob_id": "9c1a26bf11c960b6a1960c291d8ff58d29fa7ca5",
"branch_name": "refs/heads/master",
"committer_date": 1558391894000,
"content_id": "4b7bc5f091d837d5cad38ad3694d568c32f3a842",
"detected_licenses": [
"MIT"
],
"directory_id": "3bc99bd05f7294aa7777211eb478af3ab2c53f96",
"extension": "py",
"fi... | 2.546875 | stackv2 | from xml.etree import ElementTree
import requests
api_key = 'cvvxw2n26jggmr2py2z8mj26'
if __name__ == '__main__':
resp = requests.get(f"https://api.sportradar.us/nba/trial/v5/en/league/injuries.xml?api_key={api_key}")
root = ElementTree.fromstring(resp.content)
child = list(root)[0]
print(resp.conten... | 23 | 34.09 | 107 | 13 | 217 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_91fccd02410a06c5_b89a5abd", "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.", ... | 7 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensi... | [
11,
13,
15,
17,
18,
19,
20
] | [
null,
null,
null,
null,
null,
null,
null
] | [
11,
15,
15,
15,
15,
15,
15
] | [
23,
47,
59,
57,
45,
50,
56
] | |
2024-11-18T21:22:26.162388+00:00 | 1,619,142,917,000 | 516a6475e31fd893a4151a38678004533923fe91 | 2 | {
"blob_id": "516a6475e31fd893a4151a38678004533923fe91",
"branch_name": "refs/heads/master",
"committer_date": 1619142917000,
"content_id": "c914738c8fe9ce391364d07bf91115bc61410c9c",
"detected_licenses": [
"MIT"
],
"directory_id": "b42147065c586d1ee93e342512f3770cbd44778e",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
@author: muketong
@file: __init__.py
@time: 2020-08-15
"""
import os
import sys
import json
import re
import gettext
import click
import logging
import prettytable as pt
from . import config
from .utils import colorize
from .source import MangaSource
gettext.install("m... | 186 | 25.3 | 94 | 17 | 1,355 | python | [{"finding_id": "codeql_py/redos_bf58d88cb58bd5e2_6b429dbe", "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 '9-' and containing many repetitio... | 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 '9-' and containing many repetitions of '999-'.",
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '9'.",
"This part of the regular expression may cau... | [
63,
63,
63
] | [
null,
null,
null
] | [
34,
40,
45
] | [
37,
43,
48
] | |
2024-11-18T21:22:29.832995+00:00 | 1,543,201,897,000 | cad566a959e4533a13b0b65d6067cf14fee8da6c | 3 | {
"blob_id": "cad566a959e4533a13b0b65d6067cf14fee8da6c",
"branch_name": "refs/heads/master",
"committer_date": 1543201897000,
"content_id": "822d90e4ae2ef2fe9e5b9900ece8a255980c7423",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "af9c8bc510258054d77c04e0ffbe148919572944",
"extension": "py"... | 2.828125 | stackv2 | """
Controller da aplicacao de autenticacao
"""
from flask import render_template, redirect, request, url_for, flash, abort
from flask_login import login_user, logout_user, login_required
from . import auth
from .. import db
from ..models import Usuario
from .forms import LoginForm, RegistrarForm
@auth.route('/lo... | 55 | 33.31 | 80 | 18 | 384 | python | [{"finding_id": "codeql_py/url-redirection_0c1c698deae996a9_325d497b", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
23
] | [
null
] | [
33
] | [
37
] | |
2024-11-18T21:22:40.577168+00:00 | 1,583,936,584,000 | bce455da050959e3d38a672d990f46170a376da1 | 4 | {
"blob_id": "bce455da050959e3d38a672d990f46170a376da1",
"branch_name": "refs/heads/master",
"committer_date": 1583936584000,
"content_id": "600a0dd0042244bd79efaa69e65331a4f6f06ef4",
"detected_licenses": [
"MIT"
],
"directory_id": "c6331aa485f74964d0c926839dc9168c4324d425",
"extension": "py",
"fi... | 3.5 | stackv2 | ### scraping urls off PoetryFoundation for poems
# importing libraries
from bs4 import BeautifulSoup
import requests
import re
import pandas as pd
import numpy as np
# base url for poetry foundation
url = "https://www.poetryfoundation.org/sitemaps?type=poem&page="
# page number to add onto url (starting at 1 for pag... | 45 | 29.38 | 122 | 12 | 336 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_5d0edda5fe6ce85c_c16edd15", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'poetryfoundation.org/poems/', so it... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'poetryfoundation.org/poems/', so it might match more hosts than expected."
] | [
31
] | [
null
] | [
37
] | [
79
] | |
2024-11-18T21:22:44.315217+00:00 | 1,423,777,724,000 | 7b89f06ab2ede0bff4b6269cc879d471bab0146d | 3 | {
"blob_id": "7b89f06ab2ede0bff4b6269cc879d471bab0146d",
"branch_name": "refs/heads/master",
"committer_date": 1423777724000,
"content_id": "0eb0c763f0bc50395f7f93f037e25c3ee598486d",
"detected_licenses": [
"MIT"
],
"directory_id": "c76095a06702e7baa864af1d2dc3b81f2762edca",
"extension": "py",
"fi... | 2.859375 | stackv2 | #! /usr/bin/env python
# Title: TickTock
# Description: Enumerate user names through observing and comparing response time delays from a web server.
# Author: NulledByte
# Version: 1.0
# Date: 2014-02-11
# License: MIT License
from __future__ import division
import argparse
import pycu... | 135 | 32.53 | 122 | 13 | 1,080 | python | [{"finding_id": "codeql_py/request-without-cert-validation_a87e1dbccd87d6f4_2e03e90b", "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)."
] | [
62
] | [
null
] | [
5
] | [
42
] | |
2024-11-18T21:51:16.388065+00:00 | 1,693,852,193,000 | 24831d5a9289d12727aef411596ff445df31d223 | 2 | {
"blob_id": "24831d5a9289d12727aef411596ff445df31d223",
"branch_name": "refs/heads/master",
"committer_date": 1693852193000,
"content_id": "b7122d0176708260c172b062839d8bb1bdd21f58",
"detected_licenses": [
"MIT"
],
"directory_id": "d9ca334b80467e68105c02d07ede4612e0edb17d",
"extension": "py",
"fi... | 2.484375 | stackv2 | import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
pass
class UserHandler(tornado.web.RequestHandler):
def post(self):
pass
class UserInfoHandler(tornado.web.RequestHandler):
def get(self, id):
self.w... | 36 | 18.56 | 50 | 12 | 165 | python | [{"finding_id": "codeql_py/reflective-xss_dfd24c65acfd11ab_759dd285", "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)."
] | [
18
] | [
null
] | [
20
] | [
22
] | |
2024-11-18T21:51:41.817242+00:00 | 1,622,688,291,000 | b23a16d70675415273844680850c6b4ca425059a | 3 | {
"blob_id": "b23a16d70675415273844680850c6b4ca425059a",
"branch_name": "refs/heads/master",
"committer_date": 1622688291000,
"content_id": "84607c5e8fcd75e2a1ca2e2b76706c6c3fbbb173",
"detected_licenses": [
"MIT"
],
"directory_id": "03422da9f5ec333b6ac0c4f8029d0939e9ba03d0",
"extension": "py",
"fi... | 2.546875 | stackv2 | import uuid
import sys
import json
import urllib.parse as urlparse
import sqlite3
from flask import Flask, request
from flask_cors import CORS
# from lobby.server import Server
# from lobby.client import Client
app = Flask(__name__)
CORS(app)
# connects to db and causes sqlite to run on multithreaded system (suppor... | 114 | 27.96 | 84 | 15 | 764 | python | [{"finding_id": "codeql_py/flask-debug_2fdffd5dfe282e19_9160aac6", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-079",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
114,
52,
110
] | [
null,
null,
null
] | [
5,
16,
16
] | [
35,
34,
31
] | |
2024-11-18T21:51:53.401831+00:00 | 1,687,894,314,000 | 5dd8f8abfa865e463914bdcc3ebb9ca4bdcd6d58 | 3 | {
"blob_id": "5dd8f8abfa865e463914bdcc3ebb9ca4bdcd6d58",
"branch_name": "refs/heads/master",
"committer_date": 1687894314000,
"content_id": "b0f8ecab06c9f93a6dbcfe01948d76ee19e19d73",
"detected_licenses": [
"MIT"
],
"directory_id": "b79345079c803d92209aac1b8a52af5cc4643028",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/bin/env python3
# generate password mac for dovecot
import sys
import os
import getopt
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
import base64
import binascii
def usage():
h = "usage:\t" + sys.argv[0]
h += " [-s salt] password"
print... | 60 | 17.58 | 64 | 11 | 319 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a62aa866ee79bab3_f4633ce0", "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... | [
51
] | [
null
] | [
15
] | [
23
] | |
2024-11-18T21:51:56.562048+00:00 | 1,615,517,706,000 | 36336e73373cd9de710cda2ea9da7c998d29c834 | 2 | {
"blob_id": "36336e73373cd9de710cda2ea9da7c998d29c834",
"branch_name": "refs/heads/master",
"committer_date": 1615517706000,
"content_id": "27c2343cf69b7dc49b6d9cd21bfbc87eeff4ef98",
"detected_licenses": [
"MIT"
],
"directory_id": "f0a54fa8580357d129f6701a107fe02d063e0ea7",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding:utf-8 -*-
import re
import json
import time
import random
import hashlib
import requests
"""
目标APP:酷秀短视频
目标url:APP视频分享链接
爬取思路:
1. 通过APP里的分享获取视频url
2. 对 https://api.17kuxiu.com/dynamic/video/detail/guest 发送post请求,获取json数据
3. 尤其是注意headers里的校验,post请求源代码:
getParams: function(){
var use... | 129 | 34.01 | 115 | 23 | 1,243 | python | [{"finding_id": "codeql_py/overly-large-range_1ba31a0dfb7c3390_d47ebd28", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 2 | true | [
"CWE-020",
"CWE-327"
] | [
"py/overly-large-range",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].",
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](3) is used in a hashing ... | [
61,
74
] | [
null,
null
] | [
66,
23
] | [
69,
43
] | |
2024-11-18T21:51:57.413324+00:00 | 1,497,552,037,000 | ba01cd4485ced61b0aa39055abc04e1022be3d6e | 2 | {
"blob_id": "ba01cd4485ced61b0aa39055abc04e1022be3d6e",
"branch_name": "refs/heads/master",
"committer_date": 1497552037000,
"content_id": "d810b63ee63d91d930a6296bfd118eff881a9e79",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "40cb0f4c98317c06b7837155b6c4d67c13705e35",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/python
# Copyright 2015 Jason Edelman <jason@networktocode.com>
# Network to Code, LLC
#
# 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/LICENS... | 187 | 28.39 | 177 | 17 | 1,215 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e7f84b842b338ea2_a4624523", "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)."
] | [
138,
157,
160
] | [
139,
158,
161
] | [
20,
15,
15
] | [
58,
55,
54
] | |
2024-11-18T21:52:01.015601+00:00 | 1,629,762,713,000 | fd9ad39c262f2c65a9764cba7e6e783856c7ca6a | 3 | {
"blob_id": "fd9ad39c262f2c65a9764cba7e6e783856c7ca6a",
"branch_name": "refs/heads/master",
"committer_date": 1629762713000,
"content_id": "80e8c983ebdf171aa94ce8ce19ca4193c5ba5737",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "dc6a89f3f930775e691bd0c2c0ee67a9e81f6dde",
"extension": "py"... | 2.9375 | stackv2 | #Importing the Dependencies :
from flask import Flask, render_template, Response, request, make_response
import os
import sys
import json
import argparse
from .camera import VideoCamera
#init a Flask application :
app = Flask(__name__ , static_folder='static')
#init Some Values that chnages during the execution :
c=... | 206 | 33.33 | 144 | 19 | 1,499 | python | [{"finding_id": "codeql_py/flask-debug_f524cc768482c1c8_74609cda", "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.", ... | 7 | true | [
"CWE-215",
"CWE-079",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to 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 d... | [
200,
148,
30,
32,
35,
37,
117
] | [
202,
null,
null,
null,
null,
null,
null
] | [
9,
30,
31,
26,
27,
22,
29
] | [
29,
54,
52,
47,
31,
26,
33
] | |
2024-11-18T22:02:41.709534+00:00 | 1,592,619,783,000 | e30d888e8c5abd0b413e5fc0d1757e450ddfcf49 | 3 | {
"blob_id": "e30d888e8c5abd0b413e5fc0d1757e450ddfcf49",
"branch_name": "refs/heads/master",
"committer_date": 1592619783000,
"content_id": "4a0fbe501fb97ee62f57f2fb04977e2c089e24ef",
"detected_licenses": [
"MIT"
],
"directory_id": "ae3aeb093104a417bcebc4c49ec1d2e96d51f16a",
"extension": "py",
"fi... | 2.59375 | stackv2 | # -*- coding: utf-8 -*-
import socket
import threading
import time
import random
import json
mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysocket.bind(('127.0.0.1', 1026))
mysocket.listen(10)
mysocket.setblocking(False)
# mysocket.setsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, 2)
password = ''
for _... | 111 | 30.54 | 97 | 20 | 986 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a55de3252e100807_01645b50", "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."
] | [
15
] | [
null
] | [
7
] | [
15
] | |
2024-11-18T22:02:45.069970+00:00 | 1,487,665,013,000 | d4c46a808e5de8eb30530606b173419641c1294a | 3 | {
"blob_id": "d4c46a808e5de8eb30530606b173419641c1294a",
"branch_name": "refs/heads/master",
"committer_date": 1487665013000,
"content_id": "d998bc87d97e902a295240066af055da85b54bcf",
"detected_licenses": [
"MIT"
],
"directory_id": "3a3908961a143a7e3901e265e100c5e2bc8e52f5",
"extension": "py",
"fi... | 2.671875 | stackv2 | import datetime
import boto3
import os
import fnmatch
from jinja2 import Template
class RevokeSTS(object):
def __init__(
self,
client,
compromised_resource,
dry_run
):
self.client = client
self.compromised_resource = compromised_resource
sel... | 90 | 31.74 | 79 | 14 | 580 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_90e32e6864edce22_2e5fdc58", "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."
] | [
68
] | [
null
] | [
26
] | [
53
] | |
2024-11-18T22:02:46.258908+00:00 | 1,479,871,357,000 | f90e9c091433747047b26a1867d4b2e86726ae6a | 2 | {
"blob_id": "f90e9c091433747047b26a1867d4b2e86726ae6a",
"branch_name": "refs/heads/master",
"committer_date": 1479871357000,
"content_id": "2b604b031ff2911c4a90abae0395c92912b4e063",
"detected_licenses": [
"MIT"
],
"directory_id": "e264d97cce4228c56c938312c116d52537dfa2c3",
"extension": "py",
"fi... | 2.390625 | stackv2 | import click
import os
import subprocess
from collections import namedtuple
from jinja2 import Environment, FileSystemLoader
Urls = namedtuple('Urls', ['fqdn', 'git'])
NGINX_CONFIG_PATH = '/etc/nginx/apps.d'
GIT_PATH = '/opt/serve'
APP_PATH = '/home/serve/apps'
AUTHORIZED_KEYS = '/home/serve/.ssh/authorized_keys'
try... | 194 | 31.26 | 113 | 18 | 1,561 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_9ae02de2ef54c5dc_fcfd2e09", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
21
] | [
null
] | [
7
] | [
80
] | |
2024-11-18T22:16:39.553275+00:00 | 1,533,394,099,000 | 919e2b66bc29733dfedb36477e2c80115a8927ec | 2 | {
"blob_id": "919e2b66bc29733dfedb36477e2c80115a8927ec",
"branch_name": "refs/heads/master",
"committer_date": 1533394099000,
"content_id": "804086ba5748f0584daa69416c1894f136131670",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "478c7e1e325802a06b12a9b11dc19b3881c4041d",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
import requests
from xml.dom import minidom
import json
import os
import re
from flask import Fl... | 109 | 25.32 | 109 | 13 | 748 | python | [{"finding_id": "codeql_py/partial-ssrf_af4d91e7049c5fbd_61ca0900", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
53
] | [
null
] | [
14
] | [
30
] | |
2024-11-18T22:16:45.257607+00:00 | 1,556,793,026,000 | 8fb8f632da1a33be77d9abd9f8a9dddbe5ed9953 | 3 | {
"blob_id": "8fb8f632da1a33be77d9abd9f8a9dddbe5ed9953",
"branch_name": "refs/heads/master",
"committer_date": 1556793026000,
"content_id": "93c094a357d275439b171c3507a679769bd85497",
"detected_licenses": [
"MIT"
],
"directory_id": "4ff69b1aface039bda9cca299b9722379aa1115c",
"extension": "py",
"fi... | 2.671875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""ICU Prediction API: Simulator.
Author: Bas Vonk
Date: 2019-04-01
"""
from random import random, choice, randrange
from datetime import datetime, timedelta
from time import sleep
import logging
from numpy.random import normal
from faker import Faker
import coloredlogs
... | 245 | 35.76 | 118 | 20 | 2,158 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a6f26faeb4b6ff55_c061794c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
122,
181
] | [
null,
null
] | [
25,
33
] | [
69,
118
] | |
2024-11-18T22:28:02.244067+00:00 | 1,580,107,205,000 | 8343c7263fda04548af5efc7b847176be50de1d8 | 3 | {
"blob_id": "8343c7263fda04548af5efc7b847176be50de1d8",
"branch_name": "refs/heads/master",
"committer_date": 1580107205000,
"content_id": "feceb5031e4a7b16654ab70eac6cb5bc9e062520",
"detected_licenses": [
"MIT"
],
"directory_id": "96b4c5592b243cdb28f0e1befcb14e21e65b6dae",
"extension": "py",
"fi... | 3.34375 | stackv2 | from client import Client
from account_details import AccountDetails
import strgen
def create_client(fn, ln, email, password):
"""
Function to create user
"""
new_acc = Client(fn,ln, email, password)
return new_acc
def save_client(client):
"""
Function to save the user to a list
"""
... | 148 | 32.34 | 150 | 24 | 914 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7116ca38d060ba03_e8c8c513", "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."
] | [
115,
132
] | [
null,
null
] | [
35,
27
] | [
150,
128
] | |
2024-11-18T22:44:25.076585+00:00 | 1,489,633,177,000 | 5873297f23d964ee0c97f4e47caf510303279982 | 3 | {
"blob_id": "5873297f23d964ee0c97f4e47caf510303279982",
"branch_name": "refs/heads/master",
"committer_date": 1489633177000,
"content_id": "c8de5426c4253baf4d0a709d3612d88c9a33c363",
"detected_licenses": [
"MIT"
],
"directory_id": "b3b9b09afb684a6d892ac3e693460393e521fb79",
"extension": "py",
"fi... | 2.53125 | stackv2 | from flask import Flask, jsonify, request
from apscheduler.schedulers.background import BackgroundScheduler
import feedparser
import maya
import hashlib
import json
import redis
import logging
import requests
import time
# create the scheduler
scheduler = BackgroundScheduler()
# connect to redis
rdb = redis.StrictRed... | 307 | 31.33 | 103 | 24 | 2,189 | python | [{"finding_id": "codeql_py/stack-trace-exposure_9bbf4367fa15997b_821623e1", "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.", "... | 6 | true | [
"CWE-209",
"CWE-209",
"CWE-918",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/full-ssrf",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"The full URL of this request depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value... | [
182,
188,
167,
162,
238,
255
] | [
null,
null,
null,
null,
null,
null
] | [
36,
24,
21,
33,
25,
25
] | [
39,
27,
50,
67,
61,
68
] | |
2024-11-18T20:24:20.933042+00:00 | 1,532,349,555,000 | c07bf6fb1cb98dcef4a9fd3a483c7daafc7ea1fb | 2 | {
"blob_id": "c07bf6fb1cb98dcef4a9fd3a483c7daafc7ea1fb",
"branch_name": "refs/heads/master",
"committer_date": 1532349555000,
"content_id": "f44534953f4dcfc45123fe830f9be6037c03d051",
"detected_licenses": [
"MIT"
],
"directory_id": "a93d38690f581a550c5f10957aaa2e30ff874ad2",
"extension": "py",
"fi... | 2.359375 | stackv2 | import sys
from logging import getLogger, ERROR
getLogger('scapy.runtime').setLevel(ERROR)
from scapy.all import *
from scapy.all import IP, sniff
from scapy.layers import http
from multiprocessing import Process
from threading import Thread
interface = sys.argv[1]
usernames = ['']
passwords = ['']
def process_int... | 68 | 25.16 | 128 | 19 | 502 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_74d04b5a091830b7_50da73ed", "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."
] | [
37
] | [
null
] | [
10
] | [
54
] | |
2024-11-18T20:59:38.354250+00:00 | 1,548,136,191,000 | 749b34227ee46e88a665e18f3ff9fc22539d2fcc | 3 | {
"blob_id": "749b34227ee46e88a665e18f3ff9fc22539d2fcc",
"branch_name": "refs/heads/master",
"committer_date": 1548190046000,
"content_id": "3c51bc80f6cd39f741926f9ea125139bbe5855ff",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "b90c87ea6ec75d8a76b71cca4aa964dbab6d5ac3",
"extension": "p... | 2.75 | stackv2 | """
Scraping tool to retrieve Flickr photos.
"""
import numpy as np
import flickrapi
from collections import OrderedDict
import re
import time
import pandas as pd
general_metadata_parser = (
('id', (str, 'N/A')),
('owner', (str, 'N/A')),
('title', (str, 'N/A')),
('o_width', (int, -1)),
('datetake... | 299 | 31.25 | 80 | 21 | 2,198 | python | [{"finding_id": "codeql_py/overly-large-range_8a6977ae5e1f5913_9b69bf11", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
102
] | [
null
] | [
23
] | [
26
] | |
2024-11-18T20:59:42.801960+00:00 | 1,525,093,022,000 | 0c76ceef4ee7c6bd3e16bbaf2a95aa2bb2e0c516 | 2 | {
"blob_id": "0c76ceef4ee7c6bd3e16bbaf2a95aa2bb2e0c516",
"branch_name": "refs/heads/master",
"committer_date": 1525093022000,
"content_id": "d7b8b8a56fad02b214546bd7789463fde6bef31c",
"detected_licenses": [
"MIT"
],
"directory_id": "5d35a76ca602dc5fde3c2ead445295924000dbb3",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python2.7
'''
#TODO: still writing to file?
5. I edited a different show.html and server.py somewhere
'''
import os
import subprocess
import utils
from flask import Flask, request, render_template, g, redirect, Response, send_from_directory
tmpl_dir = os.path.join(os.path.dirname(os.path.abs... | 86 | 17.95 | 155 | 14 | 399 | python | [{"finding_id": "codeql_py/command-line-injection_f631170df438139b_d1dfb37d", "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)."
] | [
31
] | [
null
] | [
31
] | [
34
] | |
2024-11-18T20:59:43.410526+00:00 | 1,644,479,424,000 | ba135cb35329dccb55ede75bbe0a99a08b2175e1 | 3 | {
"blob_id": "ba135cb35329dccb55ede75bbe0a99a08b2175e1",
"branch_name": "refs/heads/master",
"committer_date": 1644479424000,
"content_id": "4b122b689bafb3bb9fe8d300ca3af4a8838b2750",
"detected_licenses": [
"MIT"
],
"directory_id": "76c2696db1657a29e33a19ca5d9aae12dc0b2aac",
"extension": "py",
"fi... | 2.546875 | stackv2 | from flask import request, redirect, url_for, render_template
from werkzeug.utils import secure_filename
import os, shutil
from app import app, classifier
def allowed_file(filename):
'''
Checks if a given file `filename` is of type image with 'png', 'jpg', or 'jpeg' extensions
'''
ALLOWED_EXTENSIONS =... | 49 | 35.76 | 94 | 16 | 386 | python | [{"finding_id": "codeql_py/url-redirection_7bcfbe6884cb83e0_f866d931", "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_... | 2 | true | [
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
23,
29
] | [
null,
null
] | [
29,
29
] | [
40,
40
] | |
2024-11-18T21:00:01.381206+00:00 | 1,556,531,768,000 | 9856fcd2254a72c4f79cb7d7d19618b3f680ccb8 | 2 | {
"blob_id": "9856fcd2254a72c4f79cb7d7d19618b3f680ccb8",
"branch_name": "refs/heads/master",
"committer_date": 1556531768000,
"content_id": "63bc13a773a201678f32e714759c6a9d780b6b81",
"detected_licenses": [
"MIT"
],
"directory_id": "bea482594d8f91fb4eafd2054b20f01b3bfcab28",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python3
# using (once again) http://blog.luisrei.com/articles/flaskrest.html
# Lab 4 server for 50.020 - vulnerable to XSS, SQLi, Command injection
# Nils, SUTD, 2017
# Z. TANG and Andrei Bytes, 2019.
from flask import Flask, render_template,request,redirect,make_response,session
import sqlite3
import o... | 117 | 31.74 | 140 | 16 | 947 | python | [{"finding_id": "codeql_py/command-line-injection_57f11f42e3bc8583_3108a394", "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": {... | 5 | true | [
"CWE-078",
"CWE-312",
"CWE-215",
"CWE-327",
"CWE-089"
] | [
"py/command-line-injection",
"py/clear-text-logging-sensitive-data",
"py/flask-debug",
"py/weak-sensitive-data-hashing",
"py/sql-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"This expression logs [sensitive data (password)](1) as clear text.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"[Sensitive data (password)](1) is used in a hashing algorith... | [
82,
38,
117,
20,
39
] | [
null,
null,
null,
null,
null
] | [
31,
15,
5,
27,
19
] | [
34,
88,
34,
64,
92
] | |
2024-11-18T21:00:09.999185+00:00 | 1,355,247,260,000 | 4fc96ce2df1f429dd5c350a2c92a306ad09790ed | 3 | {
"blob_id": "4fc96ce2df1f429dd5c350a2c92a306ad09790ed",
"branch_name": "refs/heads/master",
"committer_date": 1355247260000,
"content_id": "4e5fa0348359103ff088d502228229decc1f140e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2b49d2b89d932b14c2eb898a7b1bcaa150afcd41",
"extension": "p... | 2.734375 | stackv2 | import shutil
import os
import types
import util
def create_source(src, **keywds):
"""
Wrapper to create a Source object.
@param src - Path to the source object.
@param **keywds - Passed to the underlying source object.
"""
ret = None
if type(src) == types.StringType:
... | 372 | 35.92 | 105 | 18 | 3,039 | python | [{"finding_id": "codeql_py/overly-permissive-file_dee28bd2f8d9cbbe_a9e78a3a", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable."
] | [
352
] | [
null
] | [
9
] | [
51
] | |
2024-11-18T21:00:10.753453+00:00 | 1,535,096,453,000 | 8164671a372afa2d082fa2546d8883cd1c626ad2 | 2 | {
"blob_id": "8164671a372afa2d082fa2546d8883cd1c626ad2",
"branch_name": "refs/heads/master",
"committer_date": 1535096453000,
"content_id": "807fd105b39992050aff8630172a762202eaa29d",
"detected_licenses": [
"ISC"
],
"directory_id": "3360bce3151aa8745b18c7566e3c15757fd85aa6",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python
import argparse
import atexit
import os
import signal
import sys
import json
import time
from flask import Flask, g, flash, request, redirect, render_template, make_response, url_for
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLo... | 209 | 32.22 | 102 | 19 | 1,645 | python | [{"finding_id": "codeql_py/flask-debug_c0f3f9d13bf272e0_37406a47", "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)."
] | [
189,
116
] | [
null,
null
] | [
9,
30
] | [
44,
48
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.