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-18T22:24:12.411811+00:00 | 1,528,812,283,000 | 6a6aed5adf35f89e580ed777cf53728745e9e43a | 2 | {
"blob_id": "6a6aed5adf35f89e580ed777cf53728745e9e43a",
"branch_name": "refs/heads/master",
"committer_date": 1528812283000,
"content_id": "ff0f6184ad40948800050c3ad1ce9d572c28a4d5",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bdd777a0167c2849f0011ecac8227741834759ae",
"extension": "p... | 2.421875 | stackv2 | #!/usr/bin/env python
import sys
import getopt
import subprocess
import os
import pwd
def usage():
print '\nUsage: ' + sys.argv[0] + ' -m <mongohost> -p <mongoport> -w <webport>\n'
def get_username():
return pwd.getpwuid(os.getuid())[0]
def main(argv):
mongohost = ''
mongoport = ''
webport = ... | 52 | 23.54 | 154 | 15 | 362 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_45004f9751769be4_aeb7d8f9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
48
] | [
48
] | [
5
] | [
41
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | run_docker_findapi.py | /run_docker_findapi.py | SBU-BMI/findapi | BSD-3-Clause | |
2024-11-18T22:24:14.061295+00:00 | 1,461,206,069,000 | c7b217e132163133d8e8314d6415917ac0d2c87e | 2 | {
"blob_id": "c7b217e132163133d8e8314d6415917ac0d2c87e",
"branch_name": "refs/heads/master",
"committer_date": 1461206069000,
"content_id": "01b38cb8d82d6ace783e8d0306b93ee8030dd6a9",
"detected_licenses": [
"MIT"
],
"directory_id": "d9a5d94cd2c3653bedadf233d11ba426bdc47c43",
"extension": "py",
"fi... | 2.328125 | stackv2 | # coding: utf-8
import csv_commands
import sys
from csv import reader, writer
from csvsimpletools import app, babel
from flask import g, make_response, redirect, render_template, request
from forms import GetCSV
from tempfile import TemporaryFile
reload(sys)
sys.setdefaultencoding('utf-8')
@app.route('/')
def deaful... | 86 | 27.95 | 78 | 18 | 526 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_c3b7a67d53aebf3f_31bc84ac", "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",
"CWE-79"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.flask.security.audit.xss.make-response-with-unknown-content"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
50,
63
] | [
50,
63
] | [
19,
13
] | [
65,
35
] | [
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"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.",
"Be careful with `flask.make_response()`. If this response i... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM"
] | views.py | /csvsimpletools/views.py | pombredanne/csvsimpletools | MIT | |
2024-11-18T22:24:14.723356+00:00 | 1,587,395,273,000 | a3adaa7592729b0313c64a358f79fe3cc9b5c376 | 2 | {
"blob_id": "a3adaa7592729b0313c64a358f79fe3cc9b5c376",
"branch_name": "refs/heads/master",
"committer_date": 1587395273000,
"content_id": "acab8c760e2b99fa4ce5d612abdba087890b8739",
"detected_licenses": [
"MIT"
],
"directory_id": "8acb126606d430ae546fa13ebd3d6b8200b4a7d1",
"extension": "py",
"fi... | 2.328125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on 18-12-21 上午9:48
IDE PyCharm
@author: Meng Dong
this script is used to evaluate the detection and segmentation
results on cell tracking challenge dataset, the metric is F1 score.
according to the miccai2018 3d instance segmentation paper.
"""
import numpy as np
import os
from si... | 170 | 32.74 | 117 | 18 | 1,713 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ca61d8bfa1de65ad_45e6b5ba", "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-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
104
] | [
104
] | [
20
] | [
38
] | [
"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"
] | evaluation_nuclei_f1score.py | /tools/evaluation/evaluation_nuclei_f1score.py | MeowMeowLady/InstanceSeg-Without-Voxelwise-Labeling | MIT | |
2024-11-18T22:24:15.571911+00:00 | 1,546,964,957,000 | ff713d612237053437dec16cd6b184b2dbe87dcc | 2 | {
"blob_id": "ff713d612237053437dec16cd6b184b2dbe87dcc",
"branch_name": "refs/heads/master",
"committer_date": 1546964957000,
"content_id": "20219bdc27d4ceacef6c50b981bbe7c740c0857b",
"detected_licenses": [
"MIT"
],
"directory_id": "fae47e63ae687b0961bb0b9143ffc9ab7d954c98",
"extension": "py",
"fi... | 2.375 | stackv2 | import httplib, urllib, base64, json
from flask import Flask
#def eye_aspect(cords):
from flask import Flask
from twilio.rest import Client
from picamera import PiCamera
from datetime import datetime
import time
from azure.storage.blob import BlockBlobService
from azure.storage.blob import ContentSettings
camera = P... | 165 | 27.73 | 169 | 15 | 1,326 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_46621b9addc81e32_2b0d6312", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi... | 12 | true | [
"CWE-295"
] | [
"rules.python.lang.security.audit.httpsconnection-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
67
] | [
67
] | [
16
] | [
84
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"The HTTPSConnection API has changed frequently with minor releases of Python. Ensure you are using the API for your version of Python securely. For example, Python 3 versions prior to 3.4.3 will not verify SSL certificates by default. See https://docs.python.org/3/library/http.client.html#http.client.HTTPSConnecti... | [
5
] | [
"LOW"
] | [
"LOW"
] | Face_Landmarks.py | /Face_Landmarks.py | bendemers/Iris | MIT | |
2024-11-18T22:24:18.069369+00:00 | 1,430,160,636,000 | 5b90fcc48727c2d925cb358d6ad87cc18919627a | 3 | {
"blob_id": "5b90fcc48727c2d925cb358d6ad87cc18919627a",
"branch_name": "refs/heads/master",
"committer_date": 1430160636000,
"content_id": "d2df38d51aaf51339ad65247da6365f1472ae55a",
"detected_licenses": [
"MIT"
],
"directory_id": "a8cabacee88d8172e0aa4b370867b83e73d6cc55",
"extension": "py",
"fi... | 2.84375 | stackv2 | # -*- coding: utf-8 -*-
import pygame
import os
import xml.etree.ElementTree as ET
from pygame.locals import *
from constants import *
class BlinkenMemory(object):
def __init__(self, ncols, nrows):
# self._map = [[False for i in range(ny)] for j in range(nx)]
self.frame = [[BLACK for i in range(nco... | 193 | 33.02 | 83 | 26 | 1,518 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_fcef219d60c2548c_4e9f473d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
4,
134
] | [
4,
134
] | [
1,
16
] | [
35,
27
] | [
"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"
] | blinkentanz.py | /blinkentanz.py | trobanga/pifidelity | MIT | |
2024-11-18T22:24:24.713978+00:00 | 1,591,400,105,000 | 9df452ab92111bd56347847a66c1f6b0df0490fb | 3 | {
"blob_id": "9df452ab92111bd56347847a66c1f6b0df0490fb",
"branch_name": "refs/heads/master",
"committer_date": 1591400105000,
"content_id": "7990b37418ff09c53dc7c3a36d94b601217bc8fc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "740a77f714c8e297b4576d6f6ecb527e04f8b07f",
"extension": "py"... | 2.640625 | stackv2 | # USO
# python train.py --dataset /data --model model/activity.model --label-bin model/lb.pickle --epochs 100
import matplotlib
matplotlib.use("Agg")
# Importacion de paquetes necesarios
from keras.preprocessing.image import ImageDataGenerator
from keras.layers.pooling import AveragePooling2D
from keras.applications... | 147 | 29.26 | 103 | 11 | 1,177 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3e5720a9ae065e57_72fd8123", "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"
] | [
146
] | [
146
] | [
9
] | [
25
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | train75_25.py | /train75_25.py | ypmunoz36/kerasDeepLSC | Apache-2.0 | |
2024-11-18T22:24:25.699031+00:00 | 1,566,885,393,000 | 0b7b084ab4653805950870d99d637532a772c1a9 | 2 | {
"blob_id": "0b7b084ab4653805950870d99d637532a772c1a9",
"branch_name": "refs/heads/master",
"committer_date": 1566885393000,
"content_id": "f82f89e0967017b5a2a2235bfe543faaaa1ac645",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "3e24611b7315b5ad588b2128570f1341b9c968e8",
"extension": "p... | 2.421875 | stackv2 | """Utils for common funcs, such as setting up a log, composing functions."""
import functools
import os
import logging
import logging.config
import argparse
import pprint
import traceback
import time
import types
import subprocess
from contextlib import contextmanager
import xml.etree.ElementTree as ET
from pbcommand.... | 468 | 27.93 | 122 | 14 | 3,148 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8e695a8e32077df8_a84934fe", "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",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.use-defused-xml",
"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"
] | [
13,
398,
398
] | [
13,
398,
398
] | [
1,
13,
43
] | [
35,
48,
47
] | [
"A04:2017 - XML External Entities (XXE)",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"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.",
"Detected subprocess function 'Popen' without a static stri... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"HIGH"
] | [
"MEDIUM",
"HIGH",
"LOW"
] | utils.py | /pacbiolib/pacbio/pythonpkgs/pbcommand/lib/python2.7/site-packages/pbcommand/utils.py | bioCKO/lpp_Script | BSD-2-Clause | |
2024-11-18T22:35:56.127909+00:00 | 1,404,857,259,000 | 7e395695df1735e5b703f791d4c82cab6b14bb60 | 2 | {
"blob_id": "7e395695df1735e5b703f791d4c82cab6b14bb60",
"branch_name": "refs/heads/master",
"committer_date": 1404857259000,
"content_id": "be5a05d6e8064ca0c0a27334b3446297fde7fc52",
"detected_licenses": [
"MIT"
],
"directory_id": "b6c01b126209e16850acea61b7b752ae80702516",
"extension": "py",
"fi... | 2.46875 | stackv2 | # import sys
import os
import rat
def log(msg, desc=""):
now = rat.datetime.now()
files = rat.registry.getValue("file")
if (files is not None and "log" in files):
os.system("echo '[" + str(now) + "] " + desc + ": " + msg + "' >> " + files["log"])
return True
# end if
... | 29 | 20 | 91 | 18 | 163 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_507000c2eeac6734_c495cc1c", "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"
] | [
11
] | [
11
] | [
9
] | [
92
] | [
"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"
] | logger.py | /base/modules/rat/logger.py | nv8h/PyRattus | MIT | |
2024-11-18T22:35:57.921220+00:00 | 1,671,524,464,000 | c647ee31785af7e033aa38d3569f10ec982a3864 | 3 | {
"blob_id": "c647ee31785af7e033aa38d3569f10ec982a3864",
"branch_name": "refs/heads/master",
"committer_date": 1671524464000,
"content_id": "af4764a36418e02464d554d1499c0e839572cf6c",
"detected_licenses": [
"MIT"
],
"directory_id": "0268631c60edf418bdd8b4fdfed99f5f5684601a",
"extension": "py",
"fi... | 2.890625 | stackv2 | #!/usr/bin/env python3
"""Benchmark rpack package
This module test rpack performance and packing density quality.
These are the performance tests:
* Uniform side length test
* Sequence of squares test
* Uniform area test (todo)
# TODO Square-packing problem NxN
"""
# Built-in
import asyncio
import argparse
import... | 194 | 28.14 | 101 | 15 | 1,489 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_687c01a45bfe01e6_95d9c533", "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"
] | [
93,
108,
155
] | [
93,
108,
155
] | [
13,
13,
13
] | [
43,
43,
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"
] | crunch.py | /misc/crunch.py | Penlect/rectangle-packer | MIT | |
2024-11-18T22:36:02.165709+00:00 | 1,588,536,225,000 | 0cb4250076a73e6ecb2e88195413d4507ccb99b9 | 3 | {
"blob_id": "0cb4250076a73e6ecb2e88195413d4507ccb99b9",
"branch_name": "refs/heads/master",
"committer_date": 1588536225000,
"content_id": "531a8abb914cd24bc22cb104c0e5b2dc2a6fcd94",
"detected_licenses": [],
"directory_id": "457149d2b593c6293f8b859ca5ec3ff29cdb07f7",
"extension": "py",
"filename": "dat... | 2.609375 | stackv2 | import os
import pickle
import numpy as np
import torch
from torch.utils.data.dataset import Dataset
from torch.utils.data import DataLoader, sampler
from transform import get_train_transforms, get_test_transforms, CLAHE_GRAY
from tqdm import tqdm
# To load the picked dataset
class PickledDataset(Dataset):
def _... | 147 | 31.04 | 93 | 19 | 1,203 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_03c4bd9ac899a308_33047e0f", "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",
"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"
] | [
16,
102,
112
] | [
16,
102,
113
] | [
20,
24,
17
] | [
34,
38,
54
] | [
"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"
] | data.py | /data.py | lianqiann/traffic-sign-recognition | ||
2024-11-18T22:36:03.077673+00:00 | 1,648,742,166,000 | 6657afe813d75c38fa3a9f33c7dfbfe04f25a9c2 | 2 | {
"blob_id": "6657afe813d75c38fa3a9f33c7dfbfe04f25a9c2",
"branch_name": "refs/heads/main",
"committer_date": 1648742166000,
"content_id": "a3a2baa8a7d9cff47846033a023977528fa74df0",
"detected_licenses": [
"MIT"
],
"directory_id": "ae303db28aa98b714fa2d1064f90be1a4cdfb30c",
"extension": "py",
"file... | 2.46875 | stackv2 | #!/usr/bin/python
# run_fit.py - driver for running the fitting codes in parallel
# by launching multiplt (12 in this case) jobs
#
#
# Created by Michal Ben-Nun on 5/19/20.
#
import multiprocessing
from multiprocessing import Process
import os
import string
import random
import numpy as np
def info(title):
... | 71 | 23.21 | 85 | 12 | 550 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_cbff8acedd0878f7_69898fc4", "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"
] | [
37
] | [
37
] | [
5
] | [
86
] | [
"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"
] | run_fit.py | /code/world/run_fit.py | predsci/PSI-CARM | MIT | |
2024-11-18T22:36:16.951449+00:00 | 1,514,372,603,000 | c03fe7673db1dbd2bce186aac971a9ee33f93eb1 | 2 | {
"blob_id": "c03fe7673db1dbd2bce186aac971a9ee33f93eb1",
"branch_name": "refs/heads/master",
"committer_date": 1514372603000,
"content_id": "63b016f98f0e81adf661106aa09f855549120c04",
"detected_licenses": [
"MIT"
],
"directory_id": "2885f6041427be22918e7a39378b4b5270c3fa5d",
"extension": "py",
"fi... | 2.3125 | stackv2 | #This is the library that is going to hold the main methods
#version 1.0 completed, with signature
import requests
from json import loads, dumps
from time import sleep
import parser
import subprocess
import os
from hashlib import md5
code_remote = os.environ['CODE_REMOTE']
bin_1 = 'https://dbc-overflow.firebaseio.com... | 82 | 26.35 | 76 | 17 | 575 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-hash-algorithm-md5_84b6dea418b88a81_e058d444", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-hash-algorithm-md5", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected MD5 hash algorithm which... | 14 | true | [
"CWE-95",
"CWE-95",
"CWE-95",
"CWE-95",
"CWE-95",
"CWE-95",
"CWE-78"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rul... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"HIGH"
] | [
33,
34,
45,
46,
47,
48,
68
] | [
33,
34,
45,
46,
47,
48,
68
] | [
8,
17,
8,
16,
17,
18,
14
] | [
29,
47,
29,
45,
47,
49,
58
] | [
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection",
"A01:2017 - 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,
5,
5,
5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | remote.py | /Python/remote.py | lucasosouza/apps | MIT | |
2024-11-18T22:36:17.231349+00:00 | 1,533,658,578,000 | 0116afd310c7e711cb7b676fb76e312d38a9e70c | 3 | {
"blob_id": "0116afd310c7e711cb7b676fb76e312d38a9e70c",
"branch_name": "refs/heads/master",
"committer_date": 1533658578000,
"content_id": "5ad2573f111d003c1147bcf65e08a93935eca77e",
"detected_licenses": [
"MIT"
],
"directory_id": "0ccc43475cb4333b948e54277cf26a3f19a46d43",
"extension": "py",
"fi... | 2.96875 | stackv2 | # for python 3
# You'll need to customize this according to your needs. Proper orientation of
# the kinect is vital; if participants are able to maintain their head or wrists
# continuously inside the word rects, they will repeatedly trigger the collision
# detection
from pykinect2 import PyKinectV2
from pykinect2.PyKi... | 256 | 48.79 | 140 | 19 | 2,891 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_e996982cf65eed31_aa61fed3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ... | 3 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
100
] | [
100
] | [
9
] | [
49
] | [
"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"
] | AdverbOrAdjectiveFullScreen.py | /ESL Game Frameworks/Adverb or Adjective/AdverbOrAdjectiveFullScreen.py | jgerschler/python-kinect | MIT | |
2024-11-18T22:36:17.787395+00:00 | 1,614,569,059,000 | 0decb1d52c8b5aa30526b2ef209f1ae601a8ec9f | 2 | {
"blob_id": "0decb1d52c8b5aa30526b2ef209f1ae601a8ec9f",
"branch_name": "refs/heads/master",
"committer_date": 1614569059000,
"content_id": "620b3449b0eec68665f8a28026f61296ec2a9ead",
"detected_licenses": [
"MIT"
],
"directory_id": "955c8bdbb341d8e37db5d963928ae9c643a1f6df",
"extension": "py",
"fi... | 2.453125 | stackv2 | import abc
from simplejson.errors import JSONDecodeError
from tempfile import mktemp
from cleo import Command
from shutil import copyfileobj
import requests
from typing import Optional, Union
from distutils.version import LooseVersion
from collections import OrderedDict
from cleo.helpers import Argument
from pathlib im... | 223 | 31.5 | 89 | 20 | 1,499 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.tempfile.tempfile-insecure_221d9e80eefe47a4_68e21fbf", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.tempfile.tempfile-insecure", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Use tempfile.NamedTemporaryF... | 8 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
109
] | [
109
] | [
13
] | [
36
] | [
"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"
] | __init__.py | /pipflow/src/__init__.py | iMerica/pipflow | MIT | |
2024-11-18T22:36:21.959353+00:00 | 1,561,381,482,000 | 03331741a8f0e07521787f07e8e06b6c3bfefabb | 2 | {
"blob_id": "03331741a8f0e07521787f07e8e06b6c3bfefabb",
"branch_name": "refs/heads/master",
"committer_date": 1561381482000,
"content_id": "5329152dc36659fac72e65bcfc0057df42f6dc8b",
"detected_licenses": [
"MIT"
],
"directory_id": "92f077eca32c5bbbbab15856094a584c2e0e1ce8",
"extension": "py",
"fi... | 2.328125 | stackv2 | # coding: utf-8
# Date : 2019/4/23
# Author : kylin1020
# PROJECT : aiocrawler
# File : redis_scheduler
import pickle
from time import time
from aiocrawler import Item
from aiocrawler import Request
from aiocrawler import BaseSettings
from aiocrawler.extensions import RedisConnector
from aioredis import ... | 69 | 34.87 | 101 | 13 | 544 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_9395db691de6863c_45c8bdf9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
43,
57,
62,
69
] | [
43,
57,
62,
69
] | [
23,
46,
72,
80
] | [
44,
67,
90,
101
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | redis_scheduler.py | /aiocrawler/schedulers/redis_scheduler.py | imlzg/aiocrawler | MIT | |
2024-11-18T22:36:22.597501+00:00 | 1,581,795,451,000 | 64ba203dee6c7c67e1e56a16b1bb55a0f25fdeab | 3 | {
"blob_id": "64ba203dee6c7c67e1e56a16b1bb55a0f25fdeab",
"branch_name": "refs/heads/master",
"committer_date": 1581795451000,
"content_id": "5119de42c4c00521995ffd038312112f0c26570a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "242b8a4a92c3b998402f45a8085599766b98d920",
"extension": "py"... | 2.65625 | stackv2 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import json
import urllib.request
from xml.sax import make_parser
from xml.sax.handler import ContentHandler
from smallsmilhandler import SmallSMILHandler
class KaraokeLocal:
def __init__(self, list):
parser = make_parser()
cHandler = SmallSMI... | 57 | 29.25 | 67 | 20 | 422 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_f7cce71ee89754b0_93e5126d", "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",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
7,
8
] | [
7,
8
] | [
1,
1
] | [
32,
43
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | karaoke.py | /ptavi-p3/karaoke.py | mariagn95/PTAVI | Apache-2.0 | |
2024-11-18T22:36:27.075137+00:00 | 1,562,569,826,000 | ab4102236660042f52a006d5f09ca04a51fdf5ee | 2 | {
"blob_id": "ab4102236660042f52a006d5f09ca04a51fdf5ee",
"branch_name": "refs/heads/master",
"committer_date": 1562569826000,
"content_id": "147030af57b66bdf56e441259f6ba805583b22d6",
"detected_licenses": [
"MIT"
],
"directory_id": "4991888dc48901a2d35c192516223003fafa7b6b",
"extension": "py",
"fi... | 2.5 | stackv2 | import json
import requests
import warnings
import logging
from time import sleep, time
from collections import defaultdict
warnings.filterwarnings("ignore")
with open("config.json", 'r') as f:
config = json.load(f)
refresh_interval_sec = config['check_interval_sec']
errors = defaultdict(int)
def log_splunk(url,... | 88 | 23.53 | 78 | 15 | 576 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_c30c1df184286e08_94eaec55", "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... | 6 | true | [
"CWE-295",
"CWE-295"
] | [
"rules.python.requests.security.disabled-cert-validation",
"rules.python.requests.security.disabled-cert-validation"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
33,
56
] | [
38,
56
] | [
13,
14
] | [
3,
56
] | [
"A03:2017 - Sensitive Data Exposure",
"A03:2017 - Sensitive Data Exposure"
] | [
"Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation.",
"Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation."
] | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"LOW",
"LOW"
] | monitor_worker.py | /monitor_worker.py | ReallyLiri/resource-monitor-splunk | MIT | |
2024-11-18T22:36:31.945648+00:00 | 1,621,742,138,000 | 591a06b00938a94e0f00ffdb7ef59dc4fff7aac4 | 2 | {
"blob_id": "591a06b00938a94e0f00ffdb7ef59dc4fff7aac4",
"branch_name": "refs/heads/main",
"committer_date": 1621742138000,
"content_id": "ce38f81564038d7e67f2b36681281e7a388b2a71",
"detected_licenses": [
"MIT"
],
"directory_id": "27faf55185c4c70fcb6bc046b0ed15835be7c936",
"extension": "py",
"file... | 2.40625 | stackv2 | import cv2
import os
import pickle
import imutils
import numpy as np
import time
# IU - Concert Live Clip 2018 Tour.mp4
video_path = "D:/Github/FR-AttSys/test_video/[IU] Meaning Of You 190428.mp4"
detector_path = "./face_detection_model"
# OpenCV深度学习面部嵌入模型的路径
embedding_model = "./face_detection_model/openface_nn4.sm... | 132 | 33.18 | 116 | 18 | 1,347 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_44be3a828bcafd7a_c9c65676", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
40,
41
] | [
40,
41
] | [
22,
14
] | [
70,
54
] | [
"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"
] | fr_video.py | /fr_video.py | datamonday/FR-AttSys | MIT | |
2024-11-18T22:36:32.495403+00:00 | 1,524,563,958,000 | 3b9c2355b8138c6a5859786920a257e773196a64 | 3 | {
"blob_id": "3b9c2355b8138c6a5859786920a257e773196a64",
"branch_name": "refs/heads/master",
"committer_date": 1524563958000,
"content_id": "7427e88245ecc461bc39cb326e2553db81f308f9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1ea299bf5e6c6ffb15b893cebc1f7121218422b2",
"extension": "py"... | 2.9375 | stackv2 | #!flask/bin/python
from flask import Flask
import os
app = Flask(__name__)
@app.route('/')
def index():
return "Hello, World!"
@app.route('/api/brew/<int:cups>', methods=['GET'])
def brew_coffee(cups):
#print(cups)
if (cups >= 1 and cups <= 12):
cmd = "start cmd /c python smarter.py brew " + str(cups)
ret... | 31 | 25.74 | 66 | 12 | 232 | python | [{"finding_id": "semgrep_rules.python.flask.security.injection.os-system-injection_d65d604f6e1bbef7_2d20c284", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.os-system-injection", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "User data detected in os.syst... | 5 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-79"
] | [
"rules.python.flask.security.injection.os-system-injection",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.dangerous-system-call",
"rules.python.flask.security.audit.directly-returned-format-string"
] | [
"security",
"security",
"security",
"security"
] | [
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | [
16,
16,
16,
19
] | [
16,
16,
16,
19
] | [
20,
20,
20,
3
] | [
34,
34,
34,
58
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"User data detected in os.system. This could be vulnerable to a command injection and should be avoided. If this must be done, use the 'subprocess' module instead and pass the arguments as a list.",
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call becau... | [
7.5,
7.5,
7.5,
5
] | [
"MEDIUM",
"LOW",
"HIGH",
"HIGH"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | app.py | /app.py | Sarlianth/smarter-voice-control | Apache-2.0 | |
2024-11-18T22:36:32.676983+00:00 | 1,539,082,354,000 | cc6384ab5c15c365fefecc071fc960667a819669 | 2 | {
"blob_id": "cc6384ab5c15c365fefecc071fc960667a819669",
"branch_name": "refs/heads/master",
"committer_date": 1539082354000,
"content_id": "d4a8d89625a02dbaf4904ad36286e85ba7acbba4",
"detected_licenses": [
"MIT"
],
"directory_id": "cf72fed7074eef723770cc091493191bcc871c65",
"extension": "py",
"fi... | 2.359375 | stackv2 | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
# --------------------------------------------------------
# Fast DeepBo... | 273 | 40.89 | 109 | 21 | 2,801 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_39180c9ab8d5d354_72fee4ab", "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... | 8 | true | [
"CWE-611",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-78"
] | [
"rules.python.lang.security.use-defused-xml",
"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",
"rules.python.lang.s... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"HIGH"
] | [
17,
110,
117,
132,
144,
263
] | [
17,
110,
117,
132,
144,
263
] | [
1,
25,
13,
26,
13,
18
] | [
34,
42,
66,
43,
63,
50
] | [
"A04:2017 - XML External Entities (XXE)",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A01:2017 - Injection"
] | [
"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.",
"Avoid using `cPickle`, which is known to lead to code exec... | [
7.5,
5,
5,
5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"HIGH"
] | coco_imdb.py | /src/datasets/coco_imdb.py | rotemmairon/DeepBox | MIT | |
2024-11-18T22:36:33.260010+00:00 | 1,535,559,284,000 | 9c90936f6e30c44c004852b6f135094909f50d5a | 2 | {
"blob_id": "9c90936f6e30c44c004852b6f135094909f50d5a",
"branch_name": "refs/heads/master",
"committer_date": 1535559284000,
"content_id": "9d6a6cea075acfa0885cce9f802100ddd90643fc",
"detected_licenses": [
"MIT"
],
"directory_id": "3c5008317802588b7cef0c8a89d6bc7381e16edb",
"extension": "py",
"fi... | 2.40625 | stackv2 | import argparse
import getpass
import subprocess
class PasswordAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
if values is None:
values = getpass.getpass('%s:' % self.dest)
setattr(namespace, self.dest, values)
def execute_mongo_command(opt... | 36 | 40.61 | 131 | 14 | 332 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_68861c1b5af7f5a8_ddf7ef99", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
24
] | [
24
] | [
15
] | [
87
] | [
"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"
] | mongoUtils.py | /core/dao-mongo/src/main/resources/mongoUtils.py | dwp/queue-triage | MIT | |
2024-11-18T22:36:35.537479+00:00 | 1,419,902,815,000 | a1b3545f4a46e7d8f52b9ba6dd9406404f42c181 | 3 | {
"blob_id": "a1b3545f4a46e7d8f52b9ba6dd9406404f42c181",
"branch_name": "refs/heads/master",
"committer_date": 1419902815000,
"content_id": "44a30529b64e7271c770af64cae161f22cc4624c",
"detected_licenses": [
"MIT",
"BSD-3-Clause"
],
"directory_id": "3488890a4d793f2816c64e243d7a38c651101629",
"ext... | 2.5625 | stackv2 | import os
import errno
from glob import glob
from os.path import dirname, basename, abspath, isdir, join
libs_root = dirname(abspath(__file__))
def mkdirs(newdir, mode=0777):
try: os.makedirs(newdir, mode)
except OSError, err:
# Reraise the error unless it's about an already existing directory
... | 64 | 31.56 | 83 | 13 | 513 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_e116d0dc76081bd4_22a128d4", "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"
] | [
40,
51
] | [
40,
51
] | [
18,
9
] | [
32,
42
] | [
"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"
] | build.py | /app/deps/build.py | poke1024/plotdevice | MIT,BSD-3-Clause | |
2024-11-18T22:36:37.207623+00:00 | 1,581,499,250,000 | eaf1a1e25bd011ed8cd74a42f4b4f8ac020a816e | 3 | {
"blob_id": "eaf1a1e25bd011ed8cd74a42f4b4f8ac020a816e",
"branch_name": "refs/heads/master",
"committer_date": 1581499250000,
"content_id": "b9fe7ff3416ac075a3e6f09fa4f2e43d84b3e341",
"detected_licenses": [
"MIT"
],
"directory_id": "aedda7b6fab6495fe03167c2a1658130cb8020b2",
"extension": "py",
"fi... | 2.734375 | stackv2 | # -*- coding: utf-8 -*-
#Author: Andrea Urgolo
import numpy as np
import os.path
import pandas as pd
import random
import gc
from scipy.sparse import csr_matrix
from sklearn import preprocessing
class DataManager:
""" Dataset manager: contains all function to manipulate and query the dataset """
N_SAMPLE = ... | 228 | 35.15 | 140 | 18 | 1,821 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_59dae40eeb050d12_383463fa", "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 ... | 2 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
29
] | [
29
] | [
17
] | [
54
] | [
"A03:2021 - Injection"
] | [
"Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | data_manager.py | /duration_prediction/ws/duration_prediction/model_api/libs/io/data_manager.py | AndreaUrgolo/machinelearningwebservices | MIT | |
2024-11-18T22:36:37.266381+00:00 | 1,624,286,791,000 | 85315996506c8d4ff93049a286ec9d5d285a95df | 4 | {
"blob_id": "85315996506c8d4ff93049a286ec9d5d285a95df",
"branch_name": "refs/heads/main",
"committer_date": 1624286791000,
"content_id": "d6cf6318d014363578d0e8c72bde8a39fe463a08",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9a23113855de95f75848b4140ce8dc45e1dd9cf9",
"extension": "py",
... | 3.75 | stackv2 | #program to see and plot wifi network strength
import subprocess #library for executing and getting result of cmd commands
#@Windows
import numpy as np #library for using random number
from itertools import count ... | 147 | 42.2 | 128 | 23 | 1,380 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_535c6026266267e7_2b5812aa", "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"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
104,
104,
104
] | [
104,
104,
104
] | [
15,
32,
70
] | [
99,
62,
74
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"HIGH"
] | [
"HIGH",
"MEDIUM",
"LOW"
] | Show_Wifi_Strength_General.py | /Show_Wifi_Strength_General.py | ShivamSoni24/Show-Wifi-Strength | Apache-2.0 | |
2024-11-18T22:36:38.228737+00:00 | 1,582,082,454,000 | 038747708bdfea4e6879cffecdc649a83176421f | 3 | {
"blob_id": "038747708bdfea4e6879cffecdc649a83176421f",
"branch_name": "refs/heads/master",
"committer_date": 1582082454000,
"content_id": "5856070e20747b5f2b46ff78b5b652bd0dbefb09",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a9071778b3c5168abdeb107e55d96b244ceab474",
"extension": "p... | 2.640625 | stackv2 | from matplotlib import pyplot as plt
import numpy as np
import codecs
import argparse
parse = argparse.ArgumentParser()
parse.add_argument('-same', nargs='+', help='translations')
parse.add_argument('-trans', type=str, required=True, help='references')
parse.add_argument('-vocab', type=str, required=True, help='vocab... | 58 | 31.22 | 89 | 17 | 469 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_0269522f40c4af72_ae05b6d9", "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"
] | [
18,
27
] | [
18,
27
] | [
24,
23
] | [
31,
33
] | [
"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"
] | acc_vs_freq.py | /analytics/acc_vs_freq.py | lyy1994/reformer | BSD-3-Clause | |
2024-11-18T22:36:38.926738+00:00 | 1,479,898,938,000 | a278923105bd6c2ecf71fff7c6d69ca1d6ea0758 | 3 | {
"blob_id": "a278923105bd6c2ecf71fff7c6d69ca1d6ea0758",
"branch_name": "refs/heads/master",
"committer_date": 1479898938000,
"content_id": "b8968bf34226dbdc674e0e36edeae214ba277dbf",
"detected_licenses": [
"MIT"
],
"directory_id": "c64420b635ee606b0996760d873a9e8bebff6c43",
"extension": "py",
"fi... | 2.609375 | stackv2 |
import model
import tornado.gen
from MySQLdb import escape_string
import random
class Score(object):
@staticmethod
@tornado.gen.coroutine
def get_user_score(user_id):
result = yield model.MatrixDB.get(
"""
select sum(score) as score from question_score where user_id =... | 42 | 25.81 | 119 | 16 | 248 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_8a67dd760ef0b306_d299c2b7", "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... | 2 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
38,
38
] | [
42,
42
] | [
15,
15
] | [
10,
10
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | score.py | /src/webservice/model/question/score.py | VMatrixTeam/open-matrix | MIT | |
2024-11-18T22:36:49.042881+00:00 | 1,433,476,194,000 | d89438fcf342c8335aa3322ff6f789c6461962b7 | 3 | {
"blob_id": "d89438fcf342c8335aa3322ff6f789c6461962b7",
"branch_name": "refs/heads/master",
"committer_date": 1433476194000,
"content_id": "c3b2c67104372469b1c4217fbc55b02ae51432b1",
"detected_licenses": [
"MIT"
],
"directory_id": "2a9d8a56ebba5e11ccd31afeeda6fd1892c6b228",
"extension": "py",
"fi... | 3 | stackv2 | #!/usr/bin/env python
import xml.parsers.expat
## Primitive
##
class Primitive(object):
def __init__(self, attrs):
if 'id' in attrs:
self.nid = int(attrs['id'])
else:
self.nid = None
self.attrs = attrs
self.names = []
self.props = []
return... | 137 | 23.26 | 65 | 15 | 782 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_e5223ab8d90c3f7d_c6d12fee", "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"
] | [
2
] | [
2
] | [
1
] | [
25
] | [
"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"
] | osmxmlparser.py | /osmxmlparser.py | afcarl/osmtools | MIT | |
2024-11-18T20:23:12.994262+00:00 | 1,571,500,973,000 | f6d8ffc7b74a6bacafd7e40bc0cfa35fd1666576 | 2 | {
"blob_id": "f6d8ffc7b74a6bacafd7e40bc0cfa35fd1666576",
"branch_name": "refs/heads/master",
"committer_date": 1571500973000,
"content_id": "632dd0e51d0b64c80c65786c99e5c531e54461d5",
"detected_licenses": [
"MIT"
],
"directory_id": "629cd73cb20cbf5d34d6743a52d0d19f0fecc778",
"extension": "py",
"fi... | 2.359375 | stackv2 | # Date: 06/04/2018
# Author: Pure-L0G1C
# Description: Communicate with server
import sys
import subprocess
from os import chdir
from time import sleep
from queue import Queue
from tasks.dos import Cyclops
from threading import Thread, RLock
from . import ssh, sftp, screen, sscreenshare, keylogger
class Shell(object... | 242 | 26.65 | 110 | 20 | 1,497 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_7bba8d83190c26c3_51d20048", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 15 | 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"
] | [
195,
195,
203,
203,
209,
209
] | [
196,
195,
204,
203,
210,
209
] | [
9,
37,
13,
41,
13,
41
] | [
73,
41,
77,
45,
77,
45
] | [
"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"
] | shell.py | /agent/bot/lib/shell.py | sgrimaldi93/Loki | MIT | |
2024-11-18T20:23:14.432119+00:00 | 1,630,690,568,000 | e85930298df64db0365a44b5f6f467305817d977 | 3 | {
"blob_id": "e85930298df64db0365a44b5f6f467305817d977",
"branch_name": "refs/heads/main",
"committer_date": 1630690568000,
"content_id": "d65f821de71c27f036f7488addddfb4cf2cfe173",
"detected_licenses": [
"MIT"
],
"directory_id": "c623e570724c575d97559bc259b9f87a1ba8fadf",
"extension": "py",
"file... | 2.8125 | stackv2 | from collections import Counter
import argparse, json, os, time, re
from bs4 import BeautifulSoup
from selenium import webdriver
from jinja2 import Environment, FileSystemLoader
from utility import ext, setup_logger, login, update_table_json
import config
if __name__ == '__main__':
logger = setup_logger()
driver =... | 123 | 33.9 | 135 | 23 | 1,162 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_607038877b907ecc_dd238424", "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... | 4 | 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"
] | [
43,
43
] | [
43,
43
] | [
9,
9
] | [
39,
39
] | [
"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"
] | main.py | /main.py | ckarakoc/codewars | MIT | |
2024-11-18T20:23:15.480839+00:00 | 1,557,420,525,000 | 7a064cbc4b5f1a33efafa13b1561b637c76cc89a | 3 | {
"blob_id": "7a064cbc4b5f1a33efafa13b1561b637c76cc89a",
"branch_name": "refs/heads/master",
"committer_date": 1557420525000,
"content_id": "89ff2993fabc55ef1d6e4dea0c06c7744f2a7b12",
"detected_licenses": [
"MIT"
],
"directory_id": "8ba5733c9236b18a9bb1abbf15121deaa51bee7e",
"extension": "py",
"fi... | 2.734375 | stackv2 | import pickle
import json
import math
import os
#returns None if no models exist for cow_id; otherwise return a tuple of length-4
#the tuple represents the predicted (yield, fat, protein, lactose) respectively
def GetModelAndPredict(cow_id, temperature, humidity):
#see if there are models existing for cow_id
# ... | 36 | 38.72 | 85 | 16 | 383 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ebd82a17659f8faa_7f144222", "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
] | [
28
] | [
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"
] | model_prediction.py | /models/model_prediction.py | CiciMa/python-docs-hello-world | MIT | |
2024-11-18T20:23:16.091901+00:00 | 1,583,925,056,000 | 7dcd8e909ac9730ebe5359bf481f37a367327c39 | 2 | {
"blob_id": "7dcd8e909ac9730ebe5359bf481f37a367327c39",
"branch_name": "refs/heads/master",
"committer_date": 1583925056000,
"content_id": "50c419d533c9e0b103ab65ecde3c323608197392",
"detected_licenses": [
"MIT"
],
"directory_id": "fc54d66301568974ec6c8a2a93bbb6e1d0a10492",
"extension": "py",
"fi... | 2.3125 | stackv2 | import os
from scipy.io import wavfile
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from keras.layers import Conv2D, MaxPool2D, Flatten, LSTM
from keras.layers import Dropout, Dense, TimeDistributed
from keras.models import Sequential
from keras.utils import to_categorical
from sklearn.utils.c... | 163 | 31.25 | 91 | 14 | 1,352 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_9c2379927254ab85_0b2b4a0d", "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"
] | [
21,
58
] | [
21,
58
] | [
19,
9
] | [
38,
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"
] | model.py | /model.py | swirkes/Audio-Classification | MIT | |
2024-11-18T20:23:16.605833+00:00 | 1,593,438,214,000 | 157f1b8352de4de91585c036bb91b62df02e1b79 | 3 | {
"blob_id": "157f1b8352de4de91585c036bb91b62df02e1b79",
"branch_name": "refs/heads/master",
"committer_date": 1593438214000,
"content_id": "6393b820a9a28f47655ae71386b9c0eb8a16f72f",
"detected_licenses": [
"MIT"
],
"directory_id": "c001052851376d3aaf84db8cfe495353077f5cf3",
"extension": "py",
"fi... | 2.6875 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 23 17:15:21 2020
@author: Arnob
"""
# In[]
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn import metrics
import j... | 48 | 24.21 | 91 | 9 | 328 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_20aaa2469bf15307_260aa6bc", "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"
] | [
48
] | [
48
] | [
5
] | [
29
] | [
"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"
] | Malaria_detection.py | /app/malariaDetection/Malaria_detection.py | arc-arnob/mlModelFlask | MIT | |
2024-11-18T20:23:26.826633+00:00 | 1,599,053,689,000 | c9b5c965da4c96441eea3d32b72732590a790d41 | 3 | {
"blob_id": "c9b5c965da4c96441eea3d32b72732590a790d41",
"branch_name": "refs/heads/master",
"committer_date": 1599053689000,
"content_id": "375614d1d11fa8b877f9dc0eae815e1d0f47e814",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5fe72bb13baf3649058ebe11aa86ad4fc56c69ed",
"extension": "py"... | 2.828125 | stackv2 | """
A demo of creating a new database via SQL Alchemy.
Under MIT License from sprin (https://gist.github.com/sprin/5846464/)
This module takes the form of a nosetest with three steps:
- Set up the new database.
- Create a table in the new database.
- Teardown the new database.
"""
from sqlalchemy import (... | 66 | 26.27 | 80 | 9 | 427 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_5eae91cce8b1a080_a37841d3", "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"
] | [
51,
51,
65,
65
] | [
51,
51,
65,
65
] | [
5,
5,
5,
5
] | [
53,
53,
51,
51
] | [
"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"
] | snippet.py | /hard-gists/5846464/snippet.py | dockerizeme/dockerizeme | Apache-2.0 | |
2024-11-18T20:23:27.502753+00:00 | 1,429,560,365,000 | 18639006f889d24fc7900b712fb14b155298c703 | 3 | {
"blob_id": "18639006f889d24fc7900b712fb14b155298c703",
"branch_name": "refs/heads/master",
"committer_date": 1429560365000,
"content_id": "ba6509a81df4d07cd16e420d50c5a3a66cc89bb0",
"detected_licenses": [
"MIT"
],
"directory_id": "7904cb0d06af84b75f88fc918ebe3298eea05700",
"extension": "py",
"fi... | 2.953125 | stackv2 | """Caching
Cache regions are used to simplify common expirations and group function
caches.
To indicate functions should use cache regions, apply the decorator::
from retools.cache import cache_region
@cache_region('short_term')
def myfunction(arg1):
return arg1
To configure the cache regions, ... | 463 | 33.92 | 99 | 22 | 3,414 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c7973e2e0e264195_d05f1a18", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
229,
253,
259,
270
] | [
229,
253,
259,
270
] | [
26,
28,
46,
24
] | [
56,
58,
65,
54
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | cache.py | /retools/cache.py | znanja/retools | MIT | |
2024-11-18T20:23:31.502468+00:00 | 1,378,745,021,000 | 00ae696466a86d9784a44605aa2edae4cf50e4ec | 3 | {
"blob_id": "00ae696466a86d9784a44605aa2edae4cf50e4ec",
"branch_name": "refs/heads/master",
"committer_date": 1378745021000,
"content_id": "e0af3ece28d15ec2123d8edd15c664be936b4a6e",
"detected_licenses": [
"MIT"
],
"directory_id": "84e0e05c1729967e7fcf4da742c135bde45295a9",
"extension": "py",
"fi... | 2.796875 | stackv2 | #! /usr/bin/env python2.7-32
#encoding: utf-8
import os
import pygame
import pickle
import random
from sprites import Block
class Level (object):
def __init__ (self, file, map, game):
self.grid = self.map (map[0], map[1])
self._file = file
self.game = game
def map (self, x, y):
... | 64 | 22.3 | 67 | 15 | 384 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_60837c1da9c3ad45_769d7e53", "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-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
34,
50
] | [
34,
50
] | [
16,
9
] | [
34,
33
] | [
"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"
] | level.py | /level.py | marciusvinicius/huntermonters | MIT | |
2024-11-18T20:23:31.611857+00:00 | 1,691,739,976,000 | decd684abf83bc7c54438dac4d81fe935deef786 | 3 | {
"blob_id": "decd684abf83bc7c54438dac4d81fe935deef786",
"branch_name": "refs/heads/master",
"committer_date": 1691739976000,
"content_id": "0a780d200cd9eb01188fd0c7d58e93da3ccda54d",
"detected_licenses": [
"MIT"
],
"directory_id": "44791ec17e06edce6922159178e6ddb62b4b40e2",
"extension": "py",
"fi... | 2.546875 | stackv2 | import warnings
import sys
import importlib.abc
from importlib.machinery import ModuleSpec
import imp
from urllib.request import urlopen
from urllib.error import HTTPError, URLError
from html.parser import HTMLParser
# Get links from a given URL
def _get_links(url):
"""在指定url查找包含的其他url"""
class LinkParser(HTML... | 169 | 32.83 | 93 | 18 | 1,331 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_158996e504210641_f32a18d7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value... | 3 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
96
] | [
96
] | [
9
] | [
36
] | [
"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"
] | urlimport.py | /语法篇/元编程/urlimport.py | hsz1273327/TutorialForPython | MIT | |
2024-11-18T20:23:32.810944+00:00 | 1,424,606,283,000 | 4bb71a9b2f5852d7b2aa3ba684a23187bf6fbfae | 3 | {
"blob_id": "4bb71a9b2f5852d7b2aa3ba684a23187bf6fbfae",
"branch_name": "refs/heads/master",
"committer_date": 1424606283000,
"content_id": "bb6109e20edf38b40135342da37fb5dcfdb38fcc",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "baf362d76abcbefa47019955387d9457fbd638e4",
"extension": "p... | 3.265625 | stackv2 | """
Read a text dataset from a file given as the first
argument to this script. Then map over it and produce
a sparse csr matricx, which is written to the file
specified as the second argument.
Uses the treebanks tokenizer, because it's nice and
quick. We also filter out punctuation and so on, leaving
only words.
N... | 101 | 28.14 | 94 | 17 | 711 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d1a6461626abe64d_8dcd8ab3", "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-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
100,
100
] | [
100,
100
] | [
3,
3
] | [
30,
30
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | make_text_dataset.py | /pylearn2/scripts/datasets/make_text_dataset.py | ririw/pylearn2 | BSD-3-Clause | |
2024-11-18T20:23:35.270576+00:00 | 1,692,828,071,000 | 8002420dc7096b53dc4102f4390d890bbc0c2764 | 2 | {
"blob_id": "8002420dc7096b53dc4102f4390d890bbc0c2764",
"branch_name": "refs/heads/main",
"committer_date": 1692828071000,
"content_id": "979b2b5388952f3d3ac723fce2e2a8190e22c076",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a3d6556180e74af7b555f8d47d3fea55b94bcbda",
"extension": "py"... | 2.484375 | stackv2 | #!/usr/bin/env python3
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Script to generate yaml file based on FILES.cfg."""
import argparse
import os
def _ParseFilesCfg(files_file):
"""Return the dictionary of archive fil... | 65 | 31.12 | 77 | 15 | 496 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_06afc26c323ecedb_553d9dba", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ... | 3 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
17
] | [
17
] | [
3
] | [
46
] | [
"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"
] | cipd_from_file.py | /build/cipd/cipd_from_file.py | chromium/chromium | BSD-3-Clause | |
2024-11-18T20:23:38.981519+00:00 | 1,627,656,388,000 | 14934031c281076730f9fd11421236236501245e | 3 | {
"blob_id": "14934031c281076730f9fd11421236236501245e",
"branch_name": "refs/heads/master",
"committer_date": 1627656388000,
"content_id": "2e8dfc2e0a377dc799f1bd52c6151eaff9651b57",
"detected_licenses": [
"MIT"
],
"directory_id": "5b3e218ac7af9a48a63313b971a9602e0b607553",
"extension": "py",
"fi... | 2.765625 | stackv2 | """Common definitions for the package.
License:
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use... | 279 | 36.39 | 140 | 18 | 2,289 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_bdcdbffd89f896be_b436b63e", "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"
] | [
28
] | [
28
] | [
1
] | [
29
] | [
"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"
] | common.py | /rgedt/common.py | iCodeIN/RgEdt | MIT | |
2024-11-18T20:23:41.133048+00:00 | 1,626,971,106,000 | e6b8aa3db293e46d031cc9dba148e44855e62133 | 2 | {
"blob_id": "e6b8aa3db293e46d031cc9dba148e44855e62133",
"branch_name": "refs/heads/main",
"committer_date": 1626971106000,
"content_id": "c4e35d0568d412ee0973197494e60b17e7aa1939",
"detected_licenses": [
"MIT"
],
"directory_id": "a7ae704a6fc0d3931a06be5b81222bdce989b001",
"extension": "py",
"file... | 2.484375 | stackv2 | #!/usr/bin/python3
import sys
import glob
import os
import re
def main():
directory = sys.argv[1]
builddir = sys.argv[2]
extra_module = ""
if(len(sys.argv) > 3):
extra_module = sys.argv[3]
projectModules = {}
for filename in glob.glob(os.path.join(directory, '*.bsv')):
m = re.m... | 69 | 30.07 | 134 | 20 | 503 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_82d8665772141337_32befff5", "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 | [
""
] | [
"rules.python.lang.correctness.dict-del-while-iterate"
] | [
"correctness"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
49
] | [
57
] | [
9
] | [
22
] | [
""
] | [
"It appears that `projectModules[m]` is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration"
] | [
5
] | [
""
] | [
""
] | bsvDeps.py | /hw/bsv_nw_lib/BSVTools/scripts/bsvDeps.py | mhrtmnn/NetworkBenchmarkPEs | MIT | |
2024-11-18T21:22:12.254067+00:00 | 1,654,517,257,000 | 8d296f293b5ca1d1c1f64bc8422f047065032982 | 3 | {
"blob_id": "8d296f293b5ca1d1c1f64bc8422f047065032982",
"branch_name": "refs/heads/main",
"committer_date": 1654517257000,
"content_id": "72cbca3de55e3417b52c493bf22eab1d327b042c",
"detected_licenses": [
"MIT"
],
"directory_id": "641aaa021b3841adcca8728ae93f6785db57d29d",
"extension": "py",
"file... | 2.625 | stackv2 | import os
import subprocess
import zipfile
import winreg
import re
import requests
import logging
chromedriverpath = ''
def excuteCommand(com):
ex = subprocess.Popen(com, stdout=subprocess.PIPE, shell=True)
out, err = ex.communicate()
status = ex.wait()
print("cmd in:", com)
print("cmd out: ", o... | 125 | 26.67 | 114 | 17 | 831 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_cbb80ad83f54b72e_ba4622e9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 7 | 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"
] | [
14,
14
] | [
14,
14
] | [
10,
62
] | [
67,
66
] | [
"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
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | getchromedriver.py | /utils/getchromedriver.py | sportfy/JDMemberCloseAccount | MIT | |
2024-11-18T21:22:12.327109+00:00 | 1,575,382,349,000 | e1ca9e04bfa683b30435d8f4e67593b96c572ee1 | 3 | {
"blob_id": "e1ca9e04bfa683b30435d8f4e67593b96c572ee1",
"branch_name": "refs/heads/master",
"committer_date": 1575382349000,
"content_id": "f72c86f6141b9e5ce714030b5766cf7cff25194c",
"detected_licenses": [
"MIT"
],
"directory_id": "c5b68f8d9939ec0eafa5a54e4aa724d90675bcd2",
"extension": "py",
"fi... | 2.75 | stackv2 | import ast
import re
import pickle
from Crypto.PublicKey import RSA
from base64 import b64decode,b64encode
from tkinter import messagebox
def str2obj(s):
return ast.literal_eval(s.replace('true', 'True').replace('false', 'False'))
def trim_name(name):
return name.replace('@','').replace('#','')
def remove_sp... | 63 | 20.08 | 117 | 13 | 365 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b037bf6385f21e80_b4f87dcb", "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",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
34,
38
] | [
34,
38
] | [
9,
9
] | [
30,
34
] | [
"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"
] | isolated_functions.py | /isolated_functions.py | wonabru/chainnet | MIT | |
2024-11-18T21:22:12.567297+00:00 | 1,502,116,350,000 | 501eaaae43948da13e29e1cadbb995eb7646c032 | 3 | {
"blob_id": "501eaaae43948da13e29e1cadbb995eb7646c032",
"branch_name": "refs/heads/master",
"committer_date": 1502116350000,
"content_id": "d90751a925c27b47402b9c58addc423e5fe942cf",
"detected_licenses": [
"MIT"
],
"directory_id": "5aa163df7bdcdb2c7d2cbe8e5c44f68e9b9389d1",
"extension": "py",
"fi... | 2.796875 | stackv2 | from bs4 import BeautifulSoup
import requests
import pickle
import numpy as np
df = pickle.load(open("../data/team_color_frame.pkl", "rb"))
df['logo_url'] = np.nan
leagues = df.league.unique()
def teams_in_league(league):
return df.name[df.league == league]
def extract_logo_link_from_page(url):
request = ... | 36 | 28.47 | 85 | 12 | 247 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c2d2801409259ccf_f2889a16", "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
] | [
6
] | [
61
] | [
"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"
] | precompute_logo_links.py | /python/swagbag/precompute_logo_links.py | slizb/swag-bag | MIT | |
2024-11-18T21:22:14.519085+00:00 | 1,550,281,419,000 | 61de99725ff5fa795453941baf3248122658f3fb | 3 | {
"blob_id": "61de99725ff5fa795453941baf3248122658f3fb",
"branch_name": "refs/heads/master",
"committer_date": 1550281419000,
"content_id": "bdb245c278239705d0646403d3682ca979257c06",
"detected_licenses": [
"MIT"
],
"directory_id": "aadc4179d27774e66da1bd9a5a8c1ca260c64ca6",
"extension": "py",
"fi... | 3.109375 | stackv2 | '''
Created on 13/06/2013
@author: DANTE
'''
''' Clases estaticas con metodos de clase utilizadas
para adecuar datos a un formato especifico. La clase
DataFormat contiene metodos que validan el formato
de un dato. la clase Options contiene todo lo referido
a la carga de las opciones del programa.
La clase Lang tiene t... | 137 | 34.09 | 80 | 27 | 1,067 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.code-after-unconditional-return_9c9c7281c7d5e208_a10ec0c1", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.code-after-unconditional-return", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "code... | 9 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
90
] | [
90
] | [
61
] | [
81
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | data.py | /simulador/data.py | dantebarba/disk-scheduling-simulator | MIT | |
2024-11-18T21:22:22.694972+00:00 | 1,626,096,995,000 | 5ed203c624e934e7dd2accce2dfb68fb7111c2b0 | 3 | {
"blob_id": "5ed203c624e934e7dd2accce2dfb68fb7111c2b0",
"branch_name": "refs/heads/master",
"committer_date": 1626104353000,
"content_id": "2b2a9c949db35c6570b280b9e8da2690a42ac50f",
"detected_licenses": [
"MIT"
],
"directory_id": "f647b19838c0986bb0411a5852dc1dd7eeb3ec85",
"extension": "py",
"fi... | 3.015625 | stackv2 | """
Create by: apenasrr
Source: https://github.com/apenasrr/zipind
Compresses a folder into independent parts.
Works in hybrid mode:
-Compact folder dividing into independent parts, grouping your files in
alphanumeric order.
-Respects the ordering of folders and files.
-Respects the in... | 378 | 31.8 | 112 | 16 | 2,922 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.useless-assignment-keyed_87f703cca7f0e2be_f451ce0a", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-assignment-keyed", "finding_type": "maintainability", "severity": "low", "confidence": "medium", "message": "key `'path_file_norm'... | 7 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
172,
175,
203,
205
] | [
175,
175,
205,
205
] | [
5,
45,
5,
58
] | [
50,
49,
63,
62
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"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,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | zipind_core.py | /zipind_core.py | maraes/zipind | MIT | |
2024-11-18T21:22:25.687113+00:00 | 1,688,373,111,000 | c663bd0ba7dfb974ac9432bfb27b490a145bb098 | 3 | {
"blob_id": "c663bd0ba7dfb974ac9432bfb27b490a145bb098",
"branch_name": "refs/heads/master",
"committer_date": 1688373111000,
"content_id": "59774877420c87896c50999b72a22b6bf1ae402c",
"detected_licenses": [
"MIT"
],
"directory_id": "6aab09501c21d22410740b4dc4adb968dc192774",
"extension": "py",
"fi... | 2.53125 | stackv2 | """ Some handy functions using GDAL to manage geospatial raster data. """
import os
import subprocess
from typing import Tuple
from osgeo import gdal
from osgeo.gdalconst import GA_Update
NUMPY_TO_GDAL_DTYPE = {"bool": gdal.GDT_Byte,
"uint8": gdal.GDT_Byte,
"int8": gdal.... | 364 | 34.68 | 120 | 21 | 3,164 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1843832307c159cc_4afb6b73", "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"
] | [
197,
197
] | [
197,
197
] | [
14,
59
] | [
79,
63
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess'... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | gdalport.py | /src/veranda/raster/gdalport.py | TUW-GEO/veranda | MIT | |
2024-11-18T21:22:30.198329+00:00 | 1,519,368,509,000 | abca4da860ad101f0a95c3327c8831edc861b0dc | 3 | {
"blob_id": "abca4da860ad101f0a95c3327c8831edc861b0dc",
"branch_name": "refs/heads/master",
"committer_date": 1519368509000,
"content_id": "030b3a385ab778da3deb9b250435aebb3376049a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a74b246da458b8ba31d8ab6b553d4b7b2a0cf556",
"extension": "p... | 2.625 | stackv2 | # ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ---------------------------------------------... | 76 | 30.2 | 78 | 14 | 605 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_904ad0b99d1bba09_01271aae", "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"
] | [
46
] | [
46
] | [
27
] | [
57
] | [
"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"
] | _util.py | /micronota/database/_util.py | RNAer/micronota | BSD-3-Clause | |
2024-11-18T21:22:30.656167+00:00 | 1,604,653,516,000 | 7611dae3167e7e36288d4aee2e4d56342b1f2d2d | 4 | {
"blob_id": "7611dae3167e7e36288d4aee2e4d56342b1f2d2d",
"branch_name": "refs/heads/master",
"committer_date": 1604653516000,
"content_id": "9ecdbcedde8cacdb62e90ef9995edb567e510b66",
"detected_licenses": [
"MIT"
],
"directory_id": "472578974401c83509d81ea4d832fc3fd821f295",
"extension": "py",
"fi... | 3.6875 | stackv2 | """
day10/exercise01
day10/exercise03
直接打印商品对象: xx的编号是xx,单价是xx
直接打印敌人对象: xx的攻击力是xx,血量是xx
拷贝两个对象,修改拷贝前数据,打印拷贝后数据.
体会拷贝的价值.
"""
class Commodity:
def __init__(self, cid=0, name="", price=0):
self.cid = cid
self.name = name
self.price = price
def __str__(self):
... | 31 | 21.81 | 76 | 10 | 275 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_2ff69f03d2e47b3d_1afc61ee", "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"
] | [
30
] | [
30
] | [
9
] | [
30
] | [
"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"
] | exercise03.py | /python资料/day8.15/day12/exercise03.py | why1679158278/python-stu | MIT | |
2024-11-18T21:22:34.741718+00:00 | 1,550,903,620,000 | 1ca0e14920a6924ad7077d2e05406a9e108d2dd3 | 3 | {
"blob_id": "1ca0e14920a6924ad7077d2e05406a9e108d2dd3",
"branch_name": "refs/heads/master",
"committer_date": 1550903620000,
"content_id": "ce9653656f9ccaaf60e07437852a50971a1b7888",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3da9a5717b9fab578b9e6cf1e5836e1d90d5fccb",
"extension": "py"... | 2.578125 | stackv2 | import argparse
import os
import sys
import re
import numpy as np
from collections import defaultdict
import string
import subprocess
import shlex
import nltk
nltk.download('stopwords', quiet=True)
from nltk.stem.porter import PorterStemmer
from nltk.corpus import stopwords
def read_in_data(datapath, set_name, file,... | 187 | 40.43 | 100 | 20 | 1,786 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_834b2c405d5f0dd4_9d9682a7", "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-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
79
] | [
80
] | [
9
] | [
65
] | [
"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"
] | qa-data-only-idf.py | /idf_baseline/qa-data-only-idf.py | wassname/Castor | Apache-2.0 | |
2024-11-18T21:22:35.409340+00:00 | 1,609,176,088,000 | 3a4b0506d1512660f62f802a2087c583f24f15ad | 3 | {
"blob_id": "3a4b0506d1512660f62f802a2087c583f24f15ad",
"branch_name": "refs/heads/master",
"committer_date": 1609176088000,
"content_id": "a8c5ca21d9e9d8695f4f2c28d34f7511eb122664",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cd9fd64e4f6353270e851febda6acbd27ca17d23",
"extension": "py"... | 2.59375 | stackv2 | import pickle
import tempfile
from typing import Optional, Iterator
from jina.executors.indexers import BaseKVIndexer
from jina.helper import check_keys_exist
DATA_FIELD = 'data'
ID_KEY = 'id'
CONTENT_HASH_KEY = 'content_hash'
# noinspection PyUnreachableCode
if False:
from jina.types.document import UniqueId
... | 137 | 37.77 | 151 | 18 | 1,166 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_af8e6946515d22f7_13bedfb5", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
42,
43,
51,
52
] | [
42,
43,
51,
52
] | [
28,
37,
13,
13
] | [
66,
77,
66,
77
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | cache.py | /jina/executors/indexers/cache.py | janandreschweiger/jina | Apache-2.0 | |
2024-11-18T21:22:37.275991+00:00 | 1,508,429,796,000 | 01db74fea12c732bbe88945663c147e57eb552ed | 3 | {
"blob_id": "01db74fea12c732bbe88945663c147e57eb552ed",
"branch_name": "refs/heads/master",
"committer_date": 1508429796000,
"content_id": "57b0ad55c43545f852aeb3e2dd95661e334e8e32",
"detected_licenses": [
"MIT"
],
"directory_id": "becb275d7349e92cd14eb157142cfbf66af39e44",
"extension": "py",
"fi... | 3.15625 | stackv2 | #!/usr/bin/python
import sys, fileinput, os
import xml.etree.ElementTree as ET
from collections import OrderedDict
#from itertools import islice
'''Script to align guide-moves and follower-moves with utterances into single file
This is to produce the observation matrices '''
def usage(argv):
if len(argv) != 6:
... | 300 | 29.27 | 163 | 23 | 2,554 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_39703598ee9f174b_54cacf2c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 6 | true | [
"CWE-611",
"CWE-611",
"CWE-611",
"CWE-611",
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse",
"rules.python.lang.security.use-defused-xml-parse",
"rules.python.lang.security.use-defused-xml-parse",
"rules.python.lang.security.use-defused-xml-parse",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
4,
264,
265,
266,
267,
268
] | [
4,
264,
265,
266,
267,
268
] | [
1,
14,
12,
12,
15,
15
] | [
35,
35,
33,
33,
36,
36
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)",
"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,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | alignFGmovesUtts.py | /alignFGmovesUtts.py | GCowderoy/NLP-Preprocessing | MIT | |
2024-11-18T21:22:38.126725+00:00 | 1,588,607,610,000 | a0451b1a759bf2db7b0fee3f7b78662a8275f235 | 3 | {
"blob_id": "a0451b1a759bf2db7b0fee3f7b78662a8275f235",
"branch_name": "refs/heads/master",
"committer_date": 1588607610000,
"content_id": "e9c9b17995dd20c75b58da4d1b58c5c9202d0194",
"detected_licenses": [
"MIT"
],
"directory_id": "df24aa0c0effe441473483405cf56030eb454935",
"extension": "py",
"fi... | 3.359375 | stackv2 | from os import system
import sqlite3
import time
db = sqlite3.connect("books.sqlite")
imlec = db.cursor()
imlec.execute("CREATE TABLE IF NOT EXISTS library (author, name)")
imlec.execute("CREATE TABLE IF NOT EXISTS users (id, password, isWorker)")
class Book():
def __init__(self, name, author):
self.name ... | 112 | 24.38 | 95 | 14 | 657 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_040828ede189b15b_59d6d353", "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... | 5 | 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"
] | [
17,
17,
26,
26
] | [
17,
17,
26,
26
] | [
5,
5,
9,
9
] | [
23,
23,
30,
30
] | [
"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"
] | app.py | /app.py | ahmetsurucu/libraryAutomation | MIT | |
2024-11-18T21:22:41.903149+00:00 | 1,415,893,622,000 | 7ca0b19893785d7bb30d479d608a0668c543c21a | 2 | {
"blob_id": "7ca0b19893785d7bb30d479d608a0668c543c21a",
"branch_name": "refs/heads/master",
"committer_date": 1415893622000,
"content_id": "765cb7f101dda7bae2fbb10a12104c9273a75968",
"detected_licenses": [
"MIT"
],
"directory_id": "19a2c01ff95e6ed72b53b1addd6a1d3f27f1a0da",
"extension": "py",
"fi... | 2.4375 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from django.conf import settings
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.utils.translation import ugettext_lazy as _
from disposable_email_checker import DisposableEmailChecker
from .models im... | 196 | 40.41 | 116 | 17 | 1,645 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_79419009a9162821_0abaf4c6", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'user' is being se... | 1 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
84
] | [
84
] | [
9
] | [
57
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'user' 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"
] | forms.py | /django_project/custom_user/forms.py | gokulmenon/shiny-ironman | MIT | |
2024-11-18T21:22:42.560606+00:00 | 1,501,397,157,000 | ca44ac649b7867b798d8b8d0e51e21c01ed8f946 | 3 | {
"blob_id": "ca44ac649b7867b798d8b8d0e51e21c01ed8f946",
"branch_name": "refs/heads/master",
"committer_date": 1501397157000,
"content_id": "329e996bbb9d753a873b646983b0b7b03d9d6bb1",
"detected_licenses": [
"MIT"
],
"directory_id": "09907859f4c169988bfbabf57127fc23f82f1782",
"extension": "py",
"fi... | 2.71875 | stackv2 | import networkx as nx
import re
from metrics.link_belong_modularity import *
def get_graph_info(file_path):
def extract_first_two(collection):
return [int(collection[0]), int(collection[1])]
with open(file_path) as ifs:
lines = map(lambda ele: ele.strip(), ifs.readlines())
lines = fil... | 46 | 37.41 | 112 | 18 | 414 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_554ab1e12bc3d9d9_0425227a", "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-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
27
] | [
27
] | [
21
] | [
39
] | [
"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"
] | analyze_algo_quality.py | /community_detection_algos/scripts/play_ground/analyze_algo_quality.py | nikitabatra/FYP | MIT | |
2024-11-18T21:22:44.463811+00:00 | 1,613,278,139,000 | 132e5f6dd33cf4f65c333ad6a25c4017989d1efc | 3 | {
"blob_id": "132e5f6dd33cf4f65c333ad6a25c4017989d1efc",
"branch_name": "refs/heads/main",
"committer_date": 1613278139000,
"content_id": "7e00e6dcdaba49050136032f9f31e963291aadae",
"detected_licenses": [
"MIT"
],
"directory_id": "ff4d620ae11088669ccc3fd5944b681eaad6210b",
"extension": "py",
"file... | 2.75 | stackv2 | import json
from math import ceil
from os import path, walk
from xml.dom import minidom, NotFoundErr, Node
def node_sort_key(node, page_height, lines, offset):
x = float(node.getAttribute("ayah:x"))
y = float(node.getAttribute("ayah:y"))
line_ratio = (page_height - (offset * 2)) / lines
line_number = ... | 90 | 29.68 | 105 | 19 | 640 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_785a6261c8377ec3_0b25693b", "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"
] | [
4
] | [
4
] | [
1
] | [
47
] | [
"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"
] | positions.py | /positions.py | toseefkhilji/quran-svg | MIT | |
2024-11-18T21:22:46.324714+00:00 | 1,595,901,532,000 | 8776d83172237d978492f9726730a0eaa41b60bb | 3 | {
"blob_id": "8776d83172237d978492f9726730a0eaa41b60bb",
"branch_name": "refs/heads/master",
"committer_date": 1595901532000,
"content_id": "fe42e2ff5dd57858ef7ca2de353e77097d14ada7",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "0023e6c2fd7a7228d8f0aabce976dad245f84104",
"extension": "py",
... | 2.609375 | stackv2 | from datetime import date
import os
import rdflib
from rdflib import *
# pull RDFXML files from trellis, put them into local folder
if not os.path.exists('export_xml'):# creates xml directory
print('Generating directories')
os.makedirs('export_xml')
# initialize a graph, load in UW trellis repo, and extract r... | 121 | 35.59 | 120 | 15 | 1,095 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_23ce43a1644cff3d_f0beb9a1", "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... | 5 | 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"
] | [
67,
71,
85,
99,
113
] | [
67,
71,
85,
99,
113
] | [
9,
9,
9,
9,
9
] | [
42,
47,
53,
56,
47
] | [
"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"
] | dataForRML.py | /scripts/dataForRML.py | uwlib-cams/UWLibCatProfiles | CC0-1.0 | |
2024-11-18T21:22:47.569240+00:00 | 1,528,319,947,000 | 0dd00c82475d982c562845c3797ad3180b098dc8 | 2 | {
"blob_id": "0dd00c82475d982c562845c3797ad3180b098dc8",
"branch_name": "refs/heads/master",
"committer_date": 1528319947000,
"content_id": "547336b741c672b72708e680403853aaa3346cb1",
"detected_licenses": [
"MIT"
],
"directory_id": "944a3391eb0e524df7548f1ceaaacfbc603513c1",
"extension": "py",
"fi... | 2.359375 | stackv2 | import sys
def get_screen_count_gnome():
import gi
gi.require_version('Gdk','3.0')
from gi.repository import Gdk
d = Gdk.Display()
return d.get_n_monitors()
def get_screen_count_x():
try:
# Try python-xlib
from Xlib import X, display
except ImportError:
# Try xrandr... | 23 | 23.7 | 48 | 14 | 151 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_293f94259f437384_9741e6e6", "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"
] | [
17
] | [
17
] | [
20
] | [
34
] | [
"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"
] | multimon.py | /flickpyper/multimon.py | roma-guru/flickpyper | MIT | |
2024-11-18T21:22:52.461874+00:00 | 1,590,768,041,000 | b2459a98415710b56d51b6b56eaab30f37680724 | 2 | {
"blob_id": "b2459a98415710b56d51b6b56eaab30f37680724",
"branch_name": "refs/heads/master",
"committer_date": 1590768041000,
"content_id": "ca03965b9cf0a6588a8720806726cc2f6e45fbde",
"detected_licenses": [
"MIT"
],
"directory_id": "7162be4491df4ddebb36d6d931ca77161b382e66",
"extension": "py",
"fi... | 2.359375 | stackv2 | from django.contrib.auth.models import Group
from rest_framework import serializers
from users.models import User
class UserSerialzier(serializers.ModelSerializer):
class Meta:
model=User
fields=('id','username','mobile','email','password','groups','user_permissions')
extra_kwargs = {
... | 42 | 27.93 | 88 | 13 | 274 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_d00df4c5915bcfb0_980b0e4b", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'admin' is being s... | 3 | true | [
"CWE-521",
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password",
"rules.python.django.security.audit.unvalidated-password"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
23,
34
] | [
23,
34
] | [
9,
13
] | [
37,
44
] | [
"A07:2021 - Identification and Authentication Failures",
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'admin' 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.",
"The password on 'instance' is bei... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | admin.py | /meiduo/meiduo/apps/meiduo_admin/serializers/admin.py | physili/django_test | MIT | |
2024-11-18T21:22:59.151679+00:00 | 1,648,616,765,000 | 0ddd22183924571d4bd8fc9c333bf3b038309e89 | 2 | {
"blob_id": "0ddd22183924571d4bd8fc9c333bf3b038309e89",
"branch_name": "refs/heads/master",
"committer_date": 1648616765000,
"content_id": "3b92497eb61c63c2cbe6b1c5c4dc562c7be9924f",
"detected_licenses": [
"MIT"
],
"directory_id": "3389c87a101ab3314b96bc0f8714aa87bbbdddc6",
"extension": "py",
"fi... | 2.40625 | stackv2 | import sublime
import time
import pprint
import os
import csv
import json
import datetime
from xml.sax.saxutils import unescape, quoteattr
from .. import xmltodict
from ..soap import SOAP
from ..login import soap_login, rest_login
from ... import requests, util
class ApexApi:
def __init__(self, settings, **kwarg... | 182 | 37.8 | 105 | 16 | 1,481 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_2e25cd01d09e67da_d8f19725", "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",
"CWE-295",
"CWE-295"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.requests.security.disabled-cert-validation",
"rules.python.requests.security.disabled-cert-validation"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
8,
69,
139
] | [
8,
70,
140
] | [
1,
24,
24
] | [
49,
33,
33
] | [
"A04:2017 - XML External Entities (XXE)",
"A03:2017 - Sensitive Data Exposure",
"A03:2017 - Sensitive Data Exposure"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"Certificate verification has been explicitly disabled. Thi... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"LOW",
"LOW"
] | apex.py | /salesforce/api/apex.py | xjsender/haoide | MIT | |
2024-11-18T21:23:12.779616+00:00 | 1,479,142,523,000 | 4efea511ac845b8a9e7765fcad60421fbedeff75 | 2 | {
"blob_id": "4efea511ac845b8a9e7765fcad60421fbedeff75",
"branch_name": "refs/heads/master",
"committer_date": 1479142523000,
"content_id": "95a638ae44037033c2640cad124f88e986518f09",
"detected_licenses": [
"MIT"
],
"directory_id": "dbc9deef8be7c0d3567351fa1339793c470102b2",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python
# coding: utf-8
import os
import sys
import requests
import jinja2
from flask import Flask, make_response, render_template
# import the funimation file
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import funimation
from subprocess import check_output
f = funimation... | 85 | 31.11 | 120 | 15 | 675 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_f740ef8210cc4272_77501a3f", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 3 | true | [
"CWE-79"
] | [
"rules.python.flask.security.audit.xss.make-response-with-unknown-content"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
75
] | [
75
] | [
16
] | [
55
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` will not autoescape HTML. If you are rendering HTML, write your HTML in a template file and use `flask.render_template()` which will take care ... | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | webui.py | /webui/webui.py | ABusers/A-Certain-Magical-API | MIT | |
2024-11-18T21:23:16.789733+00:00 | 1,659,960,928,000 | d86808419b1e4f0cabc708c2a4aca6e3b680e270 | 3 | {
"blob_id": "d86808419b1e4f0cabc708c2a4aca6e3b680e270",
"branch_name": "refs/heads/main",
"committer_date": 1659960928000,
"content_id": "f162cfb42653efe990167feab5fdbd5cb2c1feb5",
"detected_licenses": [
"MIT"
],
"directory_id": "42de2cf6758df695659cfc6ed6d945666dadf3c6",
"extension": "py",
"file... | 2.75 | stackv2 | """Set up the model, copy the files, get the names."""
import os
from omegaconf import DictConfig
from src.constants import (
OCEAN_RUN_PATH,
OCEAN_SRC_PATH,
OCEAN_DATA_PATH,
ATMOS_DATA_PATH,
ATMOS_TMP_PATH,
MODEL_NAMES,
VAR_DICT,
)
from src.model_utils.mem_to_input import mem_to_dict
clas... | 372 | 30 | 86 | 18 | 2,985 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_d0fb57e9cce55d08_058d4f1a", "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... | 7 | true | [
"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"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
107,
116,
125,
134,
143,
148,
156
] | [
114,
123,
132,
141,
143,
155,
163
] | [
13,
9,
9,
9,
9,
9,
9
] | [
14,
10,
10,
10,
70,
10,
10
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found dynamic conte... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | model_setup.py | /src/models/model_setup.py | sdat2/seager19 | MIT | |
2024-11-18T21:23:17.011783+00:00 | 1,612,197,127,000 | 77bcb5cecf19ce544f76449f0d39f16d3dd66bde | 3 | {
"blob_id": "77bcb5cecf19ce544f76449f0d39f16d3dd66bde",
"branch_name": "refs/heads/master",
"committer_date": 1612197127000,
"content_id": "a3f93480522d71a59495272a2d4ff4236027859e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5f3990627180d3066c8fdfa1ca300e7f04bcd930",
"extension": "py"... | 2.765625 | stackv2 | import subprocess
import logging
class DataBrokerProcess:
def __init__(self, name, cmd, env):
self.name = name
self.cmd = cmd
self.env = env
self.__start()
def __start(self):
logging.debug("Starting process {}".format(self.name))
self.__process_handle = subproc... | 56 | 30.41 | 94 | 15 | 337 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_fbe4537a24b66b18_b5d0d928", "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
] | [
33
] | [
73
] | [
"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"
] | process_supervisor.py | /buildpack/databroker/process_supervisor.py | MXClyde/cf-mendix-buildpack | Apache-2.0 | |
2024-11-18T21:23:17.607702+00:00 | 1,586,568,914,000 | c11cda2cd520efe9bd9d737dbfc3a4d648218c4c | 2 | {
"blob_id": "c11cda2cd520efe9bd9d737dbfc3a4d648218c4c",
"branch_name": "refs/heads/master",
"committer_date": 1586568914000,
"content_id": "320f62bce6469373a8100f1b9cb4e00495294b4d",
"detected_licenses": [
"MIT"
],
"directory_id": "57be05de5ee7af6f31aac79dd7b946a8a53b9dce",
"extension": "py",
"fi... | 2.453125 | stackv2 | import pprint
from Common.Common import numbered_datasets_location
import os
from os.path import join
from os import listdir
import pickle
import json
####################
##Sequence Retrieval
####################
#Everything is one level in relation to root.
#numbered_datasets_location = numbered_datasets_location
#... | 77 | 25.97 | 99 | 14 | 562 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_69c5713f96283e42_c6985e31", "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-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
68
] | [
68
] | [
7
] | [
44
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | SAbDab.py | /code/DataManagement/SAbDab.py | Eitan177/StructuralMapping | MIT | |
2024-11-18T21:51:03.862599+00:00 | 1,522,727,762,000 | 0480e2991777a58f6edd1c58362c8c1c642251e5 | 3 | {
"blob_id": "0480e2991777a58f6edd1c58362c8c1c642251e5",
"branch_name": "refs/heads/master",
"committer_date": 1522727762000,
"content_id": "4bdb5338d7f4dab2b5cf00f955422ee7aa3dcf92",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "20a649187d68c90e196ec9be9079948007325d8f",
"extension": "py"... | 2.609375 | stackv2 | import yaml
import shlex
import logging
import subprocess
class LogicalToolManager(object):
def __init__(self):
self.handlers = []
def set_handler(self, handler):
self.handlers.append(handler)
@staticmethod
def from_file(filename):
tool_manager = LogicalToolManager()
... | 75 | 25.89 | 68 | 15 | 379 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_cfdf5f136cfb1ab8_c45fa1a3", "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"
] | [
60
] | [
64
] | [
25
] | [
10
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | LogicalToolHandler.py | /libla/LogicalToolHandler.py | forensicmatt/LogicalAvacado | Apache-2.0 | |
2024-11-18T21:51:03.919585+00:00 | 1,627,764,495,000 | e7bd9478d516af634e55c1e86ea17dc9decaaa41 | 3 | {
"blob_id": "e7bd9478d516af634e55c1e86ea17dc9decaaa41",
"branch_name": "refs/heads/master",
"committer_date": 1627764495000,
"content_id": "3276f7f9d39130dc1c5b364c169dc9c55465dfef",
"detected_licenses": [
"MIT"
],
"directory_id": "7f7da4967f06d899879c1e4681812243ef567549",
"extension": "py",
"fi... | 2.5625 | stackv2 | from PIL import Image, ImageFont, ImageDraw
from jinja2 import Template
import time
class specimen:
def __init__(self, text_config, image_config):
self.text_config = text_config
self.image_config = image_config
def save_image(self, filename, image, readings):
with open(filename, 'wb') ... | 85 | 36.84 | 130 | 16 | 845 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_198c17cf1f88909e_77fe1076", "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-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
82
] | [
82
] | [
16
] | [
37
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | specimen.py | /app/specimen.py | berlonics/growlab | MIT | |
2024-11-18T21:51:13.065840+00:00 | 1,453,332,610,000 | 706ac55dbe7450627799feb235843bb20a8b5c62 | 3 | {
"blob_id": "706ac55dbe7450627799feb235843bb20a8b5c62",
"branch_name": "refs/heads/master",
"committer_date": 1453332610000,
"content_id": "3d93a382574819731896ef8aca825d3cdc681ce6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "01175abc7d44d788a322ad2c6cdc7ea5daee4165",
"extension": "p... | 2.890625 | stackv2 | ###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | 246 | 32.67 | 81 | 16 | 1,827 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_18ecbdc3219a47de_6723a419", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
35,
36
] | [
35,
36
] | [
1,
1
] | [
28,
25
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | uxml.py | /vistrails_current/vistrails/core/utils/uxml.py | lumig242/VisTrailsRecommendation | BSD-3-Clause | |
2024-11-18T21:51:14.062967+00:00 | 1,693,348,322,000 | 539c88f8b1f3928446671b962e9e4f961e694d32 | 3 | {
"blob_id": "539c88f8b1f3928446671b962e9e4f961e694d32",
"branch_name": "refs/heads/master",
"committer_date": 1693348322000,
"content_id": "e93c4b2b2f007c2b81f09beb14ae3fca79b8ebe8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5ef6c8d47864f471e26b9902d61f8c687e941f05",
"extension": "py"... | 2.609375 | stackv2 | """show_prefix_list.py
IOSXE parsers for the following show commands:
* show ip prefix-list detail
* show ipv6 prefix-list detail
"""
# Python
import re
# Metaparser
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import Schema, Any, Optional
# =============================... | 180 | 41.97 | 113 | 23 | 1,752 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_f532824cc4bd6c3b_cd7c0878", "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"
] | [
64
] | [
64
] | [
19
] | [
70
] | [
"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"
] | show_prefix_list.py | /src/genie/libs/parser/iosxe/show_prefix_list.py | CiscoTestAutomation/genieparser | Apache-2.0 | |
2024-11-18T21:51:16.153233+00:00 | 1,692,037,722,000 | 7c743e3e22d4103223623a0b8410bd3ee034e2a8 | 3 | {
"blob_id": "7c743e3e22d4103223623a0b8410bd3ee034e2a8",
"branch_name": "refs/heads/main",
"committer_date": 1692037722000,
"content_id": "24970b581b9231d57121ac0ad08e8746c24c6a87",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "553c575677be1e0f5bb7a3e021fed7e14304a146",
"extension": "py"... | 2.546875 | stackv2 | from __future__ import absolute_import, division, print_function, unicode_literals
from six.moves import input
from sdss_access import is_posix
from sdss_access.path import AccessError
from os.path import join
from os import environ
class Auth(object):
''' class for setting up SAS authenticaton for SDSS users '''... | 142 | 32.61 | 118 | 19 | 985 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_ff41b8875d77f636_0a7d74a9", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 3 | true | [
"CWE-521",
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password",
"rules.python.django.security.audit.unvalidated-password"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
100,
129
] | [
100,
129
] | [
17,
9
] | [
53,
41
] | [
"A07:2021 - Identification and Authentication Failures",
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'self' 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.",
"The password on 'self.auth' is bei... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | auth.py | /python/sdss_access/sync/auth.py | sdss/sdss_access | BSD-3-Clause | |
2024-11-18T21:51:19.483848+00:00 | 1,504,093,077,000 | 21d29d08c4d96fd29547970511ed090689063228 | 2 | {
"blob_id": "21d29d08c4d96fd29547970511ed090689063228",
"branch_name": "refs/heads/master",
"committer_date": 1504093077000,
"content_id": "0502f5a9a5ea29c03eaef8b3ed7106373a20405d",
"detected_licenses": [
"MIT"
],
"directory_id": "351a58a3825ae0f0717e105fc6126fce628dbaa8",
"extension": "py",
"fi... | 2.359375 | stackv2 | from bs4 import BeautifulSoup
from datetime import timedelta, datetime
import db
from nltk import FreqDist
import pymorphy2
from random import choice, sample
from string import punctuation
import requests
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
import numpy as np
from random impo... | 253 | 31.93 | 141 | 21 | 2,366 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_36379889fcb17b04_7509327f", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 6 | true | [
"CWE-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"
] | [
189,
189,
245,
245
] | [
189,
189,
245,
245
] | [
3,
3,
2,
2
] | [
138,
138,
88,
88
] | [
"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"
] | news.py | /Ono2_NewsBot/news.py | iagorshkov/main | MIT | |
2024-11-18T21:51:20.384000+00:00 | 1,547,442,923,000 | 68db63b0d9dfd0c43a12ea11563b067b972cc61a | 3 | {
"blob_id": "68db63b0d9dfd0c43a12ea11563b067b972cc61a",
"branch_name": "refs/heads/master",
"committer_date": 1547442923000,
"content_id": "bc83f08f2685839926a24b435dbb761ad68ebe32",
"detected_licenses": [
"MIT"
],
"directory_id": "85f7b1f692d8988b11bc55004476ab148f5eb7e7",
"extension": "py",
"fi... | 2.859375 | stackv2 | # -*- coding:utf-8 -*-
import neuralNetwork
import dataset
import math
import numpy as cupy
import sys
import struct
import os
import pickle
if os.path.exists("profile"):
command = input("Do you want to load previous profile?(y/n)\n")
else:
command = ""
if command != "y":
hiddenNodes = input("How many nod... | 94 | 28.04 | 100 | 15 | 756 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b2ea9c44cd3b7ee5_582ee981", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 6 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.pyth... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
49,
81,
84,
86,
89,
91
] | [
49,
81,
84,
86,
89,
91
] | [
15,
21,
17,
17,
13,
13
] | [
29,
35,
55,
36,
51,
32
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | main.py | /AI_Web/NumRecognition/model/main.py | xwy27/ArtificialIntelligenceProjects | MIT | |
2024-11-18T21:51:22.382255+00:00 | 1,659,415,891,000 | ebfefd4cc409ad0d6c628757133cfb623992f15d | 2 | {
"blob_id": "ebfefd4cc409ad0d6c628757133cfb623992f15d",
"branch_name": "refs/heads/master",
"committer_date": 1659415891000,
"content_id": "a2e4f66655f813a806b41009b264f326a72e9b72",
"detected_licenses": [
"MIT"
],
"directory_id": "df43fcad5e18ac7c52ffe48f088175816016fdd3",
"extension": "py",
"fi... | 2.5 | stackv2 | from micromort.resources.configs.mongodbconfig import mongodb_config
import pymongo
from datetime import datetime
import re
import micromort.constants as constants
import os
from tqdm import tqdm
import pickle
import h5py
FILE_PATHS = constants.PATHS
OUTPUTS_DIR = FILE_PATHS['OUTPUTS_DIR']
ARTICLE_LENGTH_THRESHOLD = c... | 173 | 32.94 | 106 | 20 | 1,302 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_73faa73d79d6ad0e_80735d93", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
130,
135
] | [
130,
135
] | [
9,
16
] | [
29,
31
] | [
"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"
] | general_utils.py | /micromort/utils/general_utils.py | mannuscript/micromort | MIT | |
2024-11-18T21:51:22.916291+00:00 | 1,601,503,743,000 | 97377ac0f94bd23a44b509d75da5c464c3bbe511 | 3 | {
"blob_id": "97377ac0f94bd23a44b509d75da5c464c3bbe511",
"branch_name": "refs/heads/master",
"committer_date": 1601713424000,
"content_id": "92c3b284d339dab5c40a7aa43165f91f946dc6c7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b09e3b75efb86718801eccc9d5c4164245aabdaa",
"extension": "py"... | 2.84375 | stackv2 | """
Abstracts interaction with the ipmitool utilty
by providing a pythonic interface
"""
import sys, pexpect, subprocess
class ipmitool(object):
"""Provides an interface to run the ipmitool commmands via
subprocess or expect depending on the platform. ipmitool
on sunos does not support passing the conso... | 148 | 29.82 | 121 | 15 | 992 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.useless-if-body_dfec2ef82e8d2736_943e18ae", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-if-body", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Useless if statement; both blocks ha... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
81
] | [
81
] | [
13
] | [
122
] | [
"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"
] | ipmi.py | /ipmi/ipmi.py | raags/ipmitool | Apache-2.0 | |
2024-11-18T21:51:23.394295+00:00 | 1,594,258,216,000 | fd7bd2054fe7c890e15a2f33bc1b7d930506b860 | 3 | {
"blob_id": "fd7bd2054fe7c890e15a2f33bc1b7d930506b860",
"branch_name": "refs/heads/master",
"committer_date": 1594258216000,
"content_id": "3beeb4dcfdd8cb33267f50445ef928fe25dadba2",
"detected_licenses": [
"MIT"
],
"directory_id": "c4e550b2a4f67db570ab1aa9a417a97e56fa1476",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/env python3
from pathlib import Path
import subprocess
import time
import sys
import os
import logging
import shutil
def usage():
print("{} output_dir".format(__file__))
exit()
def get_imagemagick() -> str:
if sys.platform == "win32":
return "magick.exe"
return "convert"
def has_i... | 159 | 25.21 | 168 | 17 | 1,035 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_61184ed5132b4d9b_1d47a05d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 8 | true | [
"CWE-78",
"CWE-78",
"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.dangerous-subprocess-use-tainted-env-args",
"rules.python.lang.security.audit.subp... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
21,
21,
84,
84,
84,
141,
141,
141
] | [
21,
21,
84,
84,
84,
141,
141,
141
] | [
12,
102,
9,
24,
164,
9,
24,
101
] | [
107,
106,
169,
156,
168,
106,
93,
105
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected 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,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"MEDIUM",
"HIGH",
"LOW",
"MEDIUM",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"MEDIUM",
"LOW",
"HIGH",
"MEDIUM",
"LOW"
] | export.py | /scripts/export.py | roadrunner-craft/assets | MIT | |
2024-11-18T21:51:27.352921+00:00 | 1,494,715,930,000 | 5c0ffb69bd4228d04bbbe30ba78e25d04c0d928f | 3 | {
"blob_id": "5c0ffb69bd4228d04bbbe30ba78e25d04c0d928f",
"branch_name": "refs/heads/master",
"committer_date": 1494715930000,
"content_id": "2b87224a289b0ba70a6c94fe1f8138ea8317d4de",
"detected_licenses": [
"MIT"
],
"directory_id": "f55c8dc42093807c0bb13deb207106e947207387",
"extension": "py",
"fi... | 2.5625 | stackv2 | from Bio import SeqIO
import re
import xml.etree.cElementTree as ET
import pandas as pd
import os
columns = ['Uniprot_ID', 'protein_name', 'gene_name', 'description', 'ATP_binding',
'binding_type', 'binding_location_start', 'binding_location_end', 'sequence']
df = pd.DataFrame(columns=columns)
#file2 = '... | 153 | 36.22 | 132 | 28 | 1,121 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_ef8b2571e6f9ca7d_27353505", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
3
] | [
3
] | [
1
] | [
36
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | parse_individual_xml_working.py | /parse_individual_xml_working.py | griffincalme/Some_UniProt_Scripts | MIT | |
2024-11-18T21:51:29.863787+00:00 | 1,681,276,066,000 | 02392e079a451cabcac5107b47c21e5b66bc1c35 | 2 | {
"blob_id": "02392e079a451cabcac5107b47c21e5b66bc1c35",
"branch_name": "refs/heads/master",
"committer_date": 1681276066000,
"content_id": "8fd1a4e10e7347e79a7c21a3e752c474e3806553",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "515e45025082ffbfda960635e31f99c4ca1aa7d8",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/env python
# vim:fileencoding=utf-8
# License: Apache 2.0 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
from lxml.etree import _Comment
if sys.version_info.major < 3:
from xml.etree.cElementTree imp... | 44 | 33.66 | 100 | 15 | 361 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_7192b94e4258182d_98df2b61", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
12,
14
] | [
12,
14
] | [
5,
5
] | [
101,
100
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | stdlib_etree.py | /src/html5_parser/stdlib_etree.py | kovidgoyal/html5-parser | Apache-2.0 | |
2024-11-18T21:51:31.621114+00:00 | 1,520,025,939,000 | 2d615a120cee1c7991e704b8b4032840fbea98da | 3 | {
"blob_id": "2d615a120cee1c7991e704b8b4032840fbea98da",
"branch_name": "refs/heads/master",
"committer_date": 1520025939000,
"content_id": "8421dafdb12f3ffb3715a8123706312201b41f45",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "f68ca2e94f01e2d06ba88a0093fa35f9dae1267f",
"extension": "p... | 2.5625 | stackv2 | #!/usr/bin/env python35
"""
slack_icinga_ack_translator
~~~~~~~~~~~~~~~~~~~~~~~~~~~
This service utilizes Bottle and Requests to form a shim layer
translating Slack slash command out-going webhooks into Icinga2
Problem Acknowledgement API calls. Primarily so that admins may
acknowledge issues... | 88 | 34.16 | 85 | 16 | 831 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_2aa109278c521b11_125a22d8", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 3 | true | [
"CWE-295"
] | [
"rules.python.requests.security.disabled-cert-validation"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
67
] | [
75
] | [
9
] | [
6
] | [
"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"
] | slack_icinga_ack_translator.py | /slack_icinga_ack_translator.py | Elemnir/slack_icinga_ack_translator | BSD-2-Clause | |
2024-11-18T21:51:32.286007+00:00 | 1,390,564,966,000 | 9a4e00ec1e2d9a8e8a28d5f04ff9a7b1725e8515 | 3 | {
"blob_id": "9a4e00ec1e2d9a8e8a28d5f04ff9a7b1725e8515",
"branch_name": "refs/heads/master",
"committer_date": 1390564966000,
"content_id": "ec4d69c16c139aaf4a6e11e992d6bc7e577140c4",
"detected_licenses": [
"MIT"
],
"directory_id": "8abad59a98c1d3e49fda70bbd3d8daa89b14c13a",
"extension": "py",
"fi... | 2.609375 | stackv2 | # -*- coding: utf-8 -*-
import json
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse, HttpResponseBadRequest
def allowed_action(func):
"""
All methods which shall be callable through a given Ajax 'action' must be
decorated with @allowed_action. This is requir... | 58 | 41.53 | 94 | 15 | 511 | python | [{"finding_id": "semgrep_rules.python.django.best-practice.use-json-response_4c27474bc2677c57_83c075da", "tool_name": "semgrep", "rule_id": "rules.python.django.best-practice.use-json-response", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "Use JsonResponse instead", "remediat... | 4 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse",
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
32,
51
] | [
32,
51
] | [
20,
20
] | [
42,
47
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.",
"Detected data rendered directly to the end user via 'HttpRes... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | mixins.py | /djangular/views/mixins.py | k-funk/django-angular | MIT | |
2024-11-18T21:51:34.016257+00:00 | 1,636,755,207,000 | 7e0ef4cc1e9738e14cd422d2ee0d989c2f610ada | 3 | {
"blob_id": "7e0ef4cc1e9738e14cd422d2ee0d989c2f610ada",
"branch_name": "refs/heads/master",
"committer_date": 1636755207000,
"content_id": "a50e607ebb361fff54c16acfacb2e6d1ef1ccb0e",
"detected_licenses": [
"MIT"
],
"directory_id": "65470bc5f858a9f0f12f71f3579acd8c9130bccd",
"extension": "py",
"fi... | 2.984375 | stackv2 | from validator.BaseValidator import BaseValidator
class ConditionalValidator(BaseValidator):
operator = None #should be a lambda expression which return boolean variable
message = "This value is not valid"
def validate(self, fieldA, fieldB):
fieldA = super(ConditionalValidator, self).validate(fi... | 29 | 32.69 | 80 | 15 | 195 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_e237a617a9bae77b_65cad707", "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"
] | [
24
] | [
24
] | [
29
] | [
57
] | [
"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"
] | ConditionalValidator.py | /validator/ConditionalValidator.py | mkesicki/excel_validator | MIT | |
2024-11-18T21:51:34.859211+00:00 | 1,621,088,498,000 | d8250664e73c424db6659abf94ca42683d3a8272 | 2 | {
"blob_id": "d8250664e73c424db6659abf94ca42683d3a8272",
"branch_name": "refs/heads/master",
"committer_date": 1621088498000,
"content_id": "2c45d40e7bb3a39f4ed57c660dfc536239fc7521",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "26c5caadd04e4193199d2db1ee111a1b7d8313e6",
"extension": "py"... | 2.390625 | stackv2 | #!/usr/bin/python
import xml.etree.ElementTree as ET
import sys
import urllib
def ns_tag(tag):
return str(ET.QName('http://maven.apache.org/POM/4.0.0', tag))
def version_from_deploy(nexus_artifact, file_path):
# This is where we pull down releaser and extract the component version to use.
pom_output_file ... | 35 | 35.37 | 105 | 11 | 307 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_149b200239530911_fe7a7232", "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"
] | [
2,
14
] | [
2,
14
] | [
1,
16
] | [
35,
32
] | [
"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"
] | parse-pom.py | /library/parse-pom.py | aem-design/aemdesign-deploy | Apache-2.0 | |
2024-11-18T21:51:35.744408+00:00 | 1,493,588,325,000 | abe2604e012d22e0c4ab3ae5fbc5d772d5be8020 | 3 | {
"blob_id": "abe2604e012d22e0c4ab3ae5fbc5d772d5be8020",
"branch_name": "refs/heads/master",
"committer_date": 1493588325000,
"content_id": "21d705f6577962f3a237a68d29577f86e5801408",
"detected_licenses": [
"MIT"
],
"directory_id": "802fddaae0f3d94880f9b21f451acbb01b65c554",
"extension": "py",
"fi... | 3.1875 | stackv2 | #!/usr/bin/env python
"""This script extracts the list of Finnish words from the XML file provided by
the Institute for the Languages of Finland website. Place the XML file to the
folder data/ before running this.
The XML file can be downloaded from:
http://kaino.kotus.fi/sanat/nykysuomi/kotus-sanalista-v1.tar.gz... | 31 | 29.03 | 79 | 13 | 243 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_d5fb459e9158c3ca_01be538e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
11
] | [
11
] | [
1
] | [
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"
] | finnish_word_list.py | /finnish_word_list.py | mikamustonen/cipherxword | MIT | |
2024-11-18T21:51:35.796021+00:00 | 1,587,737,285,000 | eff6595af0e6234dad6dcb7fb67f32fc7822dc63 | 3 | {
"blob_id": "eff6595af0e6234dad6dcb7fb67f32fc7822dc63",
"branch_name": "refs/heads/master",
"committer_date": 1587737285000,
"content_id": "79281d71935e3bdd9e139f592becf8e3eb473737",
"detected_licenses": [
"MIT"
],
"directory_id": "26201dfd1367b313e1635359facdb503dfdf825d",
"extension": "py",
"fi... | 3.078125 | stackv2 | from decorator import FunctionMaker
from six import PY2, wraps
if PY2:
from funcsigs import signature, _empty
else:
from inspect import signature, _empty
from . import Data
def annotate(*args, **kwargs):
"""Set function annotations (on Python2 and 3)."""
def decorator(f):
if not hasattr(f, '_... | 162 | 30.41 | 78 | 18 | 1,118 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-annotations-usage_8edef273a581309a_64a06a45", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-annotations-usage", "finding_type": "security", "severity": "low", "confidence": "low", "message": "Annotations passed to `typi... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.dangerous-annotations-usage"
] | [
"security"
] | [
"LOW"
] | [
"LOW"
] | [
22
] | [
22
] | [
13
] | [
50
] | [
"A03:2021 - Injection"
] | [
"Annotations passed to `typing.get_type_hints` are evaluated in `globals` and `locals` namespaces. Make sure that no arbitrary value can be written as the annotation and passed to `typing.get_type_hints` function."
] | [
3
] | [
"LOW"
] | [
"LOW"
] | decorators.py | /venv/lib/python3.7/site-packages/data/decorators.py | ishaandey/manim | MIT | |
2024-11-18T21:51:37.345010+00:00 | 1,554,494,434,000 | 47f770bbe41495eaf75db2d81abd3e0a804093e3 | 3 | {
"blob_id": "47f770bbe41495eaf75db2d81abd3e0a804093e3",
"branch_name": "refs/heads/master",
"committer_date": 1554494434000,
"content_id": "d3dbed6bb39e21fbdeefa412851d1b28ab7ca17b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "d9d055c23457abad989b404840be79a6d485c1a7",
"extension": "p... | 2.90625 | stackv2 | import os
import logging
class CameraFinder():
PING_OPTIONS = '-q -c 1 -W 2'
def __init__(self, ip):
if not CameraFinder.isIpValid(ip):
raise Exception('ip {} is invalid'.format(ip))
self._ip = ip
self._ping_options = CameraFinder.PING_OPTIONS
self._log = logging.ge... | 33 | 27.06 | 91 | 14 | 232 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_08a0f97ed5fca975_0dbfe497", "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"
] | [
15
] | [
15
] | [
15
] | [
92
] | [
"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"
] | camera_finder.py | /modules/camera_finder.py | bachmmmar/PTPIPCameraSync | BSD-3-Clause | |
2024-11-18T21:51:41.157170+00:00 | 1,616,501,696,000 | 02ed4a4278854010eadf7823bcdb6155cc79de23 | 3 | {
"blob_id": "02ed4a4278854010eadf7823bcdb6155cc79de23",
"branch_name": "refs/heads/main",
"committer_date": 1616501696000,
"content_id": "591013fa07be1d059f056e4c11a38d08e5b1f018",
"detected_licenses": [
"MIT"
],
"directory_id": "310ff8045a3ac38bef3da6029d1675749d0bed20",
"extension": "py",
"file... | 2.546875 | stackv2 | import re
import sys
import string
import random
import argparse
import logging
import requests
L2TP_URL = 'https://www.listvpn.net/create-account-vpn-l2tp-{}'
PPTP_URL = 'https://www.listvpn.net/create-account-vpn-pptp-{}'
logging.basicConfig(
level=logging.INFO,
format='[%(asctime)s] (%(filename)s:%(linen... | 117 | 27.57 | 79 | 13 | 783 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_38f8ae8426f45f87_d5b709ed", "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... | 3 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
68
] | [
68
] | [
33
] | [
46
] | [
"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"
] | signup.py | /signup.py | rantanevich/listvpn.net | MIT | |
2024-11-18T21:51:45.622455+00:00 | 1,517,135,398,000 | 95fe7f361dbfed520932aa7aa5a4d302a24fd0b2 | 3 | {
"blob_id": "95fe7f361dbfed520932aa7aa5a4d302a24fd0b2",
"branch_name": "refs/heads/master",
"committer_date": 1517135398000,
"content_id": "fad5b7808b0d81d2d65d8af324ce2093f8871c96",
"detected_licenses": [
"MIT"
],
"directory_id": "50f726e92a89240e384a700ca058b7a7d3b407ed",
"extension": "py",
"fi... | 2.546875 | stackv2 | import datetime
import subprocess
import os
keywords = 'partial keywords that are emitted in case of error'
start_date = '2017-10-02' # any known date when code was compiling OK
end_date = '2018-01-18' # any known date when code was not compiling OK
travis = True # is this going to be run on Travis... | 71 | 30 | 81 | 11 | 532 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_115e9eabcaa2bab7_f1bd38b6", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
28,
41
] | [
30,
44
] | [
14,
14
] | [
52,
53
] | [
"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"
] | find_reg.py | /find_reg.py | ritiek/rustc-regression-finder | MIT | |
2024-11-18T21:51:47.024221+00:00 | 1,564,456,352,000 | 2f18eea90e72a6513b6aae03d7662d08ffc5dfde | 2 | {
"blob_id": "2f18eea90e72a6513b6aae03d7662d08ffc5dfde",
"branch_name": "refs/heads/master",
"committer_date": 1564456352000,
"content_id": "32defae6ffac3baa3c77e9d34c2a5a793b01ec85",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "323f02214a1beb2951348fe6cdfab4799e7b7f1c",
"extension": "py"... | 2.390625 | stackv2 | # -*- coding: utf-8 -*-
"""
rodio:
Efficient non-blocking event loops for async concurrency and I/O
Think of this as AsyncIO on steroids
"""
import dill
import queue
import asyncio
import multiprocessing
from node_events import EventEmitter
from .internals.debug import LogDebugge... | 202 | 35.96 | 154 | 22 | 1,562 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-dill_9da83a209af07a4c_8e94f021", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-dill", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `dill`, which uses `pickle... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-dill",
"rules.python.lang.security.deserialization.avoid-dill"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
62,
114
] | [
62,
114
] | [
21,
25
] | [
38,
42
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `dill`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `dill`, which us... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | eventqueue.py | /rodio/eventqueue.py | miraclx/rodio | Apache-2.0 | |
2024-11-18T21:51:47.329832+00:00 | 1,534,490,639,000 | 5849893526d9eacbd0d0a8a3dfc9ca3ec9de2d8e | 3 | {
"blob_id": "5849893526d9eacbd0d0a8a3dfc9ca3ec9de2d8e",
"branch_name": "refs/heads/master",
"committer_date": 1534490639000,
"content_id": "7924993430bc77906de07cd15fdcaf52ece97f71",
"detected_licenses": [
"MIT"
],
"directory_id": "2e86b13ef98923eb45ee4da540b10f69f0f2f453",
"extension": "py",
"fi... | 2.515625 | stackv2 | import pickle
import re
ptx_program_file = 'ptx_add_neighbor'
ptx_program_obj = open(ptx_program_file, 'r')
ptx_program = pickle.load(ptx_program_obj)
ptx_program_obj.close()
ld_set = {}
st_set = {}
pc = 0
for program_line in ptx_program:
if len(program_line) >= 2:
opcode = program_line[0]
opcode_... | 31 | 22.9 | 45 | 13 | 213 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_a969c09d0935201a_e4dbb0bf", "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... | 6 | 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"
] | [
6,
24,
26
] | [
6,
24,
26
] | [
15,
1,
1
] | [
43,
32,
32
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | ptx_ld_set.py | /examples/ptxILA/data_race/direct/ptx_ld_set.py | pramodsu/ILA-Tools | MIT | |
2024-11-18T21:51:47.894255+00:00 | 1,544,306,322,000 | 0d58c62a02a778db92935b125287c8905f432be6 | 3 | {
"blob_id": "0d58c62a02a778db92935b125287c8905f432be6",
"branch_name": "refs/heads/master",
"committer_date": 1544306322000,
"content_id": "654a12277dccd9a547a4de36279a37d887daf327",
"detected_licenses": [
"MIT"
],
"directory_id": "0538c4f9fb1a5277783d95875780d7e0f87d01f5",
"extension": "py",
"fi... | 2.75 | stackv2 | #!/usr/bin/env python
"""Extract the reads mapping to a list of contigs from a bam file
All contigs not included in a given contig list are removed.
Fastq files are written to PREFIX.R1.fastq.gz, PREFIX.R2.fastq.gz, and
PREFIX.unpaired.fastq.gz.
This works similar to blobtools bamfilter but does not exclude unpaired... | 146 | 30.66 | 80 | 15 | 1,140 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_64892230b458f6ea_3285ac11", "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"
] | [
76
] | [
76
] | [
13
] | [
31
] | [
"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"
] | extract_csomes.py | /bin/extract_csomes.py | fennerm/fmbiopy | MIT | |
2024-11-18T21:51:49.336285+00:00 | 1,381,505,116,000 | 90415c8696166bb4e7b269b1e83044ed342dd8b6 | 2 | {
"blob_id": "90415c8696166bb4e7b269b1e83044ed342dd8b6",
"branch_name": "refs/heads/master",
"committer_date": 1381505116000,
"content_id": "d21bb4d91026872f35290de7796641a9d5146354",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "9d40b89b33897bc3a84bc87744a345af9c9a8e20",
"extension": "p... | 2.328125 | stackv2 | #/usr/bin/python
import dbus.mainloop.glib ; dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
import glob
import hashlib
import os
import pprint
import pyjavaproperties
import random
import re
import socket
import struct
import subprocess
import tempfile
import time
class CommotionCore():
def __init__(self,... | 182 | 40.54 | 154 | 20 | 1,935 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_22ed3df8a2da7a3a_ae8464b9", "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... | 14 | 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"
] | [
123,
137
] | [
124,
138
] | [
13,
13
] | [
53,
53
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | commotionc.py | /commotionc.py | glamrock/commotion-linux-py | BSD-2-Clause | |
2024-11-18T21:51:49.428707+00:00 | 1,683,817,018,000 | e028add36292e959fca1d0e4e8a8f6fd0bf9ebbf | 3 | {
"blob_id": "e028add36292e959fca1d0e4e8a8f6fd0bf9ebbf",
"branch_name": "refs/heads/master",
"committer_date": 1683817018000,
"content_id": "29496521f62686bf86399133d40432cefad570a9",
"detected_licenses": [
"MIT"
],
"directory_id": "187b1bbbef2ed779486c22fa9bb8003ececc363a",
"extension": "py",
"fi... | 2.640625 | stackv2 | """Basic encode/decode utils, taken from PyJWT."""
from __future__ import annotations
import calendar
import datetime
from typing import Sequence
from django.conf import settings
from jwt import (
decode as jwt_decode,
encode as jwt_encode,
exceptions,
get_unverified_header,
)
# verification options ... | 85 | 26.96 | 81 | 13 | 584 | python | [{"finding_id": "semgrep_rules.python.jwt.security.audit.jwt-python-exposed-data_7a1334c552256bff_671a79bf", "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"
] | [
44
] | [
44
] | [
12
] | [
52
] | [
"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"
] | utils.py | /request_token/utils.py | yunojuno/django-request-token | MIT | |
2024-11-18T21:51:50.482857+00:00 | 1,499,818,714,000 | 72699c508922f4710be52c74dc4f8453d683ff35 | 3 | {
"blob_id": "72699c508922f4710be52c74dc4f8453d683ff35",
"branch_name": "refs/heads/master",
"committer_date": 1499818714000,
"content_id": "4ca510460133a1ef6e92c54d6b8a574c3e223fec",
"detected_licenses": [
"MIT"
],
"directory_id": "6dfc5b41ca954e84a1daaf131ed38ae92f62547e",
"extension": "py",
"fi... | 2.6875 | stackv2 | import os
import sys
import json
from django.http import HttpResponse
sys.path.append(os.path.join(os.path.dirname(__file__),"..", "tellina_learning_module"))
from bashlex import data_tools
## load the manpage expl file, note that the root should be before tellina
with open(os.path.join('website', 'manpage_expl.json... | 192 | 36.09 | 118 | 21 | 1,787 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_12da2231bb02801d_3ba95411", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ... | 3 | true | [
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse",
"rules.python.django.security.audit.xss.direct-use-of-httpresponse",
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
49,
55,
57
] | [
49,
55,
57
] | [
20,
18,
18
] | [
57,
54,
54
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.",
"Detected data rendered directly to the end user via 'HttpRes... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | cmd2html.py | /website/cmd2html.py | jyluo/tellina | MIT | |
2024-11-18T21:51:52.222323+00:00 | 1,496,694,721,000 | 5b67dc446dde175a3d1fe158a12e780405f5a078 | 3 | {
"blob_id": "5b67dc446dde175a3d1fe158a12e780405f5a078",
"branch_name": "refs/heads/master",
"committer_date": 1496694721000,
"content_id": "bc7f2e04ed313ac448916973873e11be992c90f3",
"detected_licenses": [
"MIT"
],
"directory_id": "0e46d6af2970335336559f2288a2f8cd69ecd9d0",
"extension": "py",
"fi... | 2.765625 | stackv2 | import random
import model
import cPickle as pickle
import numpy as np
def main():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--classifier", choices=model.CLASSIFIERS.keys(), default=model.DEFAULT_CLASSIFIER,
help="The classifier used for creating the pr... | 36 | 41.33 | 107 | 12 | 332 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_fd26ec286e615adf_246e66b8", "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-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
20,
20
] | [
20,
20
] | [
16,
16
] | [
30,
30
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | sample_results.py | /sample_results.py | uncommoncode/feature_explorer | MIT | |
2024-11-18T21:51:56.669902+00:00 | 1,577,621,574,000 | 51419702b425d931eaafcadcbfb095ad02945a8b | 3 | {
"blob_id": "51419702b425d931eaafcadcbfb095ad02945a8b",
"branch_name": "refs/heads/master",
"committer_date": 1577621574000,
"content_id": "9918fa8e30b2a2b398458665e93ed371607d2689",
"detected_licenses": [
"MIT"
],
"directory_id": "5cf3f1180be891bb5a8ca7b0e8f9b7650ac5a69c",
"extension": "py",
"fi... | 2.890625 | stackv2 | import gzip
import json
import requests
import string
import xml.etree.ElementTree as etree
# Converts the KANJIDIC dictionary in xml.gz format into JSON discarding unneeded data
# The data is downloaded by the script from the official KANJIDIC project website
# Outputs kanjidic.json with stroke, grade, freq, jlpt, me... | 77 | 37.73 | 112 | 20 | 821 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_b3bf500f885335fa_2d4e927f", "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"
] | [
5
] | [
5
] | [
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"
] | kanjidic.py | /tools/kanjidic.py | davidluzgouveia/kanji-data | MIT | |
2024-11-18T21:52:00.800640+00:00 | 1,619,375,041,000 | 6c028d301de65d2fbe67c02e5913eecf016b2e46 | 2 | {
"blob_id": "6c028d301de65d2fbe67c02e5913eecf016b2e46",
"branch_name": "refs/heads/main",
"committer_date": 1619375041000,
"content_id": "eee2ff6d775c5fe439e6afb599d4e6c508251fb6",
"detected_licenses": [
"MIT"
],
"directory_id": "ec95dffd04c4dbe87bc665fce9f2facf880247fd",
"extension": "py",
"file... | 2.46875 | stackv2 | from django.contrib.auth import get_user_model
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from user.utils import normalize_email
class UserSerializer(serializers.ModelSerializer):
"""
Serializer for the users object
"""
class Meta:
model = ge... | 79 | 28.19 | 74 | 13 | 435 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_0235b45123b44738_d83aee38", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'user' is being se... | 1 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
34
] | [
34
] | [
13
] | [
40
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'user' 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"
] | serializers.py | /app/user/serializers.py | DmitryBovsunovskyi/workout-restfull-api | MIT | |
2024-11-18T21:52:02.621158+00:00 | 1,497,544,694,000 | a5cf2cef1535b4185f37636cb0265e810b895a59 | 2 | {
"blob_id": "a5cf2cef1535b4185f37636cb0265e810b895a59",
"branch_name": "refs/heads/master",
"committer_date": 1497544694000,
"content_id": "bf3344aa53f0da451c4c17cd89bcc33b4f9b26ca",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "dc75caa9148738e709f11703203190e1a22f56b3",
"extension": "py"... | 2.390625 | stackv2 | # Copyright 2017 Simon Kennedy <sffjunkie+code@gmail.com>
#
# 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 ... | 262 | 31.14 | 83 | 19 | 1,658 | python | [{"finding_id": "semgrep_rules.python.django.security.injection.request-data-write_aebdf3d6fb6cd38b_d68b19ab", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.request-data-write", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Found user-controlled reque... | 1 | true | [
"CWE-93"
] | [
"rules.python.django.security.injection.request-data-write"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
215
] | [
217
] | [
9
] | [
44
] | [
"A03:2021 - Injection"
] | [
"Found user-controlled request data passed into '.write(...)'. This could be dangerous if a malicious actor is able to control data into sensitive files. For example, a malicious actor could force rolling of critical log files, or cause a denial-of-service by using up available disk space. Instead, ensure that requ... | [
5
] | [
"MEDIUM"
] | [
"MEDIUM"
] | client.py | /src/jsonrpc/client.py | sffjunkie/jsonrpc | Apache-2.0 | |
2024-11-18T21:52:06.976693+00:00 | 1,621,819,517,000 | e322173043c2c5e33a149043bcfd21b4a6e57de1 | 3 | {
"blob_id": "e322173043c2c5e33a149043bcfd21b4a6e57de1",
"branch_name": "refs/heads/main",
"committer_date": 1621819517000,
"content_id": "f537eb8658fb4676b5a1563e089a6eb0bfa7daf1",
"detected_licenses": [
"MIT"
],
"directory_id": "9998ff1d80a5442970ffdc0b2dd343e3cab30ee8",
"extension": "py",
"file... | 2.59375 | stackv2 | """
v.e.s.
To make FPC predictions
MIT License
Copyright (c) 2020 Cesar A. Gomez
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... | 142 | 38.08 | 156 | 14 | 1,340 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_d2c103dbfdbb9b57_ee81588f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi... | 5 | true | [
"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"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
114,
118,
142
] | [
114,
118,
142
] | [
5,
5,
5
] | [
101,
101,
149
] | [
"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
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | lo_predict.py | /lo_predict.py | cgomezsu/FIAQM | MIT | |
2024-11-18T21:52:08.416902+00:00 | 1,530,803,559,000 | b13c13a903d8988fe21382121b160fff3afa6458 | 2 | {
"blob_id": "b13c13a903d8988fe21382121b160fff3afa6458",
"branch_name": "refs/heads/master",
"committer_date": 1530803559000,
"content_id": "9bbaefc13fb870fb4b5569015a79c537a2fe2b85",
"detected_licenses": [
"MIT"
],
"directory_id": "34f33f67f3c6212cac02cfd10d80a7a0c8f8c0c1",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
"""Command line utility to serve a Mapchete process."""
import logging
import logging.config
import os
import pkgutil
from rasterio.io import MemoryFile
import six
from flask import (
Flask, send_file, make_response, render_template_string, abort, jsonify)
import mapchete
from mapchete.tile ... | 131 | 31.95 | 79 | 15 | 1,017 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.avoid_app_run_with_bad_host_8340e7b4cd6cc5ee_df692f47", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.avoid_app_run_with_bad_host", "finding_type": "security", "severity": "medium", "confidence": "high", "message": "Running flask app wit... | 7 | true | [
"CWE-96",
"CWE-79"
] | [
"rules.python.flask.security.audit.render-template-string",
"rules.python.flask.security.audit.xss.make-response-with-unknown-content"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
70,
124
] | [
77,
124
] | [
16,
20
] | [
10,
65
] | [
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Found a template created with string formatting. This is susceptible to server-side template injection and cross-site scripting attacks.",
"Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` w... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | serve.py | /mapchete/cli/serve.py | puqiu/mapchete | MIT | |
2024-11-18T21:52:09.067060+00:00 | 1,618,526,985,000 | 633759e65eea969cfd20163689efc4b44313b76a | 2 | {
"blob_id": "633759e65eea969cfd20163689efc4b44313b76a",
"branch_name": "refs/heads/main",
"committer_date": 1618526985000,
"content_id": "b34207dccdca066ff19f5cd979c4c4432b20a9e5",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "80c89c2aa0ecafbecc2692c29a55a5e4c675dd28",
"extension": "py"... | 2.484375 | stackv2 | import os
import pickle
from .model import Model
class SklearnModel(Model):
def __init__(self, config: dict, outdir: str = None):
super().__init__(outdir=outdir)
self.config = config
model_type = config['model']['type']
model_class = self.dynamically_import_class(model_type)
... | 21 | 27.05 | 89 | 17 | 141 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f37e9bb8d92154ac_eb9c30f4", "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"
] | [
20
] | [
20
] | [
14
] | [
40
] | [
"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"
] | sklearn_model.py | /neat/link_prediction/sklearn_model.py | SocioProphet/NEAT | BSD-3-Clause | |
2024-11-18T22:02:40.727800+00:00 | 1,690,164,914,000 | a679994046badebfd89a17f25b4388dbc51d97d6 | 2 | {
"blob_id": "a679994046badebfd89a17f25b4388dbc51d97d6",
"branch_name": "refs/heads/main",
"committer_date": 1690164914000,
"content_id": "662ae4209650e263c7441c28ddd7a2498d464b0b",
"detected_licenses": [
"MIT"
],
"directory_id": "8cbf0fb3330448dd59ba25734f76141f0180c46c",
"extension": "py",
"file... | 2.453125 | stackv2 | """License Information
metaboverse-cli
Back-end CLI Tool for Curating Metabolic Networks for Metaboverse
https://github.com/Metaboverse/metaboverse-cli/
alias: metaboverse-cli
MIT License
Copyright (c) Jordan A. Berg, The University of Utah
Permission is hereby granted, free of charge, to any person obtaining a copy... | 82 | 27.11 | 78 | 12 | 520 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_b957b4977221648e_efb7d785", "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"
] | [
80
] | [
80
] | [
5
] | [
56
] | [
"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"
] | utils.py | /cli/metaboverse_cli/curate/utils.py | Metaboverse/Metaboverse | MIT | |
2024-11-18T22:02:41.487924+00:00 | 1,647,480,227,000 | 4717e6ebfebe81a3f9e986a4c85ff46dfaf434f2 | 2 | {
"blob_id": "4717e6ebfebe81a3f9e986a4c85ff46dfaf434f2",
"branch_name": "refs/heads/main",
"committer_date": 1647480227000,
"content_id": "a5a038784286c0c3c47d49741b11ac71c807b3d4",
"detected_licenses": [
"MIT"
],
"directory_id": "eb7fdb10dac05c8b41bbe19f16ec7f5e7b1ec6d6",
"extension": "py",
"file... | 2.46875 | stackv2 | #%%
from itertools import product
import pandas as pd
import numpy as np
import pickle
def unpickle(file):
with open(file, "rb") as fo:
dict = pickle.load(fo, encoding="bytes")
return dict
#%% code for EWC, Online_EWC, SI, LwF
algs = ["EWC", "Online_EWC", "SI", "LwF"]
shift_fold = 6
total_tasks = 10... | 153 | 31.01 | 81 | 22 | 1,079 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_d5f5e0314d46c659_b05c05dc", "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",
"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"
] | [
10,
82,
152
] | [
10,
82,
152
] | [
16,
17,
17
] | [
49,
40,
40
] | [
"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"
] | benchmarking_pickle_conversion.py | /benchmarks/cifar_exp/benchmarking_pickle_conversion.py | neurodata/ProgLearn | MIT | |
2024-11-18T22:02:45.973527+00:00 | 1,598,708,420,000 | 2a871cd88624c5b59b17e4c7d5ba0e577a0b25fc | 3 | {
"blob_id": "2a871cd88624c5b59b17e4c7d5ba0e577a0b25fc",
"branch_name": "refs/heads/master",
"committer_date": 1598708420000,
"content_id": "d0a07b16e5c31d5c8b70e2ec2c27e02529c6d90b",
"detected_licenses": [
"MIT"
],
"directory_id": "ba0d42eeef710606c4a8637224ed5e3d40eadfbf",
"extension": "py",
"fi... | 2.5625 | stackv2 | import time
import pickle
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import tensorflow as tf
from nn.net import TransformerLSTMSingleId
from nn.dataset import SingleIdTrainDataset
# --------------------------------------------------------------------------------------------------
# cons... | 183 | 30.28 | 100 | 18 | 1,372 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_14661fee6bdc4cac_5209df22", "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"
] | [
45
] | [
45
] | [
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"
] | tf_lstm.py | /nn/tf_lstm.py | yzheng51/tencent-2020 | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.