added stringdate 2024-11-18 17:59:49 2024-11-19 03:44:43 | created int64 126B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.09 | source stringclasses 1
value | text stringlengths 257 22.3k | num_lines int64 16 648 | avg_line_length float64 15 61 | max_line_length int64 31 179 | ast_depth int64 8 40 | length int64 101 3.8k | lang stringclasses 1
value | sast_semgrep_findings stringlengths 1.56k 349k | sast_semgrep_findings_count int64 1 162 | sast_semgrep_success bool 1
class | sast_semgrep_error stringclasses 1
value | cwe_ids listlengths 1 162 | rule_ids listlengths 1 162 | subcategories listlengths 1 162 | confidences listlengths 1 162 | severities listlengths 1 162 | line_starts listlengths 1 162 | line_ends listlengths 1 162 | column_starts listlengths 1 162 | column_ends listlengths 1 162 | owasp_categories listlengths 1 162 | messages listlengths 1 162 | cvss_scores listlengths 1 162 | likelihoods listlengths 1 162 | impacts listlengths 1 162 | filename stringlengths 4 105 | path stringlengths 5 372 | repo_name stringlengths 5 115 | license stringclasses 385
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T20:18:19.330274+00:00 | 1,556,015,787,000 | f9347a15443d0c989288c9d98701c8d0f95f22b9 | 3 | {
"blob_id": "f9347a15443d0c989288c9d98701c8d0f95f22b9",
"branch_name": "refs/heads/master",
"committer_date": 1556015787000,
"content_id": "3daf5922376df0b991487ef0e64aeab26f130761",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "aafb74eb25ffbae242b2f8947bc3804bb04f7707",
"extension": "py"... | 2.765625 | stackv2 | #!/usr/bin/env python
import requests
from urllib3.exceptions import InsecureRequestWarning
import os
""" Retrieve a list of all the devices in NetBox. This will require
authentication. As in the previous task, create your headers manually and pass
them into your request"""
# Set the token based on the NETBOX_TOKEN e... | 33 | 33 | 78 | 13 | 265 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_0cc1bba15969a63e_703b2f63", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 3 | true | [
"CWE-295"
] | [
"rules.python.requests.security.disabled-cert-validation"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
20
] | [
20
] | [
8
] | [
66
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation."
] | [
7.5
] | [
"LOW"
] | [
"LOW"
] | ex3.py | /class11/ex3.py | nkbyrne/pyplus | Apache-2.0 | |
2024-11-18T20:18:31.467471+00:00 | 1,563,569,247,000 | cac01d1cd258cec0567552ad7a53dd7986e9bf6f | 3 | {
"blob_id": "cac01d1cd258cec0567552ad7a53dd7986e9bf6f",
"branch_name": "refs/heads/master",
"committer_date": 1563569247000,
"content_id": "1fdbaceb4687a6b137d57b0f748bef7bf6e5b4ce",
"detected_licenses": [
"MIT"
],
"directory_id": "e35d4e71d15217f8dc4ebfd4f07378700649923c",
"extension": "py",
"fi... | 2.5625 | stackv2 | #This code is by "The Beard#1555", https://github.com/oxrock/TrainingDataExtractor/blob/master/createTrainingData.py
from carball.json_parser.game import Game
from carball.analysis.analysis_manager import AnalysisManager
from carball.controls.controls import ControlsCreator
import os
import json
import carball
import ... | 117 | 36.91 | 163 | 15 | 1,089 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_b0e38fa6b02133fd_257b8bec", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
91,
96,
101
] | [
91,
96,
101
] | [
9,
9,
18
] | [
36,
36,
32
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | createTrainingData.py | /Hippity_Hoppity_Get_Off_My_Property/createTrainingData.py | JayTheYggdrasil/Hippity_Hoppity_Get_Off_My_Property | MIT | |
2024-11-18T20:18:33.878930+00:00 | 1,614,939,805,000 | 72d53e92afeca728b602d0b9a051c6d770a3bb1d | 3 | {
"blob_id": "72d53e92afeca728b602d0b9a051c6d770a3bb1d",
"branch_name": "refs/heads/main",
"committer_date": 1614939805000,
"content_id": "4e62c484be5fdde6f6c84fc9f51079fa7a0e7003",
"detected_licenses": [
"MIT"
],
"directory_id": "d4768ec80f79de42923dcfa85ee69f261c740200",
"extension": "py",
"file... | 2.765625 | stackv2 | import os
import requests
from mysql.connector import Error
from pathlib import Path
import csv
import datetime
from globals import cxn
def get_etf_list():
data={}
try:
select_query='SELECT id, ticker, description, cusip, isin, url, csv_url from etf'
with cxn.cursor() as cursor:
cur... | 89 | 35.66 | 135 | 21 | 760 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_b348dc010b01323a_f11297fb", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 4 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
34
] | [
34
] | [
13
] | [
41
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | daily_holdings_download.py | /daily_holdings_download.py | rohitapte/ark-holdings | MIT | |
2024-11-18T20:18:34.240064+00:00 | 1,588,018,194,000 | d26d53598763d44cbf2f434a1605e9d0108eb089 | 3 | {
"blob_id": "d26d53598763d44cbf2f434a1605e9d0108eb089",
"branch_name": "refs/heads/master",
"committer_date": 1588018194000,
"content_id": "e0fd483a6467c2857e5cbfdaf52a914ba73029fb",
"detected_licenses": [
"MIT"
],
"directory_id": "2344bfb923a944552374f7e52843857684abd839",
"extension": "py",
"fi... | 2.796875 | stackv2 | import os
import curses
from curses import wrapper
import subprocess
from pathlib import Path
import sys
def exec_cmd(command,scr):
if "|" in command:
# make copies of stdin and stdout in order to restore them later
sys.stdout = os.fdopen(sys.stdout.fileno(),'w',0)
s_in, s_out = (0, 0)
... | 87 | 31.3 | 114 | 19 | 690 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_b9f29833c2bcd5e7_f26ade0f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
41
] | [
41
] | [
13
] | [
60
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | shell.py | /shell.py | maarnold-they/cs-321-python-shell | MIT | |
2024-11-18T20:18:36.054537+00:00 | 1,459,880,833,000 | e8d9951d3619856c50ea5f6f29e83019622421dd | 2 | {
"blob_id": "e8d9951d3619856c50ea5f6f29e83019622421dd",
"branch_name": "refs/heads/master",
"committer_date": 1459880833000,
"content_id": "8e57c30a0c965995c21f6a8380214b2cba6bf356",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "75880e9dc1872b95f21e61ba63c9bf8d4e11eaca",
"extension": "py"... | 2.421875 | stackv2 | from xml.dom.minidom import parse
import xml.dom.minidom
import os
import json
import codecs
## This scirpt parses every .tei.xml file
## TEI annotations data file
outputfile_path = "/home/jaydeep/599hw2/tei_json"
list_of_authors = "/home/jaydeep/599hw2/list_of_authors"
tei_file_dir = "/media/jaydeep/mySpace/sprin... | 69 | 30.68 | 100 | 26 | 584 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_c4f4df6f339d5776_ad117a52", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
1,
2
] | [
1,
2
] | [
1,
1
] | [
34,
23
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | tei_xml_parser.py | /q5/tei_xml_parser.py | jdramani/599-2 | Apache-2.0 | |
2024-11-18T20:18:36.799793+00:00 | 1,604,520,926,000 | dcf5a01cc4846f777c893aafc3b91fc1dc1a40b4 | 3 | {
"blob_id": "dcf5a01cc4846f777c893aafc3b91fc1dc1a40b4",
"branch_name": "refs/heads/main",
"committer_date": 1604520926000,
"content_id": "688799652e1dc08ad6c59af53c784eab14451007",
"detected_licenses": [
"MIT"
],
"directory_id": "8a2d56dfedc7785ee2dde4203eea28e04989e993",
"extension": "py",
"file... | 3.046875 | stackv2 | from tkinter import *
import GUI
from math import log as log
from math import sqrt as sqrt
from math import sin as sin
from math import cos as cos
def inp_to_txtb(number_or_sign):
GUI.txtBox.config(state=NORMAL)
GUI.txtBox.insert(END, str(number_or_sign))
GUI.txtBox.config(state=DISABLED)
def equal():
... | 44 | 25.84 | 87 | 16 | 319 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_77cf15f99671612d_9d9409a8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
18
] | [
18
] | [
18
] | [
32
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | functions.py | /functions.py | heEXDe/calculator_tkinterGUI | MIT | |
2024-11-18T20:18:43.905377+00:00 | 1,547,639,682,000 | 2b7f674d9591a3efaa0a5e0ac0a48e765541d53c | 2 | {
"blob_id": "2b7f674d9591a3efaa0a5e0ac0a48e765541d53c",
"branch_name": "refs/heads/master",
"committer_date": 1547639682000,
"content_id": "d7b35a9e666a77776d7e7bbee895ea27f40bc6ab",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e8f002107f1bcc6fc457ca9326605338fe35e0a9",
"extension": "py"... | 2.484375 | stackv2 | #!env/bin/python3
import sys
import time
import sqlite3
import os
import json
import hashlib
def default_hash(name, args, kwargs):
hs = hashlib.sha1(
('%s--%s'% (
'-'.join(str(x) for x in args),
'-'.join('%s:%s' % (k, v) for k,v in kwargs.items())
)).encode('utf8')
).he... | 269 | 27.26 | 82 | 20 | 1,834 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-hash-algorithm-sha1_67c1e970b8375635_871fb389", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-hash-algorithm-sha1", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected SHA1 hash algorithm wh... | 5 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
28
] | [
31
] | [
13
] | [
14
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | cache.py | /google-drive/cache.py | serverboards/serverboards-plugins-oss | Apache-2.0 | |
2024-11-18T20:18:45.805838+00:00 | 1,518,811,082,000 | 50eda0c291098b34d013066aaccb8588de6e5810 | 3 | {
"blob_id": "50eda0c291098b34d013066aaccb8588de6e5810",
"branch_name": "refs/heads/master",
"committer_date": 1518811895000,
"content_id": "ac91e9bf01205b61cdbc8df3767a02887e373167",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "44e2d237db1bea6752f7e45c8c41bac93e1fe53d",
"extension": "py"... | 2.578125 | stackv2 | from param import ParamTree
from jinja2 import Environment, FileSystemLoader
import os
import logging
class RenderError(Exception):
pass
def get_system_params(prefix="J2RENDER_"):
system = {}
env = os.environ
for variable, value in os.environ.items():
if variable.startswith(prefix):
... | 75 | 26.93 | 98 | 17 | 403 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_cb2719d8d034a8a7_2781c20e", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 2 | true | [
"CWE-79",
"CWE-116"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
46,
46
] | [
46,
46
] | [
17,
17
] | [
69,
69
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | render.py | /j2render/render.py | bookwar/python-j2render | Apache-2.0 | |
2024-11-18T20:18:46.796784+00:00 | 1,505,486,565,000 | 8628c2d0a08d7fe9f935cfb4a197af92e333cab6 | 2 | {
"blob_id": "8628c2d0a08d7fe9f935cfb4a197af92e333cab6",
"branch_name": "refs/heads/master",
"committer_date": 1505486565000,
"content_id": "f867a51accfca2ceb79786c25d072206e181079d",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bf287afda71c4360f40ecd78e74049510965db82",
"extension": "p... | 2.390625 | stackv2 | from os.path import join
import os
from subprocess import call
import git
from .base import get_data_home
BASE_RAMP_KIT_URL = 'https://github.com/ramp-kits/'
RAMP_KITS_AVAILABLE = ('california_rainfall_test',
'boston_housing',
'iris',
'titanic',
... | 56 | 28.07 | 75 | 13 | 364 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.unchecked-subprocess-call_f20d210422f896c9_17d802ca", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.unchecked-subprocess-call", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "This is not checking the ret... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
54
] | [
54
] | [
9
] | [
52
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | ramp_kit.py | /rampwf/kits/ramp_kit.py | djgagne/ramp-workflow | BSD-3-Clause | |
2024-11-18T20:18:47.521822+00:00 | 1,617,594,126,000 | fb384b6ad67644969ef5bff6302df00f64f2049a | 2 | {
"blob_id": "fb384b6ad67644969ef5bff6302df00f64f2049a",
"branch_name": "refs/heads/master",
"committer_date": 1617594126000,
"content_id": "bdf9cc0e44022537b277214f12c93f3686445902",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e45e411daaafc6f25d2bc890caf6181db38095dc",
"extension": "py"... | 2.5 | stackv2 | import numpy as np
import pickle
import sys
import os
"""
currently we need to set an environment variable in 'search_space',
and then import the correct Cell class based on the search space
TODO: handle this better by making Cell subclasses for each search space
"""
if 'search_space' not in os.environ or os.environ['... | 372 | 40.47 | 128 | 19 | 3,053 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7b01fd830bcacb05_83e3456d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
40,
331
] | [
40,
331
] | [
27,
26
] | [
108,
64
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | data.py | /data.py | naszilla/nas-encodings | Apache-2.0 | |
2024-11-18T20:18:47.628255+00:00 | 1,633,878,448,000 | b17c09853376a0139ad914baf46370b23e7ef8f8 | 2 | {
"blob_id": "b17c09853376a0139ad914baf46370b23e7ef8f8",
"branch_name": "refs/heads/master",
"committer_date": 1633878448000,
"content_id": "a623f5f580f583533fde03080f308cca2e0e2d41",
"detected_licenses": [
"MIT"
],
"directory_id": "b947d7de8f7f01469fbf3a4996905f97fa940eab",
"extension": "py",
"fi... | 2.4375 | stackv2 | from flask import Flask, render_template, request, flash, redirect, jsonify, send_from_directory, url_for
import base64
from predictions import predict_malaria, predict_pneumonia
from werkzeug.utils import secure_filename
import os
import uuid
app = Flask(__name__)
UPLOAD_FOLDER = './uploads'
app.config['UPLOAD_FOLDER... | 94 | 35.3 | 105 | 19 | 633 | python | [{"finding_id": "semgrep_rules.python.flask.security.open-redirect_fd81f5ce1f38d603_bad41ccc", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.open-redirect", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Data from request is passed to redirect(). This is an open redir... | 5 | true | [
"CWE-601",
"CWE-601",
"CWE-601",
"CWE-601"
] | [
"rules.python.flask.security.open-redirect",
"rules.python.flask.security.open-redirect",
"rules.python.flask.security.open-redirect",
"rules.python.flask.security.open-redirect"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
35,
41,
67,
73
] | [
35,
41,
67,
73
] | [
20,
20,
20,
20
] | [
41,
41,
41,
41
] | [
"A01:2021 - Broken Access Control",
"A01:2021 - Broken Access Control",
"A01:2021 - Broken Access Control",
"A01:2021 - Broken Access Control"
] | [
"Data from request is passed to redirect(). This is an open redirect and could be exploited. Consider using 'url_for()' to generate links to known locations. If you must use a URL to unknown pages, consider using 'urlparse()' or similar and checking if the 'netloc' property is the same as your site's host name. See... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | app.py | /app.py | sanidhyamangal/deepdiag | MIT | |
2024-11-18T20:18:47.919296+00:00 | 1,629,459,303,000 | 7f2707c421e6fbf835f1980a4b7bf584a7c84290 | 2 | {
"blob_id": "7f2707c421e6fbf835f1980a4b7bf584a7c84290",
"branch_name": "refs/heads/master",
"committer_date": 1629459303000,
"content_id": "0ea6c3fddafbf538d4107aac7e52dd3005cea197",
"detected_licenses": [
"BSD-3-Clause",
"MIT"
],
"directory_id": "d1db03655b95a2ba46947ff5ee22fe62004a3738",
"ext... | 2.375 | stackv2 | def keylog(task_id):
global responses
global stopping_functions
def get_active_window_title():
root = subprocess.Popen(['xprop', '-root', '_NET_ACTIVE_WINDOW'], stdout=subprocess.PIPE)
stdout, stderr = root.communicate()
m = re.search(b'^_NET_ACTIVE_WINDOW.* ([\w]+)$', stdout)
... | 137 | 33.88 | 136 | 27 | 824 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_2eef013071ff561a_0922cc28", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
76,
76,
84,
84
] | [
76,
76,
84,
84
] | [
33,
61,
37,
65
] | [
90,
65,
94,
69
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | keylog.py | /Payload_Types/kayn/agent_code/keylog.py | simonedaini/Mythic | BSD-3-Clause,MIT | |
2024-11-18T20:18:48.808909+00:00 | 1,589,956,468,000 | 374774d30ff65c0fbb5cc1823bc00c56ebb89af4 | 2 | {
"blob_id": "374774d30ff65c0fbb5cc1823bc00c56ebb89af4",
"branch_name": "refs/heads/master",
"committer_date": 1589956468000,
"content_id": "5f2a9483438f54df09aaa4a783ced12bca55dff9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ddec20e39dcd7a61c7bac78f55cd1b96475d44ae",
"extension": "py"... | 2.40625 | stackv2 | import numpy as np
import sys
from tqdm import trange
import pickle
inpfile = sys.argv[1]
outfile = sys.argv[2]
embedding_dim = 300
with open(inpfile) as f:
lines = f.readlines()
lines = [line.split() for line in lines]
lines = [line for line in lines if len(line)==301]
words = [line[0] for line in lines]
nwo... | 26 | 19.85 | 69 | 10 | 157 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_578a282f44f86323_b3b9f50a", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
26
] | [
26
] | [
5
] | [
25
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | create_glove_dict.py | /create_glove_dict.py | zzg-971030/EWISE | Apache-2.0 | |
2024-11-18T20:18:54.522729+00:00 | 1,508,716,548,000 | ca4f612c37ed268ae3f7c419018d475d5b64a220 | 3 | {
"blob_id": "ca4f612c37ed268ae3f7c419018d475d5b64a220",
"branch_name": "refs/heads/master",
"committer_date": 1508716548000,
"content_id": "966f432655e59c05da631398a8bc9ffbd85e44bb",
"detected_licenses": [
"MIT"
],
"directory_id": "5ccaac22050bf41dad768fd1a93e81da2228c026",
"extension": "py",
"fi... | 2.71875 | stackv2 | import os
import requests
import json
import argparse
ACCESS_TOKEN = 'AIzaSyCHw1SncshAFT3ry2n0poQGR4EArdx6I5Q'
import urllib
def build_URL(search_text='',types_text=''):
base_url = 'https://maps.googleapis.com/maps/api/place/textsearch/json' # Can change json to xml to change outp$
key_string = '?key='+AC... | 50 | 37.8 | 120 | 14 | 492 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_aba314a3eb828596_bbab621d", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 6 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
49,
49
] | [
49,
49
] | [
5,
5
] | [
81,
81
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found user-controll... | [
7.5,
7.5
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | sample2.py | /myProject/sample2.py | trunnelben/dayEventPlanner | MIT | |
2024-11-18T20:18:56.984429+00:00 | 1,595,010,160,000 | f05f78f15af5b15490f0d3d19133f58a46ab398a | 3 | {
"blob_id": "f05f78f15af5b15490f0d3d19133f58a46ab398a",
"branch_name": "refs/heads/master",
"committer_date": 1595010160000,
"content_id": "4b742b34742b5ba72eeae27e878d9fb122c3a90d",
"detected_licenses": [
"MIT"
],
"directory_id": "81a4bc05e315710e19a7eb716bbbc7284ab0f438",
"extension": "py",
"fi... | 2.640625 | stackv2 | """Generic gaussian process regressor (GPR) on 3GB1 fitness dataset."""
import os
import time
import pickle as pkl
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import torch
from torch.utils.data import Subset
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussi... | 123 | 39.5 | 87 | 18 | 1,361 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4c93ecf1bf93ccbf_36851cd2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
64
] | [
64
] | [
52
] | [
75
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | gpr.py | /examples/gb1/gpr.py | ayushkarnawat/profit | MIT | |
2024-11-18T20:18:58.920682+00:00 | 1,612,685,869,000 | 4caabe5c450420a1b51892500f2cda5936288fee | 3 | {
"blob_id": "4caabe5c450420a1b51892500f2cda5936288fee",
"branch_name": "refs/heads/master",
"committer_date": 1612685869000,
"content_id": "635c233e7124897c12e63f1ffeacc5ef1ab74368",
"detected_licenses": [
"MIT"
],
"directory_id": "33e1cbd218088a1f1a703ca90684d8e4cd8ef3c0",
"extension": "py",
"fi... | 2.515625 | stackv2 | # Copyright (c) Microsoft Corporation
# Copyright (c) Peng Cheng Laboratory
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, includi... | 205 | 33.66 | 128 | 19 | 1,937 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_8212399854be3a11_8613ac58", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 13 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
119,
149
] | [
120,
149
] | [
24,
5
] | [
101,
38
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found dynamic conte... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | utils.py | /examples/trials/network_morphism/imagenet/utils.py | shijun18/AIPerf | MIT | |
2024-11-18T20:19:00.297420+00:00 | 1,563,039,746,000 | 308ccd2a350ed1fe47f5d30767d863c589796043 | 2 | {
"blob_id": "308ccd2a350ed1fe47f5d30767d863c589796043",
"branch_name": "refs/heads/master",
"committer_date": 1563039746000,
"content_id": "5e8e03549f2aac7a67821527a314b2299c859f67",
"detected_licenses": [
"MIT"
],
"directory_id": "cfe6deb2030148f319ad9ae5e5623cc0a7b86f3f",
"extension": "py",
"fi... | 2.390625 | stackv2 | '''
For all regions, plot number of reads per tag/template
'''
import os
import numpy as np
import gzip
from collections import Counter, defaultdict
import fileinput
import operator
import pickle
import time
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.pyplot import cm
from... | 117 | 29.21 | 72 | 12 | 645 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_b55a1beafff88aed_3b552f00", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
55
] | [
55
] | [
20
] | [
68
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | tag_count_graphs_allregions.py | /scripts/tag_count_graphs_allregions.py | 1383385/MASQ | MIT | |
2024-11-18T20:29:34.755566+00:00 | 1,634,942,646,000 | b6fb7bbb1e0fa6933fe1f38159187d5d8479592d | 3 | {
"blob_id": "b6fb7bbb1e0fa6933fe1f38159187d5d8479592d",
"branch_name": "refs/heads/master",
"committer_date": 1634942646000,
"content_id": "9d1a88e42eea1094ddcbb3f95514bab0c1c2189a",
"detected_licenses": [
"MIT"
],
"directory_id": "b6cfb794d1ac757c0e14b388d7d0ec1a5fc8e204",
"extension": "py",
"fi... | 2.921875 | stackv2 | '''
Python 3.6
Pytorch >= 0.4
Written by Hongyu Wang in Beihang university
'''
import numpy
import pickle as pkl
import sys
import torch
def dataIterator(feature_file,label_file,dictionary,batch_size,batch_Imagesize,maxlen,maxImagesize):
fp=open(feature_file,'rb')
features=pkl.load(fp)
fp.close()
... | 106 | 25.65 | 141 | 18 | 640 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a5d0e6b9e8e3b1eb_80cea7fb", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
15
] | [
15
] | [
14
] | [
26
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | data_iterator.py | /data_iterator.py | harish-143/Project_DML | MIT | |
2024-11-18T20:29:45.813351+00:00 | 1,689,611,089,000 | 0a920582891c780a65666f1c16baaf3b7a83cc1b | 2 | {
"blob_id": "0a920582891c780a65666f1c16baaf3b7a83cc1b",
"branch_name": "refs/heads/master",
"committer_date": 1689611089000,
"content_id": "a897f49f9289e539569dcab6d4efb8933a16fded",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "b681dc77226c3d126cfebe241c11225baa5f4985",
"extension": "p... | 2.3125 | stackv2 | from datetime import datetime
import logging
from collections import OrderedDict
import uuid
import time
from contextlib import contextmanager
from rdflib import ConjunctiveGraph
from rdflib.graph import BatchAddGraph
from rdflib import plugin
from rdflib.store import Store
from rdflib_sqlalchemy import registerplugins... | 307 | 34.93 | 159 | 19 | 2,323 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_333109e88c99678f_9bfb7474", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
171,
222,
233,
302
] | [
171,
222,
233,
302
] | [
26,
61,
62,
22
] | [
53,
81,
82,
49
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | persistent.py | /brickschema/persistent.py | BrickSchema/py-brickschema | BSD-2-Clause | |
2024-11-18T20:29:49.277317+00:00 | 1,497,705,990,000 | 8c1c91eda7f80e923ccd923c8c695ab67a88409b | 3 | {
"blob_id": "8c1c91eda7f80e923ccd923c8c695ab67a88409b",
"branch_name": "refs/heads/master",
"committer_date": 1497705990000,
"content_id": "12fc28709000864d6c84ec13cb074a1922fa54f1",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "453e21dd681690886a876dd3058b3d6775665099",
"extension": "p... | 2.84375 | stackv2 | import numpy as np
import os
import urllib
import cPickle as pickle
def batch_generator(X, y, batch_size, max_steps=None):
N = X.shape[0]
i = 0
while (max_steps is None) or i < max_steps:
i += 1
p = np.random.permutation(N)[:batch_size]
xx = X[p]
yy = y[p]
y... | 59 | 26.44 | 71 | 14 | 482 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_e6620d4aa6086326_5d5c9538", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
38,
38
] | [
38,
38
] | [
20,
20
] | [
36,
36
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | util.py | /examples/util.py | joh4n/elbow | BSD-3-Clause | |
2024-11-18T20:29:49.672879+00:00 | 1,564,484,072,000 | c8b13119c42ca3899c9b444cb23b9bd9743f5864 | 2 | {
"blob_id": "c8b13119c42ca3899c9b444cb23b9bd9743f5864",
"branch_name": "refs/heads/master",
"committer_date": 1564484072000,
"content_id": "d87ff623f2e31996ee89e5a8798f8b2ab1ae71f8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "770226d1ca37203e890cd2ac0e71b5648aff9929",
"extension": "py"... | 2.484375 | stackv2 | import json
import tensorflow as tf
import fire
import pickle
from model.net import SenCNN
from model.utils import PreProcessor
from pathlib import Path
from mecab import MeCab
from tqdm import tqdm
def create_dataset(filepath, batch_size, shuffle=True, drop_remainder=True):
ds = tf.data.TextLineDataset(filepath)... | 99 | 32.38 | 106 | 18 | 797 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_9057944d3e35f66e_3e1dcc84", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
49
] | [
49
] | [
13
] | [
86
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | train.py | /boseop/Convolutional_Neural_Networks_for_Sentence_Classification/train.py | modudeepnlp/NLP_Tensorflow2.0 | Apache-2.0 | |
2024-11-18T20:29:56.426780+00:00 | 1,665,437,990,000 | 062f25718be272661eba744955eafcafcc3062c4 | 2 | {
"blob_id": "062f25718be272661eba744955eafcafcc3062c4",
"branch_name": "refs/heads/master",
"committer_date": 1665437990000,
"content_id": "7c7e08b303b710fb2ae70b3e79dadfc6457cfd03",
"detected_licenses": [],
"directory_id": "a8e4280db883d41c0fbf4d45fb034a924a659c24",
"extension": "py",
"filename": "run... | 2.328125 | stackv2 | #!/usr/bin/env python
__author__ = 'etseng@pacb.com'
import os
import sys
try:
import vcf
except ImportError:
print("Cannot import vcf! Please install pyvcf!", file=sys.stderr)
sys.exit(-1)
from Bio import SeqIO
import phasing.io.SAMMPileUpReader as sp
import phasing.io.MPileUpVariantCaller as VC
from ph... | 117 | 44.44 | 169 | 14 | 1,441 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_d094ae664a2a78c0_86a263ce", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 8 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args",
"rules.python.lang.security.au... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
70,
70,
84,
84,
104,
104
] | [
70,
70,
84,
84,
104,
104
] | [
5,
5,
5,
5,
5,
5
] | [
74,
74,
74,
74,
82,
82
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found user-controll... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | run_phaser.py | /phasing/run_phaser.py | Magdoll/cDNA_Cupcake | ||
2024-11-18T20:29:58.995446+00:00 | 1,683,722,855,000 | 36eb4b1a79fffc91136faf747bddbb7727b837c6 | 3 | {
"blob_id": "36eb4b1a79fffc91136faf747bddbb7727b837c6",
"branch_name": "refs/heads/main",
"committer_date": 1683722855000,
"content_id": "df68eead6a84bcb45c5b1875f8069439dcf0b60e",
"detected_licenses": [
"MIT"
],
"directory_id": "834550638ef77699569e9ec49c1a5c4c0ac078a5",
"extension": "py",
"file... | 2.6875 | stackv2 | #!/usr/bin/env python3
"""run_formatter.py - A tool to run the various formatters with the project settings"""
import argparse
import sys
from pathlib import Path
from subprocess import CalledProcessError, run
from docker_squash.image import Chdir
def main(check: bool = False, verbose: bool = False) -> None:
"""... | 65 | 26.06 | 87 | 16 | 390 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_0b7e95537d1f7fcc_c7115053", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
47,
57
] | [
47,
57
] | [
17,
17
] | [
75,
65
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functio... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | run_formatter.py | /support/run_formatter.py | goldmann/docker-squash | MIT | |
2024-11-18T20:51:19.366181+00:00 | 1,661,047,205,000 | 7e2b95435c8c154b52d17d3f8edf8361c45e052a | 3 | {
"blob_id": "7e2b95435c8c154b52d17d3f8edf8361c45e052a",
"branch_name": "refs/heads/master",
"committer_date": 1661047205000,
"content_id": "801a0c15c5d861f6149ac62fe778edc11db05aaf",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "4d0df28268ca878a847f45463c0f33c17c5f5816",
"exten... | 2.640625 | stackv2 | import itertools, re, subprocess
from pprint import pprint
import sys
# align_channel.py 3DR
if len(sys.argv) < 2:
print('Usage: align_channel.py <ssid>')
sys.exit(1)
def build_tree(data):
lines = data.split('\n')
stack = [[]]
indent = ['']
i = 0
while i < len(lines):
line = line... | 93 | 28.34 | 125 | 22 | 693 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_aef941b91a63ba76_08ceb354", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
91,
91
] | [
91,
91
] | [
13,
121
] | [
126,
125
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess'... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | parse.py | /parse/parse.py | OpenSolo/solo-cli | MIT,Apache-2.0 | |
2024-11-18T20:51:20.870298+00:00 | 1,537,878,837,000 | ce4b7356d4f50983f68ec3dfd017ec622ba46042 | 2 | {
"blob_id": "ce4b7356d4f50983f68ec3dfd017ec622ba46042",
"branch_name": "refs/heads/master",
"committer_date": 1537878837000,
"content_id": "c044b18b88b20576cf4ba2680aefa19e9a33b700",
"detected_licenses": [
"MIT"
],
"directory_id": "1128969ca03c1e8112a6f8eb4f9fdc89508143de",
"extension": "py",
"fi... | 2.5 | stackv2 | from time import time
from django.http import HttpResponse
from django.shortcuts import render
from django.views import View
from SKR.google_speech import get_text
# Create your views here.
class TextView(View):
def get(self, request):
return render(request, "text.html")
def post(self, request):
... | 26 | 25.77 | 53 | 14 | 146 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_ba324ebdd8d0f927_c9f68575", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ... | 1 | true | [
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
19
] | [
19
] | [
16
] | [
34
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | views.py | /text/views.py | sumitrathore1313/voice | MIT | |
2024-11-18T20:51:22.004510+00:00 | 1,427,562,296,000 | cfb1fb0e9094ae34d01f74bbd02e7ae99f8b9822 | 2 | {
"blob_id": "cfb1fb0e9094ae34d01f74bbd02e7ae99f8b9822",
"branch_name": "refs/heads/master",
"committer_date": 1427562296000,
"content_id": "c60202b66ad9f4732088ce9267fbf5d398169ca0",
"detected_licenses": [
"MIT"
],
"directory_id": "1153e77b7b8fa4948f84406a5c3071c6afc9265a",
"extension": "py",
"fi... | 2.3125 | stackv2 | from datasets import data_utils
import random
import cPickle
import numpy as np
from PIL import Image
def load_data(test_split=0.1, seed=113):
dirname = "cifar-10-batches-py"
origin = "http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz"
path = data_utils.get_file(dirname, origin=origin, untar=True)
... | 41 | 27.05 | 69 | 13 | 384 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_3ebb0af4616e8ac6_42e2a6cd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
18
] | [
18
] | [
13
] | [
28
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | cifar10.py | /datasets/cifar10.py | nagadomi/keras | MIT | |
2024-11-18T20:51:25.236750+00:00 | 1,535,050,310,000 | 4077434745a73e8676db365679c889705cd7f98e | 2 | {
"blob_id": "4077434745a73e8676db365679c889705cd7f98e",
"branch_name": "refs/heads/master",
"committer_date": 1535050310000,
"content_id": "58a9ebe8f820314970e552e9fada0e0fcc1dd68d",
"detected_licenses": [
"MIT"
],
"directory_id": "fae7411d77c085359110041ce9da7cd30547cfc4",
"extension": "py",
"fi... | 2.5 | stackv2 | #!/usr/bin/python
from __future__ import print_function
import os
import sys
import argparse
import tempfile
import subprocess
import uuid
import re
import boto3
from string import Template
def get_aws_temp_creds(role_name, profile_name = None):
if profile_name:
session = boto3.Session(profile_name=profi... | 179 | 31.55 | 137 | 14 | 1,307 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b37a9437270b930d_03daa3b0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
52,
52,
173,
173
] | [
52,
52,
173,
173
] | [
13,
69,
5,
5
] | [
74,
73,
23,
23
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"MEDIUM"
] | [
"HIGH",
"LOW",
"HIGH",
"HIGH"
] | iamtool.py | /iamtool.py | gitrahimi/aws-iam-user-tool | MIT | |
2024-11-18T20:51:27.388023+00:00 | 1,449,519,642,000 | abb56bd6fda8df332b17108fe6ad3fdc6160974e | 3 | {
"blob_id": "abb56bd6fda8df332b17108fe6ad3fdc6160974e",
"branch_name": "refs/heads/master",
"committer_date": 1449519642000,
"content_id": "b770e92618e982fcb019b355d5fe1499f2e6a594",
"detected_licenses": [
"MIT"
],
"directory_id": "4a3942ab759761d30d114eec8aa11115e50281fc",
"extension": "py",
"fi... | 2.53125 | stackv2 | """
Application factory
"""
import logging.config
import os
from mc.models import db
from celery import Celery
import jinja2
from flask import Flask, current_app
from flask.ext.restful import Api
from mc.views import GithubListener
def create_app(name="mission-control"):
"""
Create the application
:para... | 114 | 27.66 | 79 | 17 | 745 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_c1550980654df096_ad365b9e", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 3 | true | [
"CWE-79",
"CWE-116"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
91,
91
] | [
91,
91
] | [
12,
12
] | [
45,
45
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | app.py | /mc/app.py | adsabs/mission-control | MIT | |
2024-11-18T20:51:29.849413+00:00 | 1,370,243,193,000 | 902c175d9e91a0f5e799079463dc5760677cfd9f | 2 | {
"blob_id": "902c175d9e91a0f5e799079463dc5760677cfd9f",
"branch_name": "refs/heads/master",
"committer_date": 1370243193000,
"content_id": "c7442bebcfe95b2fa4ed07888b9f6893baeb0a6c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "42d3393b1d974b8260fba04dccc21fd8faca2119",
"extension": "p... | 2.3125 | stackv2 | #!/usr/bin/env python
import urllib, socket
import xml.etree.ElementTree as ET
host_name = ".".join(socket.gethostname().split(".")[:-1])
url = "https://beamapp.ci.cloudbees.com/computer/api/xml?depth=1"
data = urllib.urlopen(url)
computerSet = ET.parse(data).getroot()
for computer in computerSet.iter("computer"):
... | 16 | 25.81 | 65 | 11 | 110 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_a46c0b352c31d098_7df21c0c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
3,
9
] | [
3,
9
] | [
1,
15
] | [
35,
29
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | cloudbees-am-i-on.py | /scripts/cloudbees-am-i-on.py | icanzilb/Transit | BSD-3-Clause | |
2024-11-18T19:07:00.298272+00:00 | 1,571,619,614,000 | cf4431034a38e2a835279debe48011216cb2a94a | 2 | {
"blob_id": "cf4431034a38e2a835279debe48011216cb2a94a",
"branch_name": "refs/heads/master",
"committer_date": 1571619614000,
"content_id": "b9cc4227d08c134005ce3c4731f020308900e569",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2efa86c671ff87be1efa5492761296abb70de0ff",
"extension": "py"... | 2.328125 | stackv2 | # Celery Dependencies
from __future__ import absolute_import, unicode_literals
from celery import task
# App Core Models
from .models import DataSet, SiteManifest, DataReport
# JSON Difference Detector
from jsondiff import diff
# Backend Email Dependencies
from django.core.mail import EmailMultiAlternatives
from django... | 146 | 36.43 | 87 | 24 | 1,093 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_ec65ef68c4e40f4c_039e66b1", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 3 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
133
] | [
133
] | [
21
] | [
51
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | tasks.py | /MapsDataMonitoring/monitor/tasks.py | RomartM/MapsDataMonitoring | Apache-2.0 | |
2024-11-18T19:07:02.047991+00:00 | 1,620,443,062,000 | 37de2c47d595183a5c496bcac38d793935d8b5b5 | 3 | {
"blob_id": "37de2c47d595183a5c496bcac38d793935d8b5b5",
"branch_name": "refs/heads/master",
"committer_date": 1620443062000,
"content_id": "79b4dff5234ad3db21e8010b41b1fe38ead7fdfe",
"detected_licenses": [
"MIT"
],
"directory_id": "83f122c069a85791414342be06de3ffa4f1bbf1d",
"extension": "py",
"fi... | 3.171875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@version: 1.0
@author: Jianzhang Zhang, <jianzhang.zhang@foxmail.com>
@file: synonymyprocess.py
@time: 2016-10-06
@function: 常用的文件操作方法
"""
import os
def getFileList(dir, fileList=[]):
"""
遍历一个目录,输出所有文件名
param dir: 待遍历的文件夹
param filrList : 保存文件名的列表
re... | 97 | 16.49 | 57 | 14 | 553 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.default-mutable-list_5b80ced2ea9681a9_046b7cc5", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.default-mutable-list", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Function... | 4 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
85,
96
] | [
85,
96
] | [
3,
13
] | [
26,
27
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | fileUtils.py | /Python文件读写操作和字符串操作/fileUtils.py | HiYx/toolboxs-autoscript-myself-easyboy-V1-python-matlab | MIT | |
2024-11-18T19:07:07.759467+00:00 | 1,532,114,670,000 | 63404bf44fdc233d2bbc42e2fb21e8c72870ee8b | 2 | {
"blob_id": "63404bf44fdc233d2bbc42e2fb21e8c72870ee8b",
"branch_name": "refs/heads/master",
"committer_date": 1532114670000,
"content_id": "ba33213ad779c4a08d2f08f626e37ed41543d4ba",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5ca90af17e77e061fd05881505e710c776b18606",
"extension": "py"... | 2.375 | stackv2 | #!/usr/bin/env python3
# ========================================================================
#
# Imports
#
# ========================================================================
import os
import shutil
import argparse
import subprocess as sp
import numpy as np
import time
from datetime import timedelta
# ===... | 94 | 28.29 | 106 | 15 | 723 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_38239687eff4f3f7_1e6796c9", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 5 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
75,
75,
75
] | [
75,
75,
75
] | [
20,
29,
40
] | [
73,
32,
44
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"HIGH"
] | [
"HIGH",
"MEDIUM",
"LOW"
] | run.py | /ctv/run.py | marchdf/ppm-analysis | Apache-2.0 | |
2024-11-18T19:07:19.005600+00:00 | 1,692,369,212,000 | b2dd10512a0161ccdba9543621588ac0c52c5547 | 3 | {
"blob_id": "b2dd10512a0161ccdba9543621588ac0c52c5547",
"branch_name": "refs/heads/main",
"committer_date": 1692369212000,
"content_id": "b016903cb3da0509f21fc83dd6cabf3225fcddc5",
"detected_licenses": [
"MIT"
],
"directory_id": "167c6226bc77c5daaedab007dfdad4377f588ef4",
"extension": "py",
"file... | 2.515625 | stackv2 | import subprocess
import os
import csv
import shlex
import sys
def subprocess_run(cmd):
"""Runs a command through subprocess.run, with a few tweaks. Raises an Exception if exit code != 0."""
print(shlex.join(cmd))
try:
ret = subprocess.run(cmd, capture_output=True,
tex... | 92 | 32.52 | 106 | 15 | 708 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_cd043d9356f476b8_399880ce", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
12,
26
] | [
13,
26
] | [
15,
12
] | [
75,
74
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functio... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | utils.py | /misc/scripts/library-coverage/utils.py | github/codeql | MIT | |
2024-11-18T19:07:21.774016+00:00 | 1,500,045,687,000 | 443bd5bdfce3e9197ffa6532d966c25f735232f0 | 3 | {
"blob_id": "443bd5bdfce3e9197ffa6532d966c25f735232f0",
"branch_name": "refs/heads/master",
"committer_date": 1500045687000,
"content_id": "38f70eb91be73828a46b85e82de517368027c08c",
"detected_licenses": [
"MIT"
],
"directory_id": "b1e217d9e2e07cae98cbe217b3d2bd39e6e93a9c",
"extension": "py",
"fi... | 2.9375 | stackv2 | """Simple tool that handels the steamcmd to install apps and get the full output
works under Windows an Linux """
__author__ = "Tobias Liese"
__license__ = "MIT"
__version__ = 0.5
__maintainer__ = "Tobias Liese"
__email__ = "tobiasliese@outlook.com"
__status__ = "Beta"
import os
import logging
import platform
import ... | 136 | 29.82 | 105 | 15 | 874 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_127851e124d7b21c_faf1a2c7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
79
] | [
88
] | [
16
] | [
23
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | py_steamcmd_installer.py | /py_steamcmd_installer.py | SRLut3t1um/py_steamcmd_installer | MIT | |
2024-11-18T19:07:22.882187+00:00 | 1,489,134,398,000 | 0256b5b5836b9e2221f3f5077f826707bc0a7af4 | 3 | {
"blob_id": "0256b5b5836b9e2221f3f5077f826707bc0a7af4",
"branch_name": "refs/heads/master",
"committer_date": 1489134398000,
"content_id": "c923668423ff1dd995411d5cd44421b53a288151",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "67d6d4b02106d89976bc00988ef41e8f5c20395e",
"extension": "p... | 2.953125 | stackv2 | """
"""
from hashlib import md5
from pathlib import Path
import os
import subprocess
def image_thumb(www_path:Path, fname, width:int, height:int, itype="jpg", quality:int=50):
"""Get the thumbnail fname. Make a thumbnail the image if it is not there.
:param www_path: where the thumbnails live.
:param fna... | 43 | 26.86 | 112 | 12 | 318 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-hash-algorithm-md5_2e7250179dfedaf6_c6beb3ce", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-hash-algorithm-md5", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected MD5 hash algorithm which... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
41
] | [
41
] | [
9
] | [
35
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | __init__.py | /pygameweb/thumb/__init__.py | leereilly/pygameweb | BSD-2-Clause | |
2024-11-18T19:07:28.273353+00:00 | 1,582,434,170,000 | 3a1fac162e27b2818e8abb6906c7ce4841357c8d | 2 | {
"blob_id": "3a1fac162e27b2818e8abb6906c7ce4841357c8d",
"branch_name": "refs/heads/master",
"committer_date": 1582434170000,
"content_id": "3b55ae492d26ab540a8dd9cc5c147b24b04b4ef1",
"detected_licenses": [
"MIT"
],
"directory_id": "e6a38f8150543d29effd883513b90757b3754db1",
"extension": "py",
"fi... | 2.390625 | stackv2 | from __future__ import print_function
from datetime import datetime
import logging
import os
import sqlite3
from dotenv import load_dotenv
from gsheets import Sheets
import os.path
import pandas as pd
import globals
def create_database_tables():
with sqlite3.connect(globals.DB_FILE_LOCATION) as db:
try:... | 352 | 50.42 | 135 | 16 | 2,857 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_ac8fd94f66758de8_a03d63bd", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 4 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"HIGH",
"HIGH"
] | [
246,
295,
295,
326
] | [
246,
295,
295,
326
] | [
13,
13,
13,
13
] | [
42,
34,
34,
42
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5,
5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | database.py | /src/database.py | scottyskid/werebot_discord | MIT | |
2024-11-18T19:07:28.922178+00:00 | 1,620,702,070,000 | 4a1b001d4f121fdcf376f5d7c32f4ceb5a5fc3fd | 3 | {
"blob_id": "4a1b001d4f121fdcf376f5d7c32f4ceb5a5fc3fd",
"branch_name": "refs/heads/master",
"committer_date": 1620702070000,
"content_id": "d404bd06caa09b620775b3265ee1b4f6f319192b",
"detected_licenses": [
"MIT"
],
"directory_id": "2192c08bee3c20b9e46e981666838c651ce74712",
"extension": "py",
"fi... | 2.625 | stackv2 | # ---------------------------------------------#
# 运行前一定要修改classes
# 如果生成的2007_train.txt里面没有目标信息
# 那么就是因为classes没有设定正确
# ---------------------------------------------#
import xml.etree.ElementTree as ET
from os import getcwd
sets = [ 'train', 'val', 'test']
classes = [ "car", "people", "other"]
def convert_an... | 43 | 32.26 | 105 | 17 | 391 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8212c7c978961007_1385c1ce", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 5 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
6,
16
] | [
6,
16
] | [
1,
12
] | [
35,
29
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | voc_annotation.py | /voc_annotation.py | 13488151126/mobilenet-yolov4-lite-tf2-main | MIT | |
2024-11-18T19:07:32.040998+00:00 | 1,634,577,439,000 | 89c8f828368e77b44a3f6b88b1de2193471e54ba | 3 | {
"blob_id": "89c8f828368e77b44a3f6b88b1de2193471e54ba",
"branch_name": "refs/heads/master",
"committer_date": 1634577439000,
"content_id": "8de9a58d819f2cdfac881a29f43c4d159c6d6b61",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5522a0d164bd37a1fb512b12baa4c7f9ae9d10fc",
"extension": "py"... | 2.65625 | stackv2 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2017 IBM Corporation
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agree... | 76 | 27.5 | 76 | 14 | 479 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_5c0bbbade515abd7_bd7c9476", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
21,
67
] | [
21,
67
] | [
1,
16
] | [
41,
41
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | sca_xml.py | /sca/sca_events/sca_xml.py | open-power-sdk/source-code-advisor | Apache-2.0 | |
2024-11-18T19:07:32.627571+00:00 | 1,411,871,637,000 | 471930dfe54c2c9c781129294019eed1344461fc | 3 | {
"blob_id": "471930dfe54c2c9c781129294019eed1344461fc",
"branch_name": "refs/heads/master",
"committer_date": 1411871637000,
"content_id": "2ed75267959fa7b79d9d1299ec39ddd8cf7b38bc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "da111338164bd910317c61c844cb71e2cdb55c03",
"extension": "py"... | 2.828125 | stackv2 | #encoding=utf-8
import sys
import os
import commands
import platform
import subprocess
import tempfile
#获取脚本文件的当前路径
def cur_file_dir():
#获取脚本路径
path = sys.path[0]
#判断为脚本文件还是py2exe编译后的文件,如果是脚本文件,则返回的是脚本的目录,
#如果是py2exe编译后的文件,则返回的是编译后的文件路径
if os.path.isdir(path):
return path
elif os.path.... | 77 | 23.27 | 93 | 18 | 508 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.tempfile.tempfile-insecure_48f24731f48c693d_8d6449d6", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.tempfile.tempfile-insecure", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Use tempfile.NamedTemporaryF... | 7 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
36
] | [
36
] | [
17
] | [
94
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | svn_common.py | /src/svn_common.py | jiangerji/svn-tools | Apache-2.0 | |
2024-11-18T19:07:34.600652+00:00 | 1,634,217,370,000 | f18682675aa8a7c5d73324f3ade08edf16eef58c | 3 | {
"blob_id": "f18682675aa8a7c5d73324f3ade08edf16eef58c",
"branch_name": "refs/heads/master",
"committer_date": 1634217370000,
"content_id": "4ce3d38d6c4d9684ca8289f9266795873af52cb4",
"detected_licenses": [
"MIT"
],
"directory_id": "e8f3ec89630aa5a5b5a4eeedacfac3e55f105264",
"extension": "py",
"fi... | 2.625 | stackv2 | ## The script can be run with Python 3.5 or higher version.
## The script requires 'requests' library to make the API calls. The library can be installed using the command: pip install requests.
import api_requests
import argparse
import requests
def get_usage():
return ("\nThe command should be run from the par... | 107 | 43.45 | 159 | 18 | 1,020 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_ec0a8fdba24910a1_6427975e", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 3 | true | [
"CWE-295"
] | [
"rules.python.requests.security.disabled-cert-validation"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
66
] | [
66
] | [
27
] | [
108
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation."
] | [
7.5
] | [
"LOW"
] | [
"LOW"
] | get_mssql_assets.py | /snippets/python/get_mssql_assets.py | ntbritton/netbackup-api-code-samples | MIT | |
2024-11-18T19:07:38.876026+00:00 | 1,651,319,168,000 | 9b5b8559dac2833e2532118ec696f29d77bc42a4 | 3 | {
"blob_id": "9b5b8559dac2833e2532118ec696f29d77bc42a4",
"branch_name": "refs/heads/master",
"committer_date": 1651319168000,
"content_id": "00e0b988d7915dad4aba2ca38059009a0d4ce3f3",
"detected_licenses": [
"MIT"
],
"directory_id": "3fac108364d19ea107a66711b9e27eccf77b08d8",
"extension": "py",
"fi... | 2.546875 | stackv2 | import requests
import getpass
import re
import json
import time
import os
import sys
import shutil
import subprocess
from _exception_classes import ReleaseError
def release(vers, org, repo,
DriveReleaseFiles = [],
local_release = '',
target_commitish = '',
zi... | 278 | 36 | 104 | 15 | 2,337 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_7135b9994736e021_00eab4eb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi... | 8 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
215,
215
] | [
215,
215
] | [
9,
80
] | [
85,
84
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | _release_tools.py | /gslab_scons/_release_tools.py | gslab-econ/gslab_python | MIT | |
2024-11-18T19:07:41.584425+00:00 | 1,337,640,875,000 | 6a9d8a87629ad35c7a8baf8538c5939e5a6a8c54 | 3 | {
"blob_id": "6a9d8a87629ad35c7a8baf8538c5939e5a6a8c54",
"branch_name": "refs/heads/master",
"committer_date": 1337640899000,
"content_id": "ffb33e39242d681b31e21e6a59a8468c1125902c",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "fbb8455767b49c8a6d72d2185fd7e0567a46555d",
"exten... | 3.078125 | stackv2 | """
* ColumnGroups are an ordered, named grouping of Data/LazyColumns. Column
names must be unique. ColumnGroups can be created from CSVs.
"""
import csv
from collections import namedtuple
from cStringIO import StringIO
from itertools import count, groupby, imap, izip
from operator import attrgetter, itemgetter
fr... | 435 | 38.35 | 82 | 19 | 3,596 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_02a57268c92675c3_9c4a0bf4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 9 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.p... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH"
] | [
389,
389,
390,
390,
395,
395,
396,
396
] | [
389,
389,
390,
390,
395,
395,
397,
397
] | [
9,
9,
9,
9,
13,
13,
13,
13
] | [
36,
36,
38,
38,
64,
64,
61,
61
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | columngroup.py | /site/Harvard-Reunion/scripts/harris_import/csvcolumns/columngroup.py | Socialinsect/Harvard-Reunion-Mobile-Web | Apache-2.0,MIT | |
2024-11-18T19:07:46.085507+00:00 | 1,620,038,827,000 | 6f8d7abe4c2ae99a08939e5bbec2353608597dfa | 3 | {
"blob_id": "6f8d7abe4c2ae99a08939e5bbec2353608597dfa",
"branch_name": "refs/heads/main",
"committer_date": 1620038827000,
"content_id": "a1f4e2b1cb5e8fe4475aa4d782fe2fd494646ba2",
"detected_licenses": [
"MIT"
],
"directory_id": "d6af3401235a27069978056f01a8db78f485493c",
"extension": "py",
"file... | 3.015625 | stackv2 | import amqpstorm
import threading
import time
from pvsimulator.exceptions import *
class QueueClient(object):
"""
The QueueClient represents a Client, which connects to a single RabbitMQ queue.
It can be used to publish and/or consume messages on this queue.
"""
def __init__(
self,
... | 210 | 30.21 | 89 | 15 | 1,236 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.hardcoded-password-default-argument_81bfc1e2b41cce25_c389458d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.hardcoded-password-default-argument", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Hardcode... | 2 | true | [
"CWE-798"
] | [
"rules.python.lang.security.audit.hardcoded-password-default-argument"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
12
] | [
36
] | [
5
] | [
52
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"Hardcoded password is used as a default argument to '__init__'. This could be dangerous if a real password is not supplied."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | queueclient.py | /pvsimulator/queueclient.py | nicohirsau/pv_simulator | MIT | |
2024-11-18T19:07:49.906174+00:00 | 1,593,491,447,000 | 76bd3d6432a1b2199c33a7770fd11c7d401c5c57 | 2 | {
"blob_id": "76bd3d6432a1b2199c33a7770fd11c7d401c5c57",
"branch_name": "refs/heads/master",
"committer_date": 1593491447000,
"content_id": "a8a8bfd329c0fed3dbac82915842bc5ed59838e5",
"detected_licenses": [
"MIT"
],
"directory_id": "4433ec1778783ecd386c140ec3c975d78d8989cb",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os
import numpy as np
import torch
from PIL import Image
from glob import glob
import xml.etree.ElementTree as elemTree
import random
import cv2
from torchvision.transforms import functional as F
class CustomDataset(object):
def __init__(self, root, transforms):
self.root = root
self.transfo... | 201 | 34.25 | 160 | 18 | 1,894 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_5acb2bf559deb2aa_d7e40f7d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
6,
19
] | [
6,
19
] | [
1,
23
] | [
41,
63
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | dataloader.py | /09_road_limit/dataloader.py | yeodongbin/2020AIChallengeCode | MIT | |
2024-11-18T19:07:53.794818+00:00 | 1,629,871,889,000 | 41dd1acb83408f61fe3f3e2a19b40044f75a97e3 | 3 | {
"blob_id": "41dd1acb83408f61fe3f3e2a19b40044f75a97e3",
"branch_name": "refs/heads/main",
"committer_date": 1635149121000,
"content_id": "457318d29334a459aa9bbb473ed7fc669678c38f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b41c39dfbd11ad00cb4cdc67e6dde77e7d924c07",
"extension": "py",
... | 2.71875 | stackv2 | import configparser
import glob
import os
import re
import subprocess
from collections import deque
from pool import MongoConnection
class Component:
"""
Obtain Component-File mapping based on the layered CMakeLists.txt.
"""
config = configparser.ConfigParser()
config_path = os.path.join(os.getcw... | 124 | 34.73 | 97 | 19 | 921 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ec1b20d77e231b24_6edb8da8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 4 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
73,
76
] | [
73,
76
] | [
13,
9
] | [
44,
40
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | component.py | /src/component.py | isabella232/crash-similarity-inspector | Apache-2.0 | |
2024-11-18T19:08:00.248038+00:00 | 1,600,711,722,000 | b0c8a15a050177cfffdc88c34d295fab4ecff81a | 2 | {
"blob_id": "b0c8a15a050177cfffdc88c34d295fab4ecff81a",
"branch_name": "refs/heads/master",
"committer_date": 1600711722000,
"content_id": "b8d6508e9f871e76dc8147afce8d6a5eda57d20d",
"detected_licenses": [
"MIT"
],
"directory_id": "61b7988b00085f575819116ff99232a154c55b43",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/python3
import sys
import os
package = 'gonhang'
def removeFiles():
os.system('rm -rfv ~/rpmbuild')
if len(sys.argv) == 1:
print('Please, specify the version from command line!')
sys.exit(0)
version = sys.argv[1]
print('Remove unnecessary files....')
removeFiles()
print(f'Download package... | 41 | 21.15 | 89 | 8 | 257 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_3a1a93d998c58e6d_4c058bf7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
30,
30,
38,
38
] | [
30,
30,
38,
38
] | [
1,
1,
1,
1
] | [
15,
15,
36,
36
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found user-controll... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | submitToCopr.py | /submitToCopr.py | troyp/gonhang | MIT | |
2024-11-18T19:08:01.752663+00:00 | 1,507,953,108,000 | 3ba780992e4b861b85efc1acc529d8014f6c06ce | 2 | {
"blob_id": "3ba780992e4b861b85efc1acc529d8014f6c06ce",
"branch_name": "refs/heads/master",
"committer_date": 1507953108000,
"content_id": "1f370bbbda0b207325cabcc45cc285cb384ecc20",
"detected_licenses": [
"MIT"
],
"directory_id": "43971f3df68a6209b3f84f428fc6c21f88ca7ada",
"extension": "py",
"fi... | 2.5 | stackv2 | import urllib
from django.core.urlresolvers import reverse
from django.http import HttpResponse, Http404
from dateutil.parser import parse as dateparser
from django.utils.cache import patch_vary_headers
from django.utils.translation import ugettext as _
from django.core.exceptions import SuspiciousOperation
from mement... | 249 | 36.74 | 78 | 20 | 1,948 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_e508f74433cdd0d6_380eddd4", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ... | 1 | true | [
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
228
] | [
231
] | [
20
] | [
14
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | views.py | /memento/timegate/views.py | palewire/django-memento-framework | MIT | |
2024-11-18T19:18:14.224903+00:00 | 1,625,536,489,000 | 8792a79c9f126b1613636fd272d5a223a4cfc69e | 2 | {
"blob_id": "8792a79c9f126b1613636fd272d5a223a4cfc69e",
"branch_name": "refs/heads/master",
"committer_date": 1625536489000,
"content_id": "be5fc4f293d779f022e6b7c023ae57f109ffd7e6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "dfe27217a8036797f09d59611ad3083be71c040b",
"extension": "py"... | 2.3125 | stackv2 | # update_tensorboard.py
"""
Reinstall tensorboard from source. Also copy over a file that has a different default parameter.
This is to account for texts added from tb.add_text() not showing up.
Issue: https://github.com/lanpa/tensorboardX/issues/191
Difference in tensorboard_application.py that's being copied over:... | 39 | 31.13 | 106 | 10 | 310 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_232034ef594e87b5_2020b3ef", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
24
] | [
24
] | [
9
] | [
87
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | update_tensorboard.py | /scripts/update_tensorboard.py | hyunbool/MeanSum | Apache-2.0 | |
2024-11-18T19:18:14.914625+00:00 | 1,638,782,802,000 | fcb35ee696312cfba1d77ba0c23b6e9c61255f4c | 3 | {
"blob_id": "fcb35ee696312cfba1d77ba0c23b6e9c61255f4c",
"branch_name": "refs/heads/master",
"committer_date": 1638782802000,
"content_id": "b4957547ee308b97ea43e89b9e6ea259846a085b",
"detected_licenses": [
"MIT"
],
"directory_id": "aabd50c4ee53c97d33daaf6240f3a26a5e4f61c5",
"extension": "py",
"fi... | 3.46875 | stackv2 | #
# @lc app=leetcode id=241 lang=python3
#
# [241] Different Ways to Add Parentheses
#
# https://leetcode.com/problems/different-ways-to-add-parentheses/description/
#
# algorithms
# Medium (58.28%)
# Likes: 2410
# Dislikes: 129
# Total Accepted: 128.5K
# Total Submissions: 220.1K
# Testcase Example: '"2-1-1"'
#... | 91 | 21.24 | 78 | 17 | 690 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_eba15e0fedd51ac3_39822ad7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
66
] | [
66
] | [
21
] | [
38
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | 241.different-ways-to-add-parentheses.py | /src/241.different-ways-to-add-parentheses.py | wisesky/LeetCode-Practice | MIT | |
2024-11-18T19:18:18.808359+00:00 | 1,618,420,847,000 | ac0360f22fe74dfe6a9097bd399d84c0e7571d1b | 3 | {
"blob_id": "ac0360f22fe74dfe6a9097bd399d84c0e7571d1b",
"branch_name": "refs/heads/main",
"committer_date": 1618420847000,
"content_id": "1c5c8bffd80ed571c5c6dfd321cc571dd0bdd97e",
"detected_licenses": [],
"directory_id": "5da064a2d8566074444c29adf9404532c3a88e9a",
"extension": "py",
"filename": "mail.... | 2.53125 | stackv2 | import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from email.mime.text import MIMEText
import base64
from apiclient import errors
import utils.param as param
from utils.log import init_log
fr... | 110 | 31.71 | 79 | 17 | 751 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6f46596bfb2e9b92_80406fea", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
27,
38
] | [
27,
38
] | [
21,
13
] | [
39,
38
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | mail.py | /Assignment1-ETL/bobhe/utils/mail.py | BinYuOnCa/Algo-ETL | ||
2024-11-18T19:18:21.216928+00:00 | 1,505,820,135,000 | 918f2bd14ee140da6349ca31cd427d001fdc8c10 | 3 | {
"blob_id": "918f2bd14ee140da6349ca31cd427d001fdc8c10",
"branch_name": "refs/heads/master",
"committer_date": 1505820135000,
"content_id": "785786fb5bf877e87c36d7921d0c23d0e75765d5",
"detected_licenses": [
"MIT"
],
"directory_id": "53ad33ebd01061a0463e1bd10e8cfc3d21c17905",
"extension": "py",
"fi... | 2.53125 | stackv2 | """Module with friendly_sonar logic"""
# pylint: no-name-in-module
import os
import subprocess
from distutils.spawn import find_executable
import click
def _get_sonar_exec():
sonar_home = os.environ.get('SONARLINT_HOME')
if sonar_home:
return os.path.join(sonar_home, "./bin/sonarlint")
elif find... | 93 | 31.1 | 98 | 17 | 687 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_5cf73ed8de032ed4_5bb3f120", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
69,
71
] | [
73,
71
] | [
22,
23
] | [
14,
27
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess'... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | lint.py | /friendly_sonar/lint.py | luiscruz/friendly_sonar | MIT | |
2024-11-18T19:18:40.272595+00:00 | 1,679,828,216,000 | 350533cecc692d83498462456360a4b9fb49abd6 | 3 | {
"blob_id": "350533cecc692d83498462456360a4b9fb49abd6",
"branch_name": "refs/heads/master",
"committer_date": 1679828216000,
"content_id": "a307e63c97b6777436bb17a112bdaf4f576b9eee",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b68e125bec75091516e50a3e0271619415017ce3",
"extension": "py"... | 2.90625 | stackv2 | #!/usr/bin/env python
#
# Author: Thamme Gowda [tg (at) isi (dot) edu]
# Created: 4/5/20
from typing import Union
from pathlib import Path
from xml.etree import ElementTree as ET
import argparse
from mtdata import log
from mtdata.utils import IO
import time
from mtdata.iso.bcp47 import bcp47, BCP47Tag
from mtdata.mai... | 111 | 35.68 | 102 | 21 | 1,055 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_61a0d054ef326713_c5f65655", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
8
] | [
8
] | [
1
] | [
40
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | tmx.py | /mtdata/tmx.py | thammegowda/mtdata | Apache-2.0 | |
2024-11-18T19:18:45.620798+00:00 | 1,691,002,496,000 | 17e29f2ee24ef572d579b0da13e43096ac3d7c46 | 3 | {
"blob_id": "17e29f2ee24ef572d579b0da13e43096ac3d7c46",
"branch_name": "refs/heads/master",
"committer_date": 1691002496000,
"content_id": "ed7747ba5edd3356903a7ec901692fe4b6e15629",
"detected_licenses": [
"MIT"
],
"directory_id": "2e66f7c4c3e7ce350f6581b6ec342560c48d2aa9",
"extension": "py",
"fi... | 2.9375 | stackv2 | #!/usr/bin/env python3
import rosbag
import argparse
import rosmsg
import pandas as pd
import os.path
import pickle
FILE_PATH = "/tmp/rosbag_to_pandas_input"
"""
This script reads in a rosbag and ouputs a pandas dataframe representration of the data. This is usefull for later
processing, e.g. in scikit-learn or for... | 184 | 32.88 | 123 | 15 | 1,523 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_90ea72373b513016_549190a8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 5 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
48,
184
] | [
48,
184
] | [
23,
1
] | [
57,
50
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | rosbag_to_pandas.py | /bitbots_utils/scripts/rosbag_to_pandas.py | bit-bots/bitbots_misc | MIT | |
2024-11-18T19:18:47.031494+00:00 | 1,500,559,443,000 | c65611b150dfd151e27440cede70ac212df84a6f | 3 | {
"blob_id": "c65611b150dfd151e27440cede70ac212df84a6f",
"branch_name": "refs/heads/master",
"committer_date": 1500559443000,
"content_id": "73ec7ca42c4a370236fc205242df94762b7b3138",
"detected_licenses": [
"MIT"
],
"directory_id": "57be069750cfa80d66888f12befe6b5a15bdb733",
"extension": "py",
"fi... | 3.1875 | stackv2 | #!/bin/env python3
#
# dmenu-docker
#
# (c) 2017 - Daniel Jankowski
# imports
import os
import docker
import subprocess
'''
Get all docker containers from the docker api.
'''
def getDockerContainer():
# connect to the docker api
client = docker.from_env()
# get a list of all containers
containers =... | 138 | 27.46 | 82 | 19 | 839 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_fd5b8a3571229fb1_75164f82", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
84
] | [
84
] | [
15
] | [
83
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | dmenu-docker.py | /src/dmenu-docker.py | dj95/dmenu-docker | MIT | |
2024-11-18T19:18:49.052509+00:00 | 1,582,289,157,000 | 8e2268d1c55587f62a482100737b3214fdbfc11e | 3 | {
"blob_id": "8e2268d1c55587f62a482100737b3214fdbfc11e",
"branch_name": "refs/heads/master",
"committer_date": 1582289157000,
"content_id": "fb32808b987b47e71df22b72f8a4fbea6c55e892",
"detected_licenses": [
"MIT"
],
"directory_id": "3d83cba1884c4bec96b476ea9a84014349860075",
"extension": "py",
"fi... | 2.828125 | stackv2 | import shelve, uuid
class ListingsDB:
DB_FILE = 'listings-flat.db'
def __init__(self, test=False):
self.test = test
db = self.__establish_connection()
if db.get('listings') == None:
db['listings'] = []
db.close()
def __establish_connection(self):
re... | 49 | 31.73 | 100 | 15 | 337 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_c806680f9515d0e5_e146a9cb", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-shelve"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
14
] | [
14
] | [
16
] | [
57
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | listings_db.py | /db/listings_db.py | pkrysiak/coding-challenge-bpify | MIT | |
2024-11-18T19:18:54.430508+00:00 | 1,528,700,869,000 | 831b7e28a65998ece6124cc3ceb5557064304ffe | 3 | {
"blob_id": "831b7e28a65998ece6124cc3ceb5557064304ffe",
"branch_name": "refs/heads/master",
"committer_date": 1528700869000,
"content_id": "efd2e8d032c6cbe44d85fdd4ddfb089563262f94",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "25bf369df69d897bfe69e241822705573365771a",
"extension": "py"... | 2.640625 | stackv2 | import sqlite3
import os
import hashlib
dirname, filename = os.path.split(os.path.abspath(__file__))
def getStudentList():
conn = sqlite3.connect(dirname + '/../data/hongyi.db')
c = conn.cursor()
cursor = c.execute("SELECT ID from STUIDC")
StudentList = []
for row in cursor:
StudentList.a... | 60 | 25.13 | 71 | 15 | 392 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_6b3ebdd54856b702_26a3c8d1", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 2 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
22,
51
] | [
22,
51
] | [
18,
18
] | [
72,
67
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | common.py | /src/model/common.py | HarborYuan/Student-Information-Management-System | Apache-2.0 | |
2024-11-18T19:18:55.619028+00:00 | 1,543,595,037,000 | 9e9c5cf43c6ec736a0dc832dc4c9448814ef0507 | 2 | {
"blob_id": "9e9c5cf43c6ec736a0dc832dc4c9448814ef0507",
"branch_name": "refs/heads/master",
"committer_date": 1543595037000,
"content_id": "06bd3f1e58da271dd3e349adcb9d125a1a759d62",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6956e97680a8ce7964cf4c454fbd004373cb8720",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
import os
import json
os.chdir(os.path.dirname(os.path.realpath(__file__)))
path = os.path.dirname(os.path.realpath(__file__))
template = {'type': 'FeatureCollection', 'features': [{'type': 'Feature'
, 'properties': {}, 'geometry': {'type': 'Polygo... | 82 | 42.6 | 75 | 37 | 680 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_40eead1e677145bc_86dfec16", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 6 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
29,
70
] | [
39,
80
] | [
13,
21
] | [
47,
55
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | async_download.py | /satadd/async_download.py | samapriya/satadd | Apache-2.0 | |
2024-11-18T19:18:56.987819+00:00 | 1,589,249,402,000 | 86f0290a624a814e2cc905433d96d3ca66a7a19a | 3 | {
"blob_id": "86f0290a624a814e2cc905433d96d3ca66a7a19a",
"branch_name": "refs/heads/master",
"committer_date": 1589249402000,
"content_id": "de371bd26295b7129c9bc4a11be6e974dc42f0f5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "643c9e81cd934d8eb65da0241f887c5b3fba704e",
"extension": "py"... | 3.015625 | stackv2 | # -*- coding: utf-8 -*-
# @Author : XiaoGang
# @Time : 2020/2/28 13:59
# @File : parse_response.py
import jsonpath
from config.settings import log
class ParseResponse():
symbol = ['!=', '>=', '<=', '=', '>', '<']
def __init__(self, expected_res, actual_res):
self.expected_res = expected_res.str... | 64 | 35.47 | 81 | 19 | 623 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_4223e19b08c09be2_866c3059", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
42
] | [
42
] | [
27
] | [
55
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | parse_response.py | /auto/atp/lib/parse_response.py | Strugglingrookie/oldboy2 | Apache-2.0 | |
2024-11-18T19:19:08.657742+00:00 | 1,458,162,504,000 | b4829bc45fa297747a7925efb16ce6eb4c9698b3 | 3 | {
"blob_id": "b4829bc45fa297747a7925efb16ce6eb4c9698b3",
"branch_name": "refs/heads/master",
"committer_date": 1458162504000,
"content_id": "88236582dada07922867f6c88ed1d0a77defcf28",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4358f5eb0692c47939388a87ad776515d0832501",
"extension": "py"... | 3.078125 | stackv2 | # -*- coding: utf-8 -*-
"""
Last mod: Feb 2016
@author: Juan A. Fernández
@about: Fichero de creación de la interfaz de interacción con la relacion Imparte de la base de datos.
"""
import MySQLdb
#Doc here: http://mysql-python.sourceforge.net/MySQLdb-1.2.2/
from Imparte import *
#Uso de variables generales par la cone... | 238 | 34.37 | 164 | 20 | 2,084 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_43c4fcfc26481495_806efd09", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 4 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
46,
123,
163,
212
] | [
46,
123,
163,
212
] | [
22,
22,
22,
22
] | [
43,
43,
43,
43
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | GestorImparteSQL.py | /SMS-Back-End/microservicio1/APIDB/GestorImparteSQL.py | mresti/StudentsManagementSystem | Apache-2.0 | |
2024-11-18T19:19:08.959739+00:00 | 1,598,391,580,000 | 40e1c092eafa9f81623dce6fa0b46c0d2a8be66e | 3 | {
"blob_id": "40e1c092eafa9f81623dce6fa0b46c0d2a8be66e",
"branch_name": "refs/heads/master",
"committer_date": 1598391580000,
"content_id": "d5bcd8e4f0e93efa37b080986b16dc7d6b9d7aa3",
"detected_licenses": [
"MIT"
],
"directory_id": "3fdff6bf3ef0e4b13a1ca028d04e837ced551b4a",
"extension": "py",
"fi... | 2.90625 | stackv2 | import os
# import Python's JSON lib
import json
# import the new JSON method from psycopg2
import psycopg2
from psycopg2.extras import Json
from sea_db import config
def write_json_in_db(record_list):
# create a nested list of the records' values
values = list(record_list.values())
# get the column nam... | 83 | 30.17 | 92 | 18 | 581 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_d51c9f50f54cafad_86e433d6", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 3 | true | [
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.lang.security.audit.sqli.psycopg-sqli",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"HIGH"
] | [
60,
60,
60
] | [
60,
60,
60
] | [
13,
13,
13
] | [
36,
36,
36
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Detected string concatenation with a non-literal variable in a psycopg2 Python SQL statement. This could lead to SQL injection if the variable is user-controlled and not properly sanitized. In order to prevent SQL injection, use paramet... | [
5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | add_all_skills_to_json_and_to_db.py | /add_all_skills_to_json_and_to_db.py | denysgerasymuk799/AI_challenge | MIT | |
2024-11-18T19:19:09.335516+00:00 | 1,585,588,684,000 | 991a939ed99bbac22084665b42da3f6e9de53a76 | 2 | {
"blob_id": "991a939ed99bbac22084665b42da3f6e9de53a76",
"branch_name": "refs/heads/master",
"committer_date": 1585588684000,
"content_id": "9eebf71e0d5e23c0a2fdba450a9bc11b6e3b11d5",
"detected_licenses": [
"MIT"
],
"directory_id": "8dc574414a85e57f8103ae430ccf9bb7f09c5124",
"extension": "py",
"fi... | 2.3125 | stackv2 | from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import accuracy_score
from abstractclasses.AbstractNeighborhoodPattern import CrossNeighborhoodPattern
import numpy as np
from activestateexploration.simple_lfm import MinimalLocalForwardModel
from tqdm import trange
import pickle
disable_tqdm = Fal... | 102 | 40.34 | 145 | 19 | 941 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_53c288619fe089b4_e9190def", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 6 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.pyth... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
78,
81,
86,
91,
97,
102
] | [
78,
81,
86,
91,
97,
102
] | [
21,
31,
21,
21,
21,
21
] | [
43,
48,
47,
47,
47,
47
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | evaluate_accuracy.py | /activelearning/pattern_based_active_learning/evaluate_accuracy.py | ADockhorn/Active-Forward-Model-Learning | MIT | |
2024-11-18T19:19:09.500241+00:00 | 1,676,139,610,000 | 8b622116d16b5e766921d73ecde24abdf08b5439 | 3 | {
"blob_id": "8b622116d16b5e766921d73ecde24abdf08b5439",
"branch_name": "refs/heads/master",
"committer_date": 1676139610000,
"content_id": "2c9a7e049133b9a5bec04e9dbc3ebc802723a3e1",
"detected_licenses": [
"MIT"
],
"directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9",
"extension": "py",
"fi... | 2.90625 | stackv2 | #!/usr/bin/env python
#
# Corey Goldberg, Dec 2012
#
import os
import sys
import xml.etree.ElementTree as ET
"""Merge multiple JUnit XML files into a single results file.
Output dumps to sdtdout.
example usage:
$ python merge_junit_results.py results1.xml results2.xml > results.xml
"""
def main():
args ... | 64 | 21.67 | 75 | 12 | 378 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_842a8c8b07c13c6b_db129b2e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
8,
39
] | [
8,
39
] | [
1,
16
] | [
35,
35
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | snippet.py | /dockerized-gists/4320815/snippet.py | gistable/gistable | MIT | |
2024-11-18T19:19:10.437047+00:00 | 1,356,986,208,000 | e1fa1f6b139ef652bd4e043d84958a0bbdf40368 | 3 | {
"blob_id": "e1fa1f6b139ef652bd4e043d84958a0bbdf40368",
"branch_name": "refs/heads/master",
"committer_date": 1356986208000,
"content_id": "936761eb236ec2f5888d344b33da9be33ef30a27",
"detected_licenses": [
"MIT"
],
"directory_id": "dd466a232ae5a63797294b9392c21c21e450417d",
"extension": "py",
"fi... | 3.140625 | stackv2 | #!/usr/bin/env python
# coding: utf-8
try:
import cPickle as pickle
except ImportError:
import pickle
class Classifier(object):
"""
Base of all classifiers.
This specifies the classifier API.
"""
def __init__(self, dataset, problem):
self.dataset = dataset
self.problem = ... | 145 | 25.1 | 77 | 16 | 756 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_aead1f2f4f8e5d13_3acd8b80", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 7 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
45,
45,
56,
56
] | [
45,
45,
56,
56
] | [
13,
13,
26,
26
] | [
43,
43,
50,
50
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | models.py | /simpleai/machine_learning/models.py | j0hn/simpleai | MIT | |
2024-11-18T19:19:12.619423+00:00 | 1,576,678,818,000 | 5b7eb27806c6bc94e7aa2fa782d54ce71af22d3d | 2 | {
"blob_id": "5b7eb27806c6bc94e7aa2fa782d54ce71af22d3d",
"branch_name": "refs/heads/master",
"committer_date": 1576678818000,
"content_id": "3e63274652a87e34a4ff14af36daa06e1cd30887",
"detected_licenses": [
"MIT"
],
"directory_id": "06f7c2be96341006552bb746a595f39d15aa8efb",
"extension": "py",
"fi... | 2.484375 | stackv2 | import os
import sys
import xml.etree.ElementTree as ET
from os import getcwd
year, image_set = ('2007', 'train_data')
# sets = [('2007', 'train'), ('2007', 'val'), ('2007', 'test')]
classes = ["paper", "cup"]
if len(sys.argv) > 1:
classes = sys.argv[1:]
with open('model_data/voc_classes.txt', 'w') as f:
f.... | 57 | 30.93 | 95 | 17 | 549 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_46a5c40705339495_5e7cbe5c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 6 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
3,
20
] | [
3,
20
] | [
1,
12
] | [
35,
29
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | voc_annotation.py | /voc_annotation.py | aokiayako/keras-yolov3-colab | MIT | |
2024-11-18T19:19:14.708208+00:00 | 1,668,393,970,000 | 95055a9ab100b926ae02009f5462d2681d336a35 | 3 | {
"blob_id": "95055a9ab100b926ae02009f5462d2681d336a35",
"branch_name": "refs/heads/master",
"committer_date": 1668393970000,
"content_id": "e1cb3f20a6fb8a9256f9b1c8b1e8043a397d1af5",
"detected_licenses": [
"MIT"
],
"directory_id": "ce09a201c4e5964420918d770f644765722b6b18",
"extension": "py",
"fi... | 2.84375 | stackv2 | from sys import argv
import sys
import os
import subprocess
# https://docs.python.org/3/library/sys.html
in1 = argv[1:]
# https://stackoverflow.com/questions/4426663/how-to-remove-the-first-item-from-a-list
search = "--search '"
for s in in1:
search.join(s)
search.join(" ")
search[:-1] #remove trailing space... | 30 | 18.63 | 86 | 9 | 159 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8533a801c4a93368_31abf661", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
23
] | [
23
] | [
8
] | [
33
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | ddgFirefox2.py | /ddgFirefox2.py | DU-ds/Misc-Python-Scripts | MIT | |
2024-11-18T19:19:15.372302+00:00 | 1,580,255,322,000 | 7077c336fe73ff7518dabf54f159b8a6abd4dbdc | 3 | {
"blob_id": "7077c336fe73ff7518dabf54f159b8a6abd4dbdc",
"branch_name": "refs/heads/master",
"committer_date": 1580255322000,
"content_id": "bc5c3a9a6dcf1771ae4f46b97cfbed0c5b3f63a1",
"detected_licenses": [
"MIT"
],
"directory_id": "57a012d807e6b764d4a756ffbd075532e91e3d2a",
"extension": "py",
"fi... | 2.765625 | stackv2 |
import numpy as np
import matplotlib.pyplot as plt
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import Adam
from keras.utils.np_utils import to_categorical
from keras.layers import Dropout, Flatten
from keras.layers.convolutional... | 227 | 25.43 | 110 | 16 | 1,691 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6600da18b40c8478_63c718ea", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
22,
24,
26
] | [
22,
24,
26
] | [
18,
16,
17
] | [
32,
30,
31
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | Road Symbols.py | /Traffic Signs/Road Symbols.py | zbs881314/Self-Driving-Car- | MIT | |
2024-11-18T19:19:18.807756+00:00 | 1,601,329,074,000 | 92836280dd9151eb3043d2ffd9b6f10bd91f7b27 | 3 | {
"blob_id": "92836280dd9151eb3043d2ffd9b6f10bd91f7b27",
"branch_name": "refs/heads/master",
"committer_date": 1601329074000,
"content_id": "ed04079d7a6acd9cd2333afa818466d0107769ab",
"detected_licenses": [
"MIT"
],
"directory_id": "7d2a3fe2be49659c5aaa7af4feeab57265bcdd12",
"extension": "py",
"fi... | 2.8125 | stackv2 | import http.client, urllib.parse
from xml.etree import ElementTree
from resources.supported_languages import TTSLanguageCommand
import pyaudio
class TextToSpeech:
def __init__(self, bing_key, language=None, gender=None, output_mode="riff-16khz-16bit-mono-pcm"):
"""
constructor to initialize bing... | 174 | 32.1 | 102 | 18 | 1,325 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_dd4e29ecea17aa4f_877b18b6", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611",
"CWE-295",
"CWE-295"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.audit.httpsconnection-detected",
"rules.python.lang.security.audit.httpsconnection-detected"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
2,
66,
108
] | [
2,
66,
108
] | [
1,
16,
16
] | [
34,
62,
71
] | [
"A04:2017 - XML External Entities (XXE)",
"A03:2017 - Sensitive Data Exposure",
"A03:2017 - Sensitive Data Exposure"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The HTTPSConnection API has changed frequently with minor ... | [
7.5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"LOW",
"LOW"
] | text_to_speech.py | /speech_control/text_to_speech.py | NikoKalbitzer/speech_processing_v2 | MIT | |
2024-11-18T19:29:36.334563+00:00 | 1,477,885,212,000 | 99cf2a20456d7c08403619fc23c85f2f4d5ea3a1 | 2 | {
"blob_id": "99cf2a20456d7c08403619fc23c85f2f4d5ea3a1",
"branch_name": "refs/heads/master",
"committer_date": 1477885212000,
"content_id": "b1ad97bacc5e9e3bdb5c48dc3c3feb6563468a3d",
"detected_licenses": [
"MIT"
],
"directory_id": "352be6f421e4c5e7bbda111ff18001e08d593e04",
"extension": "py",
"fi... | 2.3125 | stackv2 | import urllib.request
import urllib.parse
import pymysql
from html.parser import HTMLParser
from sqlalchemy import *
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from PC.PCModels import Pachongimage
from django.views.decorators.csrf import csrf_exempt
from django.http ... | 146 | 23.29 | 92 | 14 | 816 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_aac17dc09748c3fc_6df71cb7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value... | 3 | true | [
"CWE-352"
] | [
"rules.python.django.security.audit.no-csrf-exempt"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
139
] | [
146
] | [
1
] | [
57
] | [
"A01:2021 - Broken Access Control"
] | [
"Detected usage of @csrf_exempt, which indicates that there is no CSRF token set for this route. This could lead to an attacker manipulating the user's account and exfiltration of private data. Instead, create a function without this decorator."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | PaChong.py | /ChatServers/PC/PaChong.py | RogueAndy/RgPython | MIT | |
2024-11-18T19:29:36.439355+00:00 | 1,612,972,356,000 | 2af810438536ba9c6406fbdc182253a25f734443 | 3 | {
"blob_id": "2af810438536ba9c6406fbdc182253a25f734443",
"branch_name": "refs/heads/master",
"committer_date": 1612972356000,
"content_id": "bc41869ac309a9bf26416b0541274b9aa872a38d",
"detected_licenses": [
"MIT"
],
"directory_id": "45c033e74c1f9f188fdee36f7a25ef3374d01ff9",
"extension": "py",
"fi... | 2.859375 | stackv2 | import copy, random
from CSP_Solver.Util import big
def generateInitailPopulation(obj, populationSize):
population = []
for i in range(populationSize):
obj.createRandomInstance()
population.append((fitnessValue(obj, obj.value), copy.deepcopy(obj.value)))
return population
def randomMutatio... | 67 | 41.97 | 149 | 17 | 677 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_a62383e9797499bd_667b48e1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
20
] | [
20
] | [
24
] | [
59
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | Genetic_Util.py | /CSP_Solver/Genetic_Algo/Genetic_Util.py | LezendarySandwich/Generic-CSP-Solver | MIT | |
2024-11-18T19:29:38.619537+00:00 | 1,583,985,428,000 | 3a99f98cad394bbe4c09056f79ab031480ccc1a9 | 2 | {
"blob_id": "3a99f98cad394bbe4c09056f79ab031480ccc1a9",
"branch_name": "refs/heads/master",
"committer_date": 1583985428000,
"content_id": "fa0f6b038870ffdeee2b493b06cc2982f02a698e",
"detected_licenses": [
"MIT"
],
"directory_id": "ec4b53a1c27b7859f60f2bc1471c00f38e3da7f4",
"extension": "py",
"fi... | 2.484375 | stackv2 | import subprocess
import re
class WifiStatus:
def __init__(self, interface):
self.interface = interface
self.cmd = "/sbin/wpa_cli"
def get_state(self):
cmd = self.cmd
completed = subprocess.run(
[cmd, "-i", self.interface, "status"], capture_output=True)
st... | 34 | 28.35 | 71 | 13 | 235 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_a1968bd51e3eb045_0c269b45", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
12,
26
] | [
13,
27
] | [
21,
21
] | [
72,
72
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functio... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | wifi_status.py | /rpi_sidecar/wifi/wifi_status.py | nelnet-team/rpi_sidecar | MIT | |
2024-11-18T19:29:39.557764+00:00 | 1,493,304,142,000 | b27afe8525fada08d9229cb0f84668719625056c | 3 | {
"blob_id": "b27afe8525fada08d9229cb0f84668719625056c",
"branch_name": "refs/heads/master",
"committer_date": 1493304142000,
"content_id": "61f6930d4175196b2f4972c6f57d4a6e966087ae",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "d08ec1888f2cfd36e06cde9254bb1e1b4ba411a1",
"extension": "p... | 2.640625 | stackv2 | import time
from neopixel import *
import Colors
import BrightnessControl as BrightCtrl
import RecognitionEntrance as RecogEntr
import RecognitionMode as RecogMode
import Symbols
import LEDClock as Clock
import ColorRotator
from random import randint
# LED strip configuration:
LED_COUNT = 64 # Number of LE... | 150 | 41.81 | 113 | 11 | 1,089 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_ee6a68d98e55cbf1_82e6df8f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
47
] | [
47
] | [
25
] | [
36
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | LEDLogic.py | /main/LEDLogic.py | ssaini4/RoboticLamp | BSD-2-Clause | |
2024-11-18T19:29:44.507446+00:00 | 1,635,776,102,000 | bd57f88bfa9237416c8334b9f23e8a88c3e2501d | 3 | {
"blob_id": "bd57f88bfa9237416c8334b9f23e8a88c3e2501d",
"branch_name": "refs/heads/main",
"committer_date": 1635776102000,
"content_id": "0f4a6f17b42afed3a3dd3f7617a5f240e064ba72",
"detected_licenses": [
"MIT"
],
"directory_id": "dba4979e67596cde68ec148cb521fd32e52c722c",
"extension": "py",
"file... | 2.734375 | stackv2 | '''
The goal of this script is measure the efficiency of
different regression and approximation methods.
'''
import os
import shutil
import click
import numpy as np
from yaml import load, safe_load
import pandas as pd
from itertools import product
from sklearn.metrics import r2_score
from sklearn.metrics import mean_ab... | 144 | 36.34 | 177 | 22 | 1,200 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1aae7899f86f31b4_ae699f58", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pyyaml-load"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
124
] | [
124
] | [
14
] | [
36
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Detected a possible YAML deserialization vulnerability. `yaml.unsafe_load`, `yaml.Loader`, `yaml.CLoader`, and `yaml.UnsafeLoader` are all known to be unsafe methods of deserializing YAML. An attacker with control over the YAML input could create special YAML input that allows the attacker to run arbitrary Python ... | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | regression_estimation.py | /l_regression/regression_estimation.py | PeterMoresco/ml_scripts | MIT | |
2024-11-18T19:29:46.289945+00:00 | 1,678,436,910,000 | 721e91480e75816ef6db73868790fbe96634bcb2 | 2 | {
"blob_id": "721e91480e75816ef6db73868790fbe96634bcb2",
"branch_name": "refs/heads/master",
"committer_date": 1678436910000,
"content_id": "7fa39cc712c9e8a481715f2865a14f9b00e3a3bc",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "67485a9037ff7c9cdb7a79b1f91e05d1f13b4d7b",
"extension": "p... | 2.421875 | stackv2 | from director.tasks.robottasks import *
import director.applogic as app
def _splitCamelCase(name):
name = re.sub('(.)([A-Z][a-z]+)', r'\1 \2', name)
return re.sub('([a-z0-9])([A-Z])', r'\1 \2', name)
class TaskItem(om.ObjectModelItem):
def __init__(self, task):
om.ObjectModelItem.__init__(self, ... | 437 | 29.34 | 118 | 19 | 2,699 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a62334e9306e1d77_a3816669", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
78,
82
] | [
78,
82
] | [
16,
17
] | [
35,
45
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | taskmanagerwidget.py | /src/python/director/tasks/taskmanagerwidget.py | ori-drs/director | BSD-3-Clause | |
2024-11-18T19:29:51.670705+00:00 | 1,361,177,752,000 | 086de795d12a6be3a1f623d2564766cc018fd77e | 3 | {
"blob_id": "086de795d12a6be3a1f623d2564766cc018fd77e",
"branch_name": "refs/heads/master",
"committer_date": 1361177752000,
"content_id": "b2df86162b726c9a554d7ac9570cfe1fde85c01a",
"detected_licenses": [
"MIT"
],
"directory_id": "6992c11d874236087dd9eca1d789c386c4fcb08f",
"extension": "py",
"fi... | 2.65625 | stackv2 | import tempfile
from django.http import HttpResponse
def write_tempfile(data):
'''
Creates a tempory file and writes to it.
Returns the filepath of the file as a string.
'''
temp_file = tempfile.mkstemp()
with open(temp_file[1], 'wb') as f:
f.write(data)
return temp_file[1]
def r... | 35 | 24.89 | 79 | 11 | 223 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_8571af1abf551f64_b21e265a", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ... | 1 | true | [
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
17
] | [
17
] | [
16
] | [
69
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | utils.py | /passbook/utils.py | timtan/django-passbook | MIT | |
2024-11-18T19:29:53.515469+00:00 | 1,557,818,090,000 | e77df9a09ab362010acbbe7f4e2335c81e2dab2c | 3 | {
"blob_id": "e77df9a09ab362010acbbe7f4e2335c81e2dab2c",
"branch_name": "refs/heads/master",
"committer_date": 1557818090000,
"content_id": "96fceba8c75065b8e395fe6c61556d620d5611fe",
"detected_licenses": [
"MIT"
],
"directory_id": "b55868512e9bb81dbb69f5a6a9f6178f860dc241",
"extension": "py",
"fi... | 2.578125 | stackv2 | from pathlib import Path
from sampling.sample_creator import SampleCreator
from store.memory_hierarchy import StorageAttributes, StorageComponents
from store.store import DataStore, Metadata, MetadataField
import numpy as np
import os
import pickle
class Cifar10(DataStore):
def __init__(self, **kwargs):
s... | 127 | 36.36 | 76 | 17 | 1,023 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_7a2a6f3d2e1d04b1_fc2902fe", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
75
] | [
75
] | [
13
] | [
45
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | cifar10.py | /store/cifar10.py | mengwanguc/one_access | MIT | |
2024-11-18T19:29:54.948284+00:00 | 1,506,882,550,000 | 9f2c68a062497997fd09f633f68dfe65f95c8487 | 3 | {
"blob_id": "9f2c68a062497997fd09f633f68dfe65f95c8487",
"branch_name": "refs/heads/master",
"committer_date": 1506882550000,
"content_id": "58654d071ba67274430b067cc259d7f85d075c68",
"detected_licenses": [
"MIT"
],
"directory_id": "e558e22c0ea7396da90a087c31acb87e7a7af511",
"extension": "py",
"fi... | 2.65625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import wx
from drawdata import DrawData
import xml.etree.ElementTree as ET
class Printout(wx.Printout):
def __init__(self, parent, *args, **kwargs):
wx.Printout.__init__(self, *args, **kwargs)
self.drawData = DrawData(parent)
def OnPreparePrintin... | 61 | 32.33 | 104 | 12 | 509 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_a1f90abba2688807_097270f2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
8
] | [
8
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | printout.py | /page_designer/template_designer/code/printing/printout.py | s0ap/tex | MIT | |
2024-11-18T19:44:13.322814+00:00 | 1,501,788,482,000 | b9c4023d7232488213c0794716ec40c9f2449236 | 2 | {
"blob_id": "b9c4023d7232488213c0794716ec40c9f2449236",
"branch_name": "refs/heads/master",
"committer_date": 1501788482000,
"content_id": "899cf240dd0d15f49876863a7c03fa75c51b31f4",
"detected_licenses": [
"MIT"
],
"directory_id": "8e423d9d197b7c1e30ef85b38b7a033a34b88fce",
"extension": "py",
"fi... | 2.40625 | stackv2 | from django.conf import settings
from django.shortcuts import render, redirect, get_object_or_404
from django.views import View
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponse, Http404
from .models import Post, Like, Comment
from authorization.models import CustomUser
from... | 282 | 28.9 | 116 | 18 | 1,774 | python | [{"finding_id": "semgrep_rules.python.correctness.suppressed-exception-handling-finally-break_9158987b308583ee_245be212", "tool_name": "semgrep", "rule_id": "rules.python.correctness.suppressed-exception-handling-finally-break", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Ha... | 3 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse",
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
162,
213
] | [
162,
213
] | [
20,
20
] | [
62,
62
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.",
"Detected data rendered directly to the end user via 'HttpRes... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | views.py | /main/views.py | DenysGurin/DB2 | MIT | |
2024-11-18T19:44:13.572088+00:00 | 1,507,244,120,000 | 304427f347285056d77a2ab044df2a27085dcc2a | 3 | {
"blob_id": "304427f347285056d77a2ab044df2a27085dcc2a",
"branch_name": "refs/heads/master",
"committer_date": 1507244120000,
"content_id": "448d8659f5aa792889c4e50bbd65fa6c0a9d2e20",
"detected_licenses": [
"MIT"
],
"directory_id": "096ebd6803bc03fa2290bf07f1114970936e1f9e",
"extension": "py",
"fi... | 2.6875 | stackv2 | # -*- encoding: utf-8 -*-
#
# io.py
#
# Copyright 2017 Cody Schindler <cschindler@anasysinstruments.com>
#
# This program is the property of Anasys Instruments, and may not be
# redistributed or modified without explict permission of the author.
from . import anasysdoc
import xml.etree.ElementTree as ET #for par... | 70 | 35.76 | 106 | 14 | 670 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_83aac057225f2846_0fd3a029", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
11
] | [
11
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | anasysio.py | /anasyspythontools/anasysio.py | AnasysInstruments/anasys-python-tools | MIT | |
2024-11-18T19:44:15.319453+00:00 | 1,666,731,822,000 | f70dec3d6f214b9ba61534dad02d05fa33034ce1 | 3 | {
"blob_id": "f70dec3d6f214b9ba61534dad02d05fa33034ce1",
"branch_name": "refs/heads/master",
"committer_date": 1666731822000,
"content_id": "103a6e391f82eb15c00439d25240c09f1d9f692a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "4ae4a78ee89003a1d5d4cc9ce2e31c81975de636",
"extension": "p... | 3 | stackv2 | from enum import Enum
from functools import total_ordering
from xml.etree import ElementTree
from . import config, mapper
class TagClass(Enum):
UNIVERSAL = 0 # 0b00000000
APPLICATION = 1 # 0b01000000
CONTEXT_SPECIFIC = 2 # 0b10000000
PRIVATE = 3 # 0b11000000
class TagType(Enum):
PRIMITIVE =... | 154 | 32.78 | 96 | 22 | 1,363 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_fca4a66fd14f46fc_80a7cdce", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
3
] | [
3
] | [
1
] | [
34
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | tag.py | /src/bertlv/tag.py | philipschoemig/BER-TLV | BSD-3-Clause | |
2024-11-18T19:44:16.109079+00:00 | 1,367,953,487,000 | 99ebfbc700136e45c2fd8336c8d577c6479395f2 | 2 | {
"blob_id": "99ebfbc700136e45c2fd8336c8d577c6479395f2",
"branch_name": "refs/heads/master",
"committer_date": 1368025082000,
"content_id": "e98be3c0182e9a1224ec2396c3c155e27c6fa862",
"detected_licenses": [
"MIT"
],
"directory_id": "193a3e8cdb1f17f986525ad0450efbf54316df86",
"extension": "py",
"fi... | 2.390625 | stackv2 | # vim: set fileencoding=utf-8 :
from __future__ import absolute_import, division
import os
from pkg_resources import resource_filename
from jinja2 import (
Environment,
FileSystemLoader,
StrictUndefined,
UndefinedError,
)
from ConfigParser import (
SafeConfigParser,
)
import subprocess
import tempf... | 396 | 34.31 | 79 | 23 | 2,804 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_579a968537220755_ee0c5a74", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 8 | true | [
"CWE-78",
"CWE-79",
"CWE-116"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"MEDIUM"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
74,
156,
156
] | [
77,
157,
157
] | [
16,
15,
15
] | [
41,
53,
53
] | [
"A01:2017 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected direct us... | [
7.5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | magdev.py | /magdev.py | tzp-software/magdev | MIT | |
2024-11-18T19:44:16.936142+00:00 | 1,550,804,189,000 | 9bff7687eb3386947f3a449d32801c60ff985a7d | 3 | {
"blob_id": "9bff7687eb3386947f3a449d32801c60ff985a7d",
"branch_name": "refs/heads/master",
"committer_date": 1550804189000,
"content_id": "8746965d2843c433ebe24c1302ba9cba93a626bf",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a23ae3d3c2e5e933a427062d777ff94def316242",
"extension": "py"... | 2.859375 | stackv2 | from django.shortcuts import render
from django.http import HttpResponse
from .models import Book
# Create your views here.
def index(request):
return HttpResponse("Test URL")
# returns titles of every book
def bookTitle(request):
titles = ""
everybook = Book.objects.all()
for eachElement in everyb... | 31 | 27.52 | 85 | 10 | 231 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_f1dfcd004eca0f9c_5e887a91", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ... | 2 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse",
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
19,
24
] | [
19,
24
] | [
12,
12
] | [
32,
42
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.",
"Detected data rendered directly to the end user via 'HttpRes... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | views.py | /models3CWProject/models3App/views.py | cs-fullstack-2019-spring/django-models3-cw-Joshtg1104 | Apache-2.0 | |
2024-11-18T19:44:17.800580+00:00 | 1,659,296,135,000 | 389ccaa1bdf0d657996f2ad302db1caede1ab00f | 2 | {
"blob_id": "389ccaa1bdf0d657996f2ad302db1caede1ab00f",
"branch_name": "refs/heads/master",
"committer_date": 1659296135000,
"content_id": "981ed25bba5340de8b34010e960a23929e18d557",
"detected_licenses": [],
"directory_id": "b470776f4c614e1f2a8c295b565a2466adfd75c8",
"extension": "py",
"filename": "inc... | 2.421875 | stackv2 | #!/usr/bin/env python
'''Checks an sql database to determine what jobs to run next for
hyperparameter optimization.
Works incrementally by taking a prioritized order for evaluating
parameters. It is assumed the database is already populated with at least
one good model. The best model is identified according to som... | 228 | 36.19 | 159 | 18 | 2,095 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_4ebf266e9c268cbb_1a0973b0", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 11 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
203,
203
] | [
203,
203
] | [
1,
17
] | [
27,
26
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"MEDIUM"
] | incremental_addrequests.py | /affinity_search/incremental_addrequests.py | gnina/scripts | ||
2024-11-18T19:44:26.445955+00:00 | 1,508,205,033,000 | b0a14a078ed4c36e27f9e13fe6f27f89e097abd4 | 3 | {
"blob_id": "b0a14a078ed4c36e27f9e13fe6f27f89e097abd4",
"branch_name": "refs/heads/master",
"committer_date": 1508205033000,
"content_id": "5f77d5ac46f4b83f64cdbd130e1f972608bb9921",
"detected_licenses": [
"MIT"
],
"directory_id": "35c384813c73bb833f9443a391fc5014b9d78a8a",
"extension": "py",
"fi... | 3.15625 | stackv2 | '''
Display all of the tag types with a count of each.
Display all of the key types for Node tags and for Way tags.
How many Node and Way entries have no additional info in tag entries?
Conversion Unicode to String.
'''
import os
import xml.etree.cElementTree as ET
import pprint
#Update DATADIR and FILENAME as neede... | 132 | 35.87 | 115 | 21 | 1,301 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_a14edcde69493c6b_8e22f334", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 9 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
8
] | [
8
] | [
1
] | [
36
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | script-DisplayTagList.py | /script-DisplayTagList.py | TomOtt937/Munging-OpenStreetMap | MIT | |
2024-11-18T19:44:30.003958+00:00 | 1,657,627,227,000 | 868a021d8655050c1a3c7479914d5b84183056db | 2 | {
"blob_id": "868a021d8655050c1a3c7479914d5b84183056db",
"branch_name": "refs/heads/master",
"committer_date": 1657627227000,
"content_id": "36a311955be4533e03255035f725c99b736f419a",
"detected_licenses": [
"MIT"
],
"directory_id": "f9c4faa7403af7c57490c49f76aa84a0d790cc20",
"extension": "py",
"fi... | 2.46875 | stackv2 | import keras.models
import os
from scipy.io import wavfile
import pandas as pd
import numpy as np
from keras.models import load_model
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report
from tqdm import tqdm
from python_speech_features import mfcc
import pickle
import matplotlib.pyplot a... | 157 | 32.56 | 94 | 17 | 1,262 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a304c52db65b221a_1e3cab83", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
130
] | [
130
] | [
14
] | [
33
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | plotting.py | /plotting.py | imciflam/music-content-filtering | MIT | |
2024-11-18T19:44:32.307677+00:00 | 1,513,938,555,000 | dea76ef02a91dd964a0e755a7cee66daf3696f4b | 2 | {
"blob_id": "dea76ef02a91dd964a0e755a7cee66daf3696f4b",
"branch_name": "refs/heads/master",
"committer_date": 1513938555000,
"content_id": "3968199d625b37d80324e7f773e06af85594cad8",
"detected_licenses": [
"MIT"
],
"directory_id": "d489f46f26e80be630b76230c53812cb1ac9e252",
"extension": "py",
"fi... | 2.453125 | stackv2 | # coding: utf-8
import os
import errno
import logging
import subprocess
from threading import Timer
from vmmaster_agent.backend import adb
log = logging.getLogger(__name__)
class ScreencastRecorder:
url = None
process = None
screencast_file_abspath = None
def __init__(self):
self.screenca... | 102 | 32.73 | 115 | 16 | 727 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f9ff1006ed0f69f8_0a8edd89", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
40,
74
] | [
40,
74
] | [
25,
28
] | [
71,
74
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | screencast.py | /vmmaster_agent/backend/screencast.py | 2gis/vmmaster-agent | MIT | |
2024-11-18T19:44:37.264235+00:00 | 1,628,995,188,000 | a6b82819c756ee6ba84ca2c08516a4ed3b2395f2 | 3 | {
"blob_id": "a6b82819c756ee6ba84ca2c08516a4ed3b2395f2",
"branch_name": "refs/heads/master",
"committer_date": 1628995188000,
"content_id": "aee648868b6daa3590ab098be117514e2e934621",
"detected_licenses": [
"MIT"
],
"directory_id": "e1bda85b47d1bc0d3f273db5ec774ca45e53408a",
"extension": "py",
"fi... | 2.921875 | stackv2 | # coding=utf-8
import getopt
import json
import os
import sqlite3
import sys
def end_width(*suffix):
# find a specific suffix file
def end_check(str):
f = map(str.endswith, suffix)
return any(f)
return end_check
def dict_factory(cursor, row):
# tuple to dict
d = {}
for idx, c... | 111 | 27.08 | 111 | 17 | 740 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_375895b9de660e49_7fec31c8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 3 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
57,
57
] | [
57,
57
] | [
9,
9
] | [
68,
68
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | sqlite2json.py | /sqlite2json/sqlite2json.py | Longxr/python-data-process | MIT | |
2024-11-18T19:57:59.532077+00:00 | 1,600,015,441,000 | 169feb0ad8ba6ea1e42ec75b5d7c4289348c2b39 | 3 | {
"blob_id": "169feb0ad8ba6ea1e42ec75b5d7c4289348c2b39",
"branch_name": "refs/heads/master",
"committer_date": 1600015441000,
"content_id": "6d400b96cd69b7a2ad12efc757e636f1a9036389",
"detected_licenses": [
"MIT"
],
"directory_id": "673a818ab71ad8934e74d34564960f7014a3c195",
"extension": "py",
"fi... | 2.609375 | stackv2 | # PEKAT VISION api
#
# A Python module for communication with PEKAT VISION 3.10.2 and higher
#
# Author: developers@pekatvision.com
# Date: 20 March 2020
# Web: https://github.com/pekat-vision
import json
import os
import platform
import random
import socket
import string
import sys
import subprocess
import atexi... | 298 | 29.74 | 111 | 18 | 1,978 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_1ccf1791e827ba58_d1155307", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 4 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
259
] | [
263
] | [
24
] | [
10
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | pekat_vision_instance.py | /PekatVisionSDK/pekat_vision_instance.py | kafcha/pekat-vision-sdk-python | MIT | |
2024-11-18T19:58:00.863798+00:00 | 1,669,728,935,000 | 46148bd4a25cf1865f004d69f1b4c200dcc51acc | 3 | {
"blob_id": "46148bd4a25cf1865f004d69f1b4c200dcc51acc",
"branch_name": "refs/heads/master",
"committer_date": 1669728935000,
"content_id": "c4d82593b439a56a404b5309950fc6fbf4267b8a",
"detected_licenses": [
"MIT"
],
"directory_id": "fbbe424559f64e9a94116a07eaaa555a01b0a7bb",
"extension": "py",
"fi... | 2.609375 | stackv2 | import numpy
import numpy.random
import copy
import itertools
import dill
import tqdm
def minibatch(train_X, train_y, size=16, nr_update=1000):
with tqdm.tqdm(total=nr_update * size, leave=False) as pbar:
while nr_update >= 0:
indices = numpy.arange(len(train_X))
numpy.random.shuff... | 209 | 31.62 | 104 | 20 | 1,898 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-dill_471c2dd62ca63195_379cd9e8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-dill", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `dill`, which uses `pickle... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-dill",
"rules.python.lang.security.deserialization.avoid-dill"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
103,
103
] | [
103,
103
] | [
27,
38
] | [
72,
71
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `dill`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `dill`, which us... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | hpbff.py | /Spacy/source2.7/thinc/extra/hpbff.py | ryfeus/lambda-packs | MIT | |
2024-11-18T19:58:01.542192+00:00 | 1,597,097,303,000 | 3ffbd54df25eea458912f7fa09ba3fd36ca5164b | 3 | {
"blob_id": "3ffbd54df25eea458912f7fa09ba3fd36ca5164b",
"branch_name": "refs/heads/master",
"committer_date": 1597097303000,
"content_id": "faa33f21fbc8ce8f5e2617794bcbbd69f8704289",
"detected_licenses": [
"MIT"
],
"directory_id": "bae5f696b76af428fb5555c147c4f1bcff1bb62e",
"extension": "py",
"fi... | 2.96875 | stackv2 | """Kaggle Base Class."""
import os
import pandas as pd
import subprocess
from pathlib import Path
from .data_environment import DataEnvironment
from ..data_types import DataSourceType, FeatureType
KAGGLE_CACHE_DIR = os.environ.get("KAGGLE_CACHE_DIR", "~/.kaggle/cache")
KAGGLE_COMPETITION_URL = "https://www.kaggle.... | 214 | 37.31 | 79 | 17 | 1,676 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_5a04fc67ef3322bb_923ac0a0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
86
] | [
87
] | [
13
] | [
70
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | kaggle_base.py | /metalearn/metalearn/data_environments/kaggle_base.py | cosmicBboy/ml-research | MIT | |
2024-11-18T19:58:07.036728+00:00 | 1,582,409,604,000 | b09378db649fc1ffc1e06e09c2fe8e70a64d1c63 | 3 | {
"blob_id": "b09378db649fc1ffc1e06e09c2fe8e70a64d1c63",
"branch_name": "refs/heads/master",
"committer_date": 1582409604000,
"content_id": "860d8b14c9785eba4e632a64730c66a3cb61e77e",
"detected_licenses": [
"MIT"
],
"directory_id": "88c889ab178389d310ebe78bb10a1179c7463c2c",
"extension": "py",
"fi... | 3.140625 | stackv2 | """ Python script to generate a command parser given a configuration file.
The generation will be template based, this way it won't depend on the language.
"""
import argparse
import logging
import os
import subprocess
import yaml
import jinja2
import common_utils
def check_me():
""" Function to format this... | 150 | 30.53 | 84 | 19 | 910 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.unchecked-subprocess-call_33c790e37b50e61e_b6ce9f41", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.unchecked-subprocess-call", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "This is not checking the ret... | 8 | true | [
"CWE-79",
"CWE-116",
"CWE-78",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"HIGH",
"MEDIUM"
] | [
44,
44,
57,
69
] | [
44,
44,
57,
73
] | [
29,
29,
18,
23
] | [
71,
71,
68,
10
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A01:2017 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
7.5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"HIGH",
"MEDIUM"
] | command_generator.py | /command_generator.py | vdominguez1993/CommandGenerator | MIT | |
2024-11-18T19:58:07.958786+00:00 | 1,646,656,140,000 | 4e0035cb929af37420b122e4f7523bd88fb61b16 | 2 | {
"blob_id": "4e0035cb929af37420b122e4f7523bd88fb61b16",
"branch_name": "refs/heads/master",
"committer_date": 1646656140000,
"content_id": "3e0e158ffdf41cdc7e95683fa1ac47aa5126e986",
"detected_licenses": [
"MIT"
],
"directory_id": "48ca6f9f041a1e9f563500c8a7fa04dbb18fa949",
"extension": "py",
"fi... | 2.5 | stackv2 | import collections
from pygears.conf import reg
from pygears.typing.base import GenericMeta, param_subs, is_type, T
from pygears.typing import TypeMatchError, get_match_conds
def is_type_iterable(t):
return (not isinstance(t, (str, bytes))) and isinstance(t, collections.abc.Iterable)
def _copy_field_names(t, ... | 185 | 31.7 | 88 | 26 | 1,188 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_625a2dfc5ff9307c_45cd4ac4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
65
] | [
65
] | [
22
] | [
49
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | infer_ftypes.py | /pygears/core/infer_ftypes.py | bogdanvuk/pygears | MIT | |
2024-11-18T19:58:12.801774+00:00 | 1,624,778,587,000 | 54f72aef2b61924928b4f10c92b4827bdd73e6ef | 3 | {
"blob_id": "54f72aef2b61924928b4f10c92b4827bdd73e6ef",
"branch_name": "refs/heads/master",
"committer_date": 1624778587000,
"content_id": "bcd6bc720f2706cd8885725d6c0324fb360d60e0",
"detected_licenses": [
"MIT"
],
"directory_id": "dc6ca3544e9efb69b9fd9239520100b872692348",
"extension": "py",
"fi... | 3.40625 | stackv2 |
from random import seed
from random import randrange
from csv import reader
from math import sqrt
import pickle
# Load a CSV file
def load_csv(filename):
dataset = list()
with open(filename, 'r') as file:
csv_reader = reader(file)
for row in csv_reader:
if not row:
continue
dataset.append(row)
return... | 72 | 27.06 | 133 | 14 | 529 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_6bf0de8332b1a2cc_2962bd49", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
45
] | [
45
] | [
21
] | [
44
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | Classifier.py | /Hamro Dokan/ImageClassificationWithRandomForest1/Classifier.py | Ananta580/Hamro-Dokan | MIT | |
2024-11-18T19:58:14.033040+00:00 | 1,515,436,563,000 | 0823a85d31e83d96cf1de94145868c1e0fe4081e | 3 | {
"blob_id": "0823a85d31e83d96cf1de94145868c1e0fe4081e",
"branch_name": "refs/heads/master",
"committer_date": 1515436563000,
"content_id": "2ea2eb60bd13b179f793314bde5bec2ce35ed7c9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f3407a134608c74c6115d0c6831b41e6500dce2a",
"extension": "py"... | 2.640625 | stackv2 | import core
from core import searcher
from core.movieinfo import TMDB
from core.helpers import Url
from datetime import datetime
import json
import logging
import os
import xml.etree.cElementTree as ET
logging = logging.getLogger(__name__)
class ImdbRss(object):
def __init__(self):
self.tmdb = TMDB()
... | 149 | 33.2 | 107 | 23 | 1,127 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_434f3e93e4d98023_428268bc", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
9
] | [
9
] | [
1
] | [
36
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | imdb.py | /core/rss/imdb.py | embercoat/Watcher3 | Apache-2.0 | |
2024-11-18T20:10:17.123976+00:00 | 1,534,472,998,000 | 356d94c179dea54e66c05e04f9ab0500b7f8340b | 2 | {
"blob_id": "356d94c179dea54e66c05e04f9ab0500b7f8340b",
"branch_name": "refs/heads/master",
"committer_date": 1534472998000,
"content_id": "bad3ca7a4e8545102736c6a6bfb9aa75427b0a9f",
"detected_licenses": [
"MIT"
],
"directory_id": "bee9c548edff2dd6e628f544d44a737c84ea8172",
"extension": "py",
"fi... | 2.453125 | stackv2 | import re
import subprocess
class Network:
__subpattern= r"\s{2,}\w+"
def getnetinfo(self,info:list):
item = {}
head = ''
for i in info:
obj = None
if( not re.match(self.__subpattern,i) and not i==''):
head = re.split('\s+',i)[0]
... | 174 | 26.53 | 94 | 18 | 1,231 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_27dfc03fff3121f3_6f5883bc", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 11 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
109,
119
] | [
109,
119
] | [
13,
17
] | [
33,
38
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | net.py | /iotapp/Classes/net.py | fcarbah/IOT | MIT | |
2024-11-18T20:10:20.291235+00:00 | 1,599,958,357,000 | 33b8517821c9eba40d7fdb8287e16c31e6cd6b18 | 3 | {
"blob_id": "33b8517821c9eba40d7fdb8287e16c31e6cd6b18",
"branch_name": "refs/heads/master",
"committer_date": 1599958357000,
"content_id": "3486df33355a5a79de349f608b4823b3a318c546",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5347bb07a332e50cdff3b4c5f0919dcf17444ea3",
"extension": "py"... | 2.53125 | stackv2 | # coding:utf-8
'''
Target: Python AndroidToolBox Main Interactive Module
Author: LZR@BUAA
Date: 08/27/2020
'''
import FastbootFlash
import FileBackUp
import FileTrans
import Screen
import SoftScript
from Methods import *
MobileInfo = {}
def mainmenu():
while True:
os.system("cls")
printmenu()
... | 123 | 26.78 | 101 | 19 | 996 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-spawn-process-audit_a57b73c7fde8db31_7c6a1c67", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-spawn-process-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content ... | 4 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-spawn-process-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
42
] | [
42
] | [
13
] | [
54
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | main.py | /main.py | longzhenren/Android_Tool_Box | Apache-2.0 | |
2024-11-18T20:10:22.697061+00:00 | 1,561,799,784,000 | b0763ef53b1e77de58df4217cbe4f970726a8754 | 3 | {
"blob_id": "b0763ef53b1e77de58df4217cbe4f970726a8754",
"branch_name": "refs/heads/master",
"committer_date": 1561799784000,
"content_id": "ec1c9bc8b7f8c75558b75be16eb084b7a66f63c6",
"detected_licenses": [
"MIT"
],
"directory_id": "0a026dae605ebfdadb2a7296045b9d2ae5f8ff57",
"extension": "py",
"fi... | 2.75 | stackv2 | #!/usr/bin/env python
########################################################################
# connect_clouddb_proxy.py
#
# This is a simple wrapper that looks up the connection information in the
# config and establishes a local proxy.
########################################################################
impor... | 111 | 33.95 | 110 | 14 | 766 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f6f0a1e002223e56_b61de62d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
41,
41
] | [
41,
41
] | [
9,
24
] | [
84,
37
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functio... | [
7.5,
7.5
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"MEDIUM"
] | connect_cloud_sql_proxy.py | /scripts/connect_cloud_sql_proxy.py | AnthonyHorton/panoptes-utils | MIT | |
2024-11-18T20:10:26.861942+00:00 | 1,311,760,625,000 | b39b608027993654b72777d11684c5f986813265 | 3 | {
"blob_id": "b39b608027993654b72777d11684c5f986813265",
"branch_name": "refs/heads/master",
"committer_date": 1311760625000,
"content_id": "3c292e71ace2a1318113b11c44e9eb252c6f7ed4",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "34d49cb7c6f74b759dd079f1761ff246fee23dda",
"extension": "p... | 3.03125 | stackv2 | import cPickle
def __copy(d):
# Faster than deepcopy - ideally remove the need for deepcopy altogether
return cPickle.loads(cPickle.dumps(d, protocol=2))
class Node(object):
def __init__(self, tp, children=None, value=None):
self.type = tp
if children:
self.children = children
... | 81 | 31.16 | 79 | 19 | 593 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_edb7f277da24503b_2c9eaf90", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
5,
5
] | [
5,
5
] | [
12,
26
] | [
55,
54
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `cPickle`, which is known to lead ... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | nodes.py | /bento/core/parser/nodes.py | abadger/Bento | BSD-3-Clause | |
2024-11-18T20:10:32.671742+00:00 | 1,607,325,519,000 | 350878c3c6c85559c99278ef881d7b66dc285760 | 3 | {
"blob_id": "350878c3c6c85559c99278ef881d7b66dc285760",
"branch_name": "refs/heads/master",
"committer_date": 1607325519000,
"content_id": "0233913e43a47f32197de586906de52298bfc8d7",
"detected_licenses": [
"MIT"
],
"directory_id": "32b7903477752f7a1bc1f656b024527b9884d919",
"extension": "py",
"fi... | 2.640625 | stackv2 | import os
import torch
import spacy
import pickle
from tqdm import tqdm
import torch.nn as nn
from torch.nn.utils.rnn import pad_sequence
class Vocabulary:
def __init__(self):
self.word_to_idx = {'<PAD>' : 0, '<UNK>' : 1}
def vocab(self, sentences):
num = 2
if os.path.exists('inp... | 97 | 28.56 | 82 | 19 | 636 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4297b7dd647865b1_61b15c19", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
17
] | [
17
] | [
32
] | [
83
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | DataLoader.py | /NER/LSTM/DataLoader.py | fuxiao-zhang/PyTorch | MIT | |
2024-11-18T20:10:34.492104+00:00 | 1,590,851,367,000 | d1201a2d540fa37ee22164a81010d2eab4a56551 | 3 | {
"blob_id": "d1201a2d540fa37ee22164a81010d2eab4a56551",
"branch_name": "refs/heads/master",
"committer_date": 1590851367000,
"content_id": "96772962604114f04a18aeef915b866f2f4d189f",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "51f09d7c7e52ab79504d8824f74391d324e2bf62",
"extension": "p... | 2.671875 | stackv2 | __all__ = [
"ismod",
"gen_this",
"import_all"
]
from os import (
listdir
)
from os.path import (
splitext,
dirname,
join,
isdir,
exists
)
from inspect import (
stack,
getmodule
)
def ismod(n):
if n.startswith("__init__."):
return False
if n.endswith(".py"):
... | 75 | 20.23 | 67 | 15 | 417 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_0510bf3fad389983_17171764", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ... | 3 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
50
] | [
50
] | [
5
] | [
54
] | [
"A03:2021 - Injection"
] | [
"Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | importall.py | /importall.py | laerreal/librfunc | BSD-3-Clause | |
2024-11-18T20:10:37.200522+00:00 | 1,558,878,894,000 | 68ea7a841304ac874bac7dcde178199424a0e492 | 2 | {
"blob_id": "68ea7a841304ac874bac7dcde178199424a0e492",
"branch_name": "refs/heads/master",
"committer_date": 1558878894000,
"content_id": "ea86403abda66eec1e0b53a2db723dcac73f26f4",
"detected_licenses": [
"MIT"
],
"directory_id": "0e1d7df05c7e0cfafa79cac14851cbb6d0b64d3b",
"extension": "py",
"fi... | 2.3125 | stackv2 | from __future__ import unicode_literals
from codeop import Compile
import os
import sys
import json
import traceback
import platform
import struct
NODE_CHANNEL_FD = int(os.environ['NODE_CHANNEL_FD'])
UNICODE_TYPE = unicode if sys.version_info[0] == 2 else str
if sys.version_info[0] <= 2:
# print('PY2')
def _... | 112 | 29.76 | 97 | 19 | 794 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_9529f4a6cf0af24f_2aa8a206", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
94
] | [
94
] | [
25
] | [
81
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | node_python_bridge.py | /defaulter/node_modules/python-bridge/node_python_bridge.py | abg999/Defaulter_assignment1 | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.