added stringlengths 32 32 | created int64 1,236B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.03 | source stringclasses 1
value | text stringlengths 330 19.3k | num_lines int64 16 648 | avg_line_length float64 15.5 59.3 | max_line_length int64 37 179 | ast_depth int64 8 38 | length int64 102 3.79k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.11k 276k | sast_codeql_findings_count int64 1 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 33 | rule_ids listlengths 1 33 | confidences listlengths 1 33 | severities listlengths 1 33 | messages listlengths 1 33 | line_starts listlengths 1 33 | line_ends listlengths 1 33 | column_starts listlengths 1 33 | column_ends listlengths 1 33 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T21:00:29.806757+00:00 | 1,626,111,413,000 | 10c9a8a68dec6081835904f4c9f0e48c935a7e41 | 2 | {
"blob_id": "10c9a8a68dec6081835904f4c9f0e48c935a7e41",
"branch_name": "refs/heads/master",
"committer_date": 1626111413000,
"content_id": "aaf8b63fe4afb09f067bb7d05d68546398fa6541",
"detected_licenses": [
"MIT"
],
"directory_id": "c2da1766405d8e082ba01d0f353da4e9c3245b5e",
"extension": "py",
"fi... | 2.328125 | stackv2 | '''
This is the main module
'''
import datetime
import json
import os
import re
import urllib
import requests
from flask import Flask, render_template, request
app = Flask(__name__, static_url_path='/static')
#CORS(app)
BASE_URL = os.getenv('BASE_URL', 'http://example.com/')
HOME_BASE = os.getenv('HOME_BASE', 'http:... | 216 | 23.59 | 102 | 17 | 1,554 | python | [{"finding_id": "codeql_py/regex-injection_f3f6ebd422996c98_b03669aa", "tool_name": "codeql", "rule_id": "py/regex-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This regular expression depends on a [user-provided value](1) and is executed by [re.match](2).", "remedi... | 2 | true | [
"CWE-730",
"CWE-918"
] | [
"py/regex-injection",
"py/partial-ssrf"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This regular expression depends on a [user-provided value](1) and is executed by [re.match](2).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
211,
117
] | [
null,
null
] | [
21,
16
] | [
28,
51
] | |
2024-11-18T21:00:44.047676+00:00 | 1,434,988,478,000 | 14d189655f4966fb8e48da7ef8f64c05f147b402 | 3 | {
"blob_id": "14d189655f4966fb8e48da7ef8f64c05f147b402",
"branch_name": "refs/heads/master",
"committer_date": 1434988478000,
"content_id": "45da76080bb6f4934ca40d708fd8af3082d4fab3",
"detected_licenses": [
"MIT"
],
"directory_id": "a921cbd8d7fa4544c573c6c973cff99a2407c8e2",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/env python
"""
api.py
The API for the Felden Lesson Locator site.
Copyright (c) 2015 Mind In Motion
"""
# ---------------------------------------------------------------------------------------------
# Imports
# ---------------------------------------------------------------------------------------------
i... | 182 | 29.77 | 95 | 20 | 1,152 | python | [{"finding_id": "codeql_py/path-injection_e6823e7a7374cc3c_1d8c09a1", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
91
] | [
null
] | [
15
] | [
26
] | |
2024-11-18T21:00:49.712988+00:00 | 1,555,297,934,000 | 2e19aa4fae24e5e1122a3219f965b37cc20e5df0 | 2 | {
"blob_id": "2e19aa4fae24e5e1122a3219f965b37cc20e5df0",
"branch_name": "refs/heads/master",
"committer_date": 1555297934000,
"content_id": "c38dce49b0bbe7e0ab290b522fb91a12797b12c2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "57dc098b417321804ff17ca3a1792153c9cc0fae",
"extension": "py"... | 2.390625 | stackv2 | import os
import re
from flask import Blueprint, request, render_template, jsonify, session, redirect, url_for
from App.models import User, db
from utils import status_code
from utils.settings import UPLOAD_DIR
from utils.user_is_login import is_login
user_blueprint = Blueprint('user', __name__)
@user_blueprint.ro... | 202 | 26.56 | 90 | 15 | 1,346 | python | [{"finding_id": "codeql_py/path-injection_4f21bf2bb2824585_2a3b499e", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
115
] | [
null
] | [
15
] | [
25
] | |
2024-11-18T21:00:53.437675+00:00 | 1,593,452,436,000 | a9a8431ae486d5f6c373fe453b93c562afdb820b | 3 | {
"blob_id": "a9a8431ae486d5f6c373fe453b93c562afdb820b",
"branch_name": "refs/heads/master",
"committer_date": 1593452436000,
"content_id": "dfcef8d9a89364ce296d16638a52d077134d781b",
"detected_licenses": [
"MIT"
],
"directory_id": "b30b07b3977ac20a438cfbaa408e7c873e4cdd36",
"extension": "py",
"fi... | 3.390625 | stackv2 | # covid-19 economic tracker
import requests
import json
import os
import pandas as pd
import plotly
import plotly.graph_objects as go
import plotly.express as px
from dotenv import load_dotenv
load_dotenv()
api_key = os.environ.get("FRED_API_KEY")
# User Input and API Pull
while True:
try:
state = inp... | 189 | 33.33 | 143 | 16 | 1,622 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1b4bc8fa48d12549_519a18b8", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
87,
88
] | [
null,
null
] | [
7,
7
] | [
87,
84
] | |
2024-11-18T21:01:19.671373+00:00 | 1,630,564,105,000 | a68682df08bc3a3e2528abd6525fa8910ee786ac | 3 | {
"blob_id": "a68682df08bc3a3e2528abd6525fa8910ee786ac",
"branch_name": "refs/heads/master",
"committer_date": 1630564105000,
"content_id": "0dbd10046719e152ee84454011e28ad60db5c391",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "89a006182f40300282a47dce47617d71eac4ab94",
"extension": "py"... | 2.59375 | stackv2 | """
@author Jacob Xie
@time 11/5/2020
"""
from typing import Optional
from flask import abort, Blueprint, request, jsonify, make_response
import pandas as pd
import json
from .abstract_controller import Controller
from .util import attach_prefix
from ..config import AppConfig
from ..util import Loader
from ..provider... | 292 | 39.22 | 113 | 24 | 2,401 | python | [{"finding_id": "codeql_py/stack-trace-exposure_6eb7dfb1075b2ae0_16823c08", "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.", "... | 11 | true | [
"CWE-209",
"CWE-209",
"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",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"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... | [
100,
133,
139,
146,
154,
178,
191,
220,
246,
269,
288
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
42,
46,
46,
46,
50,
42,
42,
42,
42,
42,
42
] | [
48,
52,
52,
52,
56,
48,
48,
48,
48,
48,
48
] | |
2024-11-18T21:01:20.166510+00:00 | 1,617,187,691,000 | 820bdd17b5850f84501e980c77481775d805df1c | 2 | {
"blob_id": "820bdd17b5850f84501e980c77481775d805df1c",
"branch_name": "refs/heads/master",
"committer_date": 1617187691000,
"content_id": "f4ad067b28525a7050b228634d2b3b19e556b2dd",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6aeb20403ffdfdbc84978edf8fa7d3d6e5119ff4",
"extension": "py"... | 2.359375 | stackv2 | from collections import OrderedDict
from django.core.paginator import InvalidPage
from rest_framework.exceptions import NotFound
from rest_framework.pagination import _positive_int # noqa: WPS450
from rest_framework.pagination import PageNumberPagination as BasePageNumberPagination
from django_grpc_framework.settin... | 80 | 35.52 | 86 | 16 | 581 | python | [{"finding_id": "codeql_py/stack-trace-exposure_a95f4d6f3f1a06e5_fbaa51c8", "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."
] | [
48
] | [
null
] | [
28
] | [
31
] | |
2024-11-18T21:01:20.745509+00:00 | 1,508,885,050,000 | f02d930ac5190a06c3678649db06df11a4f16cce | 3 | {
"blob_id": "f02d930ac5190a06c3678649db06df11a4f16cce",
"branch_name": "refs/heads/master",
"committer_date": 1508885050000,
"content_id": "0a66867dfa13e18a341d28b511a2127ada5de945",
"detected_licenses": [
"MIT"
],
"directory_id": "40d47ad11c447aab4c2b82822480505f3097afa8",
"extension": "py",
"fi... | 2.640625 | stackv2 | from __future__ import unicode_literals
import logging
import ldap
from reviewboard.extensions.base import (
get_extension_manager,
)
LDAP_QUERY_TIMEOUT = 5
logger = logging.getLogger(__name__)
class LDAPAssociationException(Exception):
pass
def get_ldap_connection():
"""Return an ldap connection.
... | 177 | 30.86 | 76 | 16 | 1,204 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b1021c1b4480be82_420d6399", "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."
] | [
167,
170
] | [
168,
171
] | [
26,
26
] | [
76,
55
] | |
2024-11-18T21:01:21.346715+00:00 | 1,495,381,647,000 | b5eb2bc29a819fe51a54552457e32c0690a248ff | 3 | {
"blob_id": "b5eb2bc29a819fe51a54552457e32c0690a248ff",
"branch_name": "refs/heads/master",
"committer_date": 1495381647000,
"content_id": "baae881e1283e6a36568a6dd337caf2d99cbbafe",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a7d2f65a491d8db72cc17193a1158aa80f446d4b",
"extension": "py"... | 2.671875 | stackv2 | import sys
import requests
import json
import io
class GitHubReleases:
__defaultVersionRegex = "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"
__conf = []
__promotedVersions = {}
def __init__(self, conf):
self.__promotedVersions = {}
self.__conf = conf
def __log(self, message):
l... | 39 | 31.23 | 109 | 14 | 289 | python | [{"finding_id": "codeql_py/request-without-cert-validation_09073d37165c6967_b734e863", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
26
] | [
null
] | [
13
] | [
80
] | |
2024-11-18T21:01:32.919058+00:00 | 1,554,047,656,000 | 8e4819b8c805e99fd23a78f8b4eda9b74f5a2e1c | 2 | {
"blob_id": "8e4819b8c805e99fd23a78f8b4eda9b74f5a2e1c",
"branch_name": "refs/heads/master",
"committer_date": 1554047656000,
"content_id": "37b6c7d21edaef694b16cee9531707a77250e5e8",
"detected_licenses": [
"MIT"
],
"directory_id": "2265c393b8396292b79fdbcdd08727be24c2337a",
"extension": "py",
"fi... | 2.484375 | stackv2 | import re
from django import forms
from tagging.models import Tag
from django.utils.translation import ugettext as _
class TagAdminForm(forms.ModelForm):
class Meta:
model = Tag
def clean_name(self):
value = self.cleaned_data['name']
m=re.match("([\w| |_|-]+)$",value)
... | 20 | 25.6 | 89 | 15 | 102 | python | [{"finding_id": "codeql_py/polynomial-redos_18da011795fbcfce_30f44dd3", "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 ' '."
] | [
14
] | [
null
] | [
37
] | [
42
] | |
2024-11-18T21:25:24.245038+00:00 | 1,620,338,351,000 | 2e132df4c97deb9b738b83192ef1679b40cca132 | 3 | {
"blob_id": "2e132df4c97deb9b738b83192ef1679b40cca132",
"branch_name": "refs/heads/master",
"committer_date": 1620338351000,
"content_id": "affcd1b7c4ca4236c7cc375ea8c5c588c80a2d0b",
"detected_licenses": [
"MIT"
],
"directory_id": "1619b60dde8c089addf90264c13d1494fd64f806",
"extension": "py",
"fi... | 2.578125 | stackv2 | from flask import Flask, request, Response
from flask_cors import CORS
from bs4 import BeautifulSoup
import requests
import json
BASE_URL = 'https://rocketleague.tracker.network'
PROFILE_URL = BASE_URL + '/profile/{platform}/{username}'
app = Flask(__name__)
CORS(app)
@app.route('/rocket-league/playlist/<platform>/... | 113 | 20.33 | 82 | 13 | 668 | python | [{"finding_id": "codeql_py/full-ssrf_91f9f04923b6dc0a_f0590c0b", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).\nThe full URL of this request depends on a [user-... | 1 | true | [
"CWE-918"
] | [
"py/full-ssrf"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1).\nThe full URL of this request depends on a [user-provided value](2)."
] | [
18
] | [
null
] | [
8
] | [
25
] | |
2024-11-18T21:25:28.424237+00:00 | 1,693,477,536,000 | c2dca167f0934700678a5f476fe903b4b2b978d9 | 3 | {
"blob_id": "c2dca167f0934700678a5f476fe903b4b2b978d9",
"branch_name": "refs/heads/master",
"committer_date": 1693477536000,
"content_id": "f2ae94226b940ec7b6463a5461a811b185a10c91",
"detected_licenses": [
"MIT"
],
"directory_id": "c9500ad778b8521aaa85cb7fe3239989efaa4799",
"extension": "py",
"fi... | 2.515625 | stackv2 | import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import aiohttp
import asyncio
import json
from typing import Optional
from typing import Dict
from typing import Any
from enum import Enum
from logging import Logger
import logging
Agent = Dict[str, Any]
Domain = Dict[str, Any... | 331 | 36.41 | 119 | 18 | 2,512 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9463bac988c69c32_7f754276", "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)."
] | [
113
] | [
null
] | [
20
] | [
94
] | |
2024-11-18T21:51:24.749991+00:00 | 1,615,650,148,000 | ee8b95f3a8d5824b6bc7c451198b5afb2375b9fb | 3 | {
"blob_id": "ee8b95f3a8d5824b6bc7c451198b5afb2375b9fb",
"branch_name": "refs/heads/master",
"committer_date": 1615650168000,
"content_id": "41b8a38e671b6c7f3d1b8a6e3377610ac4f06a4d",
"detected_licenses": [
"Unlicense"
],
"directory_id": "e79af1d5d0d7c3140963e5ae1a9725d668b30ef5",
"extension": "py",... | 2.78125 | stackv2 | import requests
import matplotlib.pyplot as plt
import pprint
pp = pprint.PrettyPrinter()
top_players = requests.get('https://srb2circuit.eu/highscores/api/leaderboard', verify=False)
top_players = list(top_players.json().keys())
maps = requests.get('https://srb2circuit.eu/highscores/api/maps', verify=False)
maps = ... | 32 | 27.09 | 104 | 13 | 250 | python | [{"finding_id": "codeql_py/request-without-cert-validation_1830414b7456abdc_b7652185", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
16,
7,
10
] | [
null,
null,
null
] | [
12,
15,
8
] | [
105,
94,
80
] | |
2024-11-18T21:51:24.977257+00:00 | 1,466,548,983,000 | 8f62692f363e53721a2b1a53a100ab2d370152c0 | 2 | {
"blob_id": "8f62692f363e53721a2b1a53a100ab2d370152c0",
"branch_name": "refs/heads/master",
"committer_date": 1466548983000,
"content_id": "2f3350e36b31c9709d3aaeaf6f539154253a5101",
"detected_licenses": [
"MIT"
],
"directory_id": "e4af9b41d435eabc6f41a6bc628566ed6425d3d4",
"extension": "py",
"fi... | 2.5 | stackv2 | import os
import re
import copy
import json
import util
import requests
import jsonschema
from jsonschema.compat import urlopen, urlsplit
from . import config
log = config.log
class InputValidationException(Exception):
pass
class DBValidationException(Exception):
pass
def validate_data(data, schema_json, s... | 177 | 33.71 | 118 | 19 | 1,326 | python | [{"finding_id": "codeql_py/request-without-cert-validation_f0800c060dcfad12_c4a6f2ab", "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)."
] | [
55,
57
] | [
null,
null
] | [
26,
26
] | [
57,
57
] | |
2024-11-18T22:00:48.970281+00:00 | 1,395,677,957,000 | c9a15e14ac3ddd50f0c6089d25a3faee43f3d27a | 3 | {
"blob_id": "c9a15e14ac3ddd50f0c6089d25a3faee43f3d27a",
"branch_name": "refs/heads/master",
"committer_date": 1395677957000,
"content_id": "f6b4f13f244ed66de8e195b8fee00d83a419b1ac",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b85c8edaf0d4edbc4ce820f19c9ecc7abcb2e3bc",
"extension": "py"... | 3.421875 | stackv2 | # 120313_Demonstration.py
# In class lecture
# <Chad Hobbs>
infile = open("db.txt","r") # relative path to our database file
## lines = infile.readlines() # gets everything in file and puts it in a string
## for h in range(len(lines)):
## lines[h] = lines[h].strip()
users = []
passwords = []
first_line = infi... | 27 | 22.48 | 80 | 12 | 155 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0e4f3c8581636614_a73b5207", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
25,
26
] | [
null,
null
] | [
7,
7
] | [
12,
16
] | |
2024-11-18T22:01:06.071687+00:00 | 1,404,717,087,000 | 7d71dadcb43c08fac065308cd422465cf9d57058 | 3 | {
"blob_id": "7d71dadcb43c08fac065308cd422465cf9d57058",
"branch_name": "refs/heads/master",
"committer_date": 1404717087000,
"content_id": "aebcc151077d6c11e1dafe0e831a23ef33c88290",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7c8622b2cca7aaa34591b8889b2d50552e07882f",
"extension": "p... | 2.703125 | stackv2 | #!/usr/bin/env python
import re
from bs4 import BeautifulSoup
import requests
from model import *
# ONLY does parsing; use something else to get the URL and pass it in as an html string
# this class is ordered by the navigation on sc2casts.com
class Sc2CastsParser(object):
@staticmethod
def _cleanup_path(pa... | 345 | 32.18 | 104 | 22 | 2,554 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_0d1fcecc75aeab7a_e385aa7a", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [youtube.com](1) may be at an arbitrary position in the... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [youtube.com](1) may be at an arbitrary position in the sanitized URL."
] | [
133
] | [
null
] | [
20
] | [
58
] | |
2024-11-18T22:15:05.925025+00:00 | 1,584,405,898,000 | e21863d66f485b0166514a48cf41c9383e1a1df4 | 3 | {
"blob_id": "e21863d66f485b0166514a48cf41c9383e1a1df4",
"branch_name": "refs/heads/master",
"committer_date": 1584405898000,
"content_id": "2846216682331534913629193688658fa5323769",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "d677312f892aec5a65d2d9d210b5c55532b8ed02",
"extension": "p... | 2.671875 | stackv2 | # -*- coding: utf-8 -*-
'''
gen_ccy_l10n.py - Generate Currency Localization Data for nvlps
Copyright (c) 2020 Asymworks, LLC.
The nvlps-currency library may be freely distributed under the terms of
the BSD license. For all licensing information, details and documentation:
https://nvlps.io/nvlps-currency
T... | 307 | 31.37 | 79 | 19 | 2,454 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2b0a6582be9fe3af_99d7c313", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
204,
296
] | [
null,
298
] | [
11,
15
] | [
77,
10
] | |
2024-11-18T22:26:26.727414+00:00 | 1,592,975,187,000 | e906eef86f21c9069465d4fa2631cdf8c17e50fc | 3 | {
"blob_id": "e906eef86f21c9069465d4fa2631cdf8c17e50fc",
"branch_name": "refs/heads/master",
"committer_date": 1592975187000,
"content_id": "8fb5a8d2c1ccfc4f6e6b1ac98fbdc95e29680723",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ff6d2cfe8c83edcfedf9d6dd46a25ce2abc0bb2d",
"extension": "py"... | 2.515625 | stackv2 | from os import path
from jinja2 import Environment
from jinja2.loaders import FileSystemLoader
root_folder_path = path.dirname(path.dirname(__file__))
def generate_sitemap(urls):
sitemap_content = _generate_sitemap_content(urls)
with open(path.join(root_folder_path, 'build', 'sitemap.xml'), 'w') as sitemap_... | 19 | 36.26 | 108 | 14 | 157 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e85b09369a03f7d1_b250c122", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
17
] | [
null
] | [
11
] | [
89
] | |
2024-11-18T22:26:27.717773+00:00 | 1,669,158,992,000 | 42ccd76634ccb83abc388207859818ceb9083750 | 3 | {
"blob_id": "42ccd76634ccb83abc388207859818ceb9083750",
"branch_name": "refs/heads/master",
"committer_date": 1669158992000,
"content_id": "37fdc6a9dd347451ed4ef9a234b465766bf6197d",
"detected_licenses": [
"MIT"
],
"directory_id": "a2e19fd174bedd860297bcc72032dce0f1ea2339",
"extension": "py",
"fi... | 2.96875 | stackv2 | import tarfile
import zipfile
def maybe_log(path, log=True):
if log:
print('Extracting', path)
def extract_tar(path, folder, mode='r:gz', log=True):
maybe_log(path, log)
with tarfile.open(path, mode) as f:
f.extractall(folder)
def extract_zip(path, folder, log=True):
maybe_log(path... | 19 | 19.95 | 53 | 11 | 104 | python | [{"finding_id": "codeql_py/tarslip_51dbc5bbe43f8f5e_6341fe6d", "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)."
] | [
13
] | [
null
] | [
9
] | [
10
] | |
2024-11-18T20:40:00.025973+00:00 | 1,611,584,901,000 | 28b53c73ef8b02cca6c327cb1653835def5825b7 | 3 | {
"blob_id": "28b53c73ef8b02cca6c327cb1653835def5825b7",
"branch_name": "refs/heads/master",
"committer_date": 1611584901000,
"content_id": "4e9e92e9363d4d32c2609f2f36539abe9b27e294",
"detected_licenses": [
"MIT"
],
"directory_id": "13a13dec5702ceadb6c2f21c4570f5c11722d1bc",
"extension": "py",
"fi... | 2.796875 | stackv2 | import os
import shutil
import tarfile
import urllib.request
import pandas as pd
CIFAR10_URL = 'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz'
class CIFAR_10:
def __init__(self, path, download=True, train=True):
self.path = path
self.download = download
self.train = train
... | 63 | 40.27 | 115 | 19 | 685 | python | [{"finding_id": "codeql_py/tarslip_ed82d4256234d252_70790ab2", "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)."
] | [
32
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T21:08:17.184059+00:00 | 1,539,840,704,000 | d3b146d4450e1765394c79ca7d213be3c4d5026f | 2 | {
"blob_id": "d3b146d4450e1765394c79ca7d213be3c4d5026f",
"branch_name": "refs/heads/master",
"committer_date": 1539840704000,
"content_id": "093f9fd7c73ee169a601312816cafe2c1f9d30a3",
"detected_licenses": [
"MIT"
],
"directory_id": "71f89207425c7fe8f9adfe7be08db8f3dfb5d676",
"extension": "py",
"fi... | 2.34375 | stackv2 | from flask import Flask, request, render_template, make_response, jsonify, send_file
import logging, os
from werkzeug import secure_filename
import os
import cv2 as cv
app = Flask(__name__, static_url_path='', static_folder = "uploads")
file_handler = logging.FileHandler('server.log')
app.logger.addHandler(file_handle... | 69 | 33.65 | 93 | 13 | 561 | python | [{"finding_id": "codeql_py/reflective-xss_a988e26593daa7b4_59eea7b9", "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-022"
] | [
"py/reflective-xss",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
65,
63
] | [
null,
null
] | [
16,
26
] | [
56,
47
] | |
2024-11-18T21:08:20.001905+00:00 | 1,687,154,303,000 | efea30d8afbac2e2ef125fd8f032e65e336c8914 | 2 | {
"blob_id": "efea30d8afbac2e2ef125fd8f032e65e336c8914",
"branch_name": "refs/heads/main",
"committer_date": 1687154303000,
"content_id": "b543274cdd1ae9cac383762b3cec25c056b264ba",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2a20d2829d043dd168f61e0ec5f4b59dc04e0f39",
"extension": "py",
... | 2.390625 | stackv2 | import hashlib
import hmac
from datetime import datetime, timezone
from typing import Dict
from hummingbot.connector.exchange.foxbit import foxbit_web_utils as web_utils
from hummingbot.connector.time_synchronizer import TimeSynchronizer
from hummingbot.core.web_assistant.auth import AuthBase
from hummingbot.core.web_... | 108 | 35.22 | 116 | 18 | 743 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_1bb3d37f15acf6cc_4e372c2a", "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."
] | [
95
] | [
null
] | [
30
] | [
48
] | |
2024-11-18T21:31:54.915845+00:00 | 1,542,039,982,000 | 3a2436c64aa86532193bf8f724c6872791915ef9 | 3 | {
"blob_id": "3a2436c64aa86532193bf8f724c6872791915ef9",
"branch_name": "refs/heads/master",
"committer_date": 1542039982000,
"content_id": "423af968483df4d7deebc487d4ded046c08554da",
"detected_licenses": [
"MIT"
],
"directory_id": "60699d5998b0b70d1af94e63c1799fd3767461bd",
"extension": "py",
"fi... | 2.578125 | stackv2 | # -*- coding: utf-8 -*-
import requests
import json
import os
import time
# ---- sort user info from bash script section -------
# Get user provided information from bash script and parse it
apic_ip = os.environ['APIC_IP']
apic_username = os.environ['APIC_USERNAME']
apic_password = os.environ['APIC_PASSWORD']
chive... | 165 | 37.52 | 132 | 16 | 1,561 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d05b212c4d936802_6155cb3f", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 4 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
57,
69,
99,
113
] | [
null,
null,
null,
null
] | [
13,
16,
14,
20
] | [
66,
82,
68,
86
] | |
2024-11-18T21:32:20.632148+00:00 | 1,550,747,320,000 | 09f0982c9d5a49d5c74635827e0b5dd817e25556 | 4 | {
"blob_id": "09f0982c9d5a49d5c74635827e0b5dd817e25556",
"branch_name": "refs/heads/master",
"committer_date": 1550747320000,
"content_id": "59e74c90382f6dc67a48124bb7183912dee20989",
"detected_licenses": [
"MIT"
],
"directory_id": "5bbdf2fe73d1113a3d801313fe57a8a28674215b",
"extension": "py",
"fi... | 3.546875 | stackv2 | #EVALUATION SYSTEM FOR ABSOLUTE BEGINNERS
#Import Instances from other group members
#import userdetails from User_details created by Joy
from User_Details import userdetails
#import questions from My_Question created by David
from My_Question import questions
#import iqsum from Evaluation_Sum created by Deji
from... | 59 | 27.97 | 125 | 13 | 379 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_370cb40e0d83119a_a635675a", "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."
] | [
42
] | [
null
] | [
28
] | [
43
] | |
2024-11-18T21:49:08.202669+00:00 | 1,509,135,288,000 | be37030134e7a48e582ee25513bf45ca85f9b51b | 3 | {
"blob_id": "be37030134e7a48e582ee25513bf45ca85f9b51b",
"branch_name": "refs/heads/master",
"committer_date": 1509135288000,
"content_id": "4c950c7f08237ecb1af8bc87d2138be90db9cf89",
"detected_licenses": [
"MIT"
],
"directory_id": "e1ca7ca29dc267fb76d1c73a3f6a29243dd6e65e",
"extension": "py",
"fi... | 2.703125 | stackv2 | from flask import Flask, flash, redirect, render_template, request, session, abort
import sqlite3
from pokemon import Pokemon
# Create an instance of the Flask class
app = Flask(__name__)
# Homepage
@app.route('/')
def index():
return render_template('index.html')
# Any page from /pokemon/____, eventually will h... | 53 | 29.4 | 85 | 11 | 389 | python | [{"finding_id": "codeql_py/sql-injection_7bf1f01fb1d1f492_0bb5709f", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 1 | true | [
"CWE-089"
] | [
"py/sql-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1)."
] | [
30
] | [
31
] | [
15
] | [
27
] | |
2024-11-18T21:49:11.834486+00:00 | 1,631,350,851,000 | 8a5de0c10bfe7a0d1fa2ca60cba31af1d6ac4dc1 | 3 | {
"blob_id": "8a5de0c10bfe7a0d1fa2ca60cba31af1d6ac4dc1",
"branch_name": "refs/heads/master",
"committer_date": 1631350851000,
"content_id": "5aef2e65a2aa7af9e0c4218db583211e2c718794",
"detected_licenses": [
"MIT"
],
"directory_id": "7f71b5f6aa9b0daedd03f20a65e80cfd8c34f4a7",
"extension": "py",
"fi... | 2.546875 | stackv2 | from urllib.parse import unquote
from tqdm import tqdm
import requests
import json
import time
import sys
import re
from config import config
import login
sys.path.append('..')
from utils import net, fs
requests.packages.urllib3.disable_warnings()
def wait_response(url):
sleep_lengh = 30
response = None
w... | 156 | 35.58 | 151 | 20 | 1,500 | python | [{"finding_id": "codeql_py/request-without-cert-validation_235d44fef40e4b9a_a846e356", "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)."
] | [
27,
59
] | [
null,
null
] | [
24,
24
] | [
82,
82
] | |
2024-11-18T21:49:15.260106+00:00 | 1,621,769,490,000 | 5acf14b907e024eff0efec7bcb2977b75366299b | 3 | {
"blob_id": "5acf14b907e024eff0efec7bcb2977b75366299b",
"branch_name": "refs/heads/master",
"committer_date": 1621769490000,
"content_id": "8b573194084058228c92e77a98be6f3ac5963b04",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "605dc4e9e0ba04ecdc811171b18e59dba1f98e65",
"extension": "p... | 2.78125 | stackv2 | import re
from typing import Any, List, Optional, Union
from urllib.parse import parse_qs, urljoin, urlparse
from furl import furl
def get_value_from_qs(
url: str,
query_param: str,
):
parsed = urlparse(url)
return parse_qs(parsed.query)[query_param][0]
def remove_qs(
url: str,
key: Option... | 98 | 16.38 | 73 | 12 | 466 | python | [{"finding_id": "codeql_py/overly-large-range_cd4fac9b4090d265_708df920", "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\\\\[\\\\\\\\]^_\\]."
] | [
94
] | [
null
] | [
41
] | [
45
] | |
2024-11-18T22:42:07.279762+00:00 | 1,427,033,996,000 | 478d43527c466b42066d7b6b4a81d5037f33c107 | 2 | {
"blob_id": "478d43527c466b42066d7b6b4a81d5037f33c107",
"branch_name": "refs/heads/master",
"committer_date": 1427033996000,
"content_id": "52de00f96018bf76756b6aa8e413d538eb385bb3",
"detected_licenses": [
"MIT"
],
"directory_id": "ddea27a6580dca40e7808123edccf701b3e34e60",
"extension": "py",
"fi... | 2.46875 | stackv2 | # coding: utf-8
'''
emailer.py
Contains Emailer class to aid with sending emails from templates
'''
import logging
from jinja2 import Environment, PackageLoader
import twilio
import twilio.rest
from nhtg15_webapp import app
class Texter:
def __init__(self, app):
self.defaultfrom = app.config['SMS_FROM... | 65 | 22.62 | 69 | 16 | 330 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_dd33cda96939626a_493b05a9", "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."
] | [
32
] | [
37
] | [
29
] | [
14
] | |
2024-11-18T22:42:12.449716+00:00 | 1,464,926,297,000 | f711b1039cc5c890b17281509c9fa90a3aafb0c2 | 3 | {
"blob_id": "f711b1039cc5c890b17281509c9fa90a3aafb0c2",
"branch_name": "refs/heads/master",
"committer_date": 1464926297000,
"content_id": "20e33b69762a3c2465e8860f3ed850712be5db6d",
"detected_licenses": [
"MIT"
],
"directory_id": "e367c4d5c64d67a9a51ecebd891e50b8ce2e71c8",
"extension": "py",
"fi... | 2.890625 | stackv2 | '''
This server is a modified version of the previous one.
CTR mode is used instead of CBC or ECB mode.
You must discover the initial cipher text.
Ciphertexts will be given to the user as ascii encoded hex
strings. 0xFF will be sent as "FF" (2 Bytes), not as "\xff" (1 Byte).
You can use python's string.encode('hex')... | 209 | 32.38 | 126 | 18 | 1,590 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_2f470135a43c5feb_8d8e7fbc", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
68,
72
] | [
null,
null
] | [
16,
16
] | [
41,
36
] | |
2024-11-18T20:53:26.803313+00:00 | 1,629,445,992,000 | 498ed0804fa59ba1faf3985926dedf353c86325b | 2 | {
"blob_id": "498ed0804fa59ba1faf3985926dedf353c86325b",
"branch_name": "refs/heads/main",
"committer_date": 1629445992000,
"content_id": "35cb46c8ca36f6e370af77791cb54c160814c896",
"detected_licenses": [
"Unlicense"
],
"directory_id": "89643eadac2a4cb54beeb74b344e7ebd85fc31b9",
"extension": "py",
... | 2.421875 | stackv2 | import functools
import hashlib
import secrets
from http import HTTPStatus
from logging import getLogger
import click
from covid_data.db import get_db
from covid_data.db.queries import check_api_key, insert_api_key
from flask import request
from flask.app import Flask
from flask.blueprints import Blueprint
from flask.... | 66 | 22.23 | 84 | 18 | 339 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5567cd64ec10a0e4_bdedc1d6", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-327"
] | [
"py/clear-text-logging-sensitive-data",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"[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."
] | [
25,
27
] | [
null,
null
] | [
17,
33
] | [
24,
56
] | |
2024-11-18T20:53:43.437829+00:00 | 1,596,468,136,000 | a6373349efe7a4f45b82e33a2a65f2554b3ad5f5 | 2 | {
"blob_id": "a6373349efe7a4f45b82e33a2a65f2554b3ad5f5",
"branch_name": "refs/heads/master",
"committer_date": 1596468136000,
"content_id": "46ff6d45d0904d13a7edda830ca4f3fc5bd32c80",
"detected_licenses": [
"MIT"
],
"directory_id": "5a88568335f27eb1bc27cb71826541e90deb10a5",
"extension": "py",
"fi... | 2.5 | stackv2 | """preprocess.py.
Usage:
pp = TwitterPreprocesser(stoplist_file='twitter_stoplist.txt',
language_model='en_core_web_sm')
pp.preprocess(input_file, output_file)
"""
# Python imports
import re
import spacy
import unicodedata
import ujson as json
from bs4 import BeautifulSoup
from dateutil.pars... | 227 | 37.03 | 178 | 27 | 2,202 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_f57bca4aca8911f8_ba395447", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [pic.twitter.com](1) may be at an arbitrary position in... | 5 | true | [
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/overly-large-range",
"py/overly-large-range",
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The string [pic.twitter.com](1) may be at an arbitrary position in the sanitized URL.",
"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 ... | [
153,
46,
46,
46,
46
] | [
null,
null,
null,
null,
null
] | [
25,
12,
15,
18,
27
] | [
65,
16,
19,
22,
31
] | |
2024-11-18T21:10:22.232270+00:00 | 1,557,674,486,000 | a359c4ea3f33e845bc12a813b61ac132c8f93452 | 4 | {
"blob_id": "a359c4ea3f33e845bc12a813b61ac132c8f93452",
"branch_name": "refs/heads/master",
"committer_date": 1557674486000,
"content_id": "8b7560528190e9d7cd50929a21e3d45e1b9d1907",
"detected_licenses": [
"MIT"
],
"directory_id": "6c9f320d2e7cb6f9daeda4c431b3ee10ef062035",
"extension": "py",
"fi... | 4 | stackv2 | """
Read file into texts and calls.
It's ok if you don't understand how to read files.
"""
import csv
with open('texts.csv', 'r') as f:
reader = csv.reader(f)
texts = list(reader)
with open('calls.csv', 'r') as f:
reader = csv.reader(f)
calls = list(reader)
"""
TASK 4:
The telephone company want to i... | 146 | 29.58 | 116 | 13 | 1,776 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e85065a76aba6930_919332dc", "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."
] | [
78
] | [
null
] | [
15
] | [
27
] | |
2024-11-18T21:10:33.736586+00:00 | 1,604,937,277,000 | ce485909925103a02a15a5294498b7bd54e35a67 | 3 | {
"blob_id": "ce485909925103a02a15a5294498b7bd54e35a67",
"branch_name": "refs/heads/master",
"committer_date": 1604937277000,
"content_id": "5e6d2e7321d3e3c7639a73927977e9a63ad49abf",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d72a5df05c3d86c7f5c81776b5fac199ca6b9af0",
"extension": "py"... | 2.765625 | stackv2 | import sys
import requests
from .Authentication import generateAuthToken, readAuthToken
oauthToken = {}
def call_rest(endpoint, method, params={}, headers={"acceptType": "application/json", "contentType": "application/json"}, data={}, auth={}):
global oauthToken
# define list of valid methods
validMethods... | 46 | 35.48 | 140 | 20 | 344 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_37b9a573b5f60fe5_a594d953", "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-295"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/request-without-cert-validation"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"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.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (p... | [
28,
39,
41,
20
] | [
null,
null,
null,
26
] | [
19,
27,
27,
20
] | [
54,
39,
78,
26
] | |
2024-11-18T21:11:13.391195+00:00 | 1,619,469,974,000 | aa03fb10930aba803ce258a311c2a670c99b75a5 | 2 | {
"blob_id": "aa03fb10930aba803ce258a311c2a670c99b75a5",
"branch_name": "refs/heads/master",
"committer_date": 1619469974000,
"content_id": "9c118a5970419c5c36f5e361797891fcde0dce28",
"detected_licenses": [
"MIT"
],
"directory_id": "48aa6545cfca1e9c385384936fe7517e39222c66",
"extension": "py",
"fi... | 2.34375 | stackv2 | import os
import random
from core.dm import csc, Pr, PTurn
from hashlib import md5
import pandas as pd
from collections import defaultdict
def do_hash(s, salt=os.environ.get('HASH_SALT') or 'uid_'):
return md5(f'{salt}_{s}'.encode()).hexdigest()
def forms2excel(forms, filename='forms.xlsx'):
dd = default... | 55 | 26.2 | 98 | 16 | 373 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_19cb2b9b215b543c_a50fb9e9", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
13
] | [
null
] | [
16
] | [
38
] | |
2024-11-18T21:11:14.594359+00:00 | 1,634,650,824,000 | e1ea8069663d6325f4243923989f3836813c8c87 | 2 | {
"blob_id": "e1ea8069663d6325f4243923989f3836813c8c87",
"branch_name": "refs/heads/main",
"committer_date": 1634650824000,
"content_id": "19765833435b28e9fe008145f0e629258e25cf8b",
"detected_licenses": [
"MIT"
],
"directory_id": "04daa77180ef4a2feac4c1eaca4c841c3220857f",
"extension": "py",
"file... | 2.421875 | stackv2 | import json, math, uuid
from flask import *
from service.SaleService import *
from util.Configuration import *
sale = Blueprint('sale',__name__)
pageSize = Configuration().get("PageSize")
# 销售订单列表
@sale.route("index", methods=["get"])
def index():
saleService = SaleService()
currentIndex = request.args.... | 172 | 20.39 | 64 | 15 | 915 | python | [{"finding_id": "codeql_py/reflective-xss_59dd3dee54296e11_8d8bf297", "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)."
] | [
34
] | [
null
] | [
13
] | [
24
] | |
2024-11-18T22:29:18.811917+00:00 | 1,614,948,267,000 | f6599b7f8cc2f8a98782004a98354eef635fd9e9 | 2 | {
"blob_id": "f6599b7f8cc2f8a98782004a98354eef635fd9e9",
"branch_name": "refs/heads/master",
"committer_date": 1614948267000,
"content_id": "da07a42f445aff6f7f53d5c8cbb809bdc4a50e51",
"detected_licenses": [
"Apache-2.0",
"BSD-3-Clause"
],
"directory_id": "700c7801958dd4789caf94785b5dc8c5e3daa4fd",... | 2.34375 | stackv2 | #!/usr/bin/env python3
import datetime
import argparse
from botocore.exceptions import ClientError
import os
def write_keys_to_file(created_keys, session):
for region in created_keys:
ssh_key_dir = os.path.join(os.getcwd(), 'sessions', session.name, 'downloads', technique_info['name'], region)
if ... | 125 | 41.11 | 118 | 21 | 1,013 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_8ea410a7036c0b3b_578cf26c", "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."
] | [
24
] | [
null
] | [
44
] | [
73
] | |
2024-11-18T22:29:26.165937+00:00 | 1,520,241,746,000 | 39868b56dab1dcabac7ccc01dbd1250720a309bd | 2 | {
"blob_id": "39868b56dab1dcabac7ccc01dbd1250720a309bd",
"branch_name": "refs/heads/master",
"committer_date": 1520241746000,
"content_id": "7d0f21959396d9a2fdedfacbf3cb185174c6bc7e",
"detected_licenses": [
"MIT"
],
"directory_id": "d4347b3a4f486194573b3f859bf71b12e7faa879",
"extension": "py",
"fi... | 2.328125 | stackv2 | import io
import os
import platform
import time
import unittest
from datetime import datetime
from jinja2 import Template
from requests.structures import CaseInsensitiveDict
from httprunner import logger
from httprunner.__about__ import __version__
def get_platform():
return {
"httprunner_version": __ve... | 185 | 33.8 | 99 | 15 | 1,339 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f580a275a2b51d1e_2dd9bb5d", "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."
] | [
179
] | [
null
] | [
32
] | [
58
] | |
2024-11-18T22:29:27.978194+00:00 | 1,687,890,515,000 | d422121388af71ecfd3605a9f4797c5dd406dc11 | 2 | {
"blob_id": "d422121388af71ecfd3605a9f4797c5dd406dc11",
"branch_name": "refs/heads/master",
"committer_date": 1687890515000,
"content_id": "3fbacc728931d820c1d7bedbecc36c86939bfe1a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f761773ea0489b923536e51438c57148caf6898e",
"extension": "py"... | 2.34375 | stackv2 | import os
import subprocess
print('Setup systemd')
# the following odd code handles getting the right source directory whether running from within it or from a
# subdirectory like previousversion during updates. When running in initial install we are in the directory whereas
# when doing an update we are down a direc... | 19 | 40.47 | 116 | 12 | 199 | python | [{"finding_id": "codeql_py/overly-permissive-file_53617a07d885649a_53e72cb9", "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": ... | 2 | true | [
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable."
] | [
10,
11
] | [
null,
null
] | [
null,
null
] | [
46,
43
] | |
2024-11-18T22:29:28.390262+00:00 | 1,601,015,563,000 | 41e931b00dffc9af14dac13fabd2c730acef3e8a | 3 | {
"blob_id": "41e931b00dffc9af14dac13fabd2c730acef3e8a",
"branch_name": "refs/heads/master",
"committer_date": 1601015563000,
"content_id": "c049e8f6db16fb9692e0192d32f100194c1cd315",
"detected_licenses": [
"MIT"
],
"directory_id": "451af799d57b49f00b6fb7431453f6f4012c374e",
"extension": "py",
"fi... | 2.53125 | stackv2 | import random
import string
import sqlite3
from flask import Flask, render_template, jsonify, request, redirect, url_for, make_response
app = Flask(__name__)
db = sqlite3.connect("bot.db", check_same_thread=False)
cur = db.cursor()
@app.route("/")
def home():
logged = request.cookies.get('uname')
if logged:
retur... | 120 | 30.35 | 146 | 27 | 955 | python | [{"finding_id": "codeql_py/cookie-injection_4c3727efd6a02a8b_01e1545c", "tool_name": "codeql", "rule_id": "py/cookie-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cookie is constructed from a [user-supplied input](1).", "remediation": "", "location": {"file_path": "... | 5 | true | [
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-079"
] | [
"py/cookie-injection",
"py/cookie-injection",
"py/cookie-injection",
"py/cookie-injection",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is constructed from a [user-supplied input](1).",
"Cookie is constructed from a [user-supplied input](1).",
"Cookie is constructed from a [user-supplied input](1).",
"Cookie is constructed from a [user-supplied input](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
42,
43,
70,
71,
116
] | [
null,
null,
null,
null,
null
] | [
31,
29,
32,
30,
12
] | [
36,
32,
37,
33,
136
] | |
2024-11-18T22:41:18.858277+00:00 | 1,683,729,903,000 | 750251a741c87c1a817f99d0d3792863c4119c7a | 3 | {
"blob_id": "750251a741c87c1a817f99d0d3792863c4119c7a",
"branch_name": "refs/heads/master",
"committer_date": 1683729903000,
"content_id": "edebbb1219cf8266fa92d122e7155722c73c91b7",
"detected_licenses": [
"MIT"
],
"directory_id": "e6a3901cb4350c0c16889693cf54945360fbc66d",
"extension": "py",
"fi... | 2.5625 | stackv2 | #! /usr/bin/env python
## Hey, Python: encoding=utf-8
#
# Copyright (c) 2007-2008, 2010 Adeodato Simó (dato@net.com.org.es)
# Licensed under the terms of the MIT license.
import justrok
import os
import random
import stat
import time
from PyQt5.QtCore import pyqtSignal, QObject, QTimer
from PyQt5.QtWidgets import QA... | 224 | 28.42 | 79 | 23 | 1,552 | python | [{"finding_id": "codeql_py/overly-permissive-file_632e582669c21394_2cc9e55e", "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 readable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world readable."
] | [
116
] | [
null
] | [
10
] | [
67
] | |
2024-11-18T22:41:22.045696+00:00 | 1,439,997,651,000 | 3998e33582a286459308d33daae99a7db6154f05 | 3 | {
"blob_id": "3998e33582a286459308d33daae99a7db6154f05",
"branch_name": "refs/heads/master",
"committer_date": 1439997651000,
"content_id": "42167710f0d49085a47d12907c8a3f8384a2b208",
"detected_licenses": [
"MIT"
],
"directory_id": "f35ce2792803dc5168111cef283dd5b9d969c71b",
"extension": "py",
"fi... | 2.546875 | stackv2 | import os
import cv2
import numpy as np
from scipy.ndimage.morphology import binary_dilation
from flask import Flask, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/Users/charleslai/Documents/Programming/other-projects/waldoBot/server/imgs'
UPLOAD_FOLDER = '/User... | 80 | 34.94 | 93 | 20 | 630 | python | [{"finding_id": "codeql_py/stack-trace-exposure_a459fdbd91b436ef_159b883a", "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."
] | [
73
] | [
null
] | [
16
] | [
17
] | |
2024-11-18T22:41:23.070767+00:00 | 1,509,263,503,000 | 9fd4639aeb152d577ade8de462ba0e2ac262ac09 | 3 | {
"blob_id": "9fd4639aeb152d577ade8de462ba0e2ac262ac09",
"branch_name": "refs/heads/master",
"committer_date": 1509263503000,
"content_id": "63d287d43db378278d7deecd62637175db3590ad",
"detected_licenses": [
"MIT"
],
"directory_id": "7ab2d86928466a04a0e0d7441eeac0f3e65e1f98",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask, request, jsonify
import requests
app = Flask(__name__)
@app.route('/services/all')
def get_all_services():
print("Listing all the services")
# Container links are used, 9090 is the container port
response = requests.get('http://database-service:9090/services')
return jsonify(r... | 20 | 29.95 | 115 | 14 | 151 | python | [{"finding_id": "codeql_py/flask-debug_e1cd5aef8199aa81_ac22c90a", "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-918"
] | [
"py/flask-debug",
"py/partial-ssrf"
] | [
"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.",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
20,
16
] | [
null,
null
] | [
5,
16
] | [
47,
116
] | |
2024-11-18T22:54:22.621115+00:00 | 1,692,240,580,000 | 30be95f7e5c684c61a8e57ed2cdb2dbb9aa0cf3f | 3 | {
"blob_id": "30be95f7e5c684c61a8e57ed2cdb2dbb9aa0cf3f",
"branch_name": "refs/heads/master",
"committer_date": 1692240580000,
"content_id": "f7ce40eb285ee6ec24bd9f82eced0d7b2c55af01",
"detected_licenses": [
"MIT"
],
"directory_id": "3b1a13edca51449f015086acad1e5a51ae89cba5",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python
import os
try:
from http.server import HTTPServer #python3
from socketserver import ThreadingMixIn
except ImportError:
from BaseHTTPServer import HTTPServer,BaseHTTPRequestHandler #python2
from SocketServer import ThreadingMixIn
class MyHTTPServer(ThreadingMixIn,H... | 33 | 29.36 | 75 | 12 | 231 | python | [{"finding_id": "codeql_py/path-injection_68655cc0917d366d_2c1a0c89", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
25
] | [
null
] | [
18
] | [
26
] | |
2024-11-18T22:54:25.481637+00:00 | 1,523,382,462,000 | f9708e98141878a65b115fbab93e0bdab1073575 | 3 | {
"blob_id": "f9708e98141878a65b115fbab93e0bdab1073575",
"branch_name": "refs/heads/master",
"committer_date": 1523382462000,
"content_id": "6bb22a500842e92d5af15f5096ddd1830575e3a5",
"detected_licenses": [
"MIT"
],
"directory_id": "88e4ae7ee04d3fdf83f294b9ce2e20d1d325df86",
"extension": "py",
"fi... | 2.921875 | stackv2 | #! python3
"""
Author:: Eric DePree
Date:: 2018
Description:: A tool for enumerating information from Cisco CallManager
"""
import re
import argparse
import requests
from urllib.parse import urlparse
from urllib.parse import parse_qs
import xml.etree.ElementTree as ET
def query_and_print_data(ip_address, port, sea... | 95 | 45.17 | 120 | 19 | 913 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_db950ec372b5f608_7806383e", "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)](3) as clear text."
] | [
40
] | [
null
] | [
23
] | [
71
] | |
2024-11-18T20:55:12.422608+00:00 | 1,554,777,400,000 | f2b48d83015746d9f014f10429060c42a734e739 | 2 | {
"blob_id": "f2b48d83015746d9f014f10429060c42a734e739",
"branch_name": "refs/heads/master",
"committer_date": 1554777400000,
"content_id": "26eaab446b83f273b7222cce5165ec81b0ed3378",
"detected_licenses": [
"MIT"
],
"directory_id": "7aeddd27b6ba7460c36e689b0e1c9c180c364142",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) UbuntuChina, http://www.ubuntu.org.cn
# (c) free software, GPLv3
# Connect: oneleaf@gmail.com
# http://www.programgo.com/article/12163818605/
import BaseHTTPServer,SocketServer, cgi
from os import curdir,sep, path
uploadh... | 73 | 36.66 | 146 | 19 | 723 | python | [{"finding_id": "codeql_py/path-injection_35c0aa66afcdd6cd_447009f7", "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", ... | 3 | true | [
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"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)."
] | [
35,
54,
57
] | [
null,
null,
null
] | [
21,
32,
32
] | [
41,
34,
34
] | |
2024-11-18T21:07:36.392173+00:00 | 1,526,639,739,000 | c233355df3ae5dbc4c2425407ac1350d2d99c528 | 2 | {
"blob_id": "c233355df3ae5dbc4c2425407ac1350d2d99c528",
"branch_name": "refs/heads/master",
"committer_date": 1526639739000,
"content_id": "afbae7271c343bd1dfaa288ca34ec26e0dd4a3cc",
"detected_licenses": [
"MIT"
],
"directory_id": "77b869c2b397bcbc961c5a5d5f3fd058506979fe",
"extension": "py",
"fi... | 2.375 | stackv2 | import utils
import os
import subprocess
import shutil
from collections import namedtuple
import shlex
import random
import builtins
class Context:
def __enter__(self):
return self
def __exit__(self, exc_type, exc, tb):
pass
def __call__(self):
self.__enter__()
def __invert__(se... | 235 | 29.43 | 136 | 19 | 1,773 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_30c9d97fe9d5de55_06050d84", "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."
] | [
207
] | [
null
] | [
20
] | [
41
] | |
2024-11-18T21:07:46.856392+00:00 | 1,603,696,436,000 | 4a4319f8f354a2bfa35ecd96e7f15b30f2d2cddd | 3 | {
"blob_id": "4a4319f8f354a2bfa35ecd96e7f15b30f2d2cddd",
"branch_name": "refs/heads/master",
"committer_date": 1603696436000,
"content_id": "a9f6202c6630c9f10c401cca6f44b397b6eaaf2c",
"detected_licenses": [
"MIT"
],
"directory_id": "cd1e7de7cbbef92846d909214316a5ed267b7150",
"extension": "py",
"fi... | 2.609375 | stackv2 | # coding=utf-8
import re
from jinja2 import Environment, PackageLoader
from .pb import pasteboard_write
from .command import Command
from .constants import DART_TYPES_DEFAULT_VALUES, DART_TYPES
from .str_helpers import upper_first_letter
class MockCommand(Command):
def __init__(self, abstract_text):
supe... | 146 | 31.38 | 77 | 19 | 971 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_c6ca5d2342016cde_2d26a6da", "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."
] | [
134
] | [
138
] | [
15
] | [
10
] | |
2024-11-18T21:33:17.835987+00:00 | 1,509,109,358,000 | 07e2a757b724b40e5be534fb760542547aa46a53 | 2 | {
"blob_id": "07e2a757b724b40e5be534fb760542547aa46a53",
"branch_name": "refs/heads/master",
"committer_date": 1509109358000,
"content_id": "45a3dd59ecbaf255b89e5d90ca5f249a702ee8a5",
"detected_licenses": [
"MIT"
],
"directory_id": "ce8e69ed85b1c72ab7c9b18377860f4058388178",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import urllib
import sys
import os
import json
import lxml.html
import requests
import operator
from flask import request, Response, Flask
from socket import (AF_INET,
error,
SHUT_RDWR,
socket,
SOCK... | 313 | 27.08 | 99 | 22 | 2,210 | python | [{"finding_id": "codeql_py/xxe_ef3f14e8001c5ee5_f0d8ba93", "tool_name": "codeql", "rule_id": "py/xxe", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "XML parsing depends on a [user-provided value](1) without guarding against external entity expansion.", "remediation": "", "locat... | 2 | true | [
"CWE-611",
"CWE-918"
] | [
"py/xxe",
"py/full-ssrf"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"XML parsing depends on a [user-provided value](1) without guarding against external entity expansion.",
"The full URL of this request depends on a [user-provided value](1)."
] | [
213,
204
] | [
null,
null
] | [
41,
19
] | [
45,
36
] | |
2024-11-18T21:33:20.418324+00:00 | 1,592,442,970,000 | d6f218ededbf2c5bb3ccba34c0a1bb5bc5cfa026 | 4 | {
"blob_id": "d6f218ededbf2c5bb3ccba34c0a1bb5bc5cfa026",
"branch_name": "refs/heads/master",
"committer_date": 1592442970000,
"content_id": "f2f5a0aeadae5dc7f0c81ab6204d103bed7ec945",
"detected_licenses": [
"MIT"
],
"directory_id": "ba35560ac4296c15d86e4cd3f24cd05ccfa29c38",
"extension": "py",
"fi... | 3.671875 | stackv2 | """Module for generating names for Turing machine conditions"""
import itertools
import re
import string
class AlphabetError(Exception):
"""Base exception class for this module"""
pass
class NotAllowedName(AlphabetError):
"""Raise this exception when the name is
starting with numbers or special sy... | 145 | 25.77 | 84 | 16 | 856 | python | [{"finding_id": "codeql_py/overly-large-range_bc74ef797a348011_cb275b94", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
37
] | [
null
] | [
29
] | [
32
] | |
2024-11-18T21:55:39.360215+00:00 | 1,449,223,146,000 | a3b078693b9831535d4d69f7153eebf9d11ffac2 | 3 | {
"blob_id": "a3b078693b9831535d4d69f7153eebf9d11ffac2",
"branch_name": "refs/heads/master",
"committer_date": 1449223146000,
"content_id": "2623379300715aa45a1abb28fbbc4dd8740719bf",
"detected_licenses": [
"Unlicense"
],
"directory_id": "8650efa01652f3b75ef730b7e01c960a235ee413",
"extension": "py",... | 3.15625 | stackv2 | # coding: utf8
"""cleaner.py: Cleaner aims to clean string according several. This is a natural language processing"""
__author__ = "Sacha Schutz - Hugo Mayere"
__copyright__ = "Copyright 2009, labsquare"
__license__ = "GPL3"
__email__ = "sacha@labsquare.org"
import unsec
import re
from nltk.stem.sn... | 165 | 27.72 | 111 | 14 | 1,176 | python | [{"finding_id": "codeql_py/overly-large-range_dc642e4fa65440cb_08b86106", "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\\\\[\\\\\\\\]^_\\]."
] | [
84
] | [
null
] | [
55
] | [
58
] | |
2024-11-18T21:55:40.534338+00:00 | 1,373,532,872,000 | 5ec39e6c40bfa7fe71f1e69ffcb77f9faf5f1c9c | 3 | {
"blob_id": "5ec39e6c40bfa7fe71f1e69ffcb77f9faf5f1c9c",
"branch_name": "refs/heads/master",
"committer_date": 1373532872000,
"content_id": "32fb527f5420e5304b013bf74655812e1edce974",
"detected_licenses": [
"MIT"
],
"directory_id": "07539ecbcee0488ce4a0eb779583da3149cfac7b",
"extension": "py",
"fi... | 2.78125 | stackv2 | from __future__ import division
from jinja2 import Environment, FileSystemLoader
from amonone.core import settings
from amonone.web.settings import TEMPLATES_DIR
from amonone import __version__
from datetime import datetime, time
from amonone.utils.dates import (
utc_unixtime_to_localtime,
dateformat_local,
datefor... | 311 | 23.03 | 96 | 16 | 2,006 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_efbd09fe3536e82f_3970595b", "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."
] | [
264
] | [
265
] | [
8
] | [
38
] | |
2024-11-18T21:56:03.409372+00:00 | 1,520,036,215,000 | 7ee97e5fb6698ab32b1e448c8bf7000bafb28157 | 2 | {
"blob_id": "7ee97e5fb6698ab32b1e448c8bf7000bafb28157",
"branch_name": "refs/heads/master",
"committer_date": 1520036215000,
"content_id": "7ceee75dd1792dfdf6894f669c17386cb70afaa9",
"detected_licenses": [
"BSD-3-Clause",
"MIT"
],
"directory_id": "e34fccfe41835bed5dac43a9687dafe1805d66fe",
"ext... | 2.328125 | stackv2 | import datetime
import os
import github3
import networkx as nx
import requests
from pkg_resources import parse_version
def source_location(meta_yaml):
# TODO: use get
# TODO: have dict
try:
if 'github.com' in meta_yaml['url']:
return 'github'
elif 'pypi.python.org' in meta_yam... | 97 | 28.68 | 85 | 17 | 745 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_51099a0084cd6cc8_6a10e28b", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com](1) may be at an arbitrary position in the ... | 4 | true | [
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The string [github.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [pypi.python.org](1) may be at an arbitrary position in the sanitized URL.",
"The string [pypi.org](1) may be at an arbitrary position in the sanitized URL.",
"The string [pypi.io](1) may be at an arbitrary positio... | [
14,
16,
18,
20
] | [
null,
null,
null,
null
] | [
12,
14,
14,
14
] | [
44,
51,
44,
43
] | |
2024-11-18T22:39:32.978704+00:00 | 1,612,188,557,000 | 61c55b3aa46894c991b065b16d0e66e61c8105f6 | 2 | {
"blob_id": "61c55b3aa46894c991b065b16d0e66e61c8105f6",
"branch_name": "refs/heads/master",
"committer_date": 1612188557000,
"content_id": "1ce87cefa095b8b211771b4a42bb60b9002c5d98",
"detected_licenses": [
"MIT"
],
"directory_id": "69bf0b06f5a417b955d3b1448735dfe14651462d",
"extension": "py",
"fi... | 2.328125 | stackv2 | import json
import platform
import requests as req
from storage import app
from sysInfo import printAll
import config
def registerPress():
addr: str = app.getEntry("Server Address")
token: str = app.getEntry("Device-Token")
uname = platform.uname()
if addr != "" and token != "":
if "http" n... | 74 | 32.41 | 115 | 15 | 592 | python | [{"finding_id": "codeql_py/request-without-cert-validation_52167ff2fd2dc09e_80c41350", "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)."
] | [
20
] | [
27
] | [
27
] | [
25
] | |
2024-11-18T22:55:00.368194+00:00 | 1,582,362,306,000 | ad3a5957f26cbccb5b9fed95075e2f7a5fc12cec | 3 | {
"blob_id": "ad3a5957f26cbccb5b9fed95075e2f7a5fc12cec",
"branch_name": "refs/heads/master",
"committer_date": 1582362306000,
"content_id": "24b277bab48a522e023609bce50ebe9458309e14",
"detected_licenses": [
"MIT"
],
"directory_id": "19bcb02eb2fd3000c29c3a21c15e8c82c7007c65",
"extension": "py",
"fi... | 2.796875 | stackv2 | import tkinter
from tkinter import filedialog
import math, time
import serial
import pynmea2
from i2clibraries import i2c_hmc5883l
class ROBOT():
def __init__(self):
self.lat = 0.0
self.lng = 0.0
self.headingDeg = 0
self.headingMin = 0
port="/dev/serial0"
self.ser... | 149 | 39.61 | 106 | 16 | 1,589 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d5ee85ea91b200d4_ff7036da", "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."
] | [
31
] | [
null
] | [
19
] | [
22
] | |
2024-11-18T22:43:33.839538+00:00 | 1,494,120,730,000 | fdfae6a38c3e56c33b72dfcf7f013bcd33b7b583 | 2 | {
"blob_id": "fdfae6a38c3e56c33b72dfcf7f013bcd33b7b583",
"branch_name": "refs/heads/master",
"committer_date": 1494120730000,
"content_id": "58215c9c933a43b24678cb0536e22e3345e760e9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7e45571ca95dcc07d0726d3906c883411c61d605",
"extension": "py"... | 2.375 | stackv2 | import os
import sys
import re
import datetime
from random import randint
try:
from SimpleHTTPServer import SimpleHTTPRequestHandler as Handler
from SocketServer import TCPServer as Server
from SocketServer import ThreadingMixIn
except ImportError:
from http.server import SimpleHTTPRequestHandler as Handler
f... | 284 | 36.27 | 158 | 23 | 2,553 | python | [{"finding_id": "codeql_py/http-response-splitting_ecf164c81991cb6a_b3b2c7d2", "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).\nThis HTTP header is con... | 5 | true | [
"CWE-113",
"CWE-1333",
"CWE-1333",
"CWE-1333",
"CWE-022"
] | [
"py/http-response-splitting",
"py/polynomial-redos",
"py/polynomial-redos",
"py/polynomial-redos",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This HTTP header is constructed from a [user-provided value](1).\nThis HTTP header is constructed from a [user-provided value](2).",
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of 'a'.\nThis [regular expression](1) that depends on a [user... | [
97,
117,
145,
213,
76
] | [
null,
null,
null,
null,
null
] | [
38,
43,
68,
66,
23
] | [
46,
46,
88,
75,
31
] | |
2024-11-18T23:10:15.887069+00:00 | 1,420,634,777,000 | 57d9c3aaa4694982c9684db65ef7cbbe046d668d | 2 | {
"blob_id": "57d9c3aaa4694982c9684db65ef7cbbe046d668d",
"branch_name": "refs/heads/master",
"committer_date": 1420634777000,
"content_id": "61f16d8d388375f9cc0a9212ef0f1467527baeab",
"detected_licenses": [
"MIT"
],
"directory_id": "3eb115b52c6413b052920ed07b766e4b5a9096bb",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os
import shutil
import logging
import tarfile
import tempfile
import subprocess
import distutils.spawn
from threading import Thread
if not distutils.spawn.find_executable('ffmpeg'):
raise ImportError('ffmpeg executable not found')
class TarToH264Compressor(object):
fps = 20
scale = '-1:360'
b... | 53 | 32.43 | 111 | 15 | 461 | python | [{"finding_id": "codeql_py/tarslip_08beea6ac65a9f21_ad8c42ac", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
30
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T23:10:20.201722+00:00 | 1,547,211,558,000 | 8523a5890fa5e89a2bd770e418eab070ecf7c49b | 3 | {
"blob_id": "8523a5890fa5e89a2bd770e418eab070ecf7c49b",
"branch_name": "refs/heads/master",
"committer_date": 1547211558000,
"content_id": "70399f5acff84461d84603989b9551e349e40c31",
"detected_licenses": [
"MIT"
],
"directory_id": "d7a04e557492a51ce5781fef76d38ed391604438",
"extension": "py",
"fi... | 2.8125 | stackv2 | #!/usr/bin/env LC_ALL=en_US.UTF-8 /usr/local/bin/python3
import requests
import dateparser
from datetime import datetime
import json
import re
import html
import base64
import os
START = ""
DESTINATION = ""
API_KEY = ""
TAG_RE = re.compile(r"<[^>]+>")
def main():
url = ("https://maps.googleapis.com/maps/api/dir... | 107 | 28.61 | 79 | 13 | 768 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_eadbefcd65098591_89f33308", "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... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\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... | [
45,
48,
49
] | [
46,
null,
null
] | [
11,
11,
11
] | [
72,
43,
71
] | |
2024-11-18T23:21:46.421881+00:00 | 1,575,983,266,000 | 09cd367296acf401db11387fefacd0eedc8d0c2b | 2 | {
"blob_id": "09cd367296acf401db11387fefacd0eedc8d0c2b",
"branch_name": "refs/heads/master",
"committer_date": 1575983266000,
"content_id": "0e68f0185177b55f680fcf2e8ab0e0e77079ce9f",
"detected_licenses": [
"MIT"
],
"directory_id": "497a0874b92b4bd2d13fd2d983afe381f1d23639",
"extension": "py",
"fi... | 2.5 | stackv2 | import re
from typing import Any
from meiga import Result, Error, Failure, Success
from petisco.domain.errors.given_input_is_not_valid_error import (
GivenInputIsNotValidError,
)
from petisco.domain.errors.input_exceed_lenght_limit_error import (
InputExceedLengthLimitError,
)
class ClientId(str):
def _... | 31 | 31.87 | 80 | 19 | 240 | python | [{"finding_id": "codeql_py/redos_0e1223b091030004_301f9b5d", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'A'.", "remediati... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'A'."
] | [
28
] | [
null
] | [
53
] | [
62
] | |
2024-11-18T21:33:29.864758+00:00 | 1,556,613,136,000 | 16ea5edd6b58e4e027599452cd3bfc4acae3efd5 | 2 | {
"blob_id": "16ea5edd6b58e4e027599452cd3bfc4acae3efd5",
"branch_name": "refs/heads/master",
"committer_date": 1556613136000,
"content_id": "813131a49683205f9847641b3460f70ed595e588",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "85db3034e31e32092ca3a90f6a9af2568c20e683",
"extension": "py"... | 2.40625 | stackv2 | ## Copyright 2019 Gia-Lac TRAN, Edwin V. Bonilla, John P. Cunningham, Pietro Michiardi, and Maurizio Filippone
##
## 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... | 197 | 34.73 | 124 | 12 | 2,102 | python | [{"finding_id": "codeql_py/tarslip_928c4e8eac8fadfb_674984a8", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
97,
143
] | [
null,
null
] | [
2,
2
] | [
5,
5
] | |
2024-11-18T22:30:30.189001+00:00 | 1,525,555,986,000 | e6084174fe4c6592f52bd940ae52c71ea90522f3 | 3 | {
"blob_id": "e6084174fe4c6592f52bd940ae52c71ea90522f3",
"branch_name": "refs/heads/master",
"committer_date": 1525555986000,
"content_id": "c21541317b80bc973bdea94b80f4c77112ef889b",
"detected_licenses": [
"MIT"
],
"directory_id": "8232d78cea45e0bb4ab110d71941cd51af96a44a",
"extension": "py",
"fi... | 3.21875 | stackv2 | import os
import csv
# setting the path for the csv file
filepath = os.path.join("employees.csv")
new_employee_data = []
# Read datat into a dictionary and create a new email field
with open(filepath) as csvfile:
reader = csv.DictReader(csvfile)
#print(reader)
for row in reader:
#print(row)
... | 41 | 28.61 | 80 | 13 | 293 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d897a9b049ecfec9_da1572f9", "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."
] | [
27
] | [
null
] | [
7
] | [
24
] | |
2024-11-18T22:30:31.315387+00:00 | 1,598,421,018,000 | 35ea66a5482308c68f816cc8c4a67c9cf9f78daa | 3 | {
"blob_id": "35ea66a5482308c68f816cc8c4a67c9cf9f78daa",
"branch_name": "refs/heads/master",
"committer_date": 1598421018000,
"content_id": "b1b46c6244290c725232187e96a6b5b8e6176041",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "db959b8feae8a67f5cd92f803aeb899ce2957b79",
"extension": "py"... | 2.515625 | stackv2 | "Packages tools."
from __future__ import print_function
import glob
import os
import os.path as op
import re
import shutil
import subprocess as sp
import sys
def run(command):
"Run `command` and display output."
print('gj$', command)
sp.check_call(command.split())
def chdir(path):
"Change working ... | 189 | 23.13 | 74 | 15 | 1,190 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a08b5ee060102e2d_c2189420", "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."
] | [
93
] | [
null
] | [
5
] | [
62
] | |
2024-11-18T22:44:38.153441+00:00 | 1,582,644,692,000 | 783eb4e03de5d30a780818f85ecd1fc8d48f0063 | 3 | {
"blob_id": "783eb4e03de5d30a780818f85ecd1fc8d48f0063",
"branch_name": "refs/heads/master",
"committer_date": 1582644692000,
"content_id": "0f2c601d278003efd8cf2d4bbab084dce5af0b4c",
"detected_licenses": [
"MIT"
],
"directory_id": "6b26a0d8f41b7fb28925d3b9abd293822c1c72de",
"extension": "py",
"fi... | 2.953125 | stackv2 | import json
import requests
from hackathon_a11y.api_key import YT_API_KEY
class YoutubeController:
"""
Class to define methods to interact with YT API (and VLC?)
"""
def __request(self, api, **kwargs):
"""
Request to YouTube v3 API
:param api: what to put after "googleapis.c... | 45 | 30.07 | 80 | 15 | 306 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_463b0e4d9c454ce7_f7715c8d", "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."
] | [
26
] | [
null
] | [
15
] | [
16
] | |
2024-11-18T21:14:10.801960+00:00 | 1,467,833,900,000 | bbab457aa0dca218d0b578a70cc8f1bce00c9120 | 3 | {
"blob_id": "bbab457aa0dca218d0b578a70cc8f1bce00c9120",
"branch_name": "refs/heads/master",
"committer_date": 1467833900000,
"content_id": "144cb413624e6a0692ec8aa80c0e92cada56a762",
"detected_licenses": [
"MIT"
],
"directory_id": "1d4717d704ffc7219a51084d9ca893e47a3237e8",
"extension": "py",
"fi... | 2.65625 | stackv2 | import hashlib
from os import environ
from databaseConnection import executeSql, queryHasOneAndOnlyOneResult
GET_ALL_USER_NAMES = 'select name from users'
GET_PASSWORD_HASH = "select passwordHash from users where name = %s"
GET_USER = "select * from users where name = %s"
INSERT_USER = "insert into users (name, passw... | 37 | 37.32 | 118 | 11 | 334 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a290aaced70f3199_e7647c6f", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally e... | [
14
] | [
null
] | [
27
] | [
60
] | |
2024-11-18T21:14:13.702118+00:00 | 1,624,647,554,000 | c827e18298734df8b6b3c3858c8fbaa3a0108454 | 2 | {
"blob_id": "c827e18298734df8b6b3c3858c8fbaa3a0108454",
"branch_name": "refs/heads/master",
"committer_date": 1624647554000,
"content_id": "858ee6b11311b830332741abd3294a05e2117f97",
"detected_licenses": [
"MIT"
],
"directory_id": "4813839e2f0112f6c7760fc1743e2ff0e9ab58c9",
"extension": "py",
"fi... | 2.34375 | stackv2 | import datetime
from pyramid.view import view_config
from pyramid.response import Response
from consuming_services_apis.data.memory_db import MemoryDb
from consuming_services_apis.data.post import Post
from consuming_services_apis.infrastructure.conversions import try_int, try_date
POST_LIMIT_PER_USER = 100
######... | 195 | 33.52 | 108 | 16 | 1,478 | python | [{"finding_id": "codeql_py/stack-trace-exposure_e7e20ef4e15a73a3_91add4c9", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH"
] | [
"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."
] | [
67,
109
] | [
null,
null
] | [
25,
25
] | [
65,
64
] | |
2024-11-18T21:14:13.841103+00:00 | 1,440,919,455,000 | 46fb28037ee572214c02b58241c5b93fd75135ba | 3 | {
"blob_id": "46fb28037ee572214c02b58241c5b93fd75135ba",
"branch_name": "refs/heads/master",
"committer_date": 1440919455000,
"content_id": "a6563ba01a58a3c360be44faeac0908a98abe8da",
"detected_licenses": [
"MIT"
],
"directory_id": "b0ccb350c019bbc95d185860a408af0c2b0e1ee9",
"extension": "py",
"fi... | 3.109375 | stackv2 | """
PageUp: A simple ReStructuredText based static page generator.
'It ain't supposed to be pretty, it's just supposed to work.'
- me. right now.
"""
from docutils.core import publish_parts
from jinja2 import Environment, FileSystemLoader
from os import getcwd, path, makedirs
import requests
# Root directory of... | 86 | 30.5 | 105 | 13 | 606 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1decedbcc93ad041_ec74f5d7", "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."
] | [
47
] | [
null
] | [
14
] | [
40
] | |
2024-11-18T21:57:35.373143+00:00 | 1,586,810,360,000 | 1bbd5cb47f2c75afd63fff8790c8abf5c85f58e0 | 3 | {
"blob_id": "1bbd5cb47f2c75afd63fff8790c8abf5c85f58e0",
"branch_name": "refs/heads/master",
"committer_date": 1586810360000,
"content_id": "96bb90e131832e80d8596cb7a54994231b5a8acd",
"detected_licenses": [
"MIT"
],
"directory_id": "4271be380c25758b8d20cf209c30b8fa619f7316",
"extension": "py",
"fi... | 3.484375 | stackv2 | import string,random
import csv
def generatePassword(num):
password = ''
for n in range(num):
x = random.randint(0,94)
password += string.printable[x]
return password
print('Enter name of Site')
name_of_site = input()
passwordsreturn = generatePassword(15)
print (passwordsreturn)
with ... | 22 | 20.09 | 58 | 10 | 115 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9f7cbdbf5ca8419c_9a217e6b", "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."
] | [
17
] | [
null
] | [
8
] | [
23
] | |
2024-11-18T21:57:58.761836+00:00 | 1,611,305,248,000 | 89ce56bc731c8c96213d9b4d732dcb15c29aeeaa | 3 | {
"blob_id": "89ce56bc731c8c96213d9b4d732dcb15c29aeeaa",
"branch_name": "refs/heads/master",
"committer_date": 1611305248000,
"content_id": "0f325e0357c6e2266a13015b91a6cf20fe3f1dc3",
"detected_licenses": [
"MIT"
],
"directory_id": "91ea257b7121f6e74062ed9fbcb26f5d0ceea4e3",
"extension": "py",
"fi... | 2.828125 | stackv2 | #!/usr/bin/env python3
import click
import json
from jinja2 import Template
def read_json_file(path):
try:
with open(path) as input_file:
result = json.load(input_file)
input_file.close()
except Exception as e:
print("Can not read json file " + str(path) + " !")
r... | 85 | 32.47 | 105 | 16 | 621 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_590df7906f4eff8b_5b8d40d8", "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."
] | [
24
] | [
null
] | [
24
] | [
51
] | |
2024-11-18T21:58:04.565999+00:00 | 1,481,798,269,000 | 0957edd939087639bfe9e7a3cf82fdcdcbbb4940 | 3 | {
"blob_id": "0957edd939087639bfe9e7a3cf82fdcdcbbb4940",
"branch_name": "refs/heads/master",
"committer_date": 1481798442000,
"content_id": "d1e1dfd3a0b1e2ba1cf1d7882d338cb05387080f",
"detected_licenses": [
"MIT"
],
"directory_id": "a3b0e0e43b60e9c6278456452063728203c0f221",
"extension": "py",
"fi... | 2.671875 | stackv2 | from collections import Counter
import requests
from rest_framework import authentication, permissions, status
from rest_framework.response import Response
from rest_framework.views import APIView
from count_word_api.helpers.text import html_to_text, remove_punctuation
from .serializers import CountSerializer
class... | 38 | 34.55 | 75 | 16 | 259 | python | [{"finding_id": "codeql_py/full-ssrf_a173e87f1f55d1f3_80dd4a2c", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 1 | true | [
"CWE-918"
] | [
"py/full-ssrf"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1)."
] | [
26
] | [
null
] | [
24
] | [
41
] | |
2024-11-18T21:58:05.919045+00:00 | 1,609,148,414,000 | d829a28029b3ed87d7987b35fbefa2f8be6143a1 | 2 | {
"blob_id": "d829a28029b3ed87d7987b35fbefa2f8be6143a1",
"branch_name": "refs/heads/master",
"committer_date": 1609148414000,
"content_id": "997cf00a952f03526264caaebbfa32af08fe1c3b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "6057d6aeaadbfe61fd3ac3fbab6d964e2985c997",
"extension": "p... | 2.328125 | stackv2 | """Traefik installation and setup"""
import hashlib
import os
from glob import glob
from jinja2 import Template
from passlib.apache import HtpasswdFile
import backoff
import requests
import toml
from .config import CONFIG_DIR
from tljh.configurer import load_config, _merge_dictionaries
# FIXME: support more than one... | 144 | 34.05 | 89 | 15 | 1,344 | python | [{"finding_id": "codeql_py/overly-permissive-file_5702124d98299e67_9f16d037", "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": ... | 3 | true | [
"CWE-732",
"CWE-732",
"CWE-079"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
50,
67,
104
] | [
null,
null,
null
] | [
13,
5,
20
] | [
41,
33,
38
] | |
2024-11-18T21:58:12.771805+00:00 | 1,636,382,637,000 | 363aa5786dd2c92be014dfdc221f6b04276d1b4f | 2 | {
"blob_id": "363aa5786dd2c92be014dfdc221f6b04276d1b4f",
"branch_name": "refs/heads/master",
"committer_date": 1636382637000,
"content_id": "12f998d4748864eb2285fa4f20085f46e788938e",
"detected_licenses": [
"MIT"
],
"directory_id": "baac34ed71ee3560ab00b106e8e1763f86f88790",
"extension": "py",
"fi... | 2.40625 | stackv2 | # -*- encoding: utf-8 -*-
'''
Current module: pyrunner.ext.ssh2.Linux
Rough version history:
v1.0 Original version to use
********************************************************************
@AUTHOR: Administrator-Bruce Luo(罗科峰)
MAIL: lkf20031988@163.com
RCS: pyrunner.ext.ssh2.Linux,v 1.0 2016... | 204 | 42.35 | 170 | 21 | 2,270 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_1a5bd36a3efef013_ec0bc1b3", "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."
] | [
47
] | [
null
] | [
13
] | [
76
] | |
2024-11-18T21:58:22.189743+00:00 | 1,663,654,152,000 | b2ade3f0687a881c16f3714b4fc4c026b64f60f2 | 2 | {
"blob_id": "b2ade3f0687a881c16f3714b4fc4c026b64f60f2",
"branch_name": "refs/heads/master",
"committer_date": 1663654152000,
"content_id": "0f2357882b9f6601460d1203593e339e4d817668",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "02912a35ae0178be82ad3b138edcb560bee6cb88",
"extension": "py"... | 2.328125 | stackv2 | # Copyright 2017, Juniper Networks Pvt Ltd.
# All rights reserved.
import re
import os
import time
import json
import yaml
import jinja2
import pprint
import hashlib
import logging
from pprint import pprint
from jnpr.junos import Device
from jnpr.junos import exception
from jnpr.junos.utils.sw import SW
__author__ ... | 261 | 34.35 | 104 | 20 | 2,182 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4ad34b857c8ad590_73ff9c8a", "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."
] | [
142
] | [
null
] | [
15
] | [
80
] | |
2024-11-18T21:58:29.869616+00:00 | 1,613,182,319,000 | 7d5c51aecc24bf72aad15d0bbdbfeb11cc66ad0b | 3 | {
"blob_id": "7d5c51aecc24bf72aad15d0bbdbfeb11cc66ad0b",
"branch_name": "refs/heads/main",
"committer_date": 1613182319000,
"content_id": "c7b66aa285502d0b8ed5f27b6a1ad1a38da154ac",
"detected_licenses": [
"MIT"
],
"directory_id": "51a5ef8313022a969d0edc3bca45a6b0b0276ab2",
"extension": "py",
"file... | 2.734375 | stackv2 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring, line-too-long
import argparse
from getpass import getpass
import urllib3
from fritzconnection import FritzConnection
def get_hosts_info(fritz_connection):
"""
Returns a list of dicts with information about the known hosts.
The... | 58 | 37.93 | 139 | 16 | 575 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_69df41209d8e9ac3_8dd9f932", "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."
] | [
56
] | [
null
] | [
17
] | [
83
] | |
2024-11-18T21:58:35.119652+00:00 | 1,591,487,662,000 | 98df4f20e039b61604335fbaf405d71955536bb5 | 3 | {
"blob_id": "98df4f20e039b61604335fbaf405d71955536bb5",
"branch_name": "refs/heads/master",
"committer_date": 1591487662000,
"content_id": "afd3e9e222ce8d5526b6dbf8c7d302479613c65f",
"detected_licenses": [
"MIT"
],
"directory_id": "27f2fef4dcb7221062d0777d646b6fae92ea9ddb",
"extension": "py",
"fi... | 2.75 | stackv2 | import bcrypt
import hashlib
from alfheimproject.settings import CONFIG
class PasswordHasher:
"""PasswordHasher provide methods to encrypt game account passwords"""
def __init__(self, hash_type):
self.hash_type = hash_type
"""Main method"""
def hash_password(self, password):
if self.... | 34 | 30.59 | 78 | 15 | 236 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_27161cf97fbf76e6_2b5a264b", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
30
] | [
null
] | [
30
] | [
54
] | |
2024-11-18T23:10:53.788323+00:00 | 1,522,893,966,000 | 9c31af2a362c4259d34dcf23bdc23e252ab1f5b9 | 3 | {
"blob_id": "9c31af2a362c4259d34dcf23bdc23e252ab1f5b9",
"branch_name": "refs/heads/master",
"committer_date": 1522893966000,
"content_id": "b456b7fd936f8e33360b6fd6a30fe334c9f168dc",
"detected_licenses": [
"MIT"
],
"directory_id": "0b899449f6db8839d7a26c33ad1030910a794d83",
"extension": "py",
"fi... | 3.03125 | stackv2 | #from rgbmatrix import RGBMatrix, graphics, RGBMatrixOptions
from multiprocessing import Process, Queue, Value
from flask import Flask
import json
# The Board
def board():
''' This will need to listen to the rest_api_queue
for messages to switch teams and things like that '''
''' This process need to... | 105 | 34.47 | 119 | 18 | 868 | python | [{"finding_id": "codeql_py/reflective-xss_b86541174f9a3f5d_0d9c7130", "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)."
] | [
91
] | [
null
] | [
12
] | [
15
] | |
2024-11-18T23:10:54.819675+00:00 | 1,580,134,053,000 | 6eacecc0552e414196276a426f6def8898ffdbfc | 3 | {
"blob_id": "6eacecc0552e414196276a426f6def8898ffdbfc",
"branch_name": "refs/heads/master",
"committer_date": 1580134053000,
"content_id": "bfac5dbcdb019516a6dc14a16d2e960e357205fa",
"detected_licenses": [
"MIT"
],
"directory_id": "73e7f93353ff6fa706ec644ac24d87de970b7115",
"extension": "py",
"fi... | 2.703125 | stackv2 | from url_shortener import URLShortener
import urllib
class TinyurlShortener (URLShortener):
def __init__(self, *args, **kwargs):
self.name = "TinyURL.com"
super(TinyurlShortener, self).__init__(*args, **kwargs)
def _shorten (self, url):
answer = url
api = urllib.urlopen ("http://tinyurl.com/api-create.php?u... | 18 | 26.06 | 85 | 13 | 139 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_524573d538cf43be_56463e1a", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [tinyurl.com](1) may be at an arbitrary position in the... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [tinyurl.com](1) may be at an arbitrary position in the sanitized URL."
] | [
18
] | [
null
] | [
10
] | [
30
] | |
2024-11-18T22:35:58.090467+00:00 | 1,594,758,053,000 | 45ebbbad0ea2af342a3ac119de8b27a46a9e6702 | 3 | {
"blob_id": "45ebbbad0ea2af342a3ac119de8b27a46a9e6702",
"branch_name": "refs/heads/master",
"committer_date": 1594758053000,
"content_id": "44a1ead744a594ffb6ba40e6d29c08a33bcc62db",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "fede1ccd9cdbe193769381e6d8b6211c8cc6c490",
"extension": "py"... | 2.609375 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import sys
import zipfile
from controller import Controller
from flask import Response, Request, send_file
from functools import reduce
from io import BytesIO # Python 3 way that should work also in Python 2
from os.path import basename, dir... | 257 | 50.05 | 171 | 21 | 2,927 | python | [{"finding_id": "codeql_py/stack-trace-exposure_217c5343b6f42059_499b706c", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 6 | true | [
"CWE-209",
"CWE-209",
"CWE-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"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"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... | [
51,
73,
95,
126,
150,
225
] | [
null,
null,
null,
null,
null,
null
] | [
40,
40,
40,
38,
40,
38
] | [
89,
90,
75,
101,
75,
90
] | |
2024-11-18T22:48:31.541592+00:00 | 1,593,443,458,000 | 57a374afdf985a2b3e851436a6cccb76c0f28e68 | 2 | {
"blob_id": "57a374afdf985a2b3e851436a6cccb76c0f28e68",
"branch_name": "refs/heads/master",
"committer_date": 1593443458000,
"content_id": "08bd274c6ce81a9937dd8bfdbb9199f2298d38ac",
"detected_licenses": [
"MIT"
],
"directory_id": "618dcfdeefb509820eb5c36eef0665e3bb50f8a1",
"extension": "py",
"fi... | 2.421875 | stackv2 | from flask import Response
import requests
from abc import ABC, abstractmethod
from concurrent.futures import ThreadPoolExecutor
import simple_proxy.logger as logger
class Request(ABC):
def __init__(self, value):
self._curr_obj = {
'type': value,
'excluded_headers': ['content-enco... | 77 | 39.3 | 173 | 17 | 735 | python | [{"finding_id": "codeql_py/request-without-cert-validation_16155c410eb0e4fe_f93c6194", "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]... | 6 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
44,
54,
56,
66,
68,
76
] | [
null,
null,
null,
null,
null,
null
] | [
16,
20,
20,
20,
20,
16
] | [
136,
174,
173,
173,
172,
139
] | |
2024-11-18T22:49:06.273489+00:00 | 1,628,697,441,000 | 40048af58386252735a9880c927ff961a7fd48b6 | 2 | {
"blob_id": "40048af58386252735a9880c927ff961a7fd48b6",
"branch_name": "refs/heads/main",
"committer_date": 1628697441000,
"content_id": "489e66faac81c43fecfc7dea0eb718da10cf8080",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8ebb354612e68d6557d8d235366865cdc22e834d",
"extension": "py",
... | 2.5 | stackv2 | import http.server
import os
import socket
import ssl
import threading
import time
URL="https://192.168.7.10:8070/<binary>"
EEPROM_SIZE=512
class HTTPS_Server(threading.Thread):
def __init__(self, server_ip, server_port):
threading.Thread.__init__(self)
self.server_ip = server_ip
self.ser... | 37 | 31.24 | 112 | 12 | 307 | python | [{"finding_id": "codeql_py/insecure-default-protocol_754b4a49267669b6_3aea6c27", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
22
] | [
24
] | [
24
] | [
79
] | |
2024-11-18T23:25:53.737822+00:00 | 1,539,013,439,000 | 1be57381722559d0158ebced354b80d3534210ee | 2 | {
"blob_id": "1be57381722559d0158ebced354b80d3534210ee",
"branch_name": "refs/heads/master",
"committer_date": 1539013439000,
"content_id": "e2474c0fd9c00d8d129d4f7c75dfc28e0f7c4db6",
"detected_licenses": [
"MIT"
],
"directory_id": "f1b576052155e6a4263ed614a532a938d2f8c7e4",
"extension": "py",
"fi... | 2.3125 | stackv2 | from __future__ import unicode_literals, print_function
from ape import tasks
from random import choice
import os
import os.path
import subprocess
import json
def refine_export_database(original):
@tasks.requires_product_environment
def export_database(target_path):
"""
Exports the database. ... | 444 | 26.73 | 134 | 17 | 2,743 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_6261c7995b660944_e0230785", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive d... | [
161,
167
] | [
165,
171
] | [
17,
11
] | [
10,
6
] | |
2024-11-18T23:25:57.731145+00:00 | 1,578,023,579,000 | 41c2467ee3e5032f4077f5816aae5c24e37b1ff8 | 2 | {
"blob_id": "41c2467ee3e5032f4077f5816aae5c24e37b1ff8",
"branch_name": "refs/heads/master",
"committer_date": 1578023579000,
"content_id": "e54194aebf2a78fd838b08fdc5a24801a041bed6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a113ebf4d2cfd550e9ab3b8bdfd9d87bfa63be3b",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/env python3
# -*-coding: utf-8 -*-
# @Author : Lemon pineapple
# @FileName: FlaskServer.py.py
# @Software: PyCharm
# @Github : SkyBlueEternal.github.io Or skyblueeternal.gitee.io/blog
import os
from datetime import timedelta
from werkzeug.utils import secure_filename
from flask import Flask, render_templat... | 82 | 30.6 | 110 | 15 | 637 | python | [{"finding_id": "codeql_py/stack-trace-exposure_85a4d7abaf42450d_20cb66a1", "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."
] | [
52
] | [
62
] | [
20
] | [
27
] | |
2024-11-18T23:26:01.101650+00:00 | 1,690,980,193,000 | 7e993a8e1234a277dd8ac821edd4be6e43fd8d56 | 3 | {
"blob_id": "7e993a8e1234a277dd8ac821edd4be6e43fd8d56",
"branch_name": "refs/heads/master",
"committer_date": 1690980193000,
"content_id": "1e84a0db80570457d63e9f29ce58df6cb9afad34",
"detected_licenses": [
"MIT"
],
"directory_id": "b40d464f5721f92fdc8756b1659156e436802e67",
"extension": "py",
"fi... | 3.078125 | stackv2 | """
Common functions for other core-modules.
"""
import os
import re
from xml.etree import ElementTree as etree
import requests
from .exceptions import FritzConnectionException, FritzResourceError
from .logger import fritzlogger
NS_REGEX = re.compile("({(?P<namespace>.*)})?(?P<localname>.*)")
VALUES_TRUE = {"true"... | 121 | 33.82 | 80 | 15 | 934 | python | [{"finding_id": "codeql_py/request-without-cert-validation_34357344c584857d_d3dbc528", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
52
] | [
null
] | [
20
] | [
68
] | |
2024-11-18T22:27:17.965934+00:00 | 1,563,246,862,000 | c32731613b46216f0e2a4d451dc8772354c1bdcf | 4 | {
"blob_id": "c32731613b46216f0e2a4d451dc8772354c1bdcf",
"branch_name": "refs/heads/master",
"committer_date": 1563246862000,
"content_id": "47a7a2d352e72b760a9234bdf4ad2cd78ce1a474",
"detected_licenses": [
"MIT"
],
"directory_id": "38505719b0a15ddb4c5d5fda650c0a4013b706f5",
"extension": "py",
"fi... | 3.515625 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 15 16:36:25 2019
@author: Tyler Chinsky
@description: API caller to accuweather.com to get weather based off
inputted zipcode. Returns many weather data points seen below.
"""
#import required modules
import requests, json
#Takes in the wanted zipcode and calls accuwea... | 120 | 34.68 | 86 | 11 | 1,072 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fa65744410d039dd_429b209e", "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... | 16 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"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.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (p... | [
95,
96,
97,
97,
98,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
34,
27,
41,
60,
19,
63,
24,
56,
32,
32,
31,
56,
20,
20,
19,
26
] | [
53,
39,
51,
78,
37,
72,
32,
74,
48,
48,
46,
68,
30,
30,
28,
36
] | |
2024-11-18T22:27:38.113501+00:00 | 1,551,349,776,000 | da4968260d9ce46d770e08ae27bff2544f57d214 | 2 | {
"blob_id": "da4968260d9ce46d770e08ae27bff2544f57d214",
"branch_name": "refs/heads/master",
"committer_date": 1551349776000,
"content_id": "020f14a3ab2f7c08c50cd4dabd1475368e1c4274",
"detected_licenses": [
"MIT"
],
"directory_id": "3c1648a88c45ac59101167f4b495f92f487b3b56",
"extension": "py",
"fi... | 2.375 | stackv2 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
RMDL: Random Multimodel Deep Learning for Classification
* Copyright (C) 2018 Kamran Kowsari <kk7nc@virginia.edu>
* Last Update: Oct 26, 2018
* This file is part of HDLTex project, University of Virginia.
* Free to use, change, share and distribute source c... | 65 | 28.52 | 113 | 18 | 527 | python | [{"finding_id": "codeql_py/tarslip_6f30f23dceec20ba_bb49a424", "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)."
] | [
63
] | [
null
] | [
9
] | [
16
] | |
2024-11-18T22:27:42.187627+00:00 | 1,496,559,479,000 | 724dfa785a2b8dafb5a0f72f7f7fe5f89d6e0ec0 | 2 | {
"blob_id": "724dfa785a2b8dafb5a0f72f7f7fe5f89d6e0ec0",
"branch_name": "refs/heads/master",
"committer_date": 1496559479000,
"content_id": "51b0fbba1509ba685c0ffed7e166cb8eaa95865f",
"detected_licenses": [
"MIT"
],
"directory_id": "b14a01833bdcce839056bf18d42dff8f39aa3f6a",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simple HTTP Server
"""
import os
import sys
import re
import cgi
import argparse
import functools
import warnings
import urllib
import httplib
import socket
import SocketServer
import BaseHTTPServer
from urllib import urlencode
from SimpleHTTPServer import SimpleHTTP... | 451 | 35.49 | 117 | 20 | 3,786 | python | [{"finding_id": "codeql_py/redos_6359a1ccdaf660c5_a95308cf", "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 repetiti... | 3 | true | [
"CWE-1333",
"CWE-1333",
"CWE-022"
] | [
"py/redos",
"py/polynomial-redos",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<::' and containing many repetitions of '='.",
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings starting with 'Content-Disposition' and with many repetitions of 'Conten... | [
131,
346,
356
] | [
null,
null,
null
] | [
93,
79,
24
] | [
100,
83,
26
] | |
2024-11-18T22:14:46.416254+00:00 | 1,505,941,371,000 | d09387232f25d68c51b4aa3f0ade2c9f61e241b4 | 3 | {
"blob_id": "d09387232f25d68c51b4aa3f0ade2c9f61e241b4",
"branch_name": "refs/heads/master",
"committer_date": 1505941371000,
"content_id": "05ef99bbe3e00ce2c2f71e2dc59a0fac97a2767c",
"detected_licenses": [
"MIT"
],
"directory_id": "6223197b9300f0c459e897529671a7dacd40b60b",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python3
from gevent import monkey
import argparse
import json
import os
import sys
import jinja2
dir_path = os.path.dirname(os.path.realpath(__file__))
SRC_DIR = os.path.join(dir_path, '..', 'src')
TEMPLATES_DIR = os.path.join(SRC_DIR, 'templates')
sys.path.append(SRC_DIR)
from util.wiki import regist... | 63 | 31.73 | 106 | 15 | 465 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_89b87d91dd2bfd10_702c151e", "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."
] | [
38
] | [
null
] | [
18
] | [
83
] | |
2024-11-18T22:15:07.307413+00:00 | 1,557,976,049,000 | aeb7906a7532317332fa120ff9aea23a5a0b37e2 | 3 | {
"blob_id": "aeb7906a7532317332fa120ff9aea23a5a0b37e2",
"branch_name": "refs/heads/master",
"committer_date": 1557976049000,
"content_id": "a0a13a7b65c1de8b58f025f5c727b8c36fa788bd",
"detected_licenses": [
"MIT"
],
"directory_id": "b3174b8a14a05af49986dec97ff726b77e2fc9aa",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests , json , sys
api = 'http://api.ipstack.com/'
token = '7eefd3e65422bec69d7c8aef5a80c03e'
header = {
'cache-control' : 'public, max-age=14400',
'cf-cache-status' : 'MISS',
'cf-ray' : '4d6b585a4f32ce27-LHR',
'content-encoding' : 'br',
'content-type' : ... | 50 | 27.48 | 115 | 20 | 468 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ef5312e2e3e9adc8_47faef81", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
43
] | [
null
] | [
10
] | [
115
] | |
2024-11-18T22:55:25.283247+00:00 | 1,524,599,617,000 | ab6d3278e197873a7d77d0df62b6c25a08ea8944 | 3 | {
"blob_id": "ab6d3278e197873a7d77d0df62b6c25a08ea8944",
"branch_name": "refs/heads/master",
"committer_date": 1524599617000,
"content_id": "d58763f37e2fc21a907f2cebf699f31b5085da0d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "79634b4a07f2605f073d8731eee4929e47bae168",
"extension": "py"... | 3.015625 | stackv2 | import MySQLdb
conn=MySQLdb.connect(host='localhost',database='emp',user='root',password='')
cursor=conn.cursor()
def update(amount):
try:
print('Before Updated')
str="select *from empinfo"
cursor.execute(str)
row=cursor.fetchall()
for row in row:
#print(row)
... | 40 | 27.77 | 83 | 13 | 284 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e586131fcf691ffc_c1602e86", "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."
] | [
16,
32
] | [
null,
null
] | [
19,
19
] | [
68,
68
] | |
2024-11-18T22:55:42.739347+00:00 | 1,601,482,381,000 | 6b9a20addae442a890d14cfb0ce965b5dfb9ee88 | 3 | {
"blob_id": "6b9a20addae442a890d14cfb0ce965b5dfb9ee88",
"branch_name": "refs/heads/master",
"committer_date": 1601482381000,
"content_id": "3e3064bdedebbfd8e63489b3caaec56d192bd5b6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9456bfd645a151922bfde26aabb346a86ca0a3b3",
"extension": "py"... | 2.71875 | stackv2 | # Example of render a topology via a web server. This include :
# - building a web server via Flask (http://flask.pocoo.org/)
# - render topology graphic via NeXt UI toolkit (https://wiki.opendaylight.org/view/NeXt:Main)
# - get topology data from APIC-EM via REST API calls from Python
# Before start please install fl... | 109 | 36.72 | 94 | 11 | 1,007 | python | [{"finding_id": "codeql_py/request-without-cert-validation_b2a66365b4d9d44a_df0ef38e", "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)."
] | [
57,
78
] | [
null,
null
] | [
16,
16
] | [
90,
63
] | |
2024-11-18T22:43:34.571480+00:00 | 1,619,784,733,000 | 34171d7f68ba9135ba434d0dc7096067fbf4e945 | 3 | {
"blob_id": "34171d7f68ba9135ba434d0dc7096067fbf4e945",
"branch_name": "refs/heads/main",
"committer_date": 1619784733000,
"content_id": "85428276af3ec1eda20db1b788859ce41582cbb6",
"detected_licenses": [
"MIT"
],
"directory_id": "f4f00ac83d8a8ab5e5598fa3a14656f27d8ba301",
"extension": "py",
"file... | 2.546875 | stackv2 | import json
import plotly
import re
import pandas as pd
from nltk.stem import WordNetLemmatizer
from nltk.tokenize import word_tokenize
from flask import Flask
from flask import render_template, request, jsonify
from plotly.graph_objs import Bar
import joblib
from sqlalchemy import create_engine
app = Flask(__name__... | 142 | 30.44 | 102 | 22 | 1,114 | python | [{"finding_id": "codeql_py/overly-large-range_a5758fd43b43531e_988943f3", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 2 | true | [
"CWE-020",
"CWE-215"
] | [
"py/overly-large-range",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
19,
138
] | [
null,
null
] | [
48,
5
] | [
51,
51
] | |
2024-11-18T22:43:44.019470+00:00 | 1,565,899,240,000 | e9d31e51db750c55a8896eb3f8290aad4fd7c8ac | 2 | {
"blob_id": "e9d31e51db750c55a8896eb3f8290aad4fd7c8ac",
"branch_name": "refs/heads/master",
"committer_date": 1565899240000,
"content_id": "0066f49c26dc6ac58e7a9d8fe4a35477821e6955",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "4930a65ba63565cfa0aaa737be5af44c1eff4967",
"extension": "p... | 2.4375 | stackv2 | #!/usr/bin/env python
""" Blueprint for serving trending results.
"""
import logging
from flask_login import login_required
from flask import request, render_template, jsonify
from flask import Blueprint
import jinja2
import os
import overwatch.processing.trending.constants as CON
from overwatch.processing.trending... | 123 | 41.79 | 108 | 14 | 1,088 | python | [{"finding_id": "codeql_py/log-injection_5b8ee88c0a397167_b5802859", "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)."
] | [
53
] | [
null
] | [
18
] | [
53
] | |
2024-11-19T00:07:05.016040+00:00 | 1,632,181,067,000 | a1e8b2adbc5d84580e40fff2ce0ffbf97868f1fc | 2 | {
"blob_id": "a1e8b2adbc5d84580e40fff2ce0ffbf97868f1fc",
"branch_name": "refs/heads/main",
"committer_date": 1632181067000,
"content_id": "e343f14ceb40a10497e8b04a588ec4c595bf6672",
"detected_licenses": [
"MIT"
],
"directory_id": "77304561e1feec99d9e1d4a471e799aa99cd8424",
"extension": "py",
"file... | 2.4375 | stackv2 | import asyncio
import time
from aiohttp import web
from aiohttp_middlewares import cors_middleware
from gpiozero.pins.pigpio import PiGPIOFactory
from gpiozero import Servo
def current_milli_time():
return round(time.time() * 1000)
pin_factory = PiGPIOFactory()
class MockServo:
def __init__(self):
... | 128 | 22.73 | 88 | 15 | 785 | python | [{"finding_id": "codeql_py/stack-trace-exposure_c5e9101b9ec84bbd_ce8d7e51", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH"
] | [
"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."
] | [
96,
109
] | [
null,
null
] | [
34,
34
] | [
35,
40
] | |
2024-11-19T00:07:16.296588+00:00 | 1,583,511,639,000 | a9a12332be3631c005e4fdd4985fe9530f053225 | 3 | {
"blob_id": "a9a12332be3631c005e4fdd4985fe9530f053225",
"branch_name": "refs/heads/master",
"committer_date": 1583511639000,
"content_id": "d6dbe586e4325872eeb0008ae79c060191b323d2",
"detected_licenses": [
"MIT"
],
"directory_id": "6d9fbe242013a813040206f9065aa6d998c830dc",
"extension": "py",
"fi... | 2.734375 | stackv2 | from psycopg2 import connect
from decouple import config
from flask import Flask, jsonify
from flask_cors import CORS
def create_app():
app=Flask(__name__)
CORS(app)
DB_USER = config('POSTGRES_USERNAME')
DB_PASS = config('POSTGRES_PASSWORD')
DB_HOST = config('POSTGRES_HOST')
DB_URL = f'p... | 136 | 24.95 | 79 | 18 | 720 | python | [{"finding_id": "codeql_py/sql-injection_4613d05bc26c042f_47cfb10a", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 2 | true | [
"CWE-089",
"CWE-089"
] | [
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1)."
] | [
98,
127
] | [
null,
null
] | [
33,
33
] | [
38,
38
] | |
2024-11-19T00:33:33.908345+00:00 | 1,561,701,323,000 | d43e95b678072d6b6213780902e939d4eec16482 | 2 | {
"blob_id": "d43e95b678072d6b6213780902e939d4eec16482",
"branch_name": "refs/heads/master",
"committer_date": 1561701323000,
"content_id": "a136a6c315f2ef8bbfb203340b494e343ab73f07",
"detected_licenses": [
"MIT"
],
"directory_id": "bfe87e3ee8b03ae1192d87386178cdf6b1be57da",
"extension": "py",
"fi... | 2.359375 | stackv2 | from datetime import datetime
import urllib.parse
import flask
app = flask.Flask(__name__)
@app.route('/login')
def login():
html = '''
<html>
<body>
<form action="/validate/login" method="post">
<table>
<tr>
<td>Username: <input type="text" name="username" value="username"/></td>... | 89 | 19.93 | 86 | 15 | 468 | python | [{"finding_id": "codeql_py/cookie-injection_a138f2348f3ee56c_4acc6514", "tool_name": "codeql", "rule_id": "py/cookie-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cookie is constructed from a [user-supplied input](1).", "remediation": "", "location": {"file_path": "... | 4 | true | [
"CWE-020",
"CWE-312",
"CWE-079",
"CWE-079"
] | [
"py/cookie-injection",
"py/clear-text-storage-sensitive-data",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is constructed from a [user-supplied input](1).",
"This expression stores [sensitive data (password)](1) as clear text.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
82,
82,
31,
73
] | [
84,
84,
35,
77
] | [
7,
7,
9,
9
] | [
46,
46,
10,
10
] | |
2024-11-19T00:19:24.588558+00:00 | 1,554,275,014,000 | eb8351480dd1a37eb7997c8e892591a0d89bbd79 | 2 | {
"blob_id": "eb8351480dd1a37eb7997c8e892591a0d89bbd79",
"branch_name": "refs/heads/master",
"committer_date": 1554275014000,
"content_id": "bccaa68591933f49595e79473be97a79d6abd560",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1ed765187edcabee3c724178ae7ba9915f20d5c2",
"extension": "py"... | 2.328125 | stackv2 | """
:author: yoram@ignissoft.com
"""
from os import path
import requests
import ast
import time
import re
import copy
from trafficgenerator.tgn_utils import TgnError
class IxnRestWrapper(object):
null = 'null'
def __init__(self, logger):
""" Init IXN REST package.
:param looger: applicati... | 235 | 37.54 | 111 | 19 | 1,983 | python | [{"finding_id": "codeql_py/request-without-cert-validation_0e847cbbe03a29bd_85936e32", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
52
] | [
null
] | [
20
] | [
56
] | |
2024-11-19T01:11:34.322064+00:00 | 1,536,117,084,000 | 06337fe1aa489fe55b21fe270446e359b0b81ec5 | 3 | {
"blob_id": "06337fe1aa489fe55b21fe270446e359b0b81ec5",
"branch_name": "refs/heads/master",
"committer_date": 1536117084000,
"content_id": "8aa6f4743ac706c001e1fb86147ed5b454c5da66",
"detected_licenses": [
"MIT"
],
"directory_id": "32e6ce902f2e8d4ea4bf94641d74d4185a988d3d",
"extension": "py",
"fi... | 2.625 | stackv2 | import os
os.chdir("D:/George/Projects/PaperTrends/src")
import tweepy
from tqdm import tqdm
import pandas as pd
import sys
disableTQDM = False
class TwitterParser():
def __init__(self, user='arxivtrends'):
print("> Twitter Parser initialized")
keys = self._readAPIKeys("env.json", user)
a... | 169 | 41.07 | 171 | 25 | 1,740 | python | [{"finding_id": "codeql_py/overly-large-range_bedbfbcd9bb783e9_78349791", "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
] | [
64
] | [
67
] | |
2024-11-19T01:11:40.558149+00:00 | 1,611,240,922,000 | 00ad10c5b70377f56633882d8d5c491f1de715c7 | 3 | {
"blob_id": "00ad10c5b70377f56633882d8d5c491f1de715c7",
"branch_name": "refs/heads/master",
"committer_date": 1611240922000,
"content_id": "05d33da90614e48932883afba33e7386f76b5934",
"detected_licenses": [
"MIT"
],
"directory_id": "064d888394825f7b61669bc3e6e0728533b830b9",
"extension": "py",
"fi... | 3.109375 | stackv2 | # --------------
# import packages
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings("ignore")
# Load the dataset
df = pd.read_csv(path,sep="\t")
df.info()
# Converting date attribute from string to datetime.date datatype
df['date'] =... | 146 | 21.43 | 101 | 11 | 841 | python | [{"finding_id": "codeql_py/overly-large-range_bdf812bbba53174a_d2078ce3", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
63
] | [
null
] | [
27
] | [
30
] | |
2024-11-18T23:46:50.993366+00:00 | 1,562,085,607,000 | 88511e3ff42a8883639e1e17e1c34b7fedd9c884 | 3 | {
"blob_id": "88511e3ff42a8883639e1e17e1c34b7fedd9c884",
"branch_name": "refs/heads/master",
"committer_date": 1562085607000,
"content_id": "869e9ba893424648da4db00e6b6c3cfc1fb10df3",
"detected_licenses": [
"MIT"
],
"directory_id": "0ecefef0b44c3898cf10800cf66ac8dde2199301",
"extension": "py",
"fi... | 2.578125 | stackv2 | import requests
import json
import argparse
import pprint
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
class Session(object):
def __init__(self, ip, usr, pwd):
'https://' + ip, usr, pwd
self.usr = usr
... | 51 | 28.51 | 108 | 18 | 364 | python | [{"finding_id": "codeql_py/request-without-cert-validation_80516e72caddfa2e_a67e39d3", "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) by [this value](2).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2)."
] | [
36,
38
] | [
null,
null
] | [
20,
20
] | [
87,
109
] | |
2024-11-18T23:48:05.817911+00:00 | 1,660,740,713,000 | 7208772ba2ae82be41ae12752167486958a643d5 | 3 | {
"blob_id": "7208772ba2ae82be41ae12752167486958a643d5",
"branch_name": "refs/heads/main",
"committer_date": 1660740713000,
"content_id": "6d2d0c45f9b236a7bef4e6546e2f07881f1354bb",
"detected_licenses": [
"MIT"
],
"directory_id": "315143685b7fc938cb732dde8ce797176d7456ae",
"extension": "py",
"file... | 2.75 | stackv2 | import paramiko
import os
import socket
from ._bot import BaseBot
__all__ = [
'sshBot'
]
class sshBot(BaseBot):
"""sshBot to help with ssh connections to a server.
Parameters
----------
hostname : str
ip address of the server, by default None.
username : str
username on the... | 181 | 32.7 | 125 | 17 | 1,295 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_5ec24bb3ab2f9ea7_1cfea624", "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."
] | [
81
] | [
null
] | [
9
] | [
73
] | |
2024-11-18T23:48:07.616684+00:00 | 1,471,920,444,000 | 2672792e6b325cd0ed666c1eacb88937fc96fbbf | 2 | {
"blob_id": "2672792e6b325cd0ed666c1eacb88937fc96fbbf",
"branch_name": "refs/heads/master",
"committer_date": 1471920444000,
"content_id": "297448a020d1ff3e9e23833ae3ffc0f906dbcd62",
"detected_licenses": [
"MIT"
],
"directory_id": "f31f650400966b348919402796142672bbd500f5",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python3
#-*-coding: utf-8-*-
import tornado.httpserver
import tornado.ioloop
import tornado.web
import tornado.options
import logging
from tornado.options import define, options
define('port', default=8000, type=int)
logging.basicConfig(level=logging.INFO)
class IndexHander(tornado.web.RequestHand... | 45 | 17.71 | 77 | 12 | 201 | python | [{"finding_id": "codeql_py/reflective-xss_eb842ce41cb66392_4dd95dd8", "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-117"
] | [
"py/reflective-xss",
"py/log-injection"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
22,
21
] | [
null,
null
] | [
20,
22
] | [
35,
38
] | |
2024-11-19T00:44:08.270483+00:00 | 1,480,837,293,000 | 03369bad01a1bc9fb40fa68dd1d1f7e4df189416 | 3 | {
"blob_id": "03369bad01a1bc9fb40fa68dd1d1f7e4df189416",
"branch_name": "refs/heads/master",
"committer_date": 1480837293000,
"content_id": "de440d5091540103fea6540c66ec02e23e7ec2ae",
"detected_licenses": [
"MIT"
],
"directory_id": "9073bc43824109b4bd5e6a7364de2ef722990c59",
"extension": "py",
"fi... | 2.515625 | stackv2 | # coding: utf-8
import time
from os import path
import decimal
from logging import getLogger
import boto3
from jinja2 import Environment, FileSystemLoader
COUNTER_HASH_SIZE = 10
logger = getLogger()
env = Environment(loader=FileSystemLoader(path.join(path.dirname(__file__), 'templates'), encoding='utf8'))
dynamod... | 67 | 22.48 | 107 | 13 | 406 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b0636f78c2d54cd2_df8dbb6e", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
15
] | [
null
] | [
7
] | [
108
] | |
2024-11-19T00:44:18.199633+00:00 | 1,584,098,118,000 | 66e4947642dea3472324696c8c2daff12eacee1e | 3 | {
"blob_id": "66e4947642dea3472324696c8c2daff12eacee1e",
"branch_name": "refs/heads/master",
"committer_date": 1584098118000,
"content_id": "08a050227b681d37cd72c4712ab09272978219ca",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "298b7fba45a9b92b37a7e3042563a992e25209f3",
"extension": "py",
... | 2.59375 | stackv2 | import os
import re
import math
import pickle
import time
import sys
import requests
from bs4 import BeautifulSoup
import pandas as pd
from tqdm import tqdm
realpath = os.path.dirname(os.path.realpath(__file__))
folderpath = realpath + "\\scrape-results"
# main scraping function
def extract_wikipedia_random(num_arti... | 375 | 34.39 | 110 | 16 | 3,167 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_7f9281cae376d32b_6cf678cd", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This string, which is used as a regular expression [here](1), has an unescaped '.' befor... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This string, which is used as a regular expression [here](1), has an unescaped '.' before 'wikipedia.org/wiki/', so it might match more hosts than expected."
] | [
20
] | [
null
] | [
17
] | [
47
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.