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-19T02:32:33.276504+00:00 | 1,609,819,359,000 | 51f016cbb7a27788996e052196121fba30140307 | 2 | {
"blob_id": "51f016cbb7a27788996e052196121fba30140307",
"branch_name": "refs/heads/master",
"committer_date": 1609819359000,
"content_id": "931efce122bcf3d8fd3b7866d9bd0872ae88e45b",
"detected_licenses": [
"MIT"
],
"directory_id": "348c0c681df463f3741a01e3163f64be1d12abdc",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python3
#encoding:utf-8
from subprocess import check_output
import plistlib, os
disconnectedBGColor = "59,59,59,255"
connectedBGColor = "110,193,56,255"
disconnectedFontColor = "" # Empty string means default color
connectedFontColor = ""
# devNAME = "Noon’s AirPods Pro" # For testing only
devNAME = ""... | 86 | 46.76 | 134 | 17 | 1,078 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1d46b3c6d8169b1d_a417a9bb", "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"
] | [
62
] | [
62
] | [
15
] | [
38
] | [
"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()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | connect_appleBT.py | /source/connect_appleBT.py | noonchen/BTT_AppleWirelessHeadphone | MIT | |
2024-11-19T02:32:35.041566+00:00 | 1,682,365,054,000 | 8cb7aa094085a56d494f7c283bf216adc6e2c2de | 3 | {
"blob_id": "8cb7aa094085a56d494f7c283bf216adc6e2c2de",
"branch_name": "refs/heads/main",
"committer_date": 1682365054000,
"content_id": "4060ead80cdf799addd809b8063f5bc66eeaacef",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "330899fd4a9653e05e2a09e0a4f30c119af97ad4",
"extension": "py",
... | 2.828125 | stackv2 | import sys
import os
import subprocess
def export_transformer_model_as_onnx(model_name: str, output_path: str, feature='default', skip_exists=True):
"""
Export a model from transformers package.
Parameters
----------
model_name: str
The model name.
output_path: str
The output ... | 37 | 33.32 | 123 | 10 | 294 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8953011b732f47ba_c9f44351", "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"
] | [
31
] | [
31
] | [
5
] | [
48
] | [
"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"
] | transformers_utils.py | /python/hidet/utils/transformers_utils.py | yaoyaoding/hidet-artifacts | Apache-2.0 | |
2024-11-19T02:32:39.131827+00:00 | 1,631,118,185,000 | 807bccf86ce404aa3b3e67882a016a4f8ca8cc90 | 2 | {
"blob_id": "807bccf86ce404aa3b3e67882a016a4f8ca8cc90",
"branch_name": "refs/heads/main",
"committer_date": 1631118185000,
"content_id": "169ba8225ea9af9c7b31c683d2a906e73b9caccd",
"detected_licenses": [
"MIT"
],
"directory_id": "96bd790c2f87b38fa7d14ac0559492b24f35443a",
"extension": "py",
"file... | 2.421875 | stackv2 | import pickle
import pytorch_lightning as pl
from torch.utils.data import DataLoader
from source.dataset.SiameseDataset import SiameseDataset
class SiameseDataModule(pl.LightningDataModule):
def __init__(self, params, tokenizer):
super(SiameseDataModule, self).__init__()
self.params = params
... | 76 | 28.2 | 72 | 17 | 421 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_19bcdb6b926d2959_17e1057e", "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... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
18
] | [
18
] | [
28
] | [
53
] | [
"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"
] | SiameseDataModule.py | /source/datamodule/SiameseDataModule.py | celsofranssa/sFormers | MIT | |
2024-11-19T02:32:39.718739+00:00 | 1,626,533,838,000 | 7caca641c976841717f67ad464b4b54a4d18c657 | 2 | {
"blob_id": "7caca641c976841717f67ad464b4b54a4d18c657",
"branch_name": "refs/heads/master",
"committer_date": 1626533838000,
"content_id": "b8fc269c0efe92a045680beed475246dc3893517",
"detected_licenses": [],
"directory_id": "99f6a7ea722e85dfc66fe7441a7b50a179b7cb88",
"extension": "py",
"filename": "set... | 2.390625 | stackv2 | import streamlit as st
import datetime
from nav_sub.helper import get_index
from nav_sub.helper import get_set_date
from nav_sub.helper import get_set_selection
from nav_sub.helper import get_set_multiselection
class Settings:
def __init__(self, session_state):
self.__settings = {}
self.session_s... | 130 | 31.68 | 73 | 21 | 867 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_fff42a957785bbf3_a981014f", "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 ... | 2 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
48,
113
] | [
48,
113
] | [
33,
43
] | [
61,
71
] | [
"A03:2021 - Injection",
"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.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | settings.py | /frontend/app/nav_sub/settings.py | hfwittmann/covid19-dashboard | ||
2024-11-19T02:32:47.768260+00:00 | 1,692,202,573,000 | fe4098d745ac40ba7704dc73bfc29bb672dbd9c1 | 2 | {
"blob_id": "fe4098d745ac40ba7704dc73bfc29bb672dbd9c1",
"branch_name": "refs/heads/main",
"committer_date": 1692202573000,
"content_id": "84e236208fec7ee823fe93206053aa0394e4928e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "549688abcbafbe65572b0198a12c64e155bdd53d",
"extension": "py"... | 2.5 | stackv2 | import logging
import pathlib
import shlex
import shutil
import subprocess
import sys
from glob import glob
from pathlib import Path
from typing import Iterable
import requests
from mDeepFRI import cnn_model_links, config_links, gcn_model_links
def run_command(command, timeout=-1):
if isinstance(command, str):
... | 105 | 30.56 | 97 | 17 | 650 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_90baf511ca94191f_fd05b5da", "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"
] | [
22,
28
] | [
26,
31
] | [
33,
33
] | [
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"
] | utils.py | /mDeepFRI/utils.py | bioinf-mcb/Metagenomic-DeepFRI | BSD-3-Clause | |
2024-11-19T02:32:52.084889+00:00 | 1,486,183,824,000 | 294e1d4737bc21edc46cc297195f4958a0753ef0 | 3 | {
"blob_id": "294e1d4737bc21edc46cc297195f4958a0753ef0",
"branch_name": "refs/heads/master",
"committer_date": 1486183824000,
"content_id": "d4cc20251a8c263c6ff8b16ab2ee6b19ee386560",
"detected_licenses": [
"MIT"
],
"directory_id": "7ae0492c90140c6d20a0d01ca77d156b40e71a73",
"extension": "py",
"fi... | 2.65625 | stackv2 | from sys import argv, exit
from os.path import expanduser as expu, expandvars as expv
from os.path import basename, dirname, abspath, isdir, exists
from subprocess import Popen, PIPE
from builtins import input
def ask(evalpath, path=""):
with open(evalpath, "r") as f:
if path:
print(path + ": ... | 64 | 34.86 | 120 | 20 | 510 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_e256a29d253efafb_2c4e22ac", "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-78",
"CWE-78",
"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",
"rules.python.lang.security.audit.dangerous-subprocess-use... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
46,
46,
54,
54,
60,
60
] | [
46,
46,
54,
54,
60,
60
] | [
28,
51,
5,
31,
9,
54
] | [
107,
55,
36,
35,
59,
58
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"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,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW"
] | rm_p.py | /rm_protection/rm_p.py | olivierh59500/rm-protection | MIT | |
2024-11-19T02:32:52.973543+00:00 | 1,427,358,905,000 | af1d5c48fcb0ec28bd9478bc7e07090fbd5b6ef0 | 2 | {
"blob_id": "af1d5c48fcb0ec28bd9478bc7e07090fbd5b6ef0",
"branch_name": "refs/heads/master",
"committer_date": 1427358905000,
"content_id": "b1084dd9ea4be69dd5b818b2e6a9dabc4cd9ed5e",
"detected_licenses": [
"MIT"
],
"directory_id": "1179f9f0c9b0b4d51058031801096065f287d44f",
"extension": "py",
"fi... | 2.5 | stackv2 | import sys
import traceback
import hashlib
import time
from random import random
from datetime import datetime
from javax.servlet.http import HttpServlet
from java.lang import System
from java.util import LinkedHashMap, ArrayList
from org.python.util import PythonInterpreter
from org.yaml.snakeyaml import Yaml
from j... | 197 | 39.19 | 175 | 19 | 2,000 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2937736e2f7fef86_8c3e5b4e", "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-79"
] | [
"rules.python.django.security.injection.raw-html-format"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
188
] | [
197
] | [
22
] | [
13
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected user input flowing into a manually constructed HTML string. You may be accidentally bypassing secure methods of rendering HTML by manually constructing HTML and this could create a cross-site scripting vulnerability, which could let attackers steal sensitive user data. To be sure this is safe, check that ... | [
5
] | [
"HIGH"
] | [
"MEDIUM"
] | nomjyc.py | /nomjyc.py | relet/nomjyc | MIT | |
2024-11-19T02:32:53.189994+00:00 | 1,619,708,760,000 | cf4bdee1c304d7666d86e03976e8b0e2037a315a | 3 | {
"blob_id": "cf4bdee1c304d7666d86e03976e8b0e2037a315a",
"branch_name": "refs/heads/master",
"committer_date": 1619708760000,
"content_id": "45d6c07afdd19b523e541362d07918cae9f4f222",
"detected_licenses": [
"MIT"
],
"directory_id": "330dbbefb2e7d6283c812888c89e58498f0b4188",
"extension": "py",
"fi... | 2.53125 | stackv2 | import tkinter as tk
import tkinter.messagebox as tkm
from Zhihu.Python.Utils.Dictionary.Dictionary import *
DISPLAY_RECITE_NUM = 3
DATA_PATH = "Data/Song/"
# noinspection PyUnusedLocal
class GUI(tk.Frame):
@staticmethod
def show_help():
help_msg = "Shortcuts: \n\n" \
" Ctrl +... | 410 | 38.23 | 120 | 22 | 3,483 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.return-in-init_7bd9a76c8a8972bb_3b025d37", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.return-in-init", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "`return` should never appear inside a class __init__... | 7 | 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"
] | [
266,
409,
409
] | [
266,
409,
409
] | [
23,
21,
33
] | [
40,
54,
47
] | [
"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"
] | GUI.py | /Zhihu/Python/Utils/Dictionary/GUI.py | leoatchina/MachineLearning | MIT | |
2024-11-19T02:32:56.468519+00:00 | 1,497,059,410,000 | c42ef8da60075cff620e32fae8565135f7136d32 | 2 | {
"blob_id": "c42ef8da60075cff620e32fae8565135f7136d32",
"branch_name": "refs/heads/master",
"committer_date": 1497059410000,
"content_id": "42359307613bb712f4528d997937b0dd7f02f1e8",
"detected_licenses": [
"MIT"
],
"directory_id": "db8540d68cbef18415f166fe2eff34b22085a564",
"extension": "py",
"fi... | 2.484375 | stackv2 | # FloatingTools imports
import FloatingTools
# flask imports
from flask import request, render_template_string, redirect
# package imports
from ui import *
from utilities import SERVER
# globals
VALID_LOGIN = True
LOGGEDIN = False
@SERVER.route('/login', methods=['GET', 'POST'])
def renderLogin():
"""
Rend... | 106 | 29.6 | 155 | 19 | 737 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.render-template-string_6f394d68ffce9918_41645e05", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.render-template-string", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Found a template created with st... | 1 | true | [
"CWE-96"
] | [
"rules.python.flask.security.audit.render-template-string"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
77
] | [
77
] | [
12
] | [
49
] | [
"A03:2021 - Injection"
] | [
"Found a template created with string formatting. This is susceptible to server-side template injection and cross-site scripting attacks."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | login.py | /FloatingTools/Dashboard/login.py | tws0002/FloatingTools | MIT | |
2024-11-19T02:32:57.202204+00:00 | 1,513,972,228,000 | 2bed1946e912532e9d42ce41c50842aec280c6db | 3 | {
"blob_id": "2bed1946e912532e9d42ce41c50842aec280c6db",
"branch_name": "refs/heads/master",
"committer_date": 1513972228000,
"content_id": "dd25109a2ebbcaa1837f32304afb507bd2e2bc3a",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "42772ba1d0ebfcbc1ced0792f6ef04432b5215f4",
"extension": "p... | 2.5625 | stackv2 | #!/usr/bin/env python
# Python Scripts provided by Extreme Networks.
# This script is provided free of charge by Extreme. We hope such scripts are
# helpful when used in conjunction with Extreme products and technology;
# however, scripts are provided simply as an accommodation and are not
# supported nor maintained ... | 190 | 33.26 | 95 | 17 | 1,295 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_fcb2a36d167271b1_c53a4e28", "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... | 7 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
17
] | [
17
] | [
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"
] | restconf.py | /REST/examples/restconf.py | r3p3r/EXOS_Apps | BSD-2-Clause | |
2024-11-19T02:33:11.408310+00:00 | 1,548,409,382,000 | 64b257a63b0d96d9bd9a22096f5ce6a8ccae0f30 | 3 | {
"blob_id": "64b257a63b0d96d9bd9a22096f5ce6a8ccae0f30",
"branch_name": "refs/heads/master",
"committer_date": 1548409382000,
"content_id": "aa2dbc2537dbbb1f30b5e791644dfc0ca089c0ac",
"detected_licenses": [
"MIT"
],
"directory_id": "dbdd619c77b0070b14d354292a569804ad9ff2cf",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/usr/bin/env python
import importlib
import xml.etree.ElementTree as etree
NEWSMLG2_NS = '{http://iptc.org/std/nar/2006-10-01/}'
NITF_NS = '{http://iptc.org/std/NITF/2006-10-18/}'
VERSION = 0.1
class BaseObject():
attr_values = {}
attribute_types = {}
dict = {}
# Load all 'attributes' from any cl... | 107 | 33.09 | 89 | 18 | 793 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_48915119ad204840_a6404cf3", "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"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
4
] | [
4
] | [
1
] | [
38
] | [
"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"
] | core.py | /SportsML/core.py | iptc/sportsml-python | MIT | |
2024-11-19T02:43:25.506899+00:00 | 1,686,042,734,000 | d3ac9268a912505ca028a7008464c7b71a7d6234 | 2 | {
"blob_id": "d3ac9268a912505ca028a7008464c7b71a7d6234",
"branch_name": "refs/heads/master",
"committer_date": 1686042734000,
"content_id": "0e46c07ac6467c4d9096bf23772ef81c1aed537b",
"detected_licenses": [
"MIT"
],
"directory_id": "ba663e7bac048cc83a8f0e5359555d318538c8c9",
"extension": "py",
"fi... | 2.5 | stackv2 | import typing
from wtforms import ValidationError
from lol9k1 import database
class ValidToken(object):
""" A validator for tokens """
def __init__(self, message_invalid=None):
self.message_invalid = message_invalid if message_invalid else "Invalid or used invite token"
def __call__(self, form... | 31 | 30.58 | 113 | 13 | 202 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_81a4807045ab3c62_b14c5a8c", "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... | 1 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
28
] | [
28
] | [
26
] | [
114
] | [
"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"
] | validators.py | /lol9k1/auth/forms/validators.py | hubwoop/lol9k1 | MIT | |
2024-11-19T02:43:26.170601+00:00 | 1,499,842,298,000 | 1bb4a50039ce1a0b7716ba8a8449a83a9c0563aa | 3 | {
"blob_id": "1bb4a50039ce1a0b7716ba8a8449a83a9c0563aa",
"branch_name": "refs/heads/master",
"committer_date": 1499842298000,
"content_id": "5c65ac7d5d934c43f4a30a175a08fc2c3df67629",
"detected_licenses": [
"MIT"
],
"directory_id": "561c9821d70da906ae11cbac7418c176a9ec8df5",
"extension": "py",
"fi... | 2.71875 | stackv2 | import os
def PdfToImages(pdfFile, format='jpeg') :
# generating image file name
convertedFile = ''
for element in pdfFile.split('.')[:-1] :
convertedFile += element + '.'
convertedFile += format
# getting the "convertedImages" directory
working_directory_list = __file__.split(os.sep)[:-1]
working_director... | 28 | 34.32 | 101 | 19 | 259 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_a1b389bbc7565020_6f28c58d", "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... | 2 | 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"
] | [
20,
28
] | [
20,
28
] | [
2,
5
] | [
73,
102
] | [
"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"
] | PdfToImages.py | /src/python/PresentationToImages/PdfToImages.py | lokavidya-iitb/lokavidya-desktop | MIT | |
2024-11-19T02:43:27.549890+00:00 | 1,617,379,989,000 | 66a1ac47c18a03440b2a69dd9a75f5a606562c1c | 3 | {
"blob_id": "66a1ac47c18a03440b2a69dd9a75f5a606562c1c",
"branch_name": "refs/heads/master",
"committer_date": 1617379989000,
"content_id": "6f9b1f233d0d7ef2d2d3345ac9d62eb57286c9f7",
"detected_licenses": [
"MIT"
],
"directory_id": "527cf2d84dc1761e448449c5e40ad4c29fc2c88b",
"extension": "py",
"fi... | 2.5625 | stackv2 |
import json
import subprocess
from iemlav.lib.auto_server_patcher.patch_logger import PatchLogger
from iemlav.lib.auto_server_patcher import utils
class Installer(object):
"""Installer Class."""
def __init__(self, debug=False):
# Initialize logger
self.logger = PatchLogger(
__na... | 83 | 26.95 | 83 | 16 | 442 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_cee3286227278d5d_b5a5d52f", "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-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
50
] | [
52
] | [
27
] | [
67
] | [
"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"
] | installer.py | /iemlav/lib/auto_server_patcher/installer.py | GouravRDutta/IemLabsAV | MIT | |
2024-11-19T02:43:28.074488+00:00 | 1,642,593,904,000 | b25d9644323d3481c614fa30b1b5b2adaba92877 | 2 | {
"blob_id": "b25d9644323d3481c614fa30b1b5b2adaba92877",
"branch_name": "refs/heads/master",
"committer_date": 1642593904000,
"content_id": "56582bc8f53f776646ae1110686b52d847928677",
"detected_licenses": [
"MIT"
],
"directory_id": "cf0d5ace26ad598946bf95004bd8d1aa6afd6d84",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python3
import re
import os
import getopt
import sys
from pysam import FastaFile
def getgraph(location):
"""
Load the fusion gene table from the local file
:param location: a string of fusion gene table location
:return: a dict of fusion genes
"""
if not (os.path.exists(os.curd... | 262 | 37.61 | 173 | 24 | 2,570 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_a4d3a46375e27764_e18948b2", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.use-sys-exit", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected use of `exit`. Use `sys.exit` over the python... | 18 | true | [
"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-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-c... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
133,
135,
199,
200,
257
] | [
133,
135,
199,
200,
257
] | [
9,
5,
5,
5,
16
] | [
109,
60,
101,
101,
75
] | [
"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 dynamic conte... | [
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | build_graph.py | /build_graph.py | WangHYLab/fcirc | MIT | |
2024-11-19T02:43:30.008533+00:00 | 1,625,408,305,000 | caf47d486f6ef565d4cfceaaaf97fea8477571ef | 2 | {
"blob_id": "caf47d486f6ef565d4cfceaaaf97fea8477571ef",
"branch_name": "refs/heads/main",
"committer_date": 1625408305000,
"content_id": "516c8ec23cc1c926f5181c37a25e573e51e59f79",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0bd03e07b8f224a384aed624ffb799d4da2729e4",
"extension": "py",
... | 2.421875 | stackv2 | import os, sys
import cv2
SRC_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))
sys.path.append(SRC_DIR)
from PIL import Image
from multimodal_affinities.blocks.word import Word
from multimodal_affinities.visualization.image_utils import resize_image
import copy
import PIL
import pickle
class D... | 231 | 35.96 | 108 | 18 | 1,821 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_9bdc2c775f0daef6_87bdc058", "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"
] | [
50
] | [
50
] | [
19
] | [
42
] | [
"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"
] | document.py | /multimodal_affinities/blocks/document.py | QPC-database/multimodal-affinities | Apache-2.0 | |
2024-11-19T02:43:31.853111+00:00 | 1,433,844,938,000 | e1ace0ad9a5faeb22b45cf80dc9f2ed1a20990ea | 2 | {
"blob_id": "e1ace0ad9a5faeb22b45cf80dc9f2ed1a20990ea",
"branch_name": "refs/heads/master",
"committer_date": 1433844938000,
"content_id": "60d5b76d9d380a8e1b89faa0c8c1ebe8c6784c00",
"detected_licenses": [
"MIT"
],
"directory_id": "fdf5b9c471404fe449689afeae45b8e6432f1d99",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
import struct
import marshal
from ComssServiceDevelopment.connectors.base import BaseConnector
class OutputMulticastConnector(BaseConnector):
TIMEOUT = 0.2
TTL = 2
def __init__(self, service_instance):
self._service_instance = service_i... | 109 | 29.27 | 132 | 14 | 750 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.marshal-usage_156352f3683b0352_0e85d8db", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.marshal-usage", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The marshal module is not intended to be secure agai... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.audit.marshal-usage",
"rules.python.lang.security.audit.marshal-usage"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
50,
109
] | [
50,
109
] | [
22,
16
] | [
40,
35
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"The marshal module is not intended to be secure against erroneous or maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. See more details: https://docs.python.org/3/library/marshal.html?highlight=security",
"The marshal module is not intended to be secure agai... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | multicast.py | /program/main_sniffer/comss/ComssServiceDevelopment/connectors/udp/multicast.py | MaciejSzaflik/tirt-W4-Project | MIT | |
2024-11-19T02:43:38.932310+00:00 | 1,633,938,243,000 | 67a474ce6ad8226a2725e78f9fefb733ef97e4dc | 3 | {
"blob_id": "67a474ce6ad8226a2725e78f9fefb733ef97e4dc",
"branch_name": "refs/heads/master",
"committer_date": 1633938243000,
"content_id": "889f28ab1ed0a58ed6ffa785fd9f824178f58d2c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3f40191edb4e876c3734e44bfd73fa294247d083",
"extension": "p... | 2.546875 | stackv2 | # This file is part of the P3IV Simulator (https://github.com/fzi-forschungszentrum-informatik/P3IV),
# copyright by FZI Forschungszentrum Informatik, licensed under the BSD-3 license (see LICENSE file in main directory)
import pickle
from p3iv_types.vehicle import Vehicle
class GroundTruth(dict):
"""
Ground... | 40 | 28.93 | 118 | 12 | 269 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a34edc965a0b3474_d00cdfcd", "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"
] | [
37
] | [
37
] | [
9
] | [
39
] | [
"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"
] | ground_truth.py | /p3iv_types/src/p3iv_types/ground_truth.py | philippbrusius/P3IV | BSD-3-Clause | |
2024-11-19T02:54:49.957679+00:00 | 1,597,547,574,000 | 348f7310a10c5f03a66ed83a8cd267e566664613 | 3 | {
"blob_id": "348f7310a10c5f03a66ed83a8cd267e566664613",
"branch_name": "refs/heads/master",
"committer_date": 1597547574000,
"content_id": "9d8127df405cfd52884a6677b81f1d76f3a31b2e",
"detected_licenses": [
"MIT"
],
"directory_id": "9421d3edeb2f93feba74ae7081cab2048172c8de",
"extension": "py",
"fi... | 2.671875 | stackv2 | from gensim import corpora, models
from collections import defaultdict
import jieba
import pickle
class NLModel:
def __init__(self):
self.stoplist = list()
self.dictionary = corpora.Dictionary()
def loadStopwords(self):
lines = []
with open('data/stopwords.txt') as f:
... | 102 | 34.63 | 99 | 17 | 802 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d8b133494d7ee859_bfb46584", "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"
] | [
28
] | [
28
] | [
17
] | [
42
] | [
"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"
] | nlpa_wrap.py | /src/nlpa_wrap.py | Augustpan/social_media_user_modeling | MIT | |
2024-11-19T02:54:51.272784+00:00 | 1,424,985,912,000 | be9c49fce9f3a196fa1adfb01b1f7b87f44165a0 | 3 | {
"blob_id": "be9c49fce9f3a196fa1adfb01b1f7b87f44165a0",
"branch_name": "refs/heads/master",
"committer_date": 1424985912000,
"content_id": "598427075b77c867152870af4f61331d70f75686",
"detected_licenses": [
"MIT"
],
"directory_id": "f797287b166793c3ba08ed3b9a70ce32651ba084",
"extension": "py",
"fi... | 2.78125 | stackv2 | # -*- coding: utf-8 -*-
import os
import numpy
import six
from six.moves import cPickle, xrange
from fuel import config
from fuel.datasets import InMemoryDataset
from fuel.utils import do_not_pickle_attributes
from fuel.schemes import SequentialScheme
@do_not_pickle_attributes('features', 'targets')
class CIFAR10(I... | 102 | 38.67 | 75 | 21 | 1,038 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_12f30c08de525047_4a1796b5", "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 ... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
77,
79,
88,
90
] | [
77,
79,
88,
90
] | [
32,
32,
28,
28
] | [
66,
47,
62,
43
] | [
"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 `cPickle`, which is known to lead ... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | cifar10.py | /fuel/datasets/cifar10.py | arasmus/fuel | MIT | |
2024-11-19T02:55:05.491926+00:00 | 1,522,405,345,000 | e67dfba06c1f7028c8154339ea3b03890a60e8ec | 2 | {
"blob_id": "e67dfba06c1f7028c8154339ea3b03890a60e8ec",
"branch_name": "refs/heads/master",
"committer_date": 1522405345000,
"content_id": "7fe701c13011bdef6ea016d7d1397bf0b485fd1d",
"detected_licenses": [
"MIT"
],
"directory_id": "e2f9d4359c547c42373157e691ab40ad3cd947c5",
"extension": "py",
"fi... | 2.421875 | stackv2 | """
This module provides miscellaneous utilities.
.. moduleauthor:: Fabian Hirschmann <fabian@hirschmann.email>
.. moduleauthor:: Michael Markert <markert.michael@googlemail.com>
:copyright: PenchY Developers 2011-2012, see AUTHORS
:license: MIT License, see LICENSE
"""
from __future__ import print_function
impo... | 256 | 23.62 | 80 | 15 | 1,524 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_c71ce1e77e7176e2_4e9be9e6", "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"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
22
] | [
22
] | [
1
] | [
45
] | [
"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"
] | util.py | /penchy/util.py | fhirschmann/penchy | MIT | |
2024-11-19T02:55:09.323228+00:00 | 1,615,021,681,000 | 92c4af305d2b54e3dfa6df432b2e2cfe52df93c4 | 3 | {
"blob_id": "92c4af305d2b54e3dfa6df432b2e2cfe52df93c4",
"branch_name": "refs/heads/master",
"committer_date": 1615021681000,
"content_id": "c4449872e46c03dc1d44f005e8bb06c6e7fc26e3",
"detected_licenses": [
"MIT"
],
"directory_id": "d359dd169449969bf743c0f45f1e69b351066c55",
"extension": "py",
"fi... | 2.640625 | stackv2 | import json
import arrow
from config import settings
from helpers.db import get_cursor
from calendar_listener.utils import get_service
RFC3339 = "YYYY-MM-DDT00:00:00Z"
def get_calendars():
with open(f'{settings.BASE_DIR}/calendar_listener/calendars.json', 'r') as _file:
return json.load(_file)
def ge... | 96 | 30.69 | 137 | 18 | 707 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_624309507d5bc8ec_f0fde8c9", "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... | 3 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
68
] | [
68
] | [
5
] | [
51
] | [
"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"
] | main.py | /calendar_listener/main.py | KosyanMedia/meeting-room-remover | MIT | |
2024-11-19T02:55:14.063048+00:00 | 1,622,476,508,000 | a32dd19c4018e6a6ab70848484e1a10ce6555873 | 3 | {
"blob_id": "a32dd19c4018e6a6ab70848484e1a10ce6555873",
"branch_name": "refs/heads/main",
"committer_date": 1622476508000,
"content_id": "6a6d44bb2e48dc6e956ad017d772604294934d6d",
"detected_licenses": [
"MIT"
],
"directory_id": "19e874d506f5b6e4f5362aaa9757d6c711f53ce1",
"extension": "py",
"file... | 2.53125 | stackv2 | from flask import Flask, flash, redirect, render_template, request, session
from flask_session import Session
from tempfile import mkdtemp
from werkzeug.exceptions import default_exceptions, HTTPException, InternalServerError
from werkzeug.security import check_password_hash, generate_password_hash
from cs50 import SQL... | 170 | 32.19 | 143 | 15 | 1,228 | python | [{"finding_id": "semgrep_rules.python.flask.best-practice.use-jsonify_9a171469f2f37496_320b4d44", "tool_name": "semgrep", "rule_id": "rules.python.flask.best-practice.use-jsonify", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "flask.jsonify() is a Flask helper method which han... | 4 | true | [
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.django.security.injection.sql.sql-injection-db-cursor-execute",
"rules.python.django.security.injection.sql.sql-injection-db-cursor-execute",
"rules.python.django.security.injection.sql.sql-injection-db-cursor-execute"
] | [
"security",
"security",
"security"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
97,
97,
125
] | [
97,
97,
151
] | [
9,
16,
9
] | [
98,
98,
89
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"User-controlled data from a request is passed to 'execute()'. This could lead to a SQL injection and therefore protected information could be leaked. Instead, use django's QuerySets, which are built with query parameterization and therefore not vulnerable to sql injection. For example, you could use `Entry.objects... | [
5,
5,
5
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | application.py | /application.py | ZonkmasterX/CS50-Final-Project | MIT | |
2024-11-19T02:55:16.697566+00:00 | 1,429,632,251,000 | 424adb68c50a70ffd98c271277e6550269562c8c | 3 | {
"blob_id": "424adb68c50a70ffd98c271277e6550269562c8c",
"branch_name": "refs/heads/master",
"committer_date": 1429632251000,
"content_id": "40022e7559ef11e3cd7d02a0903b1e8d5be672f0",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "62cbe76fc1ffcb465d65a782f7bc8b75d11312e2",
"extension": "p... | 2.890625 | stackv2 | #!/usr/bin/env python
import sys, os
from optparse import OptionParser
from string import maketrans
from subprocess import check_call
def revc(s):
'''reverse complement a string'''
t = " " * len(s)
l=len(s)
intab = "AaCcGgTt"
outtab = "TtGgCcAa"
trantab = maketrans(intab, outtab)
t=s.trans... | 75 | 32.56 | 121 | 16 | 707 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_eaae8780f1f2a928_f26a5add", "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... | 7 | true | [
"CWE-78",
"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.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
60,
60,
75,
75
] | [
60,
60,
75,
75
] | [
9,
20,
5,
16
] | [
59,
58,
84,
83
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"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()'.",
"Detected subprocess ... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM"
] | autoskewer.py | /autoskewer.py | wgerlach/autoskewer | BSD-2-Clause | |
2024-11-19T02:55:20.543722+00:00 | 1,625,003,988,000 | 28a763b3783dfd14fb8ececc9f11cb7137a42a7a | 3 | {
"blob_id": "28a763b3783dfd14fb8ececc9f11cb7137a42a7a",
"branch_name": "refs/heads/main",
"committer_date": 1625003988000,
"content_id": "37caf99d81a1d90b0ecefa75cf7df4d4c1493a68",
"detected_licenses": [
"MIT"
],
"directory_id": "e552a0fd70de9a94ce65bbb2db1ce3404756c977",
"extension": "py",
"file... | 2.96875 | stackv2 | import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import pickle
import nltk
import string
from nltk.stem.snowball import SnowballStemmer
from nltk.tokenize import word_tokenize
import plotly.express as px
dfNeutral = pd.read_csv('../dataApp/neutralReviews.csv')
dfSe... | 101 | 46.95 | 132 | 23 | 1,179 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f8a830e8b781df61_034499d3", "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"
] | [
19,
22
] | [
19,
22
] | [
16,
16
] | [
30,
30
] | [
"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"
] | sentiment.py | /src/webapp/pages/sentiment.py | GabrieleFerrario/DataAnalytics | MIT | |
2024-11-19T02:55:22.221291+00:00 | 1,693,492,603,000 | badceb309bf62f9bc4f03c65f1eb5e5a642cae0e | 2 | {
"blob_id": "badceb309bf62f9bc4f03c65f1eb5e5a642cae0e",
"branch_name": "refs/heads/main",
"committer_date": 1693492603000,
"content_id": "68cea6394bcd14c1660b0ede98ca917a7368d60f",
"detected_licenses": [
"MIT"
],
"directory_id": "1c024dfbca35f4c829d4b47bdfe900d1b1a2303b",
"extension": "py",
"file... | 2.359375 | stackv2 | from __future__ import print_function
import collections
import os
import subprocess
import sys
import errno
# The BINARY_INFO tuple describes a binary as dump_syms identifies it.
BINARY_INFO = collections.namedtuple('BINARY_INFO',
['platform', 'arch', 'hash', 'name'])
def get_mo... | 53 | 28.85 | 78 | 14 | 403 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8c161ac6d269c3ec_b18b1986", "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"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
42
] | [
42
] | [
17
] | [
46
] | [
"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()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | dump_syms.py | /build/dump_syms.py | electron/electron | MIT | |
2024-11-19T02:55:22.668053+00:00 | 1,507,216,094,000 | 544d304f5e70cc11a8d6b2eaf8510011bf63fbb4 | 3 | {
"blob_id": "544d304f5e70cc11a8d6b2eaf8510011bf63fbb4",
"branch_name": "refs/heads/master",
"committer_date": 1507216094000,
"content_id": "b607fced05a64e5b788af3fe6aa8244f74c75a3c",
"detected_licenses": [
"MIT"
],
"directory_id": "2e5f482c35c917b879672998a6b1e06effa42164",
"extension": "py",
"fi... | 3.265625 | stackv2 | """
Pick a word from /usr/share/dict/words
"""
import subprocess
import random
def choose(difficulty):
(min, max) = difficulty['word length']
file = 'data/easy.words'
if difficulty['commonality'] < 0.5:
file = 'data/hard.words'
cmd = """/usr/bin/grep -E '^.{{{},{}}}$' {}""".format(min, ma... | 23 | 24.48 | 73 | 13 | 151 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_cb43456c2946bd4d_1c226e66", "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"
] | [
15,
16
] | [
17,
16
] | [
11,
32
] | [
49,
36
] | [
"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()'.",
"Found 'subprocess' function... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | words.py | /words.py | tml/python-hangman-2017-summer | MIT | |
2024-11-19T02:55:26.019222+00:00 | 1,617,807,866,000 | e3ea07ba4575215f9dbb4e38784eb69e550bbbb1 | 3 | {
"blob_id": "e3ea07ba4575215f9dbb4e38784eb69e550bbbb1",
"branch_name": "refs/heads/master",
"committer_date": 1617807866000,
"content_id": "a95646fa3083150c724bea5154efed7af61fd654",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e8d7df2e6486e5e7b850d089fd5e47ec5c05dd93",
"extension": "py"... | 2.65625 | stackv2 | import matplotlib.pyplot as plt
from matplotlib import rcParams
import pickle
rcParams.update({'figure.autolayout': True})
plt.rcParams.update({'font.size': 22})
"""
#
# Medical
#
PLOT_LABEL = 'a'
for context in [0, 26, 4, 1]:
filename = 'medical_reg_plots/context_{}'.format(context)
fig = pickle.load(file(f... | 41 | 24.68 | 78 | 14 | 347 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_efd324a8270fcca0_70e30596", "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"
] | [
38
] | [
38
] | [
15
] | [
51
] | [
"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"
] | pretty_graphs.py | /results/pretty_graphs.py | columbia/fairtest | Apache-2.0 | |
2024-11-19T02:55:26.391594+00:00 | 1,587,459,287,000 | cdf64901b60f01de1d8a0e9a4e897454534a2982 | 3 | {
"blob_id": "cdf64901b60f01de1d8a0e9a4e897454534a2982",
"branch_name": "refs/heads/master",
"committer_date": 1587459287000,
"content_id": "cc8ce9c388f39f50d9763a19e20a094c087f7a21",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "73a2222084fc9e5d3bcfc18c0b692c68599b8284",
"extension": "py"... | 2.75 | stackv2 | import json
import pickle
import logging
import numpy as np
import pandas as pd
from tools.config import Config
from tools.general import singleton
@singleton
class InputData:
"""
Reads data from files as specified in the config and stores it.
"""
def __init__(self):
self._config = Config()... | 173 | 28.09 | 101 | 19 | 1,134 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1bc66e3eddc1b347_f24ef007", "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"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
24
] | [
24
] | [
37
] | [
51
] | [
"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"
] | input_data.py | /tools/input_data.py | michal-racko/corona-virus-slovakia | Apache-2.0 | |
2024-11-19T02:55:27.384040+00:00 | 1,587,340,043,000 | ddf190b5c2ab5b6ddf144290194ba117d91f46aa | 3 | {
"blob_id": "ddf190b5c2ab5b6ddf144290194ba117d91f46aa",
"branch_name": "refs/heads/master",
"committer_date": 1587340043000,
"content_id": "6c6413567c7795e8da665bd4428d5ff06057cbbf",
"detected_licenses": [
"MIT"
],
"directory_id": "b165376f11dec84a6384311e46f28475ae352a04",
"extension": "py",
"fi... | 2.75 | stackv2 | from app import app
from flask import g, current_app
import cx_Oracle
import logging
import time
def connect_db(username='dazhi', password='Oracle233', address='oracle.cise.ufl.edu/orcl'):
"""
Create a connection to the database.
"""
logger = current_app.logger
logger.info("Establishing a new conne... | 54 | 27.17 | 91 | 11 | 380 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.hardcoded-password-default-argument_c48b8fcaefa05208_1b33a34d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.hardcoded-password-default-argument", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Hardcode... | 1 | true | [
"CWE-798"
] | [
"rules.python.lang.security.audit.hardcoded-password-default-argument"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
7
] | [
14
] | [
1
] | [
15
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"Hardcoded password is used as a default argument to 'connect_db'. This could be dangerous if a real password is not supplied."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | db.py | /app/db.py | zdong1995/salesDB | MIT | |
2024-11-19T02:55:35.097215+00:00 | 1,405,523,893,000 | 7e404e9ddf5fac20dd6430f4e75758f284275595 | 3 | {
"blob_id": "7e404e9ddf5fac20dd6430f4e75758f284275595",
"branch_name": "refs/heads/master",
"committer_date": 1405523893000,
"content_id": "f2d4790f5ed42966e5b2e74ad4a2813ce8c8ba38",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "39b5c62c54e8493feb801015db4689c171f149f3",
"extension": "py"... | 2.546875 | stackv2 | from flask import Flask, url_for, render_template, Markup
import httplib
import re
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.formatters import HtmlFormatter
app = Flask(__name__)
app.config.from_pyfile('application.cfg')
base_url = app.config['BASE_URL']
base_path = ap... | 64 | 33.44 | 138 | 16 | 597 | python | [{"finding_id": "semgrep_rules.python.flask.security.injection.raw-html-format_8859bae7cb9284e5_5d62969d", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.raw-html-format", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected user input flowing into a ... | 4 | true | [
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.injection.raw-html-format",
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup",
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup"
] | [
"security",
"security",
"security"
] | [
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
36,
42,
55
] | [
36,
42,
55
] | [
19,
12,
12
] | [
130,
26,
82
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected user input flowing into a manually constructed HTML string. You may be accidentally bypassing secure methods of rendering HTML by manually constructing HTML and this could create a cross-site scripting vulnerability, which could let attackers steal sensitive user data. To be sure this is safe, check that ... | [
5,
5,
5
] | [
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | log_highlighter.py | /log_highlighter.py | lewg/pretty-irc-logs | Apache-2.0 | |
2024-11-19T02:55:35.633401+00:00 | 1,521,835,602,000 | 013c98f9fbf53d4433935b8f2a5658df6571d164 | 3 | {
"blob_id": "013c98f9fbf53d4433935b8f2a5658df6571d164",
"branch_name": "refs/heads/master",
"committer_date": 1521835602000,
"content_id": "e73a16f39f11bbe9c4a64d44db8a34ad0c7c2487",
"detected_licenses": [
"MIT"
],
"directory_id": "a6d82ec04371473ab3107e664c071d4794a40986",
"extension": "py",
"fi... | 2.515625 | stackv2 | import telegram
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, Job,\
CallbackQueryHandler
import urllib2
import json
import os
import sys
from threading import Thread
import keys
import coin
from coin import Coin
import wallet
import chart
import user
from db_base ... | 116 | 34.53 | 116 | 15 | 1,054 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_997160afa6eaca5a_5b816156", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.pass-body-fn", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "`pass` is the body of function request. Consider... | 4 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-os-exec-audit",
"rules.python.lang.security.audit.dangerous-os-exec-tainted-env-args"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
80,
80
] | [
80,
80
] | [
9,
9
] | [
60,
60
] | [
"A01:2017 - Injection",
"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.",
"Found user controlled content when spawning a process. This is dangerous because it allows a malicious a... | [
7.5,
7.5
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | crypto_bot.py | /crypto_bot.py | cjpais/ccrypto_bot | MIT | |
2024-11-19T02:55:49.818737+00:00 | 1,677,792,935,000 | 739144d8f7f4a4c8df9310f0958332c3b086cc95 | 3 | {
"blob_id": "739144d8f7f4a4c8df9310f0958332c3b086cc95",
"branch_name": "refs/heads/master",
"committer_date": 1677792935000,
"content_id": "3989bc0aaa32ed8b98899fed78f610b4e4617652",
"detected_licenses": [
"MIT"
],
"directory_id": "622d782fc0e7021de321254e08b6925e3ff12830",
"extension": "py",
"fi... | 2.734375 | stackv2 | from django.contrib.auth.models import User, Group
from ladder.models import Player
import uuid
# python manage.py shell < ladder/management/shell/import_users.py
# format first_name, last_name, email
players = [
["John", "Doe", "jo@hn.doe"],
]
group_object = Group.objects.get(name='player')
for player in player... | 45 | 28.4 | 86 | 16 | 298 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_f6c94a1190a536ef_cea57edf", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'user_object' is b... | 1 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
33
] | [
33
] | [
9
] | [
51
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'user_object' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | import_users.py | /ladder/management/shell/import_users.py | jzahedieh/django-tennis-ladder | MIT | |
2024-11-19T02:55:54.566960+00:00 | 1,563,385,137,000 | 139a5c6d31c6206ffc1c2e005bbc3dc80b8ff0e4 | 2 | {
"blob_id": "139a5c6d31c6206ffc1c2e005bbc3dc80b8ff0e4",
"branch_name": "refs/heads/master",
"committer_date": 1563385137000,
"content_id": "a5eba768b01eb88261c883574e481e26a8d78db3",
"detected_licenses": [
"MIT"
],
"directory_id": "cac0afb2939047d6d0d35013b77efc2c3479726a",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python
# coding: utf-8
# In[7]:
import os
import matplotlib.pyplot as plt
import numpy as np
## read data:
import pandas as pd
import copy
import os
folder_names = sorted(os.listdir("../Data/ILSVRC/Data/CLS-LOC/train/"))
folder_names =sorted([i for i in folder_names if "n" in i])
# print(len(folde... | 260 | 19.96 | 137 | 24 | 1,476 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_bc9cf0bbfbccce25_1cdce319", "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"
] | [
"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"
] | [
128,
129,
130
] | [
128,
129,
130
] | [
1,
1,
1
] | [
47,
46,
48
] | [
"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"
] | mAP_for_validation_v1.py | /mAP_for_validation_v1.py | peraktong/Calculate-mAP-for-object-detection | MIT | |
2024-11-19T02:55:56.646043+00:00 | 1,650,265,559,000 | 438f5288dcbb2c707d7130e16a0bcf40587ddd9b | 3 | {
"blob_id": "438f5288dcbb2c707d7130e16a0bcf40587ddd9b",
"branch_name": "refs/heads/master",
"committer_date": 1650265559000,
"content_id": "d7db10112e7647135d348dbd1abf6380070f268f",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "9bdc23398a4239eab21e025c3c8f2bbde12ae03f",
"extension": "py",
... | 2.671875 | stackv2 | import pickle
import os
import pymysql
f = open("gender/gender_classifier.pickel", "rb")
classifier = pickle.load(f)
f.close()
pswd = os.environ["SQLPW"]
conn = pymysql.connect(host="localhost",user="sophie",passwd=pswd,db="namsor")
cursor = conn.cursor()
test_names = []
test_labels = []
test_num_list = []
def load_d... | 55 | 30.75 | 91 | 20 | 532 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1d89741a71e2ae84_a42a8b9e", "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... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
6
] | [
6
] | [
14
] | [
28
] | [
"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"
] | determine_gender.py | /gender/determine_gender.py | CMUSTRUDEL/oss-social-capital-icse2019 | CC0-1.0 | |
2024-11-19T02:55:58.464833+00:00 | 1,553,975,725,000 | c63025444bfbc1059aa7f197c90c345d180c8d8b | 2 | {
"blob_id": "c63025444bfbc1059aa7f197c90c345d180c8d8b",
"branch_name": "refs/heads/master",
"committer_date": 1553975725000,
"content_id": "6c1653150a6b943ea2dad4626c43d6131e2cfdb9",
"detected_licenses": [
"MIT"
],
"directory_id": "7d71c9e1f8a949f5542fa238a28e9fa867749d4b",
"extension": "py",
"fi... | 2.359375 | stackv2 | """
Backend of Narrator web app.
"""
import os
import sys
import shutil
import pandas as pd
import skimage.io as io
import PIL
from flask import render_template, request, redirect, url_for, send_from_directory, session
from app import app
sys.path.append(app.config['COCOAPI_PATH'] + 'PythonAPI')
from pycocotools.coco ... | 443 | 37.04 | 97 | 22 | 3,452 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_0d9fa27e60782a8a_f1c42223", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se... | 7 | true | [
"CWE-601",
"CWE-601"
] | [
"rules.python.flask.security.open-redirect",
"rules.python.flask.security.open-redirect"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
297,
366
] | [
352,
422
] | [
13,
13
] | [
60,
60
] | [
"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
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | views.py | /web/app/views.py | sssgun/Narrator | MIT | |
2024-11-19T02:55:58.513369+00:00 | 1,601,959,154,000 | aa34a1fafbcdd882b89b4de41c2d5f25efd6b12a | 3 | {
"blob_id": "aa34a1fafbcdd882b89b4de41c2d5f25efd6b12a",
"branch_name": "refs/heads/master",
"committer_date": 1601959154000,
"content_id": "a58e0a9ed5b62408ebc75fff2fef708be34879e4",
"detected_licenses": [
"MIT"
],
"directory_id": "4dd8c023e4148401201a7255dac6962bb53364e0",
"extension": "py",
"fi... | 2.625 | stackv2 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import cv2
import glob
import pickle
_parameters = {
"s_thresh_low" : 10,
"s_thresh_high" : 300,
"sx_thresh_low": 0,
"sx_thresh_high": 255,
"region_of_interest": np.ones((720, 1280), dtype=np.bool),
"src_vertice... | 67 | 25.15 | 78 | 15 | 510 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3f0051d8a606437c_879825d0", "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"
] | [
59,
65
] | [
59,
65
] | [
9,
23
] | [
36,
37
] | [
"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"
] | utils.py | /utils.py | hamdaankhalid/CarND-Advanced-Lane-Lines | MIT | |
2024-11-19T02:56:00.476911+00:00 | 1,647,742,578,000 | 35e3c7a8eeb5fabf4f72dd269f37541d0ef54994 | 3 | {
"blob_id": "35e3c7a8eeb5fabf4f72dd269f37541d0ef54994",
"branch_name": "refs/heads/master",
"committer_date": 1647742578000,
"content_id": "3278f4bdc51e2cb34670d18269bc4562f57ed28c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0a7dca58a23913478ad0a5b2df03cb9ca4994dbe",
"extension": "py"... | 2.9375 | stackv2 | #!/usr/bin/env python3
import argparse
import pandas as pd
import pickle
def parse_args():
parser = argparse.ArgumentParser('count the occurences of all features')
parser.add_argument('tr_path', type=str, help='path to training set in CSV format')
parser.add_argument('va_path', type=str, help='path to test set in C... | 32 | 31.16 | 104 | 12 | 264 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_13feabb3b1406440_6ec5bcd5", "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"
] | [
32
] | [
32
] | [
3
] | [
32
] | [
"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"
] | count_feat.py | /Handson-ML/kaggle/avazu_ctr_pred/1st Solution/bag/util/count_feat.py | txsniper/Learning-Note | Apache-2.0 | |
2024-11-19T02:56:06.446241+00:00 | 1,449,688,321,000 | 8a8ab43fba7fd8da49053e0127a344cc316e0995 | 2 | {
"blob_id": "8a8ab43fba7fd8da49053e0127a344cc316e0995",
"branch_name": "refs/heads/master",
"committer_date": 1449688321000,
"content_id": "d62936010f75e396ffb85d57153c2cf8a738b56f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ea232d74b063957e28e73f74162665e5e0e88b20",
"extension": "py"... | 2.453125 | stackv2 | from flask import render_template, request, Flask
#from app import app
import pymysql as mdb
import pandas as pd
import sys, re
import program_rankings as rank
import numpy as np
import copy
app = Flask(__name__)
@app.route('/contact')
def contact():
"""Page with contact information."""
return render_template... | 215 | 40.45 | 172 | 21 | 2,007 | python | [{"finding_id": "semgrep_rules.python.flask.security.injection.nan-injection_4a46ffb4813f1b8c_ca68621f", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.nan-injection", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found user input going directly into type... | 6 | true | [
"CWE-704",
"CWE-915",
"CWE-704",
"CWE-915",
"CWE-704"
] | [
"rules.python.flask.security.injection.nan-injection",
"rules.python.django.security.injection.tainted-sql-string",
"rules.python.flask.security.injection.tainted-sql-string",
"rules.python.django.security.injection.tainted-sql-string",
"rules.python.flask.security.injection.tainted-sql-string"
] | [
"security",
"security",
"security",
"security",
"security"
] | [
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
90,
117,
117,
130,
130
] | [
90,
117,
117,
130,
130
] | [
31,
42,
42,
42,
42
] | [
53,
84,
84,
114,
114
] | [
"",
"A08:2021 - Software and Data Integrity Failures",
"A01:2017 - Injection",
"A08:2021 - Software and Data Integrity Failures",
"A01:2017 - Injection"
] | [
"Found user input going directly into typecast for bool(), float(), or complex(). This allows an attacker to inject Python's not-a-number (NaN) into the typecast. This results in undefind behavior, particularly when doing comparisons. Either cast to a different type, or add a guard checking for all capitalizations ... | [
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | views.py | /views.py | kdsimmons/CharityChooser | Apache-2.0 | |
2024-11-19T02:56:07.088729+00:00 | 1,566,590,901,000 | ef8d99e6776ccbafd314f80c58a21e9fab041bae | 2 | {
"blob_id": "ef8d99e6776ccbafd314f80c58a21e9fab041bae",
"branch_name": "refs/heads/master",
"committer_date": 1566590901000,
"content_id": "a3bf8e1fa8c90453ef2f4ade7441d7cc5c1789b8",
"detected_licenses": [
"MIT"
],
"directory_id": "4abad1f7b31f37df76c545eca1e4d7984f92790c",
"extension": "py",
"fi... | 2.328125 | stackv2 | import os
splits = ['test', 'val', 'train']
root_path = '/private/home/medhini/navigation-analysis-habitat/habitat-api/data/datasets/roomnav/mp3d/v1/'
pointnav_dataset = '/private/home/medhini/navigation-analysis-habitat/habitat-api/data/datasets/pointnav/mp3d/v1/'
pointnav_dataset_v2 = '/private/home/medhini/navigati... | 22 | 49 | 125 | 14 | 302 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_0b2d064a6cf99b21_7b220ad8", "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... | 2 | 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"
] | [
19,
22
] | [
19,
22
] | [
9,
5
] | [
57,
126
] | [
"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"
] | pointnav_v2_generator.py | /habitat/datasets/pointnav/pointnav_v2_generator.py | medhini/habitat-api | MIT | |
2024-11-19T03:10:19.205223+00:00 | 1,522,259,822,000 | 2d28ab006f28f4f41221f6832648cfbbe99a753b | 3 | {
"blob_id": "2d28ab006f28f4f41221f6832648cfbbe99a753b",
"branch_name": "refs/heads/master",
"committer_date": 1522259822000,
"content_id": "58393c95e23dcb5066ffa47b41ed6f6cff62cf92",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cd16f3919502efd6157e23bf0d8ef76e5e876a39",
"extension": "py"... | 2.828125 | stackv2 | import requests
import datetime
import xml.etree.ElementTree as ET
from dateutil.relativedelta import relativedelta
import pandas as pd
import pathlib
import os
from bs4 import BeautifulSoup
ENDPOINT = "https://ssl.orpak.com/api40/TrackTecPublic/PublicService.asmx/ExecuteCommand"
cur_date = datetime.datetime.now().... | 99 | 28.75 | 92 | 16 | 782 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_e60551d1e3e19c1d_ef7fcc06", "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"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
3
] | [
3
] | [
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"
] | extract.py | /extract.py | CityOfLosAngeles/data-workflows-101 | Apache-2.0 | |
2024-11-19T03:10:21.391000+00:00 | 1,690,953,055,000 | 7fc0edc2169231bae11b03e174a6070e36cbdc8b | 2 | {
"blob_id": "7fc0edc2169231bae11b03e174a6070e36cbdc8b",
"branch_name": "refs/heads/master",
"committer_date": 1690953055000,
"content_id": "24b6467302ea9cfa085ea62fd036bf7719e85db9",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3b4c6b6a8a46bc2c6fa1a07c46f4f359f3d15f6a",
"extension": "p... | 2.328125 | stackv2 | #!/usr/bin/env python3
###
# Copyright (c) 2015-2016, James Lu
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# ... | 90 | 43.21 | 169 | 16 | 891 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_51867733c6860ae3_a3eccb02", "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... | 5 | 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"
] | [
87,
87
] | [
87,
87
] | [
5,
21
] | [
89,
88
] | [
"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"
] | update-version.py | /update-version.py | jlu5/SupyPlugins | BSD-3-Clause | |
2024-11-19T03:10:23.412129+00:00 | 1,670,146,133,000 | 048bfc9e9e949f318eba7a68d8e819e5835c3c8f | 4 | {
"blob_id": "048bfc9e9e949f318eba7a68d8e819e5835c3c8f",
"branch_name": "refs/heads/master",
"committer_date": 1670146133000,
"content_id": "d72b6d882ad711737b53462742d3757d748151d7",
"detected_licenses": [
"MIT"
],
"directory_id": "755a05dbf86eedc8ee02c999bc867e5acf4c94b4",
"extension": "py",
"fi... | 3.890625 | stackv2 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# We need previous line since we have UTF-8 characters that we are working with, i.e. the suit representations.
# day051.py
# By Sebastian Raaphorst, 2019.
#
# Perm rank / unrank algorithms inspired from Kreher & Stinson, and the following webpage:
# http://tryalgo.org/en/... | 227 | 34.29 | 118 | 16 | 2,095 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_644028584d519864_4b0c01ee", "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"
] | [
90
] | [
90
] | [
22
] | [
29
] | [
"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"
] | day051.py | /dcp_py/day051/day051.py | sraaphorst/daily-coding-problem | MIT | |
2024-11-19T03:10:27.316873+00:00 | 1,632,956,254,000 | 8fcc6164f1e38207bd25a1bc76dabd645409a61a | 2 | {
"blob_id": "8fcc6164f1e38207bd25a1bc76dabd645409a61a",
"branch_name": "refs/heads/master",
"committer_date": 1632956254000,
"content_id": "13084560f8d73778235690a561cfa6c95fd39d05",
"detected_licenses": [
"MIT"
],
"directory_id": "9bdb63926a3f9fcd22770585148da51f642225ea",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# impl_mnist_torch.py
# SciML-Bench
# Copyright © 2021 Scientific Machine Learning Research Group
# Scientific Computing Department, Rutherford Appleton Laboratory
# Science and Technology Facilities Council, UK.
# All rights reserved.
"""
Implementation of the MNIST_... | 254 | 36.53 | 78 | 18 | 2,192 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_146ad2b5a5d22013_c3993dd7", "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 ... | 2 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
114,
123
] | [
114,
124
] | [
21,
21
] | [
46,
51
] | [
"A03:2021 - Injection",
"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.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | impl_mnist_torch.py | /sciml_bench/benchmarks/MNIST_torch/impl_mnist_torch.py | lukehare/sciml-bench | MIT | |
2024-11-19T03:10:32.408588+00:00 | 1,619,630,889,000 | b9052813dca187d59428b54d6a808fae25b8064d | 3 | {
"blob_id": "b9052813dca187d59428b54d6a808fae25b8064d",
"branch_name": "refs/heads/master",
"committer_date": 1619630889000,
"content_id": "8a83ad8e0164b15162eb8ea032b78769a177f30c",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "95e00b2c7f4f6d754c7f676bc10f73f3ee6cedb3",
"exten... | 3.09375 | stackv2 | # Size of a single page in a paginated query.
_PAGE_SIZE = 100
class PaginatedCollection:
""" An iterable collection of database objects (Projects, Labels, etc...).
Implements automatic (transparent to the user) paginated fetching during
iteration. Intended for use by library internals and not by the end ... | 67 | 35.03 | 80 | 14 | 527 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_8086c8491d587e86_28096128", "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... | 1 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
50
] | [
50
] | [
23
] | [
62
] | [
"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"
] | pagination.py | /labelbox/pagination.py | jtsodapop/labelbox-python | Apache-2.0,MIT | |
2024-11-19T03:10:33.213339+00:00 | 1,629,753,544,000 | ae3de06bcf09104337c4794cfb8e6641a99bb8ae | 3 | {
"blob_id": "ae3de06bcf09104337c4794cfb8e6641a99bb8ae",
"branch_name": "refs/heads/master",
"committer_date": 1629753544000,
"content_id": "2a6c071e6a2ceec4379b3db25131597694dc814a",
"detected_licenses": [
"MIT"
],
"directory_id": "4cd94a620965fe99c4cead12ddcddb1a3cc7deb3",
"extension": "py",
"fi... | 2.640625 | stackv2 | import os
import sys
import urllib.request
import subprocess
import koji
def get_buildrequire_pkgs_from_build(build_id, session, config):
"""
Function which queries koji for pkgs whom belong to a given build tag
of a koji build and paires rpms with their respective package.
:param str build_id: buil... | 142 | 34.33 | 100 | 18 | 1,248 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.list-modify-while-iterate_11c6a02154ef8c92_4eed7992", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.list-modify-while-iterate", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "It appears that `tagged_rpms` ... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
140
] | [
140
] | [
5
] | [
44
] | [
"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"
] | __init__.py | /bld2repo/bld2repo/__init__.py | xiaonanhe/modulemd-tools | MIT | |
2024-11-19T03:10:33.682827+00:00 | 1,674,323,930,000 | 90b4bd816f7c5fa19e9dccf8df4ac61d8da1dd10 | 3 | {
"blob_id": "90b4bd816f7c5fa19e9dccf8df4ac61d8da1dd10",
"branch_name": "refs/heads/master",
"committer_date": 1674323930000,
"content_id": "50e738558583c706ee7927aeaaca6122c71b6b66",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "714864ff41966264b5e1823b6a94ae5950907de6",
"extension": "p... | 2.8125 | stackv2 |
"""
Compilers
Used to compile source files into binaries and bytecode.
"""
import os as _os
from clay import settings
class Compiler(object):
"""Used to compile source files into bytecode or executable format"""
def __init__(self, compiler_name, src_ext, dst_ext, sources=None, directory=_os.curdir):
... | 127 | 34.11 | 110 | 20 | 958 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_f38e4602e0a72bec_f1a4b64d", "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... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
97
] | [
97
] | [
17
] | [
32
] | [
"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."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | compilers.py | /shell/compilers.py | claywahlstrom/clay | BSD-2-Clause | |
2024-11-19T03:10:37.753454+00:00 | 1,625,316,963,000 | 62deca9120047f189d6bd422cace68de41b6de45 | 3 | {
"blob_id": "62deca9120047f189d6bd422cace68de41b6de45",
"branch_name": "refs/heads/master",
"committer_date": 1625316963000,
"content_id": "b928140e6983ea8685c33c34d6c5b66d4ba5eeb2",
"detected_licenses": [
"MIT"
],
"directory_id": "a75d9050638778ae72260cb9d88fc74ce2ba33a2",
"extension": "py",
"fi... | 2.84375 | stackv2 | from tkinter import *
from tkinter import messagebox
import random
root = Tk()
root.title("dfvdfvdf")
def farrukh():
# Обработка сортировки и случайных ситуаций
try:
array = str(a_entry.get())
if array[0] != "[":
array = "[" + str(array)
if array[-1] !="]":
arra... | 34 | 25.38 | 74 | 13 | 281 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_10c6681d53d29581_8a3f3e05", "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"
] | [
17
] | [
17
] | [
30
] | [
41
] | [
"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"
] | 32.py | /First course/2nd semester/Python3/32.py | gHuwk/University | MIT | |
2024-11-19T03:10:48.133835+00:00 | 1,539,332,359,000 | e8993e7f742649f41120bd11ddd988e4e655cf8c | 2 | {
"blob_id": "e8993e7f742649f41120bd11ddd988e4e655cf8c",
"branch_name": "refs/heads/master",
"committer_date": 1539332359000,
"content_id": "235230d3fc62802aeb68b3330d4480b17ade85ac",
"detected_licenses": [
"MIT"
],
"directory_id": "a876bc6d372ef2a5e1bf1c807041b45bc5a8bc09",
"extension": "py",
"fi... | 2.375 | stackv2 | '''
Created by irving on 8/10/18
'''
import pickle
import cv2
from modules.sample import Sample
from modules.loader import Loader
from modules.settings import ProjectSettings
import random
with open('body_face_sample.pickle', 'rb') as f:
body_face_samples: {str: Sample} = pickle.load(f)
with open('car_sample.p... | 42 | 29.79 | 104 | 12 | 324 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f972a16df4aa18f6_d7085635", "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"
] | [
14,
16
] | [
14,
16
] | [
40,
34
] | [
54,
48
] | [
"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"
] | custom_visualization.py | /custom_visualization.py | irving-genvis/open-images-starter | MIT | |
2024-11-19T03:10:50.683678+00:00 | 1,627,944,219,000 | 4d7ef8e611231262bcfd5e7148f5c9833b489136 | 3 | {
"blob_id": "4d7ef8e611231262bcfd5e7148f5c9833b489136",
"branch_name": "refs/heads/main",
"committer_date": 1627944219000,
"content_id": "b6a48c1eec7fb7b402e52f94aad179f51f0f52af",
"detected_licenses": [
"MIT"
],
"directory_id": "b0b88622f5dc5f14e427cf0fde37307d54f41996",
"extension": "py",
"file... | 2.8125 | stackv2 | """
Using the metacalibration function, this script loops over a variety of
different parameters to measure the response of the shear response matrix.
It pickles a list of tuples with the galsim objects and relevant parameters to disk.
Step 1. Generate a combination of galaxies to feed into the metacalibration() func... | 329 | 34.98 | 177 | 21 | 3,439 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_663a8365f6359c7e_a9feff94", "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"
] | [
262
] | [
262
] | [
9
] | [
32
] | [
"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_generation.py | /scripts/Metacalibration/data_generation.py | sidneymau/shear-estimator-sensitivity | MIT | |
2024-11-19T03:10:51.900769+00:00 | 1,595,597,877,000 | aad4678f80aa0be2e24699db1cb02c787fa8ffae | 2 | {
"blob_id": "aad4678f80aa0be2e24699db1cb02c787fa8ffae",
"branch_name": "refs/heads/master",
"committer_date": 1595597877000,
"content_id": "a6ae0d5e37cab8b42f1b5febcb3ec5a8c7b9c5d8",
"detected_licenses": [
"MIT"
],
"directory_id": "34181f7e5bd68a5a8734c96a72e6a391babd0aa8",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : package_service.py
# @Author: zaoshu
# @Date : 2020-06-19
# @Desc :
import os
import tarfile
import time
from jinja2 import Template
from pynpm import NPMPackage
from common.cmd_util import CmdUtil
from common.constant import BuildType
from common.exception i... | 131 | 33.9 | 90 | 21 | 1,038 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_d2a409edc8a69fce_af5049e8", "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... | 6 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
32,
48
] | [
32,
50
] | [
22,
26
] | [
75,
14
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"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 direct use of jinja2. If n... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | package_service.py | /service/package_service.py | LianGee/galio | MIT | |
2024-11-19T03:21:49.069264+00:00 | 1,492,709,799,000 | 18333b7a88d7b8093a919cf66e300f2e347b6c1d | 3 | {
"blob_id": "18333b7a88d7b8093a919cf66e300f2e347b6c1d",
"branch_name": "refs/heads/master",
"committer_date": 1492709799000,
"content_id": "12a5f9af14f69d3edabbf3c495a20f93c432e999",
"detected_licenses": [
"MIT"
],
"directory_id": "098fac45e07f4b3b6cd86eddfb769af97cb26b29",
"extension": "py",
"fi... | 2.703125 | stackv2 | import MySQLdb
from VSdatabase import *
def check_user(username, password):
found_user = False
db = connect_to_mysql()
cursor = db.cursor()
cursor.execute("SELECT * FROM users")
for row in cursor.fetchall():
if username==row[0] and password==row[1]:
found_user = True
break
db.close()
return found_user
... | 38 | 20.45 | 69 | 11 | 207 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_fec070cce6692de0_e29a820e", "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... | 4 | true | [
"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"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH"
] | [
24,
24,
34,
34
] | [
24,
24,
34,
34
] | [
3,
3,
3,
3
] | [
28,
28,
28,
28
] | [
"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
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | VSauthenticate.py | /VSauthenticate.py | sagarmanchanda/video-search | MIT | |
2024-11-19T03:21:52.136272+00:00 | 1,684,497,112,000 | 79502373d27a645b2ddb8fe32993af10bebbb29f | 2 | {
"blob_id": "79502373d27a645b2ddb8fe32993af10bebbb29f",
"branch_name": "refs/heads/master",
"committer_date": 1684497112000,
"content_id": "33ef83deffedbf62b9ef48772705dce0fe042ed0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ca94071518d3cc097d711628ed82abbdc9202769",
"extension": "py"... | 2.453125 | stackv2 | # Copyright (C) 2022 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 36 | 34.28 | 81 | 8 | 271 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_7a5d514178b6f08d_975ff156", "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"
] | [
21
] | [
21
] | [
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"
] | include_parser.py | /vulkan_generator/vulkan_parser/internal/include_parser.py | google/agi | Apache-2.0 | |
2024-11-19T03:22:08.978133+00:00 | 1,636,187,200,000 | 2f9c5fcb32da61edf5941066e7e4bf4a56e18e1e | 3 | {
"blob_id": "2f9c5fcb32da61edf5941066e7e4bf4a56e18e1e",
"branch_name": "refs/heads/master",
"committer_date": 1636187200000,
"content_id": "1be99f94849e457cff965bac1e8a0a3f9075530e",
"detected_licenses": [
"MIT"
],
"directory_id": "9b380852eb7ea4576d1e89c3be2c98d53f4289b4",
"extension": "py",
"fi... | 2.75 | stackv2 | import numpy as np
import os
from xml.etree import ElementTree
class XML_preprocessor(object):
def __init__(self, data_path):
self.path_prefix = data_path
self.data = []
self._preprocess_XML()
def _preprocess_XML(self):
filenames = os.listdir(self.path_prefix)
# filen... | 65 | 38.42 | 120 | 29 | 591 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8c7381f9d709c289_72722c38", "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,
23
] | [
3,
23
] | [
1,
20
] | [
34,
66
] | [
"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"
] | xml_to_data.py | /xml_to_data.py | ZzzzzZXxxX/yolo3_keras_Flag_Detection | MIT | |
2024-11-19T03:22:21.528401+00:00 | 1,607,942,108,000 | 035bdcb9dd6f3c6650109652e945953b114752d4 | 3 | {
"blob_id": "035bdcb9dd6f3c6650109652e945953b114752d4",
"branch_name": "refs/heads/master",
"committer_date": 1607942108000,
"content_id": "fd69437111b965098f718c051f82faf146ec598c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0c26eea3728f84b84d09a8a5cf8462acf07c970e",
"extension": "py"... | 2.546875 | stackv2 | import argparse
import os
import pickle
from sklearn.datasets import load_iris
from sklearn.svm import SVC
from sklearn.model_selection import cross_val_score, StratifiedKFold
from maggot.experiment import Experiment
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser... | 59 | 25.66 | 79 | 16 | 371 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4458b4502d439f73_fcfe3dfe", "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"
] | [
59
] | [
59
] | [
9
] | [
30
] | [
"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"
] | iris_sklearn.py | /examples/iris_sklearn.py | ex4sperans/maggot | Apache-2.0 | |
2024-11-19T03:43:50.582326+00:00 | 1,580,452,155,000 | 94e4a8cf07d2e4b80b755337a5cd058ef8ac0df0 | 2 | {
"blob_id": "94e4a8cf07d2e4b80b755337a5cd058ef8ac0df0",
"branch_name": "refs/heads/master",
"committer_date": 1580452155000,
"content_id": "fafb2a44b5546b57e7b9a0e1b258ffe1c56e7342",
"detected_licenses": [
"MIT"
],
"directory_id": "5550f2e47a30348f17b0b72a70baa6ce26a41dc8",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 26 15:33:23 2018
@author: ken
"""
import subprocess
import pickle
import glob
import numpy as np
from util import *
import argparse
parser = argparse.ArgumentParser(description='Train a Fast R-CNN network')
parser.add_argument('--topx', dest='topx... | 123 | 27.59 | 97 | 15 | 845 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a4b1a8d1b583d240_5749708c", "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... | 15 | true | [
"CWE-502",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"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",
"rules.python.lang.security.audit.dangerous-su... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | [
56,
110,
110,
110,
111,
111,
111,
115,
115,
115,
121
] | [
56,
110,
110,
110,
111,
111,
111,
115,
115,
115,
121
] | [
22,
1,
17,
58,
1,
17,
62,
9,
25,
74,
5
] | [
36,
63,
50,
62,
67,
52,
66,
79,
65,
78,
62
] | [
"A08:2017 - Insecure Deserialization",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"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.",
"Detected subprocess function 'call' without a s... | [
5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
5
] | [
"LOW",
"LOW",
"MEDIUM",
"HIGH",
"LOW",
"MEDIUM",
"HIGH",
"LOW",
"MEDIUM",
"HIGH",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"LOW",
"HIGH",
"MEDIUM",
"LOW",
"HIGH",
"MEDIUM",
"LOW",
"MEDIUM"
] | cull_confusion.py | /cull_confusion.py | kentaroy47/DatasetCulling | MIT | |
2024-11-19T03:43:53.315530+00:00 | 1,563,375,498,000 | 8fa6c8f4a7b37a158a8496f3e4bddccd3bd57837 | 3 | {
"blob_id": "8fa6c8f4a7b37a158a8496f3e4bddccd3bd57837",
"branch_name": "refs/heads/master",
"committer_date": 1563375498000,
"content_id": "ced88f485eb8aebb245a8bcf48ad569b3bfd67a1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "947d3734faa92b3d607f48ad27d6db3f2831d591",
"extension": "py"... | 2.6875 | stackv2 | # from flask import Flask
from flask import Flask, render_template, request, jsonify
from redis import Redis, RedisError
import os
import socket
import json
# Connect to Redis
redis = Redis(host="redis", db=0, socket_connect_timeout=2, socket_timeout=2)
app = Flask(__name__)
task_list = ['1','2']
task_key = "Kay'... | 64 | 24.67 | 101 | 12 | 437 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.directly-returned-format-string_4704a2c8a9fb8a40_9e477d36", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.directly-returned-format-string", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected Fl... | 2 | true | [
"CWE-79"
] | [
"rules.python.flask.security.audit.directly-returned-format-string"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
42
] | [
42
] | [
9
] | [
73
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected Flask route directly returning a formatted string. This is subject to cross-site scripting if user input can reach the string. Consider using the template engine instead and rendering pages with 'render_template()'."
] | [
5
] | [
"HIGH"
] | [
"MEDIUM"
] | app.py | /docs/basic website 2019.6.28/app.py | Cloud-PG/experiment-kube-services | Apache-2.0 | |
2024-11-19T03:43:54.207046+00:00 | 1,539,897,363,000 | aabb1b87091b9c8b1005e8f7751c92dfdaa3cd46 | 3 | {
"blob_id": "aabb1b87091b9c8b1005e8f7751c92dfdaa3cd46",
"branch_name": "refs/heads/master",
"committer_date": 1539897363000,
"content_id": "37789b979a0d40155679905055cf09e4e7958671",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "47c6295d16a5a546f5aca8a4ace2ed4b5e753a53",
"extension": "p... | 3.4375 | stackv2 | """ Methods for working with urllib scraping web pages """
import xml.etree.ElementTree as ET
import urllib.request
def rfindta(el, r, tag, attr):
""" Recursively find tags with value tag and attribute attr and append to list r """
if len(el) > 0:
for c in el:
rfindta(c, r, tag, attr)
... | 42 | 24.95 | 88 | 15 | 276 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_0c646f42ae8a2f12_556202c7", "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... | 4 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
3
] | [
3
] | [
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"
] | url_utils.py | /cdippy/url_utils.py | wdar/cdippy | BSD-3-Clause | |
2024-11-19T03:43:54.706001+00:00 | 1,483,928,847,000 | b9329c298b688bf54c6adadc3aa8d0a1696f7eed | 3 | {
"blob_id": "b9329c298b688bf54c6adadc3aa8d0a1696f7eed",
"branch_name": "refs/heads/master",
"committer_date": 1483929302000,
"content_id": "dd79fc481bf88b46031384c5de007839923e99dc",
"detected_licenses": [
"MIT"
],
"directory_id": "2799036e6d2655375aeebc06b0093940e21612f1",
"extension": "py",
"fi... | 2.984375 | stackv2 | #!/usr/bin/env python
"""
ConnMenu: a simple SSH connection menu
Author: Blake Buckalew
Version: 1
Description: A simple console-based SSH connection menu, fed by an INI style configuration file
Usage: Just execute it. Optionally provide a configuration file as an argument.
Dependencies: cursesmenu (pip install curses-... | 97 | 23.89 | 98 | 17 | 610 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_082f32b15f852935_b5019be9", "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"
] | [
88,
91
] | [
88,
91
] | [
9,
5
] | [
99,
41
] | [
"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"
] | connmenu.py | /connmenu.py | phlegmatick/connmenu | MIT | |
2024-11-19T03:43:56.717343+00:00 | 1,579,546,453,000 | 71448c296181841b8db9adcee25052bf37f30447 | 3 | {
"blob_id": "71448c296181841b8db9adcee25052bf37f30447",
"branch_name": "refs/heads/master",
"committer_date": 1579546453000,
"content_id": "d6a312cd31cd35dfb83d7d4e1fa3943fe04bc42d",
"detected_licenses": [
"MIT"
],
"directory_id": "5e7ebb00dc871fe3605c2f8c789d721c531ed7e3",
"extension": "py",
"fi... | 2.640625 | stackv2 | """ Security Related things """
from functools import wraps
from flask import request
from flask_restplus import abort
from flask_jwt_extended import verify_jwt_in_request, get_jwt_claims
import jwt
def require_auth(func):
""" Secure method decorator """
@wraps(func)
def wrapper(*args, **kwargs):
... | 44 | 23.95 | 68 | 14 | 232 | python | [{"finding_id": "semgrep_rules.python.jwt.security.audit.jwt-python-exposed-data_35e5103bb723a774_f02055a8", "tool_name": "semgrep", "rule_id": "rules.python.jwt.security.audit.jwt-python-exposed-data", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The object is passed strictly to j... | 1 | true | [
"CWE-522"
] | [
"rules.python.jwt.security.audit.jwt-python-exposed-data"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
40
] | [
40
] | [
12
] | [
50
] | [
"A02:2017 - Broken Authentication"
] | [
"The object is passed strictly to jwt.encode(...) Make sure that sensitive information is not exposed through JWT token payload."
] | [
5
] | [
"LOW"
] | [
"LOW"
] | security.py | /app/api/security.py | joeyzhou98/TheStars354 | MIT | |
2024-11-19T03:43:56.776402+00:00 | 1,630,325,451,000 | 03c4764c544358feee30778b3e04820687ead0d4 | 3 | {
"blob_id": "03c4764c544358feee30778b3e04820687ead0d4",
"branch_name": "refs/heads/main",
"committer_date": 1630325451000,
"content_id": "7ad37e20f50e409b14149f7130dde8d239b74b0b",
"detected_licenses": [
"MIT"
],
"directory_id": "de955b1c1f4e468bf01d0e8761a06b0c86e6858d",
"extension": "py",
"file... | 3.171875 | stackv2 | import numpy as np
from Utils.log_handler import log_to_console
"""
Module handles the transfer ports for the APPL block
"""
class Port:
"""
class that describes the port for transferring data
"""
arr = None
def __init__(self, name: str, size: int, port_type: str, is_image: bool) -> None:
... | 109 | 26.56 | 100 | 16 | 728 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_e72dae53ec863c11_3208f660", "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 ... | 3 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
50
] | [
50
] | [
41
] | [
65
] | [
"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"
] | port.py | /Application/Frame/port.py | cristi161/eecvf | MIT | |
2024-11-19T03:43:59.772068+00:00 | 1,624,634,900,000 | 78fdfb2cb66a3c9536ce42825f1194b78b3dcc4e | 2 | {
"blob_id": "78fdfb2cb66a3c9536ce42825f1194b78b3dcc4e",
"branch_name": "refs/heads/main",
"committer_date": 1624634900000,
"content_id": "0f7a64f34f623ff532fd404072c5bc2c79839163",
"detected_licenses": [
"MIT"
],
"directory_id": "ac5927437e1f3158f5fd4ef7bbebb106dc8ba307",
"extension": "py",
"file... | 2.34375 | stackv2 | import subprocess
import logging
import json
def get_tag_list(repo):
logging.info("Fetching tag list form " + repo)
command = ["crane", "ls", repo]
resp = subprocess.check_output(command)
return [item for item in resp.decode("UTF-8").split('\n') if len(item.strip()) > 0]
def copy_image_tag(source, t... | 40 | 30.57 | 87 | 13 | 308 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c9b84290f191be67_298b4c8f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 5 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.danger... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
9,
16,
23,
31,
39
] | [
9,
16,
23,
31,
39
] | [
12,
12,
23,
23,
23
] | [
44,
44,
57,
57,
57
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"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()'.",
"Detected subproces... | [
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | crane.py | /franken/crane.py | fleeto/image-sync | MIT | |
2024-11-19T03:44:02.755638+00:00 | 1,581,756,882,000 | 993a19cd4c7c2fadfd13b07ad8708c023e758edd | 2 | {
"blob_id": "993a19cd4c7c2fadfd13b07ad8708c023e758edd",
"branch_name": "refs/heads/master",
"committer_date": 1581756882000,
"content_id": "0e47f68be2d6dc5336fb3843d93ea464a7a67a4f",
"detected_licenses": [
"MIT"
],
"directory_id": "439b136e7fff2cb03225b0d854b27e633951a570",
"extension": "py",
"fi... | 2.34375 | stackv2 | import zipfile
import shutil
import os
import uuid
import re
import pwd
import grp
import json
import os.path as path
from logger import logger
import subprocess
def zip_files(zip_file_name, saved_dir, files_to_zip):
logger.info("zip files as [{}] to [{}]".format(zip_file_name, saved_dir))
with zipfile.ZipFile... | 147 | 40.8 | 121 | 22 | 1,407 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3bfd20219ed77853_08c55f48", "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... | 5 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
129
] | [
130
] | [
14
] | [
94
] | [
"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"
] | utils.py | /bin/utils.py | X20435668/cs5331_project | MIT | |
2024-11-19T03:44:02.921303+00:00 | 1,605,078,002,000 | a1b94fd511dd02dfb19673bbce97c6a6a798981e | 2 | {
"blob_id": "a1b94fd511dd02dfb19673bbce97c6a6a798981e",
"branch_name": "refs/heads/master",
"committer_date": 1605078002000,
"content_id": "c0a83015a1909fc10987c4c8054164397f2b5b7e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e44301fb87ecce8defe68fdaa5f540753e8dbccf",
"extension": "py"... | 2.40625 | stackv2 | import glob
import os
import random
import socket
import subprocess
import uuid
from typing import AnyStr, Set, Dict
import arrow
from flask import request
from actor_libs.errors import ParameterInvalid
def generate_uuid(size=32, str_type='char') -> str:
"""
Generate 32 bit uuid
"""
if str_type == ... | 187 | 28.33 | 94 | 17 | 1,278 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-uuid-version_28ed22d3ba813ae7_6cbb286e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-uuid-version", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Using UUID version 1 for UUID generation can ... | 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-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
72,
79,
79
] | [
74,
79,
79
] | [
28,
13,
44
] | [
14,
49,
48
] | [
"A01:2017 - Injection",
"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()'.",
"Detected subproces... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"HIGH"
] | [
"HIGH",
"HIGH",
"LOW"
] | utils.py | /server/actor_libs/utils.py | dlsurainflow/actorcloud_BE | Apache-2.0 | |
2024-11-19T03:44:10.570467+00:00 | 1,624,710,415,000 | c1ce7f2b60540c0ebae7f34de250b6d0f1c7efef | 3 | {
"blob_id": "c1ce7f2b60540c0ebae7f34de250b6d0f1c7efef",
"branch_name": "refs/heads/main",
"committer_date": 1624710415000,
"content_id": "f74cfd0346d92ca9acb430da8e67b4125c5280ad",
"detected_licenses": [
"MIT"
],
"directory_id": "c0bb8297f80d771c2894ce472b600c1da0968cbf",
"extension": "py",
"file... | 2.53125 | stackv2 | from tkinter import *
import sqlite3
#import matplotlib.pyplot as plt
#import pandas as pd
from datetime import *
from tkinter import messagebox
#root=Tk()
#root.configure(bg='gray27')
#root.title('EPMS')
#conn=sqlite3.connect('epms.db')
def main():
def emp():
def back():
top.destroy... | 365 | 37.84 | 170 | 21 | 3,682 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_b9baa2f1a28a849d_7fc0ea21", "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"
] | [
126,
134
] | [
126,
134
] | [
17,
17
] | [
82,
80
] | [
"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"
] | EPMS_DBMS.py | /EPMS_DBMS.py | Nishit014/EPMS-DBMS | MIT | |
2024-11-19T03:44:10.790500+00:00 | 1,648,832,652,000 | 030179100d0415823a1375e8d9c9e25f2577a6f3 | 2 | {
"blob_id": "030179100d0415823a1375e8d9c9e25f2577a6f3",
"branch_name": "refs/heads/main",
"committer_date": 1648832652000,
"content_id": "e0120bc6a1849de66cc125c6c8e8e995bfcf8b3e",
"detected_licenses": [
"MIT"
],
"directory_id": "0f6db051f895b5f4621610c9f84eb678e83629bf",
"extension": "py",
"file... | 2.5 | stackv2 | import logging
from stock_data_provider import create_dataframe, filter_dataframe
from stock_data_provider.utils import get_data_globals
class IndicatorCollect(object):
def __init__(self, indicator_script):
self.indicator_script_ = indicator_script
def _get_buildin_values(self):
return {}
... | 25 | 31.44 | 109 | 13 | 151 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_0831554a56bf5985_97ba6518", "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
] | [
33
] | [
75
] | [
"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"
] | indicator_collect.py | /src/learn/indicator_collect.py | stonewell/learn-curve | MIT | |
2024-11-19T03:44:21.972402+00:00 | 1,559,411,478,000 | 1292c5f2df82c8c449accb4f0cb62ce9ee04f8ed | 3 | {
"blob_id": "1292c5f2df82c8c449accb4f0cb62ce9ee04f8ed",
"branch_name": "refs/heads/master",
"committer_date": 1559411478000,
"content_id": "4ace15f34fea3e4a4802474add8cea4ca5d8fa64",
"detected_licenses": [
"MIT"
],
"directory_id": "1510ff57d12341ad039260b664659809fa0871c3",
"extension": "py",
"fi... | 3.03125 | stackv2 | from huffman import *
import struct
import pickle
import array
def bits_to_bytes(bits):
length = len(bits)
padding = 8 - (length % 8)
bits += [0] * padding
result = []
for i in range(0, len(bits), 8):
b = bits[i:i+8]
result.append(int(''.join([str(x) for x in b]), 2))
return res... | 45 | 28.49 | 86 | 16 | 346 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fa212822c368c45e_98779507", "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"
] | [
28,
41
] | [
28,
41
] | [
20,
12
] | [
38,
87
] | [
"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"
] | utils.py | /utils.py | crescat/huffman | MIT | |
2024-11-19T03:44:22.400163+00:00 | 1,664,344,420,000 | 77871b027c66046e46c27b1a698944afb4417dad | 2 | {
"blob_id": "77871b027c66046e46c27b1a698944afb4417dad",
"branch_name": "refs/heads/master",
"committer_date": 1664344420000,
"content_id": "bc90f8568b6e608db100894ce28679980db85c50",
"detected_licenses": [
"MIT"
],
"directory_id": "ce2841479ca5ba498162f163064f53c7189bf6e7",
"extension": "py",
"fi... | 2.453125 | stackv2 | # -*- coding: utf-8 -*-
"""
Some class extensions from keras needed for run_ann.py
Created on Mon Dec 14 10:32:51 2020
@author: lbechberger
"""
import tensorflow as tf
import time, pickle
import cv2
import numpy as np
import csv, os
# based on https://stackoverflow.com/questions/55653940/how-do-i-implement-salt-pep... | 285 | 40.28 | 176 | 20 | 2,668 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_451d6e16fe59fd1f_053b9a61", "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"
] | [
135
] | [
135
] | [
13
] | [
107
] | [
"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"
] | keras_utils.py | /code/ml/ann/keras_utils.py | lbechberger/LearningPsychologicalSpaces | MIT | |
2024-11-19T03:44:23.009376+00:00 | 1,634,718,162,000 | 81b1f27a2dc7171fc902a41b4bb936f4e712428c | 3 | {
"blob_id": "81b1f27a2dc7171fc902a41b4bb936f4e712428c",
"branch_name": "refs/heads/master",
"committer_date": 1634718162000,
"content_id": "d39774f5374672b40d957c09ee4c5e33a448ecbf",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7e2c32ba97d081f363d494720047f5d537efe7ae",
"extension": "py"... | 2.625 | stackv2 | import os
import subprocess
import tempfile
from pathlib import Path
from util import run
def be_absent(path):
path = Path(path)
if path.is_symlink():
path.unlink()
elif path.is_file():
path.unlink()
elif path.is_dir():
path.rmdir()
# XXX: should we `shutil.rmtree(path... | 114 | 25.18 | 82 | 15 | 762 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_199d9c308a8160ee_cf607cd4", "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"
] | [
62,
63
] | [
64,
63
] | [
11,
51
] | [
6,
55
] | [
"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()'.",
"Found 'subprocess' function... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | declarative.py | /declarative.py | AliDotS/rawfile-localpv | Apache-2.0 | |
2024-11-19T03:44:23.125569+00:00 | 1,552,117,300,000 | 387d2d3d26733b9e53a92418a1e42117466d2290 | 2 | {
"blob_id": "387d2d3d26733b9e53a92418a1e42117466d2290",
"branch_name": "refs/heads/master",
"committer_date": 1552117300000,
"content_id": "8f51ab3873156ece717008ea56334e750bafe33c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6c96601d64a02c4050410c5e45efa6e1bd8253f6",
"extension": "py"... | 2.390625 | stackv2 | import os
import os.path
import re
import logging
import jinja2
from io import StringIO
from .utils import (
get_meta_name_and_modifiers, html_escape, split_page_url, get_url_tail)
RE_FILE_FORMAT = re.compile(r'\r\n?', re.MULTILINE)
RE_META_SINGLE_LINE = re.compile(
r'^\{\{(?P<name>(__|\+)?[a-zA-Z][a-zA-Z0-9... | 294 | 35.51 | 79 | 21 | 2,593 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_272051d1d19ab877_c7c71613", "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"
] | [
272,
272
] | [
272,
272
] | [
15,
15
] | [
35,
35
] | [
"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"
] | formatter.py | /wikked/formatter.py | ludovicchabant/Wikked | Apache-2.0 | |
2024-11-19T03:44:27.256797+00:00 | 1,590,926,660,000 | d4e083206f9b0870e63a334eb0c70c532de09e3c | 3 | {
"blob_id": "d4e083206f9b0870e63a334eb0c70c532de09e3c",
"branch_name": "refs/heads/master",
"committer_date": 1590926660000,
"content_id": "d0872da1b5772dda5ef77d3398edea2a6069bccf",
"detected_licenses": [
"MIT"
],
"directory_id": "aa3c436d5e07434d1d366b7f14fc55aebd756225",
"extension": "py",
"fi... | 3.265625 | stackv2 | import nltk
from nltk.tokenize import word_tokenize
# nltk.download('punkt')
import pickle as pkl
def add(a,b):
return a+b
def div(a, b):
# try:
# c = a/b
# return c
# except ZeroDivisionError as error:
# return "Error"
if b ==0:
raise ValueError("Cant be zero")
ret... | 49 | 19.84 | 66 | 11 | 295 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0f276c9e06f8c54c_b22b4f17", "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"
] | [
26
] | [
26
] | [
17
] | [
35
] | [
"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"
] | some_functions.py | /UnitTestCase/some_functions.py | shivam-kotwalia/python_snippets | MIT | |
2024-11-19T03:44:28.126010+00:00 | 1,631,676,139,000 | 68d07705e60dd002cc405ad4271d9ed55b8893d4 | 2 | {
"blob_id": "68d07705e60dd002cc405ad4271d9ed55b8893d4",
"branch_name": "refs/heads/main",
"committer_date": 1631676139000,
"content_id": "fd236df3aeef8b792e64ed35b228c519a04fc185",
"detected_licenses": [
"MIT"
],
"directory_id": "da786913f671da8928fd64b7bad529070b970190",
"extension": "py",
"file... | 2.40625 | stackv2 | #coding:utf8
'''
1、从raw AndroidManifest.xml文件或APK文件中获取暴露组件
2、从raw AndroidManifest.xml文件或APK文件中获取明文AndroidManifest.xml
'''
# 加密zip ChilkatZip
#from .axmlprinter import AXMLPrinter
from .axml import AXMLPrinter
import zipfile,json
from io import StringIO, BytesIO
from struct import pack, unpack
from xml.dom import mi... | 362 | 35.66 | 115 | 20 | 2,662 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_d1431060a14fda07_1cc7102d", "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"
] | [
16
] | [
16
] | [
1
] | [
28
] | [
"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"
] | apk.py | /inter/apkcookpy/lib/apk.py | zzzzfeng/amonkey | MIT | |
2024-11-19T03:44:29.002055+00:00 | 1,689,340,333,000 | 15c7b7b5e50fb44c2b5d3f727facb264d97c2df2 | 3 | {
"blob_id": "15c7b7b5e50fb44c2b5d3f727facb264d97c2df2",
"branch_name": "refs/heads/master",
"committer_date": 1689340333000,
"content_id": "901246871adfcf558365d1b7603b8203d76794ca",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "879722f7047c00611bb563195641a330869f72a0",
"extension": "p... | 2.515625 | stackv2 | """Parsers for extracting alchemical data from `GOMC <http://gomc.eng.wayne.edu/>`_ output files.
"""
import pandas as pd
from . import _init_attrs
from .util import anyopen
from ..postprocessors.units import R_kJmol
k_b = R_kJmol
@_init_attrs
def extract_u_nk(filename, T):
"""Return reduced potentials `u_nk` ... | 246 | 27.07 | 97 | 21 | 1,736 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_c4435be5f2790115_8a70480e", "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 ... | 2 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
72,
201
] | [
72,
201
] | [
17,
28
] | [
46,
63
] | [
"A03:2021 - Injection",
"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.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | gomc.py | /src/alchemlyb/parsing/gomc.py | alchemistry/alchemlyb | BSD-3-Clause | |
2024-11-19T03:44:35.286125+00:00 | 1,624,652,009,000 | 67643d14671852d7f9696a9db67264a66455c320 | 3 | {
"blob_id": "67643d14671852d7f9696a9db67264a66455c320",
"branch_name": "refs/heads/master",
"committer_date": 1624652009000,
"content_id": "918c5eb20f49db902dfcd617872c6fa5d44b2884",
"detected_licenses": [
"MIT"
],
"directory_id": "ef1ed26c9fb428c514bf16787eda02ce18f5ca22",
"extension": "py",
"fi... | 2.734375 | stackv2 | # -*- coding: UTF-8 -*-
'''
'''
import requests
import time
import threading
import urllib3
from fake_headers import Headers
import uuid
from geolite2 import geolite2
ips = []
# 爬数据的线程类
def getChinaIP(ip='127.0.0.1'):
reader = geolite2.reader()
ip_info = reader.get(ip)
geolite2.close()
print(ip_info)... | 95 | 29.35 | 140 | 20 | 826 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-uuid-version_9ff012688482d6ec_006330de", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-uuid-version", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Using UUID version 1 for UUID generation can ... | 6 | true | [
"CWE-295"
] | [
"rules.python.requests.security.disabled-cert-validation"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
49
] | [
50
] | [
16
] | [
124
] | [
"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"
] | usage2.py | /examples/usage2.py | k8scat/ProxyPool | MIT | |
2024-11-19T01:44:03.328681+00:00 | 1,693,837,533,000 | 3e269c08fb9ddb7a1433d32239728191bd82d352 | 2 | {
"blob_id": "3e269c08fb9ddb7a1433d32239728191bd82d352",
"branch_name": "refs/heads/master",
"committer_date": 1693837533000,
"content_id": "0ab0c7ad37d92471ad7dca858412d620fd1e1135",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8da41ffa2ccb09e04f95db0f211e0ed69a42a352",
"extension": "py"... | 2.4375 | stackv2 | #!/usr/bin/env python
import apache_beam as beam
import argparse
import datetime
import logging
import os
def to_csv(rowdict):
# Pull columns from BQ and create a line
import hashlib
import copy
CSV_COLUMNS = 'weight_pounds,is_male,mother_age,plurality,gestation_weeks'.split(',')
# Create synthetic data w... | 136 | 33.32 | 132 | 21 | 1,195 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.sha224-hash_46b0e2a66b1ecedd_039e14a5", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.sha224-hash", "finding_type": "security", "severity": "medium", "confidence": "high", "message": "This code uses a 224-bit hash function, which is deprec... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
54
] | [
55
] | [
9
] | [
60
] | [
"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"
] | transform.py | /courses/machine_learning/deepdive/05_review/pipelines/containers/bqtocsv/transform.py | GoogleCloudPlatform/training-data-analyst | Apache-2.0 | |
2024-11-19T01:44:08.693074+00:00 | 1,480,699,411,000 | b597681a50e72e951e70847468dfdaa71dcc762e | 2 | {
"blob_id": "b597681a50e72e951e70847468dfdaa71dcc762e",
"branch_name": "refs/heads/master",
"committer_date": 1480699411000,
"content_id": "604d28d0501b889a589fccc661856bc35f65ba21",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a3a8f4f4caf0fde77e3ac72c5210f6170b90c67b",
"extension": "py"... | 2.4375 | stackv2 | import operator
from collections import defaultdict
import numpy as np
from speaker_recognition.gmm.pygmm import GMM
class GMMSet(object):
def __init__(self, gmm_order=32, ubm=None, reject_threshold=10, **kwargs):
self.kwargs = kwargs
self.gmms = []
self.ubm = ubm
self.reject_th... | 85 | 29.94 | 78 | 14 | 714 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_efd39f95e6c1a56f_bc1aa7b0", "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 ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
70
] | [
70
] | [
13
] | [
47
] | [
"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"
] | gmmset.py | /speaker_recognition/gmmset.py | patengelbert/speaker-recognition | Apache-2.0 | |
2024-11-19T01:44:09.749302+00:00 | 1,587,656,272,000 | 1b6bd6d3d324b5143ce6357ad2584f98deef3c5c | 3 | {
"blob_id": "1b6bd6d3d324b5143ce6357ad2584f98deef3c5c",
"branch_name": "refs/heads/master",
"committer_date": 1587656272000,
"content_id": "f81f383cc03571d4087b9faff88e3956136ad64e",
"detected_licenses": [
"MIT"
],
"directory_id": "515a48fe61576c37ce2b0b1cb76a5e2fc3af466d",
"extension": "py",
"fi... | 2.65625 | stackv2 | import os
import shutil
import sublime
import subprocess
import threading
from sublime_lib import ActivityIndicator, ResourcePath
def run_command(on_exit, on_error, popen_args):
"""
Runs the given args in a subprocess.Popen, and then calls the function
on_exit when the subprocess completes.
on_exit i... | 132 | 35.95 | 109 | 17 | 997 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_5e29de39570bcae4_19277680", "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"
] | [
20
] | [
20
] | [
13
] | [
85
] | [
"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"
] | server_npm_resource.py | /lsp_utils/st3/lsp_utils/server_npm_resource.py | seasofttongkhanh/SublimetextBackup | MIT | |
2024-11-19T02:08:18.170923+00:00 | 1,623,859,416,000 | d11deed3becdd8c428b37fc6ff2913eb8c57b807 | 2 | {
"blob_id": "d11deed3becdd8c428b37fc6ff2913eb8c57b807",
"branch_name": "refs/heads/main",
"committer_date": 1623859416000,
"content_id": "4e592b4bddd47b1c32ea739ecf8f1d3126be9f5c",
"detected_licenses": [
"MIT"
],
"directory_id": "780a1de36e31ef86688d7e957cbb7fcc107e2c6a",
"extension": "py",
"file... | 2.421875 | stackv2 | import xml.etree.ElementTree as ET
import os
def create_base_xml(original_file_path, tile, name):
tree = ET.ElementTree()
root = ET.Element("annotation")
folder = ET.SubElement(root, "folder")
folder.text = str(original_file_path)
filename = ET.SubElement(root, "filename")
filename.text = str(name)
path ... | 49 | 33.29 | 56 | 13 | 444 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_40950a98cf48d47d_6f299d7d", "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"
] | [
1
] | [
1
] | [
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"
] | xml_tools.py | /src/xml_tools.py | agustinroviraquezada/PAIthology | MIT | |
2024-11-19T02:08:18.494516+00:00 | 1,615,818,467,000 | 37b5c7cf204b4892ddb268f357daa20d58c6559d | 2 | {
"blob_id": "37b5c7cf204b4892ddb268f357daa20d58c6559d",
"branch_name": "refs/heads/master",
"committer_date": 1615818467000,
"content_id": "d038dfcd2b585e274fe036e6557618617de500e4",
"detected_licenses": [
"MIT"
],
"directory_id": "1c64fb8357978cc30d027c542e5d3c26d6c1598e",
"extension": "py",
"fi... | 2.4375 | stackv2 | import asyncio
import logging
from asyncio.protocols import BaseProtocol
from asyncio.transports import BaseTransport
from pathlib import Path
from typing import TYPE_CHECKING, Awaitable, List, Optional, Tuple
from cluster_fixture.base import (
DEFAULT_KAFKA_VERSION,
Component,
KafkaVersion,
get_jinja_... | 116 | 34.43 | 119 | 14 | 885 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_681a821cb00a2896_edaebfea", "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-78"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.lang.security.audit.dangerous-asyncio-exec-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
95,
98
] | [
95,
104
] | [
37,
16
] | [
61,
10
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A01:2017 - 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 subprocess function 'self.... | [
5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | zookeeper.py | /cluster_fixture/zookeeper.py | real-digital/esque-wire | MIT | |
2024-11-19T02:08:54.113019+00:00 | 1,672,657,043,000 | c86b32bc161fdd8fa8e49cca6989723ac1450901 | 2 | {
"blob_id": "c86b32bc161fdd8fa8e49cca6989723ac1450901",
"branch_name": "refs/heads/master",
"committer_date": 1672657043000,
"content_id": "c96a9b5b1ef9371a95d0e9e563136d0206b792a9",
"detected_licenses": [
"MIT"
],
"directory_id": "20edddd8c1968a6f38dbc34ac51f8004eabbc47e",
"extension": "py",
"fi... | 2.359375 | stackv2 | import os
import sys
from pathlib import Path
from subprocess import check_call, check_output
from tempfile import gettempdir, mkdtemp
from contextlib import contextmanager
import click
@click.command()
# Required arguments
@click.option('--path', '-p', help='Absolute path to the Devito executable.',
r... | 186 | 39.09 | 151 | 18 | 1,888 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_a4d41af5a17b0f47_ca35b158", "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.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
132,
136,
140,
156
] | [
132,
136,
140,
156
] | [
15,
15,
15,
19
] | [
33,
30,
30,
34
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"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()'.",
"Detected subprocess ... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | run_advisor.py | /data_generation/forward_model/devito/scripts/advisor/run_advisor.py | LukasMosser/SNIST | MIT | |
2024-11-19T02:08:57.095372+00:00 | 1,687,537,686,000 | 174c9843c56ea11f0f5a82f6346f740036738168 | 2 | {
"blob_id": "174c9843c56ea11f0f5a82f6346f740036738168",
"branch_name": "refs/heads/master",
"committer_date": 1687537686000,
"content_id": "bd2989021107e701c9bcedcea8516e738cfe3518",
"detected_licenses": [
"MIT"
],
"directory_id": "b4d15afbd768766c2701cdcb06d1302d7b3e0557",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/python3
import os
import yaml
from dateutil import parser
import datetime
import pytz
INPUT_DIR="/Users/pwagstro/Documents/workspace/web/engineer/posts"
OUTPUT_DIR="/Users/pwagstro/Documents/workspace/web/content/post"
TIMEZONE="US/Eastern"
OLD_TAGS=['status', 'timestamp', 'wordpress_id', 'layout', 'oldcat... | 78 | 27.94 | 102 | 15 | 580 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0f567706ca06c2c0_a934eb08", "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... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
74
] | [
74
] | [
9
] | [
83
] | [
"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."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | weblogmigrate.py | /helpers/weblogmigrate.py | pridkett/patrick.wagstrom.net | MIT | |
2024-11-19T02:21:21.744904+00:00 | 1,572,287,976,000 | 53b36162a6fc21e1ea14d4874fce0cd923baedac | 2 | {
"blob_id": "53b36162a6fc21e1ea14d4874fce0cd923baedac",
"branch_name": "refs/heads/master",
"committer_date": 1572287976000,
"content_id": "bbcef546f896c53fb1679c3fe94c181f129d635a",
"detected_licenses": [
"MIT"
],
"directory_id": "bfb18dd3218200ed5c7a3918848a838344514bd3",
"extension": "py",
"fi... | 2.484375 | stackv2 | import hashlib
import requests
import simplejson
import os
import sys
from flask import Flask, request, Response
if len(sys.argv) > 1:
SITE = sys.argv[1]
else:
SITE = "https://github.com/"
EXCLUDED_HEADERS = ['content-encoding', 'content-length', 'transfer-encoding', 'connection']
app = Flask(__name__)
... | 59 | 34.32 | 102 | 18 | 491 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-hash-algorithm-sha1_b5a455eefb1901ce_7705bb5e", "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... | 8 | true | [
"CWE-918"
] | [
"rules.python.flask.security.injection.ssrf-requests"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
42
] | [
42
] | [
12
] | [
44
] | [
"A10:2021 - Server-Side Request Forgery (SSRF)"
] | [
"Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox... | [
7.5
] | [
"MEDIUM"
] | [
"HIGH"
] | proxy.py | /proxy.py | JoaoFelipe/minicurso-mineracao-interativa | MIT | |
2024-11-19T02:21:22.499482+00:00 | 1,588,845,608,000 | 3b6284309e0c5de67159b2e8f3e4e4e1e431795f | 3 | {
"blob_id": "3b6284309e0c5de67159b2e8f3e4e4e1e431795f",
"branch_name": "refs/heads/master",
"committer_date": 1588845608000,
"content_id": "2623efa1eb585297379b83f5120c07e07adadcd5",
"detected_licenses": [
"MIT"
],
"directory_id": "7e583b67f1a3e73d7ed10a63372bcba70c3d4432",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Extract the parameters from the database to a parameter file.
The parameter file can be used to add a new equal simulation, but more usefully
modified to run a slightly different simulation.
"""
# Copyright (C) 2017-2019 Håkon Austlid Taskén <hakon.tasken@gmail.com>
# ... | 156 | 34.71 | 79 | 17 | 1,146 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_2142f673b7279b79_9d298c38", "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... | 6 | true | [
"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"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH"
] | [
119,
119,
125,
125
] | [
119,
119,
126,
126
] | [
5,
5,
5,
5
] | [
73,
73,
40,
40
] | [
"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
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | extract_params.py | /sim_db/src_command_line_tool/commands/extract_params.py | task123/sim_db | MIT | |
2024-11-19T02:21:23.627372+00:00 | 1,570,883,836,000 | ffa4dc9a0eb3bc4beebcd43283a042e031f7863b | 2 | {
"blob_id": "ffa4dc9a0eb3bc4beebcd43283a042e031f7863b",
"branch_name": "refs/heads/master",
"committer_date": 1570883836000,
"content_id": "befa3887c296ee5eca9076e3cc110c3498c85927",
"detected_licenses": [
"ISC"
],
"directory_id": "0a89cad9f98e5c014b4c6970c6a63d29c89bacbf",
"extension": "py",
"fi... | 2.328125 | stackv2 | """Backends for beamformed data streams."""
import sys
import os
import subprocess
import ilisa.observations.modeparms
import ilisa.observations.beamformedstreams
dumpername = 'dump_udp_ow_11'
pathtodumper = os.path.dirname(ilisa.observations.beamformedstreams.__file__)
dumpercmd = os.path.join(pathtodumper, dumpern... | 71 | 41.08 | 91 | 21 | 732 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_cf06a42d51c9b357_2e5f5e16", "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.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
44,
51
] | [
52,
51
] | [
5,
27
] | [
22,
31
] | [
"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"
] | bfbackend.py | /ilisa/observations/beamformedstreams/bfbackend.py | mpozoga/iLiSA | ISC | |
2024-11-19T02:21:27.052217+00:00 | 1,574,279,434,000 | 9a7c8fa68e38cfec151a0a4414bb9cd9dc842f56 | 3 | {
"blob_id": "9a7c8fa68e38cfec151a0a4414bb9cd9dc842f56",
"branch_name": "refs/heads/master",
"committer_date": 1574279434000,
"content_id": "e3313fdd4952172cdf39a2a0c77c07e5e74ad378",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "505ec45ef339f42f3e726a862a71b7f6fb4bcb5d",
"extension": "p... | 2.8125 | stackv2 | import subprocess
import threading
class RunCmd(threading.Thread):
p = None
def __init__(self, cmd, timeout):
threading.Thread.__init__(self)
self.cmd = cmd
self.timeout = timeout
def run(self):
self.p = subprocess.Popen(self.cmd)
self.p.wait()
def go(self):
... | 40 | 20.48 | 83 | 12 | 186 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_dab1684c7db30fc4_c88d97e8", "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"
] | [
14
] | [
14
] | [
18
] | [
44
] | [
"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"
] | runcmd.py | /slsf/runcmd.py | verivital/slsf_randgen | BSD-3-Clause | |
2024-11-19T02:21:27.294212+00:00 | 1,585,531,712,000 | 31269f19c17b9257520ee1c92c73f8c5a34647b7 | 3 | {
"blob_id": "31269f19c17b9257520ee1c92c73f8c5a34647b7",
"branch_name": "refs/heads/main",
"committer_date": 1585531712000,
"content_id": "1a3afd1765517480de2e082aab7ed0b326b450fa",
"detected_licenses": [
"MIT"
],
"directory_id": "ff2c286870bc93981dd60814e656792b81fee13e",
"extension": "py",
"file... | 2.828125 | stackv2 | import pandas as pd
import pickle
print('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n')
print('Starting data labelling...')
with open('cache/data_labeler_vars.pickle', 'rb') as f:
lastIndex, datajobs = pickle.load(f)
print('Starting from index: ' + str(lastIndex))
for i in range(lastIndex, datajobs.shape[0]):
prin... | 44 | 29.57 | 97 | 13 | 352 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_bce4aa575375dc8b_65b7b3a0", "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"
] | [
10,
44
] | [
10,
44
] | [
28,
5
] | [
42,
42
] | [
"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_labeler.py | /src/data/data_labeler.py | Actuent/classifier | MIT | |
2024-11-19T02:21:33.671012+00:00 | 1,496,257,813,000 | 960e2d1bbd26d891acd54f7c3b8e41ae50f7910b | 3 | {
"blob_id": "960e2d1bbd26d891acd54f7c3b8e41ae50f7910b",
"branch_name": "refs/heads/master",
"committer_date": 1496257813000,
"content_id": "4d1bf02193e5feb0ce553523b2b7030ad1af1888",
"detected_licenses": [
"Unlicense"
],
"directory_id": "ef3ac69163c04363f566e0e482ae5eefed66f27c",
"extension": "py",... | 2.828125 | stackv2 | print(__doc__)
import matplotlib.pyplot as plt
import numpy as np
import cPickle
from sklearn.neural_network import MLPClassifier
from sklearn import preprocessing
# rescale the data, use the traditional train/test split
# mlp = MLPClassifier(hidden_layer_sizes=(100, 100), max_iter=400, alpha=1e-4,
# ... | 30 | 33.73 | 88 | 9 | 291 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_59617b719337649e_40b052c2", "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"
] | [
14
] | [
14
] | [
8
] | [
54
] | [
"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"
] | nn.py | /519-DeepLearning/assignment1/NN/nn.py | neale/CS-program | Unlicense | |
2024-11-19T02:21:34.689664+00:00 | 1,495,587,612,000 | e0ce8c115846300582c9916fdff33c05229eb242 | 2 | {
"blob_id": "e0ce8c115846300582c9916fdff33c05229eb242",
"branch_name": "refs/heads/master",
"committer_date": 1495587612000,
"content_id": "6ea93894e43b02e9a415dc46c436d813906f6315",
"detected_licenses": [
"MIT"
],
"directory_id": "31ad37adc06bea5e17f79a86ab8bf266c9b6611e",
"extension": "py",
"fi... | 2.359375 | stackv2 | from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.http import HttpResponseServerError
from django.views.generic import ListView
from django.shortcuts import render
import urllib.request
import traceback
from .models import IngredientSpec, IgnoredWords, DataWayCooking, DataIn... | 217 | 37.09 | 121 | 27 | 1,499 | python | [{"finding_id": "semgrep_rules.python.django.security.injection.ssrf.ssrf-injection-urllib_0a34b79d02c376d4_9cbf3800", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.ssrf.ssrf-injection-urllib", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from req... | 4 | true | [
"CWE-918"
] | [
"rules.python.django.security.injection.ssrf.ssrf-injection-urllib"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
90
] | [
141
] | [
9
] | [
33
] | [
"A10:2021 - Server-Side Request Forgery (SSRF)"
] | [
"Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF), which could result in attackers gaining access to private organization data. To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the us... | [
7.5
] | [
"MEDIUM"
] | [
"HIGH"
] | views.py | /crawler/views.py | lucasgr7/silverplate | MIT | |
2024-11-19T02:21:37.084809+00:00 | 1,677,469,170,000 | cbc9c02d63f56c01987d84ca4d7ca405d56bd072 | 3 | {
"blob_id": "cbc9c02d63f56c01987d84ca4d7ca405d56bd072",
"branch_name": "refs/heads/master",
"committer_date": 1677469170000,
"content_id": "df9301db06568b9a4f4460269a895252cb93adb9",
"detected_licenses": [
"MIT"
],
"directory_id": "d226bbcd79145ddfcf7644ecd4d09585594f7f82",
"extension": "py",
"fi... | 2.625 | stackv2 | ## bcreader.py
## Author: Yangfeng Ji
## Date: 01-27-2015
## Time-stamp: <yangfeng 01/30/2015 22:16:26>
from cPickle import dump
import gzip
def reader(fname):
bcvocab = {}
with open(fname, 'r') as fin:
for line in fin:
items = line.strip().split('\t')
bcvocab[items[1]] = items... | 26 | 20.73 | 45 | 14 | 194 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3149b8f7f0589a35_b15bd4f2", "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-cPickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
20
] | [
20
] | [
9
] | [
26
] | [
"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"
] | bcreader.py | /resources/bcreader.py | jiyfeng/DPLP | MIT | |
2024-11-19T02:21:39.552149+00:00 | 1,543,290,678,000 | 46f9662a36627d8a4fd01f9d16094d1f91515d90 | 3 | {
"blob_id": "46f9662a36627d8a4fd01f9d16094d1f91515d90",
"branch_name": "refs/heads/master",
"committer_date": 1543290678000,
"content_id": "25d5f83c4e8af02e5ae24744c6399966e01bc54f",
"detected_licenses": [
"MIT"
],
"directory_id": "3a879d56cd5aa44189886342e9c036eb63fb4255",
"extension": "py",
"fi... | 3.25 | stackv2 | """Generate monochromatic backgrounds instantly"""
import argparse
import os
import re
from imgurpython import ImgurClient
from PIL import Image
import pyperclip
try:
import configparser
except ImportError:
import ConfigParser as configparser
FILE_NAME = 'monochromatic_backgrounds.png'
def create_image(siz... | 114 | 29.5 | 100 | 17 | 805 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3015011782190498_979cbbe9", "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-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
62
] | [
62
] | [
17
] | [
50
] | [
"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."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | chromatic.py | /chromatic/chromatic.py | danishprakash/chromatic | MIT | |
2024-11-19T02:46:43.954017+00:00 | 1,631,801,131,000 | 79ce80ec55d8e6be691970cb5e60ce61e6864bdc | 2 | {
"blob_id": "79ce80ec55d8e6be691970cb5e60ce61e6864bdc",
"branch_name": "refs/heads/main",
"committer_date": 1631801131000,
"content_id": "0cd8c0b554c22f942d70ef964f23b2d738b5b11b",
"detected_licenses": [
"MIT"
],
"directory_id": "6e55662e812d84baa5bd2879780dedab002bcaa3",
"extension": "py",
"file... | 2.40625 | stackv2 | import argparse
import json
import os
import re
import subprocess as sp
import sys
import tempfile
with open (os.environ.get("translatorsJsonFile")) as f:
translators = json.load(f)
def strip_hashes_from_lock(lock):
for source in lock['sources'].values():
del source['hash']
def list(args):
out = "Availa... | 195 | 23.29 | 97 | 15 | 1,160 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_bcd30dccdf58b057_e7a3d438", "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... | 9 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
78
] | [
80
] | [
5
] | [
6
] | [
"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"
] | cli.py | /src/apps/cli.py | MatthewCroughan/dream2nix | MIT | |
2024-11-19T02:46:44.398979+00:00 | 1,580,390,068,000 | bfd0061ee9320bff5c77e41cbcf58ae94f4a2227 | 3 | {
"blob_id": "bfd0061ee9320bff5c77e41cbcf58ae94f4a2227",
"branch_name": "refs/heads/master",
"committer_date": 1580390068000,
"content_id": "49d3ac20db6f02e67b3c3f9bbed1ab58a614ad9e",
"detected_licenses": [
"MIT"
],
"directory_id": "556ab59e8665b755e223a6bf11ea9be3967e3908",
"extension": "py",
"fi... | 2.78125 | stackv2 | #! /usr/bin/python3
import csv
import copy
import glob
try:
from lxml import etree as et
except:
import xml.etree.ElementTree as et
import re
import os
from tkinter import *
from tkinter import messagebox
"""
Version 2.1
- Fixed encoding for Windows machines
- Explained special chars variable
"""
# all chars... | 290 | 39.47 | 172 | 22 | 2,510 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8986ac2091341de9_a7fd7bb9", "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
] | [
5
] | [
39
] | [
"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"
] | abbrevsolver.py | /abbrevsolver.py | raykyn/abbrevSolver | MIT | |
2024-11-19T02:57:56.289402+00:00 | 1,456,453,126,000 | e20df3e546ceb410834e58d28918c49bee3ff181 | 2 | {
"blob_id": "e20df3e546ceb410834e58d28918c49bee3ff181",
"branch_name": "refs/heads/master",
"committer_date": 1456453126000,
"content_id": "7f9c8c05c6a7953dd02ff58b91a0a5b29adbcadc",
"detected_licenses": [
"BSD-3-Clause",
"MIT"
],
"directory_id": "5706a192e52a7f97d1b341fcb0894cb790883889",
"ext... | 2.46875 | stackv2 | #!c:/python33/python.exe
# -*- coding: utf-8 -*-
import os
import cgi
import time
print('Content-type: text/html\n\n')
if os.environ['REMOTE_ADDR']!='127.0.0.1':
print('forbidden access')
else:
fs = cgi.FieldStorage()
src = fs['src'].value
t0 = time.perf_counter()
exec(src)
print('CPython: %6... | 17 | 20.71 | 70 | 15 | 124 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_af196ec1a9260283_a80acfc6", "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 ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
16
] | [
16
] | [
5
] | [
14
] | [
"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"
] | speed.py | /static/brython/cgi-bin/speed.py | harukaeru/Brython-Django | BSD-3-Clause,MIT | |
2024-11-19T02:57:56.831225+00:00 | 1,619,091,102,000 | f452b0c1279ea04c2cb5ee289521dc2c33aa5ac4 | 2 | {
"blob_id": "f452b0c1279ea04c2cb5ee289521dc2c33aa5ac4",
"branch_name": "refs/heads/master",
"committer_date": 1619091102000,
"content_id": "2342324efb70264e2dc42d31c54d6f17d8a40b60",
"detected_licenses": [
"MIT"
],
"directory_id": "c238594a96924865ffa88be82bf35da8513b4af2",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python3
from tkinter import *
from tkinter import ttk, filedialog, Text
import subprocess
import os
import time
class Root(Tk):
def __init__(self):
super(Root, self).__init__()
self.title(".:: ONDaSCA: On-demand Network Data Set Creation Application - GUI ::.")
# self.minsi... | 188 | 35.81 | 130 | 19 | 1,586 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_26b54ad23c7b4eb4_3bec2f9c", "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",
"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-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-t... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
143,
143,
153,
172,
172
] | [
143,
143,
153,
172,
172
] | [
18,
51,
9,
21,
49
] | [
69,
55,
55,
114,
53
] | [
"A01:2017 - Injection",
"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,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"HIGH",
"LOW"
] | ONDASCA.py | /ONDASCA.py | larbiaryeh/ONDaSCA | MIT | |
2024-11-19T02:57:57.931062+00:00 | 1,613,727,994,000 | b939c17d3b05995f9512c51d6f03d1743ea4fe3f | 3 | {
"blob_id": "b939c17d3b05995f9512c51d6f03d1743ea4fe3f",
"branch_name": "refs/heads/main",
"committer_date": 1613727994000,
"content_id": "b9c1062ab32287144da95488fd19a9e73ad61d8d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bec80a6c482bfa8ea64eb13a0850040dd3d3585a",
"extension": "py",
... | 2.515625 | stackv2 | import json
import os
from xml.etree import ElementTree as ET
from lxml import objectify
def update_system_filter(xml_file_path,tmp_path):
#read system filter xml file
tree=ET.parse(xml_file_path)
#get the root tag of the xml file
root=tree.getroot()
#create list of jsons file from tmp path
j... | 75 | 37.29 | 103 | 24 | 547 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_cc48059c38bc3791_7c382939", "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,
10
] | [
40,
33
] | [
"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"
] | xmlparser.py | /xmlparser.py | nehas185/json_to_xml_parser | Apache-2.0 | |
2024-11-19T02:57:59.800892+00:00 | 1,486,237,561,000 | 15f6974980d99327939770fe66319e63c6401564 | 3 | {
"blob_id": "15f6974980d99327939770fe66319e63c6401564",
"branch_name": "refs/heads/master",
"committer_date": 1486237561000,
"content_id": "fb319655d412facd23b1a397fcac9071dc5bb414",
"detected_licenses": [
"MIT"
],
"directory_id": "458e69284fdee17dbf842ad207b8648a035f4137",
"extension": "py",
"fi... | 3.0625 | stackv2 | import numpy as np
import csv
import cPickle
import re
import random
from spell import correction
import sys
def process_word(in_word):
# All processing has been shifted to 'process_sentence'. Refer to its implementation.
return in_word.lower()
def process_sentence(in_sent):
in_sent = in_sent.strip(" ?")
in_sent ... | 175 | 34.09 | 137 | 15 | 1,656 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_0c87c576e03a69a9_88c4bc98", "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"
] | [
43,
155
] | [
43,
155
] | [
20,
2
] | [
35,
29
] | [
"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"
] | analyze_data_glovem.py | /analyze_data_glovem.py | tadityasrinivas/quora_semantic_equivalence | MIT | |
2024-11-19T02:58:13.859602+00:00 | 1,538,592,664,000 | 03fab1aee1bee5bf5a7cd624f10863dfb13e8eb8 | 2 | {
"blob_id": "03fab1aee1bee5bf5a7cd624f10863dfb13e8eb8",
"branch_name": "refs/heads/master",
"committer_date": 1538592664000,
"content_id": "c6868589a7f87bea674eba425b6f43f0d0032df2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f8e9fe0cfecf82a9721c377f6077da1b9d61fdc5",
"extension": "py"... | 2.390625 | stackv2 | #!/usr/bin/python
########################## read_dump.py #########################
# Author: SG Langer 30 Jan 2018
#
# Purpose: provide a set of classes to open/read various annotation
# dbase dumps from public image archives
#
#
###############################################################
import os, string, zipf... | 346 | 30.5 | 153 | 27 | 3,225 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_b0211b5bc1be7aeb_aff2141f", "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... | 29 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"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-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-c... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
70,
73,
78,
89,
94,
96,
119,
121,
136,
139,
196,
211,
240,
260
] | [
70,
73,
78,
89,
94,
96,
119,
121,
136,
139,
196,
211,
240,
260
] | [
54,
67,
3,
9,
9,
9,
4,
3,
47,
4,
3,
57,
3,
57
] | [
101,
126,
26,
59,
59,
59,
30,
26,
85,
39,
26,
104,
26,
104
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01... | [
"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,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | read_dump.py | /read_dump.py | sglanger/FHIRmaker | Apache-2.0 | |
2024-11-19T03:10:01.743091+00:00 | 1,542,383,923,000 | a6fe3d425a065162f62aa4252e79c3306836cbaa | 3 | {
"blob_id": "a6fe3d425a065162f62aa4252e79c3306836cbaa",
"branch_name": "refs/heads/master",
"committer_date": 1542383923000,
"content_id": "9f0b08969773da21594f6302ce62c83ee39636dd",
"detected_licenses": [
"MIT"
],
"directory_id": "4b0810b737d079cdd36d5220648832c697702414",
"extension": "py",
"fi... | 2.703125 | stackv2 | def resize_images():
import cv2
import matplotlib.pyplot as plt
import sys, os
path = './examples_2/traffic_sign_from_web_cropped/'
files = os.listdir(path)
for file in files:
img = cv2.imread(path+file)
# plt.imshow(img)
# plt.show()
# sys.exit()
# re... | 64 | 25.98 | 61 | 14 | 446 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f01e85df55aa8280_7718634f", "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"
] | [
58
] | [
58
] | [
9
] | [
35
] | [
"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"
] | resize_images.py | /resize_images.py | ChengZhongShen/Traffic_Sign_Classifier | MIT | |
2024-11-19T03:10:03.087672+00:00 | 1,571,343,926,000 | 4c6b4eda5449f25ea9f7d078e5ac3c2cf35fa91a | 3 | {
"blob_id": "4c6b4eda5449f25ea9f7d078e5ac3c2cf35fa91a",
"branch_name": "refs/heads/master",
"committer_date": 1571343926000,
"content_id": "1f51ed36e760007a5464be93ef30907d21d5cbe8",
"detected_licenses": [
"MIT"
],
"directory_id": "ddb3329af81c7209327e4f8775dd31a3f8e4a479",
"extension": "py",
"fi... | 2.6875 | stackv2 | # -*- coding: utf-8 -*-
""" moduł z funkcjami ogólnego przeznaczenia """
import os
import platform
from PIL import Image
import common
def preview_histogram(file, dir_temp):
"""
histogram generation
file - fullname image file
dir_temp - fullname temporary directory
--
return: fullname of his... | 74 | 23.99 | 80 | 15 | 433 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_1c354d8c2960fb2c_e304f20d", "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... | 2 | 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"
] | [
31,
64
] | [
31,
64
] | [
9,
9
] | [
27,
27
] | [
"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"
] | preview.py | /src/preview.py | hndr91/FotoKilof | MIT | |
2024-11-19T03:10:09.356522+00:00 | 1,529,051,306,000 | a7e9dece1bfdf537817c2d5053283d55c9e09767 | 3 | {
"blob_id": "a7e9dece1bfdf537817c2d5053283d55c9e09767",
"branch_name": "refs/heads/master",
"committer_date": 1529051306000,
"content_id": "b553108bd98895f4da1eabbdaa90eb93e365892a",
"detected_licenses": [
"MIT"
],
"directory_id": "4392360e46fdb27e060bb778e19e0ba99ff49ee8",
"extension": "py",
"fi... | 2.59375 | stackv2 | """
Copyright 2018 Alex Redaelli <a.redaelli at gmail dot com>
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, including without limitation the rights to use, copy,
modify, m... | 97 | 40.19 | 126 | 18 | 974 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_1fe8652f38ece67e_655947a5", "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"
] | [
49
] | [
49
] | [
18
] | [
38
] | [
"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"
] | searcher.py | /ExeSysMain/ExeSysFunctionalModules/IR/searcher.py | alessandror/ExeSys-Python | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.