added
stringlengths
32
32
created
int64
1,244B
1,694B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.25
source
stringclasses
1 value
text
stringlengths
324
20.1k
num_lines
int64
16
598
avg_line_length
float64
15.1
58.3
max_line_length
int64
33
179
ast_depth
int64
8
39
length
int64
101
3.8k
lang
stringclasses
1 value
sast_codeql_findings
stringlengths
1.1k
265k
sast_codeql_findings_count
int64
1
45
sast_codeql_success
bool
1 class
sast_codeql_error
stringclasses
1 value
cwe_ids
listlengths
1
45
rule_ids
listlengths
1
45
confidences
listlengths
1
45
severities
listlengths
1
45
messages
listlengths
1
45
line_starts
listlengths
1
45
line_ends
listlengths
1
45
column_starts
listlengths
1
45
column_ends
listlengths
1
45
2024-11-18T20:18:48.595124+00:00
1,625,668,494,000
b42d44387d8bbdccdeb691b89778c11b6af385d5
3
{ "blob_id": "b42d44387d8bbdccdeb691b89778c11b6af385d5", "branch_name": "refs/heads/master", "committer_date": 1625668494000, "content_id": "7227139283bec0789b7dfd565513024b835115fd", "detected_licenses": [ "Python-2.0", "MIT" ], "directory_id": "5f9ca0fa06eb34965c7fe57d7e54adb9827694fd", "exten...
2.640625
stackv2
import hashlib import os from os.path import join, dirname from flask import Flask, request, jsonify import jwt from dotenv import load_dotenv #Load the environment envpath = join(dirname(__file__),'../.env') load_dotenv(envpath) app = Flask(__name__) port = os.getenv('PORT') api_key = os.getenv('NEXMO_API_KEY') # ...
61
27.93
85
14
436
python
[{"finding_id": "codeql_py/stack-trace-exposure_ac1824ec5fda9a3e_f28aa12e", "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." ]
[ 35 ]
[ null ]
[ 17 ]
[ 23 ]
2024-11-18T20:18:49.581928+00:00
1,553,959,697,000
def1891e7748c3a6b374aa906a44d4f825cdce6a
2
{ "blob_id": "def1891e7748c3a6b374aa906a44d4f825cdce6a", "branch_name": "refs/heads/master", "committer_date": 1553959697000, "content_id": "fe74be9fd1a3d9fdffb5b6f787e7de38358616cc", "detected_licenses": [ "MIT" ], "directory_id": "88486b98a78ab6d07a4d952c72a38f8276d7b13a", "extension": "py", "fi...
2.484375
stackv2
from flask import Flask, render_template import requests app = Flask(__name__) app.config["DEBUG"] = True @app.route('/') def home(): return render_template("index.html") @app.route('/learn') def learn(): return render_template("learn.html") @app.route('/track1') def track1(): return render_template("track1....
36
17.83
40
9
163
python
[{"finding_id": "codeql_py/reflective-xss_813425f163935726_530598f9", "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)." ]
[ 33 ]
[ null ]
[ 9 ]
[ 21 ]
2024-11-18T20:51:27.499873+00:00
1,620,854,211,000
e28291d878c6d841f7aa163a972c2867ca42cd0f
3
{ "blob_id": "e28291d878c6d841f7aa163a972c2867ca42cd0f", "branch_name": "refs/heads/master", "committer_date": 1620854211000, "content_id": "b4af6d50931dd66283f4809ff4e0867b4f7f1817", "detected_licenses": [ "MIT" ], "directory_id": "9528b4fd9eb5e539177aacdb5232dc1626916e30", "extension": "py", "fi...
2.75
stackv2
#!/usr/bin/env python3 from math import atan2,degrees,sin,cos,pi,sqrt,fabs from collections import namedtuple import jinja2 import sys StarPosition = namedtuple('StarPosition','cx cy angle') cn_flag_template = jinja2.Template( ''' <?xml version="1.0" standalone="no"?> <svg id="cn-flag" width="600" height="400" view...
72
33.56
141
12
934
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_777a694993ca46d5_b4d2522f", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 10 ]
[ 40 ]
[ 20 ]
[ 14 ]
2024-11-18T20:51:46.533476+00:00
1,683,906,382,000
de3dc120913ae6d7c6a02658ee40beea20f0013e
3
{ "blob_id": "de3dc120913ae6d7c6a02658ee40beea20f0013e", "branch_name": "refs/heads/master", "committer_date": 1683906382000, "content_id": "ef8915dd246e66369e61a6abf09199104abca9e1", "detected_licenses": [ "MIT" ], "directory_id": "11734a8153ff53e87b63f043b504173843c30c0f", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python """ Create desktop shortcuts for Linux """ import os import sys HAS_PWD = False try: import pwd HAS_PWD = True except ImportError: pass from .shortcut import shortcut, get_pyexe from . import UserFolders scut_ext = 'desktop' ico_ext = ('ico', 'svg', 'png') DESKTOP_FORM = """[Deskto...
152
31.04
83
17
1,158
python
[{"finding_id": "codeql_py/overly-permissive-file_75859fb7cca1167a_f41ba684", "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." ]
[ 151 ]
[ null ]
[ 13 ]
[ 32 ]
2024-11-18T19:07:12.624390+00:00
1,605,489,816,000
acf4802a59efdf6b4d38511261256d0f8a569881
3
{ "blob_id": "acf4802a59efdf6b4d38511261256d0f8a569881", "branch_name": "refs/heads/main", "committer_date": 1605489816000, "content_id": "dcb605a272116903c47b08ab170d04187076b174", "detected_licenses": [ "MIT" ], "directory_id": "4ea5e9ad71f58d81922fc523c75c44808b5ee5f9", "extension": "py", "file...
2.671875
stackv2
from flask import Flask ,request,redirect,url_for, jsonify import json app = Flask(__name__) # Port number is required to fetch from env variable # http://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#PORT Json = "NULL" #cf_port = os.getenv("PORT") #pull credentials for database externally def...
76
26.2
99
17
465
python
[{"finding_id": "codeql_py/flask-debug_484b6eb512e2fe99_58e5206a", "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)." ]
[ 75, 59, 72 ]
[ null, null, null ]
[ 6, 16, 12 ]
[ 50, 22, 16 ]
2024-11-18T19:07:23.579903+00:00
1,545,767,441,000
2b11d26b6c2ee0c3b45a49e58010c48e7fefd1b4
2
{ "blob_id": "2b11d26b6c2ee0c3b45a49e58010c48e7fefd1b4", "branch_name": "refs/heads/master", "committer_date": 1545767441000, "content_id": "fef232730384f57e9bff4482ef21e74ccf233a61", "detected_licenses": [ "MIT" ], "directory_id": "fc1bb3f869ccd10817894b1d3638865416fe4e8f", "extension": "py", "fi...
2.421875
stackv2
import pyart import os import math OUTFILE = '/Users/clancygreen/Dropbox/Uber/Data/Precipitation/sample3.csv' BASE = '/Users/clancygreen/Dropbox/Uber/Data/Precipitation/Sample NEXRAD Level 3 Files/' INDIRS = ['NWS_NEXRAD_NXL3_KOKX_20140703000000_20140703235959', 'NWS_NEXRAD_NXL3_KOKX_20140516000000_20140516235959'...
169
27.09
102
20
1,592
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_80a0396bf05161fd_defef424", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text." ]
[ 138 ]
[ null ]
[ 18 ]
[ 65 ]
2024-11-18T19:07:38.929615+00:00
1,626,000,489,000
52fa1dd7460aba696c5ec41b4a94e212a025245c
3
{ "blob_id": "52fa1dd7460aba696c5ec41b4a94e212a025245c", "branch_name": "refs/heads/master", "committer_date": 1626000489000, "content_id": "8fd9cf4100483c10b41d907d4c0e5bf032aa4b53", "detected_licenses": [ "MIT" ], "directory_id": "731d3a0c960d441895b6b105bb4043eb41078821", "extension": "py", "fi...
2.578125
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import itertools import json import logging import os import re import tempfile import traceback from string import ascii_lowercase from typing import List from lxml import html def num_to_alpha(num): pairs = {'0': 'zero', '1': 'one', '2': 'two', '3': 'three', '4': ...
161
30.43
104
19
1,352
python
[{"finding_id": "codeql_py/overly-large-range_9108b05014a140b3_cac69346", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "remediatio...
9
true
[ "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020" ]
[ "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range ...
[ 142, 142, 142, 142, 142, 142, 143, 143, 143 ]
[ null, null, null, null, null, null, null, null, null ]
[ 34, 37, 40, 43, 46, 49, 34, 37, 46 ]
[ 38, 41, 44, 47, 50, 53, 38, 41, 50 ]
2024-11-18T19:07:41.871791+00:00
1,693,477,536,000
aece30d76727dba19c8c21b3c5036ad127a73988
2
{ "blob_id": "aece30d76727dba19c8c21b3c5036ad127a73988", "branch_name": "refs/heads/master", "committer_date": 1693477536000, "content_id": "e47a22a02783b50ec2e777b942130c7d3b028434", "detected_licenses": [ "MIT" ], "directory_id": "c9500ad778b8521aaa85cb7fe3239989efaa4799", "extension": "py", "fi...
2.40625
stackv2
import komand from .schema import SearchInput, SearchOutput # Custom imports below import json import requests import os class Search(komand.Action): def __init__(self): super(self.__class__, self).__init__( name="search", description="Search all data", input=SearchInput(), output=SearchOutpu...
66
34.14
104
17
454
python
[{"finding_id": "codeql_py/request-without-cert-validation_7ecdafc34024f66b_906f4d60", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 32, 43 ]
[ 34, 45 ]
[ 29, 34 ]
[ 14, 18 ]
2024-11-18T19:07:43.307226+00:00
1,504,882,279,000
d93fea9aa57502bf473631b29c9c0a9fdcf94af0
3
{ "blob_id": "d93fea9aa57502bf473631b29c9c0a9fdcf94af0", "branch_name": "refs/heads/master", "committer_date": 1504882279000, "content_id": "a46c5d756494973b6e949bfa208b3eae5521c051", "detected_licenses": [ "Apache-2.0" ], "directory_id": "35847e43bc97822fe5f9062fa88d0944c1919bdf", "extension": "py"...
2.53125
stackv2
import json import logging import os import re import shutil import time import tarfile import zipfile from pycuckoo.cuckooapi import CuckooAPI class CuckooUtils(): def __init__(self, baseurl, apikey='', proxies={}, verify=True): self.baseurl = baseurl if self.baseurl[-1] == '/': sel...
143
38.22
79
19
1,195
python
[{"finding_id": "codeql_py/tarslip_a76d625042454781_1862fc81", "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)." ]
[ 106 ]
[ null ]
[ 13 ]
[ 24 ]
2024-11-18T19:07:58.815253+00:00
1,622,710,134,000
b1041332d879bb968aaab7f6be24d9a2fe15ccaa
2
{ "blob_id": "b1041332d879bb968aaab7f6be24d9a2fe15ccaa", "branch_name": "refs/heads/master", "committer_date": 1622710134000, "content_id": "5e88f31760bc1e31cfaa60f3a56835c9e826c9c5", "detected_licenses": [ "MIT" ], "directory_id": "6e8efcf2ad81e09499ecc39a0075e816bd5ff163", "extension": "py", "fi...
2.390625
stackv2
from flask import request, make_response, jsonify from flask.views import MethodView from werkzeug.routing import ValidationError from project import db, bcrypt from project.User.models import User class RegisterAPI(MethodView): def post(self): post_data = request.get_json() username = post_data....
165
39.99
104
21
1,249
python
[{"finding_id": "codeql_py/stack-trace-exposure_179e6e3ec9db0aae_9d2ee9b1", "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." ]
[ 38 ]
[ null ]
[ 46 ]
[ 61 ]
2024-11-18T19:18:14.001199+00:00
1,492,674,354,000
c784581e0eb5ab806862dd6165e21bd333109443
3
{ "blob_id": "c784581e0eb5ab806862dd6165e21bd333109443", "branch_name": "refs/heads/master", "committer_date": 1492674354000, "content_id": "ada9860df84f112c5e3770f65e1bb8ad39506df8", "detected_licenses": [ "MIT" ], "directory_id": "572e939028cddb91ac947d07656ce61a76620a09", "extension": "py", "fi...
3.1875
stackv2
# -*- encoding: utf-8 -*- import os import errno def ensure_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(path) except OSError as e: if e.errno != errno.EEXIST: raise e def ensure_intermediate_dir(path): """ Ensure interme...
159
16.31
78
13
645
python
[{"finding_id": "codeql_py/overly-permissive-file_fb24364879b7edc7_c349a7fd", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world writable.", "remediation": "", "location": {...
2
true
[ "CWE-732", "CWE-732" ]
[ "py/overly-permissive-file", "py/overly-permissive-file" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Overly permissive mask in open sets file to world writable.", "Overly permissive mask in open sets file to world writable." ]
[ 38, 50 ]
[ null, null ]
[ 16, 16 ]
[ 45, 45 ]
2024-11-18T19:18:15.997071+00:00
1,633,016,731,000
8009f4b91a973d797184ac0bef20981011aad49d
3
{ "blob_id": "8009f4b91a973d797184ac0bef20981011aad49d", "branch_name": "refs/heads/master", "committer_date": 1633016731000, "content_id": "0c0ac629650d7b28091876670670c488c4023263", "detected_licenses": [ "MIT" ], "directory_id": "ba5d722f8ab000f40f9a7834850572459e552783", "extension": "py", "fi...
2.84375
stackv2
# -*- coding: utf-8 -*- """ Bitrix24 ~~~~~~~~~~~~ This module implements the Bitrix24 REST API. :copyright: (c) 2019 by Akop Kesheshyan. """ import requests from time import sleep from urlparse import urlparse from .exceptions import BitrixError class Bitrix24(object): """A user-created :class:`Bitrix24 <Bitr...
122
36.82
118
29
1,025
python
[{"finding_id": "codeql_py/request-without-cert-validation_1c27e26c4d8683cc_98e771cc", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 119, 121 ]
[ null, null ]
[ 17, 17 ]
[ 112, 112 ]
2024-11-18T19:18:48.688401+00:00
1,588,933,970,000
acd3ed65687d1d9d93b4cad3738043ec2a73c66d
3
{ "blob_id": "acd3ed65687d1d9d93b4cad3738043ec2a73c66d", "branch_name": "refs/heads/master", "committer_date": 1588933970000, "content_id": "96de1a5240de6ba8ecc76838d2da2a82a83fb94d", "detected_licenses": [ "MIT" ], "directory_id": "51502110a58028032a6c36b80b2c20ec853e71ea", "extension": "py", "fi...
2.546875
stackv2
import flask from pypi_org.infrastructure.view_modifiers import response import pypi_org.services.package_service as package_service blueprint = flask.Blueprint('packages', __name__, template_folder='templates') @blueprint.route('/project/<package_name>') @response(template_file='packages/details.html') def package...
37
29.43
78
11
250
python
[{"finding_id": "codeql_py/reflective-xss_b006b3b2c647eff9_0bff79ae", "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)." ]
[ 37 ]
[ null ]
[ 12 ]
[ 72 ]
2024-11-18T19:19:09.025599+00:00
1,619,806,421,000
bc221a6d20ba1492e379480542a175e468f52980
2
{ "blob_id": "bc221a6d20ba1492e379480542a175e468f52980", "branch_name": "refs/heads/master", "committer_date": 1619806421000, "content_id": "8a494608599ff780f05f1fe05bd28f61836a30e7", "detected_licenses": [ "MIT", "Apache-2.0" ], "directory_id": "a5b09a3acfa7087cc5d34a0010179d19011bb7e6", "exten...
2.46875
stackv2
import scrapy import os, sys import re from lxml import html from lxml.html.clean import clean_html from markdownify import markdownify as md def basic_clean(data): return re.sub('@import .*', '', data) def remove_html_comments(data): return re.sub('<!--.*-->', '', data) class DownloadNotice(scrapy.Spider):...
43
31.65
83
18
312
python
[{"finding_id": "codeql_py/bad-tag-filter_561439d71e997d08_51dba1fc", "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." ]
[ 13 ]
[ null ]
[ 20 ]
[ 29 ]
2024-11-18T19:29:36.045369+00:00
1,499,060,853,000
99b993d30c7fceb10ecdb6eec6c98fea2db2f839
3
{ "blob_id": "99b993d30c7fceb10ecdb6eec6c98fea2db2f839", "branch_name": "refs/heads/master", "committer_date": 1499060853000, "content_id": "b008259eb5ea9c9ba3ea6837b0b4f2525fa89fce", "detected_licenses": [ "Apache-2.0" ], "directory_id": "73bd95339384f6b77ec452ff987b832447e261c9", "extension": "py"...
3.015625
stackv2
from .theExceptions import ValidationError class Validator(object) : """All validators must inherit from this class""" def __init__(self, *args, **kwrags) : pass def validate(self, value) : """The only function that a validator must implement. Must return True if erevything went well or a ...
49
37.41
136
16
456
python
[{"finding_id": "codeql_py/overly-large-range_ce5fb83d07fa1403_77feb4f9", "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...
3
true
[ "CWE-020", "CWE-020", "CWE-020" ]
[ "py/overly-large-range", "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]." ]
[ 27, 27, 27 ]
[ null, null, null ]
[ 18, 31, 44 ]
[ 21, 34, 47 ]
2024-11-18T19:29:50.576902+00:00
1,476,659,504,000
3637c7a0269b6bcd9856255414c6d9ac5c84a450
2
{ "blob_id": "3637c7a0269b6bcd9856255414c6d9ac5c84a450", "branch_name": "refs/heads/master", "committer_date": 1476659504000, "content_id": "0a85cd5144033d975f94bff99daed9e49d2e0e29", "detected_licenses": [ "MIT" ], "directory_id": "83a36780306a6c6cf40e4c8032fc083cdb749bac", "extension": "py", "fi...
2.359375
stackv2
import pyramid_handlers from blue_yellow_app.controllers.base_controller import BaseController class AccountController(BaseController): @pyramid_handlers.action(renderer='templates/account/index.pt') def index(self): return {} @pyramid_handlers.action(renderer='templates/account/signin.pt') d...
53
32.09
89
13
314
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_aa7449131e9ea622_e44be630", "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." ]
[ 36 ]
[ null ]
[ 15 ]
[ 89 ]
2024-11-18T19:44:36.808610+00:00
1,634,909,814,000
c7bd14b6a45a29517735be977cd40fc4a882bd3a
3
{ "blob_id": "c7bd14b6a45a29517735be977cd40fc4a882bd3a", "branch_name": "refs/heads/main", "committer_date": 1634909814000, "content_id": "fa811edf6ff8cff9b71f5d0485a9148c42f42da5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a9b0e2907079ceda6ee7ad14aa9362e1bbdb03f2", "extension": "py", ...
2.984375
stackv2
""" Base class for datasets. """ import gzip import logging import os import sys import tarfile import zipfile from urllib.parse import urlparse import requests class DataSource: """ The training or testing dataset that accommodates custom augmentation and transforms. """ def __init__(self): ...
95
31.4
89
21
633
python
[{"finding_id": "codeql_py/tarslip_7a812f1ad7084236_468b624a", "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)." ]
[ 57 ]
[ null ]
[ 17 ]
[ 20 ]
2024-11-18T19:58:07.348557+00:00
1,645,501,463,000
d10757718245c95ba82d85329e338443d8408317
3
{ "blob_id": "d10757718245c95ba82d85329e338443d8408317", "branch_name": "refs/heads/master", "committer_date": 1645501463000, "content_id": "78fd6ac72380f59dbf6f4dee1025c2a9a463432c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "936b73a803b7628d0d25429b9d9c12c0811914e5", "extension": "py"...
2.78125
stackv2
from driver import UART from micropyGNSS import MicropyGNSS class GNSS(object): def __init__(self, uartObj): self.uartObj = None if not isinstance(uartObj, UART): raise ValueError("parameter is not a GPIO object") # 初始化定位模组串口 self.uartObj = uartObj self.gnss = ...
28
29.68
78
14
209
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f77a2ad3c34e2d5e_a0dea8a2", "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." ]
[ 27, 27 ]
[ null, null ]
[ 19, 40 ]
[ 38, 58 ]
2024-11-18T19:58:26.439998+00:00
1,600,026,659,000
f31a6473a2b0781f613c80ddb6d3047d7c41bdec
2
{ "blob_id": "f31a6473a2b0781f613c80ddb6d3047d7c41bdec", "branch_name": "refs/heads/master", "committer_date": 1600026659000, "content_id": "05fc5a9baca7a27b598fc8402be3905a16211fb3", "detected_licenses": [ "MIT" ], "directory_id": "848268d6a292cb2cc8a311c48c65bbbdb8841420", "extension": "py", "fi...
2.375
stackv2
""" File System REST API ============================= Interface for storing and retrieving data from the file system :Author: Nik Sumikawa :Date: Aug 21, 2020 """ import logging log = logging.getLogger(__name__) from rest_framework.response import Response from rest_framework.views import APIView from django.conf...
163
28.96
88
15
1,079
python
[{"finding_id": "codeql_py/path-injection_37004c2881e0822f_26114b7b", "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", ...
2
true
[ "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 79, 109 ]
[ null, null ]
[ 30, 34 ]
[ 50, 54 ]
2024-11-18T20:10:36.680125+00:00
1,618,205,794,000
6725fc5d8973660880159cb13898a09e52bafc46
2
{ "blob_id": "6725fc5d8973660880159cb13898a09e52bafc46", "branch_name": "refs/heads/main", "committer_date": 1618205794000, "content_id": "be6de4d32490ab6b60861b0dd910551c4bac9053", "detected_licenses": [ "MIT" ], "directory_id": "b5ca95f76025bda1037aa2f8a9f9f78ee187f700", "extension": "py", "file...
2.453125
stackv2
""" python not_new_app.py """ from flask import * app = Flask(__name__,template_folder="templates_old") @app.route('/') def create(): return render_template('not_index.html') def logger(line): with open('log.txt','a+') as f: f.write(str(line)+"\n") @app.route('/no',methods=["POST","GET"]) def no(...
30
21.47
71
12
162
python
[{"finding_id": "codeql_py/flask-debug_a6769f1769516a51_7f466c39", "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).\nCross-site scripting vulnerability due to a [user-provided value](2).\nCross-site scripting vulnerability due to a [user-pr...
[ 30, 27 ]
[ null, null ]
[ 5, 12 ]
[ 24, 50 ]
2024-11-18T20:23:41.231875+00:00
1,617,996,137,000
f31151c67aad497ac91d67639527984576526fe2
3
{ "blob_id": "f31151c67aad497ac91d67639527984576526fe2", "branch_name": "refs/heads/master", "committer_date": 1617996137000, "content_id": "946d2e6d957f5aa36d2ad6c2f3b4842c45e81605", "detected_licenses": [ "MIT" ], "directory_id": "c761d6988441981b2341db2eebde9454e53e326b", "extension": "py", "fi...
2.546875
stackv2
import os import json import requests import pandas as pd from flask import Flask, request, Response # constants TOKEN = '1587703051:AAHkscpj9AVjVd1O0NVsR3tCiybqpYoj7ws' # # info about the bot # https://api.telegram.org/bot1587703051:AAHkscpj9AVjVd1O0NVsR3tCiybqpYoj7ws/getMe # # get updates # https://api.telegram.or...
147
28.76
154
22
1,271
python
[{"finding_id": "codeql_py/partial-ssrf_df7e1faea07c5c4a_70a7c27d", "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)." ]
[ 30 ]
[ null ]
[ 9 ]
[ 48 ]
2024-11-18T20:49:15.584604+00:00
1,592,401,704,000
2a4eea091d13dfbf64d56b1da68eb0108a8b8728
3
{ "blob_id": "2a4eea091d13dfbf64d56b1da68eb0108a8b8728", "branch_name": "refs/heads/master", "committer_date": 1592401704000, "content_id": "c125a11b46ff0a488d3a34443c65ef6f74f6ce6f", "detected_licenses": [], "directory_id": "bf58a0e7f0f8b34a96f3ef84b45dba46c4e2ba3d", "extension": "py", "filename": "pri...
2.859375
stackv2
import os import html2text from setting import SAVE_DIR from typing import Any """ 前景色 背景色 颜色 30 40 黑色 31 41 红色 32 42 绿色 33 43 黃色 34 44 蓝色(有问题) 35 45 紫红色 36 46 青蓝色 37 47 白色 显示方式 意义 0 终端默认设置 1 高亮显示 4 使用下划线 5 闪烁 7 反白显示 8 不可见 """ colour_map = { 'black': '30', 'red': '31', 'green': '32', 'yellow': '33', ...
381
41.47
128
23
3,540
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b9a190454d47089c_56d286a7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text." ]
[ 38 ]
[ null ]
[ 11 ]
[ 50 ]
2024-11-18T20:49:42.036704+00:00
1,573,752,480,000
cbde135eb37a5ef80e6bd9f7838ea9046c1af2e3
2
{ "blob_id": "cbde135eb37a5ef80e6bd9f7838ea9046c1af2e3", "branch_name": "refs/heads/master", "committer_date": 1573752480000, "content_id": "0c8348d5d93984a9cbe36d3142ee8926c3af8763", "detected_licenses": [ "MIT" ], "directory_id": "09836ecc9dfb9832a1cde3acf0ee745385bb99c6", "extension": "py", "fi...
2.46875
stackv2
import socket from datetime import datetime import os from hashlib import sha256 import json import time from flask_sqlalchemy import SQLAlchemy from flask import Flask, request, session, make_response, render_template, jsonify import requests from flask import redirect import blocksec2go import CardReader class Blo...
363
30.12
118
17
2,406
python
[{"finding_id": "codeql_py/flask-debug_fec63251a52cb60f_f706d114", "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-918", "CWE-079" ]
[ "py/flask-debug", "py/full-ssrf", "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.", "The full URL of this request depends on a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 363, 178, 189 ]
[ null, 179, null ]
[ 5, 16, 16 ]
[ 43, 69, 54 ]
2024-11-18T20:49:53.038257+00:00
1,525,917,904,000
8ef23eb7a5f38f8a81a832d65ab4021126b32c8c
2
{ "blob_id": "8ef23eb7a5f38f8a81a832d65ab4021126b32c8c", "branch_name": "refs/heads/master", "committer_date": 1525917904000, "content_id": "b5511d9b710f9bca82e117cd0281bb63932278ba", "detected_licenses": [ "MIT" ], "directory_id": "9195d58690ab99cc6eeb56ba8b91f5ea18c786ea", "extension": "py", "fi...
2.328125
stackv2
import datetime import jinja2 import os import time import webapp2 # This value gets incremented every time we deploy so that we can cache bust # our static resources (css, js, etc) RESOURCE_VERSION = 4 jinja = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.dirname(__file__)+'/tmpl')) class BaseHandler(...
53
25.04
93
14
343
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_2eeaf787011bc9b0_a07a2296", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 12 ]
[ null ]
[ 9 ]
[ 94 ]
2024-11-18T20:49:56.641209+00:00
1,574,471,530,000
85ef90f8a9a0ca959140843eae36a9d19e7cebfc
3
{ "blob_id": "85ef90f8a9a0ca959140843eae36a9d19e7cebfc", "branch_name": "refs/heads/master", "committer_date": 1574471530000, "content_id": "b26702b94ba118e5245052f48d4e2f9516a79dd5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "abe59d5f9b2f3260c9f97fa0198dcfe4aa6ddaf7", "extension": "py"...
3.125
stackv2
# Essentials and Utilities import sys import re import os import pickle import numpy as np import pandas as pd from sqlalchemy import create_engine # Tokenization and Lemmatization import nltk from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.stem.wordnet import WordNetLemmatizer nltk...
207
28.38
111
14
1,369
python
[{"finding_id": "codeql_py/overly-large-range_7685a77b1d5f6cc3_023b471f", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]." ]
[ 54 ]
[ null ]
[ 61 ]
[ 64 ]
2024-11-18T20:49:57.954953+00:00
1,475,405,919,000
86e8730154e658e7eb3cd2a820b2f40d31d075d3
3
{ "blob_id": "86e8730154e658e7eb3cd2a820b2f40d31d075d3", "branch_name": "refs/heads/master", "committer_date": 1475405919000, "content_id": "50eda22a350ac4ddfc78dbfa384bc21cd5a12775", "detected_licenses": [ "MIT" ], "directory_id": "5634e9c537d49bdf5b4f63b33aa9455fccd63764", "extension": "py", "fi...
2.59375
stackv2
#!/usr/bin/env python import os import sys import getpass import subprocess as sp command = ' '.join(map(str, sys.argv[1:])) username = getpass.getuser() prompt = "[sudo] password for {0}: ".format(username) dumpdir = "/tmp/.snooper" # change this dumpfile = "/tmp/.snooper/dump.txt" # change this sudo = 'sudo' # chang...
42
24.79
79
14
301
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_beb10aa7f2f1046d_95cf8571", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.", "This expression stores [sensitive data (password)](1) as clear text." ]
[ 21, 26 ]
[ null, null ]
[ 20, 20 ]
[ 60, 60 ]
2024-11-18T20:49:59.532956+00:00
1,662,296,878,000
bcc1b79d37ff694e10b1f508200dae270a2afa8e
3
{ "blob_id": "bcc1b79d37ff694e10b1f508200dae270a2afa8e", "branch_name": "refs/heads/master", "committer_date": 1662297992000, "content_id": "74698213d3af90ad4234db18502c5bd0337c1e56", "detected_licenses": [ "CC0-1.0" ], "directory_id": "60e3169dd04ab1a86b6f4f613a8600c0431c08cf", "extension": "py", ...
2.78125
stackv2
'''Convert disquls XML comments to YAML.''' import os import pathlib import hashlib import yaml import iso8601 import xmltodict from rebuild_comments import encrypt COMMENT_DIR = os.environ.get('COMMENT_DIR', './_source/_data/comments') def get_disqus_threads(infile): with open(infile, 'r', encoding='utf-8') as...
79
28.38
125
19
561
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_250b6df481542e18_d0b86f39", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://mehdix.ir](1) may be at an arbitrary position i...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [http://mehdix.ir](1) may be at an arbitrary position in the sanitized URL." ]
[ 73 ]
[ null ]
[ 12 ]
[ 54 ]
2024-11-18T20:50:05.095935+00:00
1,678,110,909,000
d4690390c21d4542af1c7418860192a77bbb367e
3
{ "blob_id": "d4690390c21d4542af1c7418860192a77bbb367e", "branch_name": "refs/heads/master", "committer_date": 1678110909000, "content_id": "202086774c9cbea7cd3114e011dcaaaa5b45cd5b", "detected_licenses": [ "MIT" ], "directory_id": "8dda9f692776047ff4c3925f50f9509990cae350", "extension": "py", "fi...
2.828125
stackv2
import re INT_LIST = ['DA', 'UL', 'US'] TIME_LIST = ['TM'] # noinspection SpellCheckingInspection SIGNEDINT_LIST = ['US or SS'] # noinspection SpellCheckingInspection INTSTRING_LIST = ['IS'] DT_LIST = ['DT'] DS_LIST = ['DS'] CS_LIST = ['CS'] def cs_validator(key, value): assert re.sub('[a-zA-Z _]', '', value).__...
53
32.81
95
12
507
python
[{"finding_id": "codeql_py/overly-large-range_2c6c9e1e7f84e256_d57a559d", "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 \\[+...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_`a-e\\]." ]
[ 46 ]
[ null ]
[ 24 ]
[ 27 ]
2024-11-18T20:50:27.970290+00:00
1,626,786,765,000
0ff24e3cc522a25d4faec92593c7993078d2e24a
4
{ "blob_id": "0ff24e3cc522a25d4faec92593c7993078d2e24a", "branch_name": "refs/heads/main", "committer_date": 1626786765000, "content_id": "24d7deb8c4dc478bc5a781f6653af295109ef4a3", "detected_licenses": [ "MIT" ], "directory_id": "064dd52bc84b357c4398cb942949ecd8926260fc", "extension": "py", "file...
3.734375
stackv2
""" Use Bayesian Classification to solve the given problem. Dataset: bayes.csv """ from functools import reduce from typing import Dict import pandas as pd def main(dataset_path: str, X: Dict): df = pd.read_csv(dataset_path, encoding="utf8") i = 0 c_yes = 0 c_no = 0 pn_yes = [] pn_no = [] ...
89
26.38
88
13
826
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7ecad9e08c9a5f0a_e461a891", "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." ]
[ 36 ]
[ 39 ]
[ 9 ]
[ 8 ]
2024-11-18T20:50:42.084680+00:00
1,632,309,717,000
a5a101ca4451ebd92acdc02caf8d0bfbc816d54b
3
{ "blob_id": "a5a101ca4451ebd92acdc02caf8d0bfbc816d54b", "branch_name": "refs/heads/master", "committer_date": 1632309717000, "content_id": "b330942cb1e645fe80c35148fe3072a3cd350a77", "detected_licenses": [ "MIT" ], "directory_id": "d2138e39015ef82831c023af966448668697a568", "extension": "py", "fi...
2.8125
stackv2
from flask import Flask from flask import request from textblob import TextBlob import re import pandas as pd # To handle data import numpy as np # For number computing app = Flask(__name__) @app.route("/") def hello(): text = request.args.get('text') c_text = ' '.join(re.sub("(@[A-Za-z0-9]+)|([^0-9...
25
24.24
99
15
185
python
[{"finding_id": "codeql_py/polynomial-redos_c71b45077479558c_3b0c26bc", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with ma...
1
true
[ "CWE-1333" ]
[ "py/polynomial-redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of 'a'." ]
[ 14 ]
[ null ]
[ 86 ]
[ 90 ]
2024-11-18T20:51:16.980865+00:00
1,553,589,055,000
1f6880660a548752c7f81ac71e6ab16c40db637c
3
{ "blob_id": "1f6880660a548752c7f81ac71e6ab16c40db637c", "branch_name": "refs/heads/master", "committer_date": 1553589055000, "content_id": "62719b80ae01e94adef48c3a23936cc456e7f701", "detected_licenses": [ "MIT" ], "directory_id": "181ca3e4f85fa9d84b9e7b1ae0a9008383c95000", "extension": "py", "fi...
3.296875
stackv2
"""Functions for reading data from the sentiment dictionary and tweet files.""" import os import re import string from datetime import datetime from ucb import main, interact import codecs DATA_PATH = 'data' + os.sep def make_tweet(text, time, lat, lon, sentiment): """Return a tweet, represented as a python dict...
204
34.36
155
18
1,755
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7e9539a8e6a9f61e_d8f47653", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 198, 170 ]
[ null, null ]
[ 9, 15 ]
[ 34, 28 ]
2024-11-18T20:51:18.475641+00:00
1,555,145,783,000
4b1163d0aaece9a94e3b78ab85fd6652272da6b9
3
{ "blob_id": "4b1163d0aaece9a94e3b78ab85fd6652272da6b9", "branch_name": "refs/heads/master", "committer_date": 1555145783000, "content_id": "165b97def004da1b11bdbb99ddf456b95f44b1df", "detected_licenses": [ "MIT" ], "directory_id": "7381056be4ad3615fd183935e6708c60c6b9861f", "extension": "py", "fi...
2.515625
stackv2
import os import shutil import tempfile import pkg_resources from pathlib import Path import yaml from jinja2 import Template from flask import Flask as FlaskApp, send_file, abort INDEX_CONTENT = pkg_resources.resource_string("vuecli", "index.html") LOADING_CONTENT = pkg_resources.resource_string("vuecli", "loading.g...
115
31.94
73
17
832
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_51306447439cb7c2_04069d74", "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." ]
[ 53 ]
[ null ]
[ 16 ]
[ 34 ]
2024-11-18T20:51:19.949560+00:00
1,566,567,993,000
83d7984aa32f3170d965134a019c2191a1216f30
2
{ "blob_id": "83d7984aa32f3170d965134a019c2191a1216f30", "branch_name": "refs/heads/master", "committer_date": 1566567993000, "content_id": "9610e3e7165f1297ec966441d7d17d354ee24de0", "detected_licenses": [ "MIT" ], "directory_id": "6ff60da7d31ff238d2b29005f5451a6b2e2519b1", "extension": "py", "fi...
2.328125
stackv2
import time from flask import Flask, request, render_template from werkzeug.utils import secure_filename import os from keras.preprocessing import image import simplejson as json import argparse import numpy as np import tensorflow as tf import glob BASE_PROJECT_DIR = "Images" BASE_PREDICTIONS_DIR = "predictions"...
151
25.41
126
20
972
python
[{"finding_id": "codeql_py/path-injection_5f0ac4432bf1f422_9492a484", "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", ...
2
true
[ "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 134, 141 ]
[ null, null ]
[ 19, 15 ]
[ 65, 107 ]
2024-11-18T20:51:22.430438+00:00
1,601,261,491,000
c0a9c859923136ba93cf4833a901b958d0c87854
3
{ "blob_id": "c0a9c859923136ba93cf4833a901b958d0c87854", "branch_name": "refs/heads/master", "committer_date": 1601261491000, "content_id": "d213d1b5461770f74f25a612e668364959edbd9a", "detected_licenses": [ "MIT" ], "directory_id": "976d73a87803e19e6dfda3317b749eecabc9922b", "extension": "py", "fi...
2.609375
stackv2
''' Created by Muhammad Syafrudin <github.com/justudin> ''' # USAGE # Start the server: # python app.py # import the necessary packages import numpy as np import pandas as pd import io, os from flask import Flask, jsonify, render_template, request, flash, redirect, url_for import requests from joblib import load from...
112
29.63
100
13
818
python
[{"finding_id": "codeql_py/flask-debug_9b84800eac9b0666_47048c1e", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
6
true
[ "CWE-215", "CWE-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" ]
[ "HIGH", "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).", "This log entry depends on a [user-provided value](1).", "This log entry de...
[ 112, 38, 45, 52, 59, 88 ]
[ null, null, null, null, null, null ]
[ 2, 50, 50, 50, 43, 43 ]
[ 50, 52, 52, 52, 45, 45 ]
2024-11-18T20:51:25.530430+00:00
1,533,610,948,000
58d3c25d05afd45a25f52a83348e07df1de80548
3
{ "blob_id": "58d3c25d05afd45a25f52a83348e07df1de80548", "branch_name": "refs/heads/master", "committer_date": 1533610948000, "content_id": "f772039ed9caf8004123799fe3816f9259feaa56", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c992cfc718f17672097ad890852d312dbeed3cc3", "extension": "py"...
2.53125
stackv2
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging from jinja2 import Template def gen_tensorflow_client_string(generated_tensor_data, model_name): """ Generate TensorFlow SDK in Bash. Args: generated_tensor_data: Examp...
43
29.4
138
11
354
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_0f1b42a3223e2ae2_eaf22410", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 26 ]
[ null ]
[ 14 ]
[ 37 ]
2024-11-18T21:13:52.067652+00:00
1,470,048,274,000
e3caa435a40d594bbd741f64b82010d2ff09f092
2
{ "blob_id": "e3caa435a40d594bbd741f64b82010d2ff09f092", "branch_name": "refs/heads/master", "committer_date": 1470048274000, "content_id": "23b7cf6c489465d7f697a443462b0feb5eea7e17", "detected_licenses": [ "MIT" ], "directory_id": "2b63369b570630cd1218b4653d282550558d3823", "extension": "py", "fi...
2.3125
stackv2
import logging from flask import current_app import jinja2 import flask logger = logging.getLogger(__name__) class AngularInjection(object): def __init__(self,app=None): self.app = app self.init_app(app) self.data = dict(request_args={},view_args={},data={}) def init_app(self,app): ...
47
31.21
93
17
310
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_9f8954eb84246664_8e70f3c4", "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." ]
[ 45 ]
[ null ]
[ 24 ]
[ 56 ]
2024-11-18T21:13:56.459888+00:00
1,549,985,139,000
550afff0afd31772dfed8bc8650a49873508f484
3
{ "blob_id": "550afff0afd31772dfed8bc8650a49873508f484", "branch_name": "refs/heads/master", "committer_date": 1549985139000, "content_id": "3949567cb450b6b583be651a62ec0932484d3d4c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8abca2dc0e912851cc2e6a4d722f12341e0baa48", "extension": "py"...
3.390625
stackv2
from base64 import b64encode import os import hashlib import argparse # inspired by https://gist.github.com/komuw/c6fb1a1c757afb43fe69bdd736d5cf63 def hash_pass(password): """Hashing password according to RabbitMQ specs.""" # 1.Generate a random 32 bit salt: # This will generate 32 bits of random data: ...
41
25.63
93
10
303
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_139fc4764fab87ce_01997c04", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e...
[ 18 ]
[ null ]
[ 27 ]
[ 31 ]
2024-11-18T21:14:05.691283+00:00
1,485,693,123,000
40f5acd03b51bb8340324e8c6d5675db43bda8c8
2
{ "blob_id": "40f5acd03b51bb8340324e8c6d5675db43bda8c8", "branch_name": "refs/heads/master", "committer_date": 1485693123000, "content_id": "a0988818d1cda5dd731227f2bbf7228e4d0ca18b", "detected_licenses": [ "MIT" ], "directory_id": "6bb9f92ccf86cb1669e3f5e6763c3307c99f9614", "extension": "py", "fi...
2.421875
stackv2
from flask import Flask from flask import request, jsonify import pickle import base64 import png import io import requests import numpy as np from adv_cnn.model import is_admin, do_adver app = Flask(__name__) def get_adv(face, mod_face): red1 = face[:,:,0] green1 = face[:,:,1] blue1 = face[:,:,2] red...
116
32.64
94
19
1,034
python
[{"finding_id": "codeql_py/unsafe-deserialization_429cfc3b4a6cc451_1bd4fb6d", "tool_name": "codeql", "rule_id": "py/unsafe-deserialization", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Unsafe deserialization depends on a [user-provided value](1).", "remediation": "", "locatio...
1
true
[ "CWE-502" ]
[ "py/unsafe-deserialization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Unsafe deserialization depends on a [user-provided value](1)." ]
[ 109 ]
[ null ]
[ 29 ]
[ 33 ]
2024-11-18T21:14:12.260270+00:00
1,574,029,901,000
14696369e321a59489ebd38356ad84f29dab3672
3
{ "blob_id": "14696369e321a59489ebd38356ad84f29dab3672", "branch_name": "refs/heads/master", "committer_date": 1574029901000, "content_id": "e9c22fd54d0dea389ce9194c1804d1858b84a888", "detected_licenses": [ "MIT" ], "directory_id": "1fde49a4951008810d64e5181e5a04528cc4b12e", "extension": "py", "fi...
2.5625
stackv2
from flask import Flask, jsonify, request import logging from pymodm import connect from pymodm import MongoModel, fields from datetime import datetime import sendgrid import os from sendgrid.helpers.mail import * app = Flask(__name__) connect('mongodb+srv://wl181:Willy1201@bme547-uxcjh.gcp.mongodb.net/' 'test...
368
36.16
79
15
3,168
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4129aa12c8072400_d4c95519", "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-117", "CWE-117" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/log-injection", "py/log-injection" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.", "This log entry depends on a [user-provi...
[ 48, 116, 48, 116 ]
[ 49, 117, 49, 117 ]
[ 18, 18, 18, 18 ]
[ 50, 63, 50, 63 ]
2024-11-18T21:14:25.356380+00:00
1,544,221,943,000
afc09c2a89ba23ca42c17d89593b128cfe5a7654
3
{ "blob_id": "afc09c2a89ba23ca42c17d89593b128cfe5a7654", "branch_name": "refs/heads/master", "committer_date": 1544221943000, "content_id": "1d727f954e11de457a8542c101073856db7bc1c5", "detected_licenses": [ "MIT" ], "directory_id": "52328a95a2732c2a17bfaf36bd4005401fdb1364", "extension": "py", "fi...
2.515625
stackv2
from bs4 import BeautifulSoup from fuzzywuzzy import fuzz from urllib.parse import urlparse from pyppeteer import launch import requests import sys import json import time import socket import argparse import pdb import re import asyncio import logging import aiohttp import async_timeout total_fuzz = [] class Compar...
213
32.69
152
21
1,624
python
[{"finding_id": "codeql_py/request-without-cert-validation_b00e9c653251d539_2096a0be", "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)." ]
[ 129 ]
[ null ]
[ 26 ]
[ 58 ]
2024-11-18T21:14:34.450773+00:00
1,620,087,263,000
bb75fbc2f664542592d3ed8f76190d39c3014f97
3
{ "blob_id": "bb75fbc2f664542592d3ed8f76190d39c3014f97", "branch_name": "refs/heads/master", "committer_date": 1620087263000, "content_id": "79084437ee0470ae31239a996b084bc41164ceda", "detected_licenses": [ "MIT" ], "directory_id": "f683e8aa8a3282ac7554307ec21f7000f5148de6", "extension": "py", "fi...
2.5625
stackv2
from datetime import datetime import json import logging import os import sys from flask import Flask, request, jsonify, make_response, abort, Response from modules import utilities from modules.Classifier import Classifier HTTP_STATUS_OK = 200 HTTP_STATUS_INVALID_INPUT = 400 HTTP_STATUS_INTERNAL_ERROR = 500 # READ...
111
27.61
110
15
719
python
[{"finding_id": "codeql_py/flask-debug_08a785b32a12d32d_27b59add", "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-117" ]
[ "py/flask-debug", "py/log-injection" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This log entry depends on a [user-provided value](1)." ]
[ 111, 55 ]
[ null, null ]
[ 5, 22 ]
[ 67, 39 ]
2024-11-18T21:14:42.460753+00:00
1,686,877,810,000
bd997910482b004c133086f183347b1526212ebe
3
{ "blob_id": "bd997910482b004c133086f183347b1526212ebe", "branch_name": "refs/heads/master", "committer_date": 1686877810000, "content_id": "b1c6b5f82967c8922b5245dfdab6cbf63c81bf24", "detected_licenses": [ "Unlicense" ], "directory_id": "b37c89bac4baa9fb6ef49c95c88dc66750f0a6c8", "extension": "py",...
3.4375
stackv2
# 从接龙中提取电话号码,物品数量,方便统计总数 # 物品表述应该为:物品x单位。比如:西瓜2个。鸡蛋2个。 import sys import re tinydict = {'一': 1, '二': 2, '三': '3', '四': '4', '五': '5', '六': '6', '七': '7', '八': '8', '九': '9', '两': '2'} pattern_phone = '1[3456789]\d{9}' def extract_phone_food(filename, food, unit): pattern_food = food+'.'+unit with open(filena...
45
30.73
107
19
413
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_5278d41e4d5e95ec_8f9cdde8", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 32, 31 ]
[ null, null ]
[ 26, 23 ]
[ 79, 76 ]
2024-11-18T20:10:47.688860+00:00
1,520,973,353,000
dd68e764d68c0bf9919adc967ceb64efea763701
2
{ "blob_id": "dd68e764d68c0bf9919adc967ceb64efea763701", "branch_name": "refs/heads/master", "committer_date": 1520973353000, "content_id": "2b555c26b9726a5d7d754f3b53a37a0f9da6791b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ee51ea8a61038001ce648b14e1f8f870e5c4470c", "extension": "py"...
2.375
stackv2
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Penguin Computing, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
384
34.61
78
19
3,009
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_ed9b8a4df0143eae_3b7d08af", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 209 ]
[ null ]
[ 13 ]
[ 64 ]
2024-11-18T20:10:50.408795+00:00
1,419,257,654,000
6c44f16fac072409dd1b8ce82a83a47481c25cce
3
{ "blob_id": "6c44f16fac072409dd1b8ce82a83a47481c25cce", "branch_name": "refs/heads/master", "committer_date": 1419257654000, "content_id": "e0d02d177aeb81014c883e02b46438e63ec18544", "detected_licenses": [ "Unlicense" ], "directory_id": "9767527b428ec20faa99e4fc06ec1831bcfbc5ec", "extension": "py",...
3.140625
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'Bruno Konrad' import tweepy import os class TwitterMiner(object): """ Mineiradora do Twitter! O objetivo dessa classe é ir atrás de tweets afim de preencher uma base de dados. É interessante que já sejam buscados tweets com :) ou :( para facilitar ...
77
40.36
120
16
741
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_147800a97f51ea3d_3780a16a", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text.\nThis expression stores [sensitive data (secret)](3) as clear text.\nThis expression stores [sensitive data (secret)](4) as clear text." ]
[ 67 ]
[ null ]
[ 57 ]
[ 80 ]
2024-11-18T20:10:52.407971+00:00
1,600,934,918,000
1126f616544401c0462b995d0df22d89cb7ef542
3
{ "blob_id": "1126f616544401c0462b995d0df22d89cb7ef542", "branch_name": "refs/heads/master", "committer_date": 1600934918000, "content_id": "ec3ef4fd6aa2353d5ce9d449cc5c1310b96d0107", "detected_licenses": [ "MIT" ], "directory_id": "31056d7c5e69afe7b996c97e5c9f9132c2ebc27b", "extension": "py", "fi...
3.40625
stackv2
import string import random def generate(k,check): lowercase=list(string.ascii_lowercase) uppercase=list(string.ascii_uppercase) numbers=['0','1','2','3','4','5','6','7','8','9'] specialcharacters=['!','@','#','$','%','&','*','^'] all_values=lowercase+uppercase+numbers+specialcharacters password="" x=0 if(che...
38
23.97
81
15
249
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9e17a2928358faf1_1e735ae1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw...
[ 36 ]
[ null ]
[ 8 ]
[ 23 ]
2024-11-18T20:10:59.412012+00:00
1,524,725,485,000
7a3c5f75fa76d7c5447a75afe73542ea869d9362
2
{ "blob_id": "7a3c5f75fa76d7c5447a75afe73542ea869d9362", "branch_name": "refs/heads/master", "committer_date": 1524725485000, "content_id": "8aaf23de7a4490d033586beba50e330af908c668", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f700710ad4f7b776a2715c3bded94f6e763703b3", "extension": "py"...
2.484375
stackv2
from http.server import BaseHTTPRequestHandler, HTTPServer import urllib.parse as url_parser import fnmatch import os import zipfile import json from google.cloud import storage def get_config(): with open('CONFIG.json') as json_file: return json.load(json_file) # Refer: http://stackoverflow.com...
86
44.26
101
22
798
python
[{"finding_id": "codeql_py/path-injection_a84a44c116fe0d86_7d2b5a77", "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", ...
10
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "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).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](...
[ 40, 41, 45, 47, 50, 50, 58, 59, 64, 65 ]
[ null, null, null, null, null, null, null, null, null, null ]
[ 47, 41, 44, 35, 35, 45, 47, 41, 47, 41 ]
[ 56, 50, 53, 52, 43, 53, 56, 50, 56, 50 ]
2024-11-18T20:48:11.540348+00:00
1,517,309,255,000
c0cef2b21e60739771749a9817c458e2ae9cba7e
3
{ "blob_id": "c0cef2b21e60739771749a9817c458e2ae9cba7e", "branch_name": "refs/heads/master", "committer_date": 1517309255000, "content_id": "e68f7169462d6a3fa6be3cefa2c261bc9108c4b0", "detected_licenses": [ "MIT" ], "directory_id": "dd813b8324b2e372f2ef387ade140cf771a93364", "extension": "py", "fi...
3.375
stackv2
""" Lil Jimbo 2.0 No longer works like previous method. Implementation cycle and general to do in flow-chart style: User enters message to FB bot fb bot receives fb bot sends to heroku heroku runs python app with fb user message as input (or just the python function) app sends fb message to wit.ai. wit.ai contains a n...
261
32.19
152
18
2,221
python
[{"finding_id": "codeql_py/flask-debug_13421d802828b402_1be16073", "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)." ]
[ 261, 175 ]
[ null, null ]
[ 2, 10 ]
[ 21, 44 ]
2024-11-18T20:48:31.206583+00:00
1,547,418,595,000
4f05847af249383c913c6697ceeac6419c3bc37c
2
{ "blob_id": "4f05847af249383c913c6697ceeac6419c3bc37c", "branch_name": "refs/heads/master", "committer_date": 1547418595000, "content_id": "db954eefc0abf44e58b4935ac4caea8d8f13eb0b", "detected_licenses": [ "MIT" ], "directory_id": "ba5e1a29fbe03405d0baad6a0dbdc5ecc01bd2ed", "extension": "py", "fi...
2.375
stackv2
from bs4 import BeautifulSoup as bs import subprocess import os import sys import mwparserfromhell import re import json from timeit import default_timer as timer from multiprocessing import Pool import tqdm from itertools import chain from functools import partial import pandas as pd import glob from pymongo import Mo...
311
27.64
133
16
2,114
python
[{"finding_id": "codeql_py/redos_3271a44167da32dc_1273cc44", "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 '\\n\\[\\[Image|' 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 '\\n\\[\\[Image|' and containing many repetitions of '|'.", "This part of the regular expression may cause exponential backtracking on strings starting with '\\n\\[\\[File|' and containing many repetitions of '|'." ]
[ 106, 109 ]
[ null, null ]
[ 33, 32 ]
[ 36, 35 ]
2024-11-18T21:11:30.790878+00:00
1,466,015,996,000
6785907dee9766d72bed46ce601cea7b4e864373
2
{ "blob_id": "6785907dee9766d72bed46ce601cea7b4e864373", "branch_name": "refs/heads/master", "committer_date": 1466015996000, "content_id": "c69a19cafcf04b7f99c273430aca406baf5aa769", "detected_licenses": [ "MIT" ], "directory_id": "5867c672de7fc9523371062e951be8044fac414d", "extension": "py", "fi...
2.34375
stackv2
# coding: utf-8 """ PAP XML and remote API URLs """ from collections import ( namedtuple, OrderedDict ) import requests from lxml import etree PAP_BASE_URL = 'https://www.bmf-steuerrechner.de' PapResource = namedtuple('PapResource', ('remote_service_path', 'pap_xml_path')) PAP_RESOURCES = OrderedDict(( (...
96
29
98
12
889
python
[{"finding_id": "codeql_py/request-without-cert-validation_2588f02d33e1fc8c_18da7735", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 80, 91 ]
[ null, null ]
[ 16, 16 ]
[ 47, 59 ]
2024-11-18T21:11:34.079365+00:00
1,551,364,520,000
692173d4cb24a3a30414f7ebf9a7825364049678
2
{ "blob_id": "692173d4cb24a3a30414f7ebf9a7825364049678", "branch_name": "refs/heads/master", "committer_date": 1551364520000, "content_id": "65339a915fb210a3c74e4707211e00d28a9be49c", "detected_licenses": [ "MIT" ], "directory_id": "a6f1a694fa1343e321bea517b8804e8f812bfa76", "extension": "py", "fi...
2.421875
stackv2
#!/usr/bin/env python import csv import sys import re import argparse import time import random import urllib3 import requests import logging import html import json from bs4 import BeautifulSoup from itertools import cycle from datetime import datetime urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarnin...
198
32.56
136
22
1,502
python
[{"finding_id": "codeql_py/request-without-cert-validation_518b4f7409713225_625c6b11", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 113, 116 ]
[ 114, null ]
[ 28, 28 ]
[ 66, 76 ]
2024-11-18T21:11:34.522882+00:00
1,565,888,678,000
2c6b4af02cfe1c936d198bd3706a77a36ea96112
2
{ "blob_id": "2c6b4af02cfe1c936d198bd3706a77a36ea96112", "branch_name": "refs/heads/master", "committer_date": 1565888678000, "content_id": "87b600182a0b9ac3b8ef24fee01c6d4c5ee25537", "detected_licenses": [ "MIT" ], "directory_id": "ae1b93863b841ffb04cc8a01235b14f5af1eef95", "extension": "py", "fi...
2.40625
stackv2
#final version for automating an email that the team gets every day #libraries #web driver (need selenium because of Java Script) from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by im...
195
33.53
134
13
1,706
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_7fa93516e0e665f7_d86c3d2e", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 128 ]
[ null ]
[ null ]
[ 61 ]
2024-11-18T21:11:36.686045+00:00
1,611,596,766,000
354f462d61ad382e6a0715c1351ffd0b1405245a
2
{ "blob_id": "354f462d61ad382e6a0715c1351ffd0b1405245a", "branch_name": "refs/heads/master", "committer_date": 1611596766000, "content_id": "24e92d5e574585cf2d8fb0dd0a66fd3ddcc03385", "detected_licenses": [ "MIT" ], "directory_id": "06ad86a48875e9e4a57def4c39175a08fce0d369", "extension": "py", "fi...
2.34375
stackv2
"""Views. """ import re import urllib.parse import difflib from django.conf import settings from django.shortcuts import render, redirect from django.http import Http404 from piweb.decorators import require_app_access import flont.apps import rdflib from . import ontology DEFAUTL_SPARQL_QUERY = """ PREFIX flont: <ht...
117
29.04
91
17
886
python
[{"finding_id": "codeql_py/redos_3ed9b40f9d0546f2_a6db9f9f", "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 'SELECT ?' and containing many rep...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with 'SELECT ?' and containing many repetitions of ' ?'." ]
[ 70 ]
[ null ]
[ 46 ]
[ 48 ]
2024-11-18T21:26:05.547555+00:00
1,541,997,696,000
a5d19018b45782ce4ae96b03cbebcdeef778c5f4
3
{ "blob_id": "a5d19018b45782ce4ae96b03cbebcdeef778c5f4", "branch_name": "refs/heads/master", "committer_date": 1541997696000, "content_id": "330bc77be19722584d4217693ef1806740e64f24", "detected_licenses": [ "Apache-2.0" ], "directory_id": "99c3cae02dad27ebf6e22acd01420a0511d57c60", "extension": "py"...
2.78125
stackv2
import time import zmq print("ZeroMQ Server starting") HOST = '127.0.0.1' PORT = '4444' _context = zmq.Context() _publisher = _context.socket(zmq.PUB) url = 'tcp://{}:{}'.format(HOST, PORT) def publish_message(message): try: _publisher.bind(url) time.sleep(1) _publisher.send(message...
43
17.47
68
11
208
python
[{"finding_id": "codeql_py/reflective-xss_5dd59e7f57150b7e_27968ddd", "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)." ]
[ 40 ]
[ null ]
[ 12 ]
[ 20 ]
2024-11-18T21:26:10.436954+00:00
1,625,103,527,000
8aa32aaf442875c8d85d5f5b37acf7ca05165fcf
3
{ "blob_id": "8aa32aaf442875c8d85d5f5b37acf7ca05165fcf", "branch_name": "refs/heads/master", "committer_date": 1625103527000, "content_id": "7fb37752659170a146dc66d48a842d8ea15eaaed", "detected_licenses": [ "MIT" ], "directory_id": "f3984df4242edddfdd1452ed467d8e23d374422e", "extension": "py", "fi...
2.734375
stackv2
#!/usr/bin/env python import os import argparse from argparse import ArgumentParser __author__ = 'Teruaki Enoto' __version__ = '0.01' # v0.01 : 2020-08-01 : original version def get_parser(): """ Creates a new argument parser. """ parser = argparse.ArgumentParser('nidecrypt.py', formatter_class=argparse.RawDes...
44
25.5
112
10
336
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b024f79d67e06f0a_23e05106", "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." ]
[ 35 ]
[ null ]
[ 8 ]
[ 11 ]
2024-11-18T21:51:47.817398+00:00
1,636,918,300,000
5774a409947feb6d69b4dc2fad8e568ef019e5d2
3
{ "blob_id": "5774a409947feb6d69b4dc2fad8e568ef019e5d2", "branch_name": "refs/heads/main", "committer_date": 1636918300000, "content_id": "59755f46c83f454ff2119b6b8c107c37b1446abe", "detected_licenses": [ "Apache-2.0" ], "directory_id": "76abf9c76ecbf85e836edabd1c9ebca2957cb1cd", "extension": "py", ...
2.625
stackv2
# -*- coding: utf-8 -*- """ load image and return text (OCR) @author: avinash gaikwad """ from flask import * from PIL import Image import pytesseract app = Flask(__name__) @app.route('/') def upload(): return render_template("upload_image_file.html") def encoder_image(): ##########################...
53
30.09
74
13
415
python
[{"finding_id": "codeql_py/path-injection_5715edea1ca58cda_f2bda6d2", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).", "remed...
1
true
[ "CWE-022" ]
[ "py/path-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2)." ]
[ 39 ]
[ null ]
[ 16 ]
[ 26 ]
2024-11-18T21:52:17.617612+00:00
1,602,751,268,000
22d7d7fe9e712d5a6cbb43b40637036c1d1aecd8
3
{ "blob_id": "22d7d7fe9e712d5a6cbb43b40637036c1d1aecd8", "branch_name": "refs/heads/main", "committer_date": 1602751268000, "content_id": "f1e2961f312e9fcc8b3c8bc13236788021d75a03", "detected_licenses": [ "MIT" ], "directory_id": "4355265516e8366c2d5817a088197004e513e31e", "extension": "py", "file...
3.109375
stackv2
# # This is the Brute Forcing Program for Serial Connections such as UART. # Program Name: sbrute.py # Program Version Number: 1.0 # Author(s): ab@merimetso.net # Date: 31st October 2020 # # import serial import time import sys # # This ...
262
35.57
107
19
2,379
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9ab960d1ba0a79ff_b7b80c6a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text." ]
[ 92, 78 ]
[ null, null ]
[ 23, 23 ]
[ 103, 107 ]
2024-11-18T21:52:25.348689+00:00
1,523,524,690,000
04a8345ee7d13b575f88e51fc60c137978dadd66
2
{ "blob_id": "04a8345ee7d13b575f88e51fc60c137978dadd66", "branch_name": "refs/heads/master", "committer_date": 1523524690000, "content_id": "49f585bffc516374a6137c4384c65e53935ea4c9", "detected_licenses": [ "MIT" ], "directory_id": "abcd18b508a20746b2b5fe6bf508c307c46c4b41", "extension": "py", "fi...
2.34375
stackv2
import pickle import numpy as np import os from urllib.request import urlretrieve import tarfile import zipfile import sys class DataFeed(object): def __init__(self): train_images, train_labels, train_descriptions = get_data_set() val_images, val_labels, val_descriptions = get_data_set('test') ...
148
31.38
100
16
1,221
python
[{"finding_id": "codeql_py/tarslip_9dadbe4ac9c2d900_a9156db6", "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)." ]
[ 144 ]
[ null ]
[ 13 ]
[ 54 ]
2024-11-18T20:31:24.604896+00:00
1,692,713,861,000
fbec10451cf173d6e19ce3ed56a213baf02b4a38
3
{ "blob_id": "fbec10451cf173d6e19ce3ed56a213baf02b4a38", "branch_name": "refs/heads/master", "committer_date": 1692713861000, "content_id": "30af82643e076fd7d9a063c79d795c77aae05bd0", "detected_licenses": [ "MIT" ], "directory_id": "ef0c2298da42c0c5dd684544cf9eb4ad392d57a5", "extension": "py", "fi...
2.640625
stackv2
import pandas as pd import pysam import os, sys import subprocess from io import StringIO from tqdm import tqdm import parmap import multiprocessing as mp # Snakemake input # print(snakemake.input[0]) # directory_input = snakemake.input[0] # directory_input += "/" if directory_input.endswith("/") is False else directo...
101
32.82
134
19
954
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_d0a5f0982ae6501d_60ab0314", "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." ]
[ 101 ]
[ null ]
[ 18 ]
[ 46 ]
2024-11-18T21:10:21.429925+00:00
1,575,938,621,000
5ed1a1a7d97ce074b18173bbd6756bc75e26690f
2
{ "blob_id": "5ed1a1a7d97ce074b18173bbd6756bc75e26690f", "branch_name": "refs/heads/master", "committer_date": 1575938621000, "content_id": "a6e1c1fd49bae8c0ffe5a3d2b56a1aa93a41d6de", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "1bfe17d02c2cc9939d00c707b5559257cc297481", "extension": "p...
2.453125
stackv2
#!/usr/bin/env python import sys import os import stat import yaml from collections import defaultdict from datetime import datetime import itertools import colorful from jinja2 import Environment, FileSystemLoader import commons # local module def get_topics(yaml_data): s = set() for node in yaml_data: ...
229
32.97
170
18
1,758
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_33c2ccc08a07b1f3_fad861d6", "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." ]
[ 125 ]
[ null ]
[ 11 ]
[ 100 ]
2024-11-18T21:10:48.744142+00:00
1,559,185,605,000
0e6afa45647b8384e53ce999515c50c91ec6b402
2
{ "blob_id": "0e6afa45647b8384e53ce999515c50c91ec6b402", "branch_name": "refs/heads/master", "committer_date": 1559185605000, "content_id": "93d8a70c7c643cbdce1632236e24aaf3b38b35ad", "detected_licenses": [ "MIT" ], "directory_id": "8f92401f827cc364a6bc4a7b878f1c89cfe83150", "extension": "py", "fi...
2.375
stackv2
from practicum import find_mcu_boards, McuBoard, PeriBoard from flask import Flask, Response, jsonify, request from flask_cors import CORS import json import threading app = Flask(__name__) CORS(app) devs = find_mcu_boards() if len(devs) == 0: print("*** No practicum board found.") exit(1) mcu = McuBoard(devs...
131
24.82
92
12
908
python
[{"finding_id": "codeql_py/reflective-xss_ebc9e6784f0b244b_eb8d9747", "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)." ]
[ 115 ]
[ null ]
[ 12 ]
[ 29 ]
2024-11-18T21:10:56.243512+00:00
1,571,746,545,000
a85c7683860f1b55a3d0a1a95661ba75c8ed9cde
3
{ "blob_id": "a85c7683860f1b55a3d0a1a95661ba75c8ed9cde", "branch_name": "refs/heads/master", "committer_date": 1571746545000, "content_id": "1cb05f6bbdba32bea821db9c2ff06384cf9a22a1", "detected_licenses": [ "MIT" ], "directory_id": "f003803882aff589bc310b81b6a589252621cba8", "extension": "py", "fi...
2.875
stackv2
import sys import json import os.path import sqlite3 from flask import Flask, Response, render_template # Funciones auxiliares def lista_tablas(): conn = sqlite3.connect(sys.argv[1]) c = conn.cursor() c.execute("SELECT * FROM sqlite_master WHERE type='table';") tablas = [tabla[1] for tabla in c.fetcha...
97
28.23
90
17
692
python
[{"finding_id": "codeql_py/reflective-xss_739c16c424e962f9_9e794f6f", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability d...
3
true
[ "CWE-079", "CWE-089", "CWE-089" ]
[ "py/reflective-xss", "py/sql-injection", "py/sql-injection" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2).", "This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2).", "This SQL query depends on a [user-provided value](1).\n...
[ 19, 32, 44 ]
[ 23, null, null ]
[ 9, 19, 19 ]
[ 7, 54, 54 ]
2024-11-18T21:23:49.186102+00:00
1,693,598,230,000
e96eeb558e6d391647ca7fa9d0f4e59a4fc2f2e9
3
{ "blob_id": "e96eeb558e6d391647ca7fa9d0f4e59a4fc2f2e9", "branch_name": "refs/heads/master", "committer_date": 1693598230000, "content_id": "fb26a4707ad684d1b30530315986c2d0483fd24c", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "2a5483d51ffe40126844a7673ebfcec6c8ccda7a", "extension": "p...
2.515625
stackv2
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import getpass import json import six import yaml from clint.textui import puts from six.moves import input from commcare_cloud.colors import color_error from commcare_cloud.commands.command_base impor...
114
39.98
119
17
941
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7646268cabb42279_73ee9144", "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...
6
true
[ "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" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secre...
[ 44, 60, 69, 105, 111, 114 ]
[ null, null, null, 106, null, null ]
[ 19, 19, 19, 15, 23, 19 ]
[ 25, 75, 75, 62, 100, 88 ]
2024-11-18T21:37:19.206409+00:00
1,485,511,811,000
4a74bf1d35531f608c933a36fd2c369fcfaf1b63
2
{ "blob_id": "4a74bf1d35531f608c933a36fd2c369fcfaf1b63", "branch_name": "refs/heads/master", "committer_date": 1485511811000, "content_id": "ac2aaf486f4559582951cdc512b813972bb3b50d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "be378f71e4c4533e761da86cd328ce56c03a55ea", "extension": "py"...
2.3125
stackv2
import os from jinja2 import Environment, FileSystemLoader class Template(object): def __init__(self, schema, template="default", **kwargs): self.__author_stats = kwargs.get("author_stats") self.__base_path = os.path.join( os.path.dirname(os.path.realpath(__file__)), '../....
27
27.81
72
15
156
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_4f57091da3cfd263_015c0574", "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." ]
[ 19 ]
[ 21 ]
[ 27 ]
[ 10 ]
2024-11-18T21:37:51.050857+00:00
1,624,431,545,000
43dc4b18d0d884e1a14db1d06f2551e9bd3ea307
2
{ "blob_id": "43dc4b18d0d884e1a14db1d06f2551e9bd3ea307", "branch_name": "refs/heads/main", "committer_date": 1624436299000, "content_id": "ab46e33aa7acae4560e30d84593817bb8addcdd3", "detected_licenses": [ "MIT" ], "directory_id": "97c08a5e9fbc49bdd43ae4943d9d788a6fa99c6a", "extension": "py", "file...
2.421875
stackv2
import os import re import subprocess import time class Base: def __init__(self): self.files = {'params': 'parameters', 'breakinfo': 'break_information', 'coll': 'collect', 'blat': 'blat', 'filtmatch': 'filter_match', 'filtmiss': 'filter_miss', ...
90
35.73
101
20
786
python
[{"finding_id": "codeql_py/overly-permissive-file_72d226cea27480ae_c75dc8b2", "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." ]
[ 35 ]
[ null ]
[ 9 ]
[ 31 ]
2024-11-18T21:58:59.692988+00:00
1,592,064,662,000
029059f5cc2a1ee906cee1cac8b0f1219e5e1b53
2
{ "blob_id": "029059f5cc2a1ee906cee1cac8b0f1219e5e1b53", "branch_name": "refs/heads/master", "committer_date": 1592064662000, "content_id": "ccb17f07b66bf5a354e1d1a4183b4b9e44ae7bc0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "09c391b06be34dcfc08693f9759460684c039fe4", "extension": "py"...
2.484375
stackv2
# Copyright 2020, Pulumi Corporation. All rights reserved. import abc import json import io import paramiko import pulumi from pulumi import dynamic import sys import time from typing import Any, Optional from typing_extensions import TypedDict from uuid import uuid4 # ConnectionArgs tells a provisioner how to acces...
169
36.14
119
19
1,326
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_ebcef6f54bd92f0e_6bf9e4db", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 33 ]
[ null ]
[ 5 ]
[ 62 ]
2024-11-18T21:59:14.823808+00:00
1,533,102,494,000
762d88267fa0328ca61e100989142ff10371c31c
3
{ "blob_id": "762d88267fa0328ca61e100989142ff10371c31c", "branch_name": "refs/heads/master", "committer_date": 1533102494000, "content_id": "9e1a26db3cd82e408915f92d00ff17fffe43b317", "detected_licenses": [ "MIT" ], "directory_id": "4c3b3a40f4c3041fd25728f066fa6744a9301c0f", "extension": "py", "fi...
2.515625
stackv2
#!/usr/bin/env python import threading, paramiko, subprocess usage = "./bh_sshcmd.py <hostname> <user> <password> <command>" host = sys.argv[1] user = sys.argv[2] passwd = sys.argv[3] command = sys.argv[4] def banner(): print "######## SSH Client p26 #########" #Black Hat Python; SSH w/ Paramiko (p 26) ...
33
28
96
10
259
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_979bff2a8e50a35f_6b22bc5b", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 17 ]
[ null ]
[ 2 ]
[ 62 ]
2024-11-18T21:59:19.593221+00:00
1,622,294,116,000
9eca7ca5e42ea4167cf1b0caae6511d4cdbe681b
3
{ "blob_id": "9eca7ca5e42ea4167cf1b0caae6511d4cdbe681b", "branch_name": "refs/heads/master", "committer_date": 1622294116000, "content_id": "07ed3d835f1726516945bace14cdcdb42eea8050", "detected_licenses": [ "MIT" ], "directory_id": "6e802f62ac6ae8b748ed91283e357a96d9ca5e2a", "extension": "py", "fi...
2.578125
stackv2
"""MagicMirror Management Protocol Server""" import os import subprocess import glob import json from flask import Flask, request, jsonify from flask_cors import CORS CONFIG_FILE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../config/config.js") app = Flask(__name__) CORS(app) def _ret_unknown_ac...
366
29.3
98
17
2,612
python
[{"finding_id": "codeql_py/flask-debug_fd0084293f697253_2b6158ab", "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.", ...
21
true
[ "CWE-215", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-079", "CWE-022", "CWE-022" ]
[ "py/flask-debug", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss",...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "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.", "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 ...
[ 366, 132, 159, 177, 186, 239, 254, 267, 277, 279, 304, 314, 316, 322, 336, 338, 347, 354, 359, 262, 263 ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
[ 5, 12, 16, 16, 16, 20, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 20, 20, 16, 23, 19 ]
[ 24, 39, 24, 24, 43, 51, 43, 41, 45, 90, 43, 45, 90, 24, 45, 90, 28, 28, 43, 31, 27 ]
2024-11-18T21:59:21.326077+00:00
1,614,262,371,000
621bdd4486f2b86f3707da7299e5157e0d177eb1
3
{ "blob_id": "621bdd4486f2b86f3707da7299e5157e0d177eb1", "branch_name": "refs/heads/main", "committer_date": 1614262371000, "content_id": "c4252439aa515be1afe7c894257dc9d37a9c78d9", "detected_licenses": [ "MIT" ], "directory_id": "a5985b48f37124f989da1a3f99269944b54d020e", "extension": "py", "file...
3.0625
stackv2
from .utils.decorators import timer from .publications import Publication from collections.abc import Iterable, Iterator from typing import Dict, List from .elements import factory, Element from bs4 import BeautifulSoup import requests import re import sys class DepartmentPublications(Iterable): """This class pro...
228
30.78
86
19
1,503
python
[{"finding_id": "codeql_py/overly-large-range_afb78ffdfe386706_d726ccb1", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class.", "remediation": "", "loc...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that overlaps with a-z in the same character class.", "Suspicious character range that overlaps with A-Z in the same character class." ]
[ 79, 79 ]
[ null, null ]
[ 42, 45 ]
[ 45, 48 ]
2024-11-18T22:11:53.274590+00:00
1,579,524,917,000
7e46659f0b3b4de7bbea2f3fa5e298bfdfd894ea
2
{ "blob_id": "7e46659f0b3b4de7bbea2f3fa5e298bfdfd894ea", "branch_name": "refs/heads/master", "committer_date": 1579524917000, "content_id": "1d7d1acb30bef809ef924745ed2ae1793db3dba4", "detected_licenses": [ "MIT" ], "directory_id": "c73561d78b65097e8e5c5df64eca577f30312f8c", "extension": "py", "fi...
2.375
stackv2
import requests from flask import ( Blueprint, request, jsonify) from flaskr.db import get_db name_required = "Organization Name is required." bp = Blueprint('auth', __name__, url_prefix='/org') @bp.route('/register', methods=('POST', 'GET')) def register_organization(): if request.method == 'POST': ...
162
42.32
134
18
1,460
python
[{"finding_id": "codeql_py/reflective-xss_43ee505b1bde8c4b_eab9bec5", "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...
2
true
[ "CWE-079", "CWE-918" ]
[ "py/reflective-xss", "py/partial-ssrf" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 60, 157 ]
[ null, 158 ]
[ 16, 26 ]
[ 21, 88 ]
2024-11-18T22:24:09.584451+00:00
1,595,499,834,000
d4d162aba4157f6a7e6915aae00abeade3eab6d3
3
{ "blob_id": "d4d162aba4157f6a7e6915aae00abeade3eab6d3", "branch_name": "refs/heads/master", "committer_date": 1595499834000, "content_id": "45122c484a4332d268b9e5a944b298170efaa3b6", "detected_licenses": [ "Apache-2.0" ], "directory_id": "cd4bb3232f44e3bb1a787b0be7b452e19f740c8d", "extension": "py"...
2.71875
stackv2
""" This file provides remote port forwarding functionality using paramiko package, Inspired by: https://github.com/paramiko/paramiko/blob/master/demos/rforward.py """ import select import socket import sys import threading from io import StringIO import warnings import paramiko DEBUG_MODE = False def handler(chan,...
107
29.27
85
18
621
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_1e440732a9409d20_28e8d4d9", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to WarningPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to WarningPolicy may be unsafe." ]
[ 66 ]
[ null ]
[ 5 ]
[ 65 ]
2024-11-18T22:24:14.865516+00:00
1,562,760,128,000
f0d345c12707ce8e2e39323db8b9f746b8c4a124
2
{ "blob_id": "f0d345c12707ce8e2e39323db8b9f746b8c4a124", "branch_name": "refs/heads/master", "committer_date": 1562760128000, "content_id": "7b882ea2be3b61a4c8e4eff74d339e110667a902", "detected_licenses": [ "MIT" ], "directory_id": "c6a02afd2421435fc45070e88bcd1dd25bde49c1", "extension": "py", "fi...
2.40625
stackv2
import os import hashlib from urllib.parse import parse_qs #系统的查询参数解析方法 import jinja2 from DBHelper import DBHelper from Response import * # 处理模块 # 读取文件 def load_file(fileName): try: with open(fileName, 'rb') as fp: return fp.read() # 文件存在 except Exception as e: return b"File n...
157
29.43
113
15
1,284
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_df12243d6b427696_397fb387", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
5
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-327" ]
[ "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/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "[Sensitive data (password)](...
[ 47, 50, 74, 74, 49 ]
[ null, null, null, null, null ]
[ 24, 15, 24, 33, 33 ]
[ 32, 23, 32, 36, 56 ]
2024-11-18T22:24:28.756669+00:00
1,683,551,347,000
b97efa7c4dc9f97e427ea749cc2859cb30318e0c
3
{ "blob_id": "b97efa7c4dc9f97e427ea749cc2859cb30318e0c", "branch_name": "refs/heads/master", "committer_date": 1683551347000, "content_id": "c1ff62f7783e421cba196253584a06dbe0b6d057", "detected_licenses": [ "Apache-2.0" ], "directory_id": "abe3e59c9dae5aa7d757661c34b158519e3d79f0", "extension": "py"...
2.625
stackv2
import argparse import json import binascii def csv_head_template(backend_public_key, token): head = f'''key,type,encoding,value key_storage,namespace,, server_key,data,base64,{backend_public_key} ''' if token is not None: head += f'''token,data,binary,{token} ''' return head def csv_device_tem...
85
30.79
87
14
746
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_df5701bbf1d1bc9f_fa0ae404", "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." ]
[ 81 ]
[ null ]
[ 18 ]
[ 21 ]
2024-11-18T22:36:37.405579+00:00
1,625,673,513,000
62a3cc16ffdb00dc68f1039bb084cdbb7479e281
3
{ "blob_id": "62a3cc16ffdb00dc68f1039bb084cdbb7479e281", "branch_name": "refs/heads/main", "committer_date": 1625673513000, "content_id": "388b68f61e0e00ec3f33af2f36c8490aa1e1ef81", "detected_licenses": [ "MIT" ], "directory_id": "2dcf8371b6e1923e1ca93bec99cfa92de5617f85", "extension": "py", "file...
2.9375
stackv2
from collections import Counter, defaultdict import string import random import re import json import os import hashlib ENCODED_MESSAGES = ["e4820b45d2277f3844eac66c903e84be", "23170acc097c24edb98fc5488ab033fe", "665e5bcb0c20062fe8abaaf4628bb154"] PRIME_NUMBERS = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, ...
216
32.26
141
20
1,826
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_78cf30db9575d6a2_0fef86fc", "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." ]
[ 44 ]
[ null ]
[ 15 ]
[ 35 ]
2024-11-18T22:36:40.309168+00:00
1,519,747,166,000
375971fcc6f3197245a564c321d8c7c6e411e0b3
3
{ "blob_id": "375971fcc6f3197245a564c321d8c7c6e411e0b3", "branch_name": "refs/heads/master", "committer_date": 1519747166000, "content_id": "e4eb47e07c64b58748155356b8b297839047e239", "detected_licenses": [ "MIT" ], "directory_id": "c9569cefaffeb53adc96901799c4cd6036af3d62", "extension": "py", "fi...
2.53125
stackv2
import os import json import subprocess from flask import Flask, request app = Flask(__name__) script_path = os.path.abspath(__file__) config = os.path.join(os.path.dirname(script_path), 'server.json') def get_upload_folder(): return json.loads(open(config,'r').read())['upload_folder'] @app.route('/upload', me...
59
32.08
70
15
422
python
[{"finding_id": "codeql_py/command-line-injection_c3970004cb16a193_6aa5a09e", "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-215", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/command-line-injection", "py/flask-debug", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This command line depends on a [user-provided value](1).", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [...
[ 56, 59, 28, 31, 42 ]
[ null, null, null, null, null ]
[ 40, null, 21, 19, 19 ]
[ 44, 17, 28, 39, 34 ]
2024-11-18T22:36:45.109003+00:00
1,478,921,707,000
f957eee34349630ed1e76e5480d2734c484142e1
3
{ "blob_id": "f957eee34349630ed1e76e5480d2734c484142e1", "branch_name": "refs/heads/master", "committer_date": 1478921707000, "content_id": "72fd82fae622f931f39654ecbacb23dfb499a012", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fd81ab00e96dabf798abc04083e2bd8c78217125", "extension": "py"...
2.78125
stackv2
import sqlite3 from flask import ( Flask, render_template, request, session, redirect, url_for, flash, jsonify ) app = Flask(__name__) app.secret_key = 'chavesecreta' class Produto: def __init__(self): self.id = None self.nome = None self.imagem = None ...
168
21.4
66
12
938
python
[{"finding_id": "codeql_py/sql-injection_23221a9ba7fbf711_3eccd05f", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2)."...
1
true
[ "CWE-089" ]
[ "py/sql-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2)." ]
[ 70 ]
[ null ]
[ 20 ]
[ 23 ]
2024-11-18T22:36:53.197028+00:00
1,551,908,227,000
e2e9833284a36655546a4ac9cba39848508d7895
3
{ "blob_id": "e2e9833284a36655546a4ac9cba39848508d7895", "branch_name": "refs/heads/master", "committer_date": 1551908227000, "content_id": "bf02a861fe1233a041924e06bb15b73b89ea1631", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "f3a6dac90ae4134eb038b7e0d650328d716cd891", "extension": "p...
2.53125
stackv2
#!/usr/bin/python3 # # This software is provided under under the BSD 3-Clause License. # See the accompanying LICENSE file for more information. # # Windows Exploit Suggester - Next Generation # # Author: Arris Huijgen (@bitsadmin) # Website: https://github.com/bitsadmin import sys, csv, re, argparse, os, urllib.reques...
327
33.76
160
15
3,120
python
[{"finding_id": "codeql_py/redos_85abce512a93713f_f0861dc2", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with ': ' and containing many repetitio...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with ': ' and containing many repetitions of '9'." ]
[ 73 ]
[ null ]
[ 43 ]
[ 46 ]
2024-11-18T20:23:24.801510+00:00
1,684,877,422,000
705e0534b60a710698c6505a835e7bb53c1cc46a
2
{ "blob_id": "705e0534b60a710698c6505a835e7bb53c1cc46a", "branch_name": "refs/heads/main", "committer_date": 1684877422000, "content_id": "253d918d10b97f354c723bdd71be396686180d5c", "detected_licenses": [ "MIT" ], "directory_id": "7cecdae92dc9b32df74d45a1bd529bc544283f94", "extension": "py", "file...
2.40625
stackv2
import json from typing import Optional import requests import urllib3 urllib3.disable_warnings() STATE_OK = 0 STATE_WARNING = 1 STATE_CRITICAL = 2 STATE_UNKNOWN = 3 States = { STATE_OK: "OK", STATE_WARNING: "WARNING", STATE_CRITICAL: "CRITICAL", STATE_UNKNOWN: "UNKNOWN", } def send_passive_check...
61
19.64
84
11
319
python
[{"finding_id": "codeql_py/request-without-cert-validation_6de82caa5b9d8bd7_4d56b02f", "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)." ]
[ 55 ]
[ 61 ]
[ 12 ]
[ 6 ]
2024-11-18T21:22:11.973156+00:00
1,522,218,522,000
ddc6da1e01e9b4551e3ee0a43e062ef4618083c5
3
{ "blob_id": "ddc6da1e01e9b4551e3ee0a43e062ef4618083c5", "branch_name": "refs/heads/master", "committer_date": 1522218522000, "content_id": "211f2068558c0aa310f28ae4a76af4b1a8a3f70d", "detected_licenses": [ "MIT" ], "directory_id": "0694071162d7f3c60292a3bf42995b7dc7fa74f0", "extension": "py", "fi...
2.578125
stackv2
from django.db import models from django.core.exceptions import ObjectDoesNotExist from django.utils import timezone import hashlib import base64 import os # Create your models here. class User(models.Model): name = models.CharField(max_length=128) password = models.CharField(max_length=512, default='cmdb123'...
60
30.07
82
15
438
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_f2442fafdc71353b_19cfaaed", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational...
[ 27, 33 ]
[ null, null ]
[ 24, 24 ]
[ 47, 56 ]
2024-11-18T21:22:14.760640+00:00
1,594,799,471,000
ab829a0bb07f5f593a89d86833ce9afdd4ff8fc3
3
{ "blob_id": "ab829a0bb07f5f593a89d86833ce9afdd4ff8fc3", "branch_name": "refs/heads/master", "committer_date": 1594799471000, "content_id": "faa4202b5e5fa5726264e2c0e2991d8c6f6794ec", "detected_licenses": [ "MIT" ], "directory_id": "bbbc685a9e8cba5ee4819c34e5841baa07966bf7", "extension": "py", "fi...
2.734375
stackv2
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import crawler import json import os import sys import time reload(sys) sys.setdefaultencoding('utf8') class Music163Crawler: music_config = dict() music_crawler = None song_url_list = list() def __init__(self): self.music_crawler = crawler.Craw...
134
37.52
101
17
1,121
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_5161fcd56be23bb2_061fa29f", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://music.163.com](1) may be at an arbitrary posit...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [https://music.163.com](1) may be at an arbitrary position in the sanitized URL.", "The string [https://music.163.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 45, 56 ]
[ null, null ]
[ 16, 16 ]
[ 55, 63 ]
2024-11-18T21:22:23.555985+00:00
1,608,328,771,000
02754da35cbd0c99d01aa7b9dc502b71d12f13e8
3
{ "blob_id": "02754da35cbd0c99d01aa7b9dc502b71d12f13e8", "branch_name": "refs/heads/master", "committer_date": 1608328771000, "content_id": "b5ca4e89ee676bb81c24715dd02939b2b19e33c5", "detected_licenses": [ "MIT" ], "directory_id": "1ada4434bc929d2e993061752d53925a906faadf", "extension": "py", "fi...
2.5625
stackv2
import json import re from time import sleep from tqdm import tqdm from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdr...
141
30.31
115
16
1,016
python
[{"finding_id": "codeql_py/incomplete-hostname-regexp_78aab3966ce61c64_982454c8", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'youtube.com/watch', so it might mat...
1
true
[ "CWE-020" ]
[ "py/incomplete-hostname-regexp" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression has an unescaped '.' before 'youtube.com/watch', so it might match more hosts than expected." ]
[ 79 ]
[ null ]
[ 27 ]
[ 64 ]
2024-11-18T21:51:23.176427+00:00
1,614,353,563,000
10de4849594f33c5597c27fe34459b641596f3d5
3
{ "blob_id": "10de4849594f33c5597c27fe34459b641596f3d5", "branch_name": "refs/heads/master", "committer_date": 1614353563000, "content_id": "69c99dcb5d356db269e20fc0cff2701120f6d36c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e40e516a8e0f2bddda490120447004322624e433", "extension": "py"...
2.765625
stackv2
import re import subprocess from urllib.parse import urlparse db_netloc_re = re.compile(r'^.+@.+:\d+$') email_re = re.compile(r'^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$') """ Utilities for dealing with REST and database servers """ def assert_http_uri(uri): """Check supplied URI matches http""" parsed...
128
37.59
120
16
1,236
python
[{"finding_id": "codeql_py/redos_49ad1a31602690c6_4bf89453", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with 'a' and containing many repetition...
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 'a' and containing many repetitions of 'a'.", "This part of the regular expression may cause exponential backtracking on strings starting with 'a@a' and containing many repetitions of 'a'." ]
[ 7, 7 ]
[ null, null ]
[ 36, 52 ]
[ 39, 55 ]
2024-11-18T21:51:25.161009+00:00
1,690,553,201,000
46c23f7fe6eb275378bf1a885a6752ac552d258a
3
{ "blob_id": "46c23f7fe6eb275378bf1a885a6752ac552d258a", "branch_name": "refs/heads/master", "committer_date": 1690553201000, "content_id": "5cab12ed2a9db8bf2e611f64a3d2000a3fca1dde", "detected_licenses": [ "MIT" ], "directory_id": "c7644a122dfdfd4522aa4e678dbae0a78c3b50ed", "extension": "py", "fi...
2.71875
stackv2
import logging from twilio.twiml.voice_response import VoiceResponse, Say from twilio.rest import Client from datetime import datetime import os account_access = os.environ["AccountAccess"] accouunt_secret = os.environ["AccountSecret"] from_number = os.environ["PhoneNumber"] logger = logging.getLogger() logger.setLev...
51
29.39
158
10
339
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0f5daf3fd658dd76_3270ac92", "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." ]
[ 28 ]
[ null ]
[ 17 ]
[ 90 ]
2024-11-18T21:51:28.829737+00:00
1,436,035,148,000
05f2640e71101c0d8fbc87d8c2ba3a7b0e46a3ad
3
{ "blob_id": "05f2640e71101c0d8fbc87d8c2ba3a7b0e46a3ad", "branch_name": "refs/heads/master", "committer_date": 1436035148000, "content_id": "f3e88646b7e62b07c98261df8b46c9833a524b32", "detected_licenses": [ "MIT" ], "directory_id": "3ec0c4990472cce528a2d987ca90db7ddf9e5b32", "extension": "py", "fi...
2.6875
stackv2
import threading import time import gps import csv class GPSPoller(threading.Thread): __log_file_name = None __log_file = None __csv_writer = None __current_value = None __start_time = None __debug = None running = False def __init__(self, a_log_file_name='./gps.csv', a_debug=False): ...
59
30.51
70
16
429
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_16d4660d6b0f75bd_84a5385d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text." ]
[ 44 ]
[ null ]
[ 27 ]
[ 34 ]
2024-11-18T21:51:38.638786+00:00
1,481,788,664,000
5c5851fd38fdf57529fdfca8315f6659c1f0845c
3
{ "blob_id": "5c5851fd38fdf57529fdfca8315f6659c1f0845c", "branch_name": "refs/heads/master", "committer_date": 1481788664000, "content_id": "2425c2f0537806fa569cf13e27aa8aad243d4dd8", "detected_licenses": [ "MIT" ], "directory_id": "cf97c156c421f13e5a0ade6fe2ed423c9bd6ffb2", "extension": "py", "fi...
3.109375
stackv2
import os, re txt_file_paths = [] for root, dirs, files in os.walk('tmp'): for file in files: if file.endswith(".txt"): txt_file_paths.append(os.path.join(root, file)) for files in txt_file_paths: fp = open(os.getcwd() + os.sep + files, 'r') pattern = re.compile('\d.+\w+') count = 0...
33
31.39
72
16
262
python
[{"finding_id": "codeql_py/overly-large-range_89062a7389cd0a42_30f32c2b", "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\\]." ]
[ 20 ]
[ null ]
[ 54 ]
[ 57 ]
2024-11-18T21:51:52.454570+00:00
1,637,764,263,000
2b245e9253141b6ed53cfc78737a19c8680a9f34
2
{ "blob_id": "2b245e9253141b6ed53cfc78737a19c8680a9f34", "branch_name": "refs/heads/master", "committer_date": 1637764263000, "content_id": "0bdfa8cd2083c69ceb7bd5238699a573ac959caa", "detected_licenses": [ "MIT" ], "directory_id": "8d2ee809e024838ced3e0e0776743c7c46d5af3b", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/env python3 # Used to run dhmap + analytics on the same machine for dev purposes import SimpleHTTPServer import SocketServer PORT = 8000 class RevHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_GET(self): if self.path.startswith('/analytics/'): path = self.path[len('/analytics/'):] ...
24
26.21
68
15
161
python
[{"finding_id": "codeql_py/http-response-splitting_9c1f9ece3f72f0be_b7e769db", "tool_name": "codeql", "rule_id": "py/http-response-splitting", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This HTTP header is constructed from a [user-provided value](1).", "remediation": "", "lo...
1
true
[ "CWE-113" ]
[ "py/http-response-splitting" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This HTTP header is constructed from a [user-provided value](1)." ]
[ 14 ]
[ null ]
[ 36 ]
[ 67 ]
2024-11-18T21:52:00.708389+00:00
1,579,230,135,000
ae01d7471af8fc52e3caa0785d81a6da80d5019d
2
{ "blob_id": "ae01d7471af8fc52e3caa0785d81a6da80d5019d", "branch_name": "refs/heads/master", "committer_date": 1579230135000, "content_id": "9cb26e3f05d8a27dd377c4ee3c81c30a8b15f602", "detected_licenses": [ "MIT" ], "directory_id": "6fd4b4decc91092e1d4073c89b53d23547eb6cef", "extension": "py", "fi...
2.328125
stackv2
import logging import sys from typing import Optional from brutemethehorizon import helper from brutemethehorizon.config import Colors, Config logger = logging.getLogger('horizon') def run(url: str, userlist: list, passlist: list, domain: str) -> Optional[dict]: d = {} for password in passlist: for ...
57
37.93
124
17
490
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_79de0c4b4f426127_c499122b", "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...
4
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive dat...
[ 29, 32, 36, 42 ]
[ null, null, null, null ]
[ 22, 17, 17, 19 ]
[ 60, 77, 124, 84 ]
2024-11-18T21:52:07.940274+00:00
1,628,940,141,000
49b275b0454d2a477a3d1d4777b57692adc26a19
2
{ "blob_id": "49b275b0454d2a477a3d1d4777b57692adc26a19", "branch_name": "refs/heads/main", "committer_date": 1628940141000, "content_id": "5727fd2200c6e519592ca8e198b81208ad9d0084", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "4a84b29149592e804e7e003193fd464614370795", "extension": "py"...
2.34375
stackv2
import paramiko import time import datetime import schedule def BACKUP(): TNOW = datetime.datetime.now().replace(microsecond=0) username = 'admin' password = 'admin' DEVICE_LIST = open ('09_devices') for RTR in DEVICE_LIST: RTR = RTR.strip() print ('\n #### Initiating the backup...
43
26.7
90
14
272
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_def2584d004c44a2_b06214ca", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 19 ]
[ null ]
[ 9 ]
[ 70 ]
2024-11-18T22:02:43.082877+00:00
1,450,734,034,000
15edafcd45dc29053745a298d7b7c27404739545
3
{ "blob_id": "15edafcd45dc29053745a298d7b7c27404739545", "branch_name": "refs/heads/master", "committer_date": 1450734034000, "content_id": "4e1c8d8925362f85c76bac0157ab8d46b95b4778", "detected_licenses": [ "MIT" ], "directory_id": "5a411471b1b50b2824521294d4055281f36fd3fb", "extension": "py", "fi...
2.671875
stackv2
#!/usr/bin/env python """ Copyright (c) 2015 World Wide Technology, Inc. All rights reserved. Revision history: 16 December 2015 | 1.0 - initial release 19 December 2015 | 1.1 - refacted code to handle errors 20 December 2015 | 1.2 - Tested and run pylint 21 December 2015 | 1...
273
28.1
135
15
1,727
python
[{"finding_id": "codeql_py/request-without-cert-validation_136962815d3fca64_4ba0b6c1", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 126, 143 ]
[ null, null ]
[ 17, 17 ]
[ 93, 69 ]
2024-11-18T22:16:46.678953+00:00
1,564,513,843,000
ef99d4458aa343ae680012e66445a9487bcf73d8
2
{ "blob_id": "ef99d4458aa343ae680012e66445a9487bcf73d8", "branch_name": "refs/heads/master", "committer_date": 1564513843000, "content_id": "4a8e6b81629ad25771004541a4a430b9ca77c1dc", "detected_licenses": [ "OpenSSL", "Apache-2.0" ], "directory_id": "0abf57fb7f446f4379b55edd535206500e8cbfb4", "e...
2.5
stackv2
""" Se siguen los pasos para establecer conexion con el emotiv app en mac os x Usando Cortex v2.0 Actualziación: 11 de junio 2019 """ from websocket import create_connection import ssl import json import time clientId = "" clientSecret = "" answer = "" token = None headset = "" sesion = "" profile = "gogo" ...
209
23.25
87
10
1,242
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1b5a6458c39873db_c5d23997", "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." ]
[ 37 ]
[ null ]
[ 11 ]
[ 14 ]
2024-11-18T22:27:46.614322+00:00
1,607,783,258,000
e8ca0396a485f58cef61bbc437b0c74ff548ccab
3
{ "blob_id": "e8ca0396a485f58cef61bbc437b0c74ff548ccab", "branch_name": "refs/heads/main", "committer_date": 1607783258000, "content_id": "abc1d7ede357e2a445bfb682f176110e502b864f", "detected_licenses": [ "MIT" ], "directory_id": "bdebef383139206ff655ba3d958fe5aff7405dd1", "extension": "py", "file...
3.265625
stackv2
import sys import time import argparse import datetime from random import randrange from impacket.smbconnection import SMBConnection, SessionError def single_user_bruteforce(username, password_file, domain, sleeptime, domain_controllers, output_filename): """ Single user bruteforce functionality (one user, ma...
228
31.85
152
17
1,756
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_124675afc7a683af_d490a9c4", "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.\...
4
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-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 stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text.\nThis expression stores [sensitive data (password)](4) as clear text.\nThis expression stores [sensitive d...
[ 121, 79, 143, 147 ]
[ null, null, null, null ]
[ 13, 11, 15, 15 ]
[ 24, 44, 77, 83 ]
2024-11-18T22:27:47.605966+00:00
1,610,633,981,000
d1ae9294d8ca002d4205ce1f82f6ea257a087348
3
{ "blob_id": "d1ae9294d8ca002d4205ce1f82f6ea257a087348", "branch_name": "refs/heads/master", "committer_date": 1610633981000, "content_id": "259bc5b2777f2370ea8a2761591c6fad01dcff63", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f45f46121de6f266a7b3cf1b4ca3b0b707b23dd9", "extension": "py"...
2.71875
stackv2
import os import json from jinja2 import Template def generate_pdf_report(yoshi_output_file, project_name, community_type): """ Generates a PDF report of a given output of Yoshi. :param yoshi_output_file: Path to the Yoshi output file. :param project_name: Name of the project. :param community_typ...
98
41
87
17
912
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_37a48e708924d8be_854d85ba", "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." ]
[ 19 ]
[ null ]
[ 16 ]
[ 46 ]
2024-11-18T22:44:07.448784+00:00
1,487,604,994,000
fd1cdba4bf243c535b2e4ae03cf22142504fe922
3
{ "blob_id": "fd1cdba4bf243c535b2e4ae03cf22142504fe922", "branch_name": "refs/heads/master", "committer_date": 1487604994000, "content_id": "50b4fc1811320a399cf8a7010a83f6d796af7ece", "detected_licenses": [ "Apache-2.0" ], "directory_id": "36fb8369cb13d5ee79d0cbb366d4fa35c0aafeb4", "extension": "py"...
2.671875
stackv2
# -*- coding: utf-8 -*- """ sceptre.config This module implements a Config class, which stores a stack or environment's configuration. """ import logging import os import yaml from jinja2 import Environment, FileSystemLoader, StrictUndefined from packaging.specifiers import SpecifierSet from packaging.version impor...
302
36.57
79
21
2,188
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_dca2b895a5812d84_7bac6695", "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." ]
[ 140 ]
[ 143 ]
[ 27 ]
[ 22 ]
2024-11-18T22:44:20.963237+00:00
1,677,356,619,000
a0bcdaa3368955cc8ce8cf95a9c95003e90d7911
3
{ "blob_id": "a0bcdaa3368955cc8ce8cf95a9c95003e90d7911", "branch_name": "refs/heads/master", "committer_date": 1677356619000, "content_id": "83ce01b065409949e3bd38340ac8e92a6fa41d81", "detected_licenses": [ "MIT" ], "directory_id": "64624181e06745b564b66e4c87f43251a5f05931", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python3 import argparse import jinja2 parser = argparse.ArgumentParser('portchan.py') parser.add_argument('-c', '--confname') parser.add_argument('-p', '--prefix', required=True) parser.add_argument('-f', '--first', type=int, default=1) parser.add_argument('-o', '--offset', type=int, default=0) parser....
60
25.75
75
13
427
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_4995fc4acd37f998_b575fd3c", "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." ]
[ 49 ]
[ null ]
[ 12 ]
[ 37 ]
2024-11-18T22:44:21.492675+00:00
1,677,223,384,000
172d374955add4ab516065a93afd3975b99da576
3
{ "blob_id": "172d374955add4ab516065a93afd3975b99da576", "branch_name": "refs/heads/master", "committer_date": 1677223384000, "content_id": "ce7f7ccaf6725a9f4ab5bae0e2576f77a91cc110", "detected_licenses": [ "MIT" ], "directory_id": "b21c84b0e737397713ad9540347a6a1f1839c261", "extension": "py", "fi...
2.59375
stackv2
#!/usr/bin/env python3 import argparse import codecs import http.client import http.server import json import logging import re import sys import time import urllib.error import urllib.parse import urllib.request import webbrowser logging.basicConfig(level=20, datefmt='%I:%M:%S', format='[%(asctime)s] %(message)s') ...
221
35.44
121
26
2,059
python
[{"finding_id": "codeql_py/log-injection_8c0d82d765013daa_e40546e0", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno...
1
true
[ "CWE-117" ]
[ "py/log-injection" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "This log entry depends on a [user-provided value](1)." ]
[ 114 ]
[ null ]
[ 18 ]
[ 71 ]
2024-11-18T20:59:41.349022+00:00
1,528,292,605,000
43b79ed4922d119e106d9810294354fc868be0e5
2
{ "blob_id": "43b79ed4922d119e106d9810294354fc868be0e5", "branch_name": "refs/heads/master", "committer_date": 1528292605000, "content_id": "788bf797a602dfba44c2774d272f4d86b5aeca6b", "detected_licenses": [ "MIT" ], "directory_id": "c3089d8f5c7d05ce8e8d22335dd94f0dfa6e7cdb", "extension": "py", "fi...
2.390625
stackv2
# -*- coding: utf-8 -*- from flask import Flask, render_template, request, redirect, url_for import glob import os import shutil import time import numpy as np import cv2 import keras from keras.models import Model, Input from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten ...
113
28.88
97
19
1,048
python
[{"finding_id": "codeql_py/path-injection_6d23753c0e0af4b4_c1da07f6", "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", ...
2
true
[ "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 90, 90 ]
[ null, null ]
[ 17, 43 ]
[ 41, 56 ]
2024-11-18T21:00:00.659395+00:00
1,687,608,419,000
62045ae261b7e6771d9838f11f9ada1dac8085ca
2
{ "blob_id": "62045ae261b7e6771d9838f11f9ada1dac8085ca", "branch_name": "refs/heads/master", "committer_date": 1687608419000, "content_id": "8383415d2381ac3e1874d16a9440517908e51797", "detected_licenses": [ "Apache-2.0" ], "directory_id": "13feec69e423695e650d018a1ceca1f6fa83d275", "extension": "py"...
2.390625
stackv2
## Copyright 2020 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 import os import platform import re import shutil import tarfile from zipfile import ZipFile from urllib.request import urlretrieve # Runs a command and checks the return value for success def run(command): status = os.system(command) if s...
63
31.43
102
15
483
python
[{"finding_id": "codeql_py/tarslip_257720f32dbcfad5_69fdbe88", "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)." ]
[ 43 ]
[ null ]
[ 3 ]
[ 10 ]
2024-11-18T21:00:42.671251+00:00
1,552,362,413,000
3dc275f438fb076609c5330bc8f99823a89cca15
3
{ "blob_id": "3dc275f438fb076609c5330bc8f99823a89cca15", "branch_name": "refs/heads/master", "committer_date": 1552362413000, "content_id": "a18c1a8411e2ed34b3b3528999283d9ce815fa4e", "detected_licenses": [ "MIT" ], "directory_id": "5554b9c3f9010f79453cce4c67d04bb262b9cb5e", "extension": "py", "fi...
2.890625
stackv2
import sys from typing import List from jinja2 import Template def main(): if len(sys.argv) != 2: print(sys.argv) print('Usage: generate_ast <output directory>') sys.exit(1) outputDir = sys.argv[1] defineAst(outputDir, "Expr", [ "Assign : Token name, Expr value", ...
86
31.72
109
13
728
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_9684728a6656d610_36a1ac00", "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." ]
[ 51 ]
[ 78 ]
[ 16 ]
[ 9 ]
2024-11-18T21:00:49.105081+00:00
1,405,751,383,000
834443a2d44fa92bd6fb4747846be8889006aebe
3
{ "blob_id": "834443a2d44fa92bd6fb4747846be8889006aebe", "branch_name": "refs/heads/master", "committer_date": 1405751383000, "content_id": "6fa0cca18d7a498c4af4fe51a60c99d92b0d3f0e", "detected_licenses": [ "MIT" ], "directory_id": "182df66321a4904d02cb476976993ae2bf120b20", "extension": "py", "fi...
2.828125
stackv2
import youtube_dl import urllib import re from flask import Flask from flask import render_template from flask import request from flask import Response import os app = Flask(__name__) @app.route("/") def hello(): return render_template('index.html') @app.route("/search") def hello2(): s = request.args.get('nam...
58
22.79
71
12
368
python
[{"finding_id": "codeql_py/path-injection_3783ce9678796f0b_653a522d", "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", ...
5
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-918" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/partial-ssrf" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "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).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 30, 31, 36, 38, 42 ]
[ null, null, null, null, null ]
[ 20, 13, 27, 23, 13 ]
[ 23, 16, 30, 26, 40 ]
2024-11-18T21:01:18.861604+00:00
1,510,942,894,000
76fb1fcf103ca5aaa8caed1d27fd8b06a697659f
3
{ "blob_id": "76fb1fcf103ca5aaa8caed1d27fd8b06a697659f", "branch_name": "refs/heads/master", "committer_date": 1510942894000, "content_id": "532983512ebad6ebef77840aca663e2a1f1ef574", "detected_licenses": [ "MIT" ], "directory_id": "6ad437a72334ace247da599d22a71eca4d3ff020", "extension": "py", "fi...
2.59375
stackv2
import MySQLdb import MySQLdb.converters from .config import config from .utils import QuasarException def dec_to_float_converter(): converter = MySQLdb.converters.conversions.copy() converter[246] = float return converter def _connect(opts): conn = None try: conn = MySQLdb.connect(**op...
80
25.25
76
17
426
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ad32d9e8a26d4c8d_c2ef942a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text." ]
[ 44 ]
[ null ]
[ 72 ]
[ 76 ]
2024-11-18T21:01:21.525673+00:00
1,689,708,989,000
3119465967a3fe7fd2ec5ce434060a8377a94a4d
3
{ "blob_id": "3119465967a3fe7fd2ec5ce434060a8377a94a4d", "branch_name": "refs/heads/master", "committer_date": 1689708989000, "content_id": "d5db3c1e0e481126a01eb8fe56d7b76d53a910d5", "detected_licenses": [ "NIST-Software", "BSD-3-Clause", "MIT" ], "directory_id": "142060f5794b472d1c772c6b5017...
2.59375
stackv2
""" REST views for the search operators. """ from django.utils.decorators import method_decorator from rest_framework import status from rest_framework.exceptions import ValidationError from rest_framework.response import Response from rest_framework.views import APIView from core_main_app.commons import exceptions fr...
224
32.19
85
16
1,390
python
[{"finding_id": "codeql_py/stack-trace-exposure_ce466af4c08633db_e263d768", "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.", "...
9
true
[ "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "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.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information...
[ 46, 87, 90, 93, 97, 102, 135, 187, 223 ]
[ null, null, null, null, null, null, null, null, null ]
[ 17, 29, 29, 29, 17, 17, 17, 17, 17 ]
[ 24, 36, 36, 36, 24, 24, 24, 24, 24 ]