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:26:13.224702+00:00 | 1,495,065,887,000 | e689407f093bb917e5cadee1dfeb3beb93d7c60b | 3 | {
"blob_id": "e689407f093bb917e5cadee1dfeb3beb93d7c60b",
"branch_name": "refs/heads/master",
"committer_date": 1495065887000,
"content_id": "efb4ef8686d54c26c068c811bb328a1f30e1cc01",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "376aa169b4b880ce72fcf1d6131736c4e7f71ed7",
"extension": "py"... | 2.546875 | stackv2 | #!/usr/bin/env python
# hgvm-builder chromMatcher.py: match chromosomes from one assembly to another
"""
Takes two assembly FASTAs, a reference and a query, and matches each contig in
the query to one or more contigs in the reference by aligning parts of it.
The reference should have already been indexed with `bwa in... | 238 | 32.47 | 83 | 18 | 1,721 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_dbdc0cfc7b2010e5_0d7d4ca6", "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"
] | [
121
] | [
121
] | [
17
] | [
84
] | [
"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"
] | chromMatcher.py | /scripts/chromMatcher.py | BD2KGenomics/hgvm-builder | Apache-2.0 | |
2024-11-18T22:26:14.892323+00:00 | 1,529,470,115,000 | c783333cf950f53d8e4531b276b2f3ee5f6265c1 | 3 | {
"blob_id": "c783333cf950f53d8e4531b276b2f3ee5f6265c1",
"branch_name": "refs/heads/master",
"committer_date": 1529470115000,
"content_id": "716a480ead3f2acf3e761e5b964c29190a06a466",
"detected_licenses": [
"Unlicense"
],
"directory_id": "576fe0155c31fa5444c9859757a714040ea81cfd",
"extension": "py",... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
# Rafael Corsi @ insper.edu.br
# Dez/2017
# Disciplina Elementos de Sistemas
#
# script para gerar hack a partir de nasm
# suporta como entrada um único arquivo
# ou um diretório
# Possibilita também a geração do .mif
import os,sys
import argparse
import subprocess
import re
TOOLSPATH = os.pat... | 75 | 30.65 | 108 | 22 | 643 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_02dd4b540b30a042_c9ca1c48", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
25,
25
] | [
25,
25
] | [
12,
44
] | [
49,
48
] | [
"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"
] | assembler.py | /Projetos/tools/scripts/assembler.py | mariaeduardabicalho/Z01 | Unlicense | |
2024-11-18T22:26:25.856895+00:00 | 1,612,505,444,000 | 65814fe3c06cd48d0a9642f33e6f4acf75dabc6e | 2 | {
"blob_id": "65814fe3c06cd48d0a9642f33e6f4acf75dabc6e",
"branch_name": "refs/heads/master",
"committer_date": 1612505444000,
"content_id": "5819ccbc2266b22efaf946f78a66413da63bf652",
"detected_licenses": [
"MIT"
],
"directory_id": "94bd1e0d8caae89e8ae7b917d78fb241df650d46",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/10/12 11:27
# @Author : AnNing
import argparse
from warnings import filterwarnings
from schedule import *
filterwarnings("ignore")
resolution_types = {
'1KM',
'1KMCorrect',
'4KM',
'4KMCorrect',
}
functions = {
'fy4a_save_4km_orbit... | 69 | 31.28 | 111 | 12 | 627 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.string-concat-in-list_48e1373808febd0d_f7378360", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.string-concat-in-list", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Dete... | 2 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
68
] | [
68
] | [
5
] | [
24
] | [
"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"
] | run.py | /run.py | NingAnMe/GFSSI | MIT | |
2024-11-18T22:26:27.857964+00:00 | 1,408,958,947,000 | 3e8035c27a287de7fb0b665b9b9aa2c05ed681c8 | 2 | {
"blob_id": "3e8035c27a287de7fb0b665b9b9aa2c05ed681c8",
"branch_name": "refs/heads/master",
"committer_date": 1408958947000,
"content_id": "26bba3da999fc54f2d5f86b143688c8d94cbf81d",
"detected_licenses": [
"MIT"
],
"directory_id": "d6854158dd802aee2497e37d9e459389929f057c",
"extension": "py",
"fi... | 2.40625 | stackv2 | from __future__ import absolute_import, division, print_function, unicode_literals
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
import subprocess
from os.path import join, exists
from pgrunner.commands import ROOT, CURRENT, \
ensure_stopped, ensure_started, ac... | 56 | 30.07 | 84 | 14 | 344 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c815d98d61574109_422bd4a9", "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"
] | [
36
] | [
36
] | [
12
] | [
32
] | [
"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"
] | pg_snapshot.py | /pgrunner/management/commands/pg_snapshot.py | wojas/django-pgrunner | MIT | |
2024-11-18T20:39:39.406574+00:00 | 1,593,735,825,000 | f94eb30368cc068be271ae2b58769ca0aff5ac9e | 2 | {
"blob_id": "f94eb30368cc068be271ae2b58769ca0aff5ac9e",
"branch_name": "refs/heads/master",
"committer_date": 1593735825000,
"content_id": "0b60631f38138e4c4f64d5f92c87b197d234d074",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "67c7df20f38cea62626303facd23fbfa3265bddc",
"exten... | 2.359375 | stackv2 | """
crop the cluster proposals
-------------------------------
Written by Fan Yang
-------------------------------
"""
import pickle,json,os,cv2
import numpy as np,glob
from ClusterMerge import ICM,NMM
def load_cluster_proposals(proposal_file):
"""
:param proposal_file: cluster proposal_file:
:return: clust... | 346 | 39.9 | 146 | 19 | 3,608 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_74cbe8a46f3f6cac_cfe6fefb", "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"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
16,
25
] | [
16,
25
] | [
16,
16
] | [
30,
30
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | crop_cluster_proposals.py | /detectron/ops/crop_cluster_proposals.py | vasevarad/Clustered-Object-Detection-in-Aerial-Image | Apache-2.0,MIT | |
2024-11-18T20:39:39.802458+00:00 | 1,688,378,614,000 | 3042779c650874fdf9440bc58b0a7f97d7c2a63c | 2 | {
"blob_id": "3042779c650874fdf9440bc58b0a7f97d7c2a63c",
"branch_name": "refs/heads/master",
"committer_date": 1688378614000,
"content_id": "506fff91af6e299816aa7b56206c73cc36747d20",
"detected_licenses": [
"MIT"
],
"directory_id": "c544b4a171b55fb98e2a17aa3068b599301585ac",
"extension": "py",
"fi... | 2.484375 | stackv2 | import subprocess
import shlex
from plasTeX.Imagers import Imager as _Imager
class pdftoppm(_Imager):
""" Imager that uses libpoppler's pdftoppm to convert pdf to png """
command = 'pdftoppm -png -r 150'
compiler = 'pdflatex'
fileExtension = '.png'
def verify(self):
"""
pdftoppm w... | 54 | 33.43 | 97 | 16 | 415 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7396fa18a574c793_b3703dd1", "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.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
21,
22,
45
] | [
25,
22,
45
] | [
16,
39,
9
] | [
57,
43,
98
] | [
"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
] | [
"LOW",
"HIGH",
"LOW"
] | [
"HIGH",
"LOW",
"HIGH"
] | pdftoppm.py | /plasTeX/Imagers/pdftoppm.py | plastex/plastex | MIT | |
2024-11-18T20:39:53.798207+00:00 | 1,528,413,602,000 | 27073b4f84118a73a15828b3b08c10a604e36394 | 3 | {
"blob_id": "27073b4f84118a73a15828b3b08c10a604e36394",
"branch_name": "refs/heads/master",
"committer_date": 1528413602000,
"content_id": "aa481aa095f7ef51af8ea547b992d23a2d683dbe",
"detected_licenses": [
"MIT"
],
"directory_id": "1475fd4bf28de5647860e0d106af2b459e114ae9",
"extension": "py",
"fi... | 2.625 | stackv2 | """
Module to test differing featuresets.
"""
import os
import itertools
import pandas as pd
class Ablation_Experiment:
# public
def __init__(self, config_obj, app_obj, util_obj):
self.config_obj = config_obj
self.app_obj = app_obj
self.util_obj = util_obj
def run_experiment(self... | 84 | 34.83 | 78 | 15 | 677 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_6d685946973b4906_8f5d90ff", "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... | 3 | 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"
] | [
69,
70,
71
] | [
69,
70,
71
] | [
9,
9,
9
] | [
45,
49,
49
] | [
"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"
] | ablation_exp.py | /experiments/ablation_exp.py | snspam/sn_spam | MIT | |
2024-11-18T20:39:59.125064+00:00 | 1,474,340,285,000 | 3adb723fea5bcc4057632526c9b67a40115fad11 | 3 | {
"blob_id": "3adb723fea5bcc4057632526c9b67a40115fad11",
"branch_name": "refs/heads/master",
"committer_date": 1474340285000,
"content_id": "95a54905b9530f6e418507490d3ad061610fe0c9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e71220de767c2bd5ce6593fcb1f8ae4791ac9b32",
"extension": "py"... | 2.921875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import json
import shutil
import subprocess
import time
def ReadKddsToBeCalculated(fname):
"""
self explanatory
"""
listKdds=[]
with open(fname,'r') as f:
for line in f:
listKdds.append(line.rstrip('\n'))
... | 138 | 21.12 | 73 | 15 | 838 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_bcacbd4d44bf5556_26b13b9b", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 7 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
115,
115
] | [
115,
115
] | [
18,
45
] | [
50,
49
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | addCluster.py | /XcScripts/addCluster.py | Iwan-Zotow/runEGS | Apache-2.0 | |
2024-11-18T20:40:06.335891+00:00 | 1,628,166,296,000 | 54c0a9a55c57b6fa9cae8b53f9b8068f1665ba44 | 3 | {
"blob_id": "54c0a9a55c57b6fa9cae8b53f9b8068f1665ba44",
"branch_name": "refs/heads/master",
"committer_date": 1628166296000,
"content_id": "f11d26bee4a5d0e41a892077e260f777ce370ef0",
"detected_licenses": [
"MIT"
],
"directory_id": "3888201dc005d7a2eb70c0b1abe4458b11a920cd",
"extension": "py",
"fi... | 2.65625 | stackv2 | import copy
import pickle
import numpy as np
import time
from globals import *
class User:
def __init__(self):
self.topics = np.array(TOPICS)
self.width_of_keyboard = WIDTH_OF_KEYBOARD
self.mode = MODE
self.setting_topic_name = SETTINGS_TOPIC_NAME
# self.neural_network
de... | 64 | 24.91 | 71 | 14 | 408 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_93cbe4128ad257d5_e0abc6e8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
19,
63
] | [
19,
63
] | [
16,
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"
] | loading.py | /data_processing/loading.py | VTGcon/telegram-news-bot | MIT | |
2024-11-18T20:40:06.436311+00:00 | 1,634,416,404,000 | 6579a5a9f687343f09071e9c2db608ea914e946b | 3 | {
"blob_id": "6579a5a9f687343f09071e9c2db608ea914e946b",
"branch_name": "refs/heads/main",
"committer_date": 1634416404000,
"content_id": "24cdd4dec0a93f2f6fd26014fa10f3cb6083d11a",
"detected_licenses": [
"MIT"
],
"directory_id": "e734b1090fc9db60ef25c8dc636d3762d53d97a7",
"extension": "py",
"file... | 2.65625 | stackv2 | from subprocess import Popen, PIPE, STDOUT
import os,sys
import argparse
import asyncio
#taken from https://stackoverflow.com/questions/55003789/python-call-callback-after-async-function-is-done
def run_async(callback):
def inner(func):
def wrapper(*args, **kwargs):
def __exec():
... | 175 | 29.33 | 127 | 19 | 1,199 | python | [{"finding_id": "semgrep_rules.python.lang.compatibility.python36-compatibility-Popen2_65cfbc2bde25e354_02022835", "tool_name": "semgrep", "rule_id": "rules.python.lang.compatibility.python36-compatibility-Popen2", "finding_type": "compatibility", "severity": "high", "confidence": "medium", "message": "the `encoding` a... | 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"
] | [
32,
32
] | [
32,
32
] | [
23,
104
] | [
109,
108
] | [
"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"
] | Pr0xyChess.py | /Pr0xyChess.py | tryingsomestuff/Pr0xyChess | MIT | |
2024-11-18T20:40:07.100593+00:00 | 1,573,560,004,000 | 40dce58b950fe47f4e999a54fa2dc2d15c8c86b8 | 2 | {
"blob_id": "40dce58b950fe47f4e999a54fa2dc2d15c8c86b8",
"branch_name": "refs/heads/master",
"committer_date": 1573560004000,
"content_id": "448fc10ee5981bc28695ed1c6c31295aa66a8b24",
"detected_licenses": [
"BSD-2-Clause",
"BSD-3-Clause"
],
"directory_id": "17ca505b759d1b82f4066c139cbc8cb23eb8c715... | 2.484375 | stackv2 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import torchvision
from torchvision import datasets, models, transforms
import copy
import os
import shutil
import pickle
import sys
sys.path.append('../')
... | 271 | 26.62 | 104 | 13 | 1,829 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d868dfe1d97b3a75_4f3aab55", "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-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
210,
251
] | [
210,
251
] | [
17,
2
] | [
36,
28
] | [
"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_utils.py | /utils/model_utils.py | sudhirpratapyadav/MAS-PyTorch | BSD-2-Clause,BSD-3-Clause | |
2024-11-18T20:40:07.160728+00:00 | 1,420,329,907,000 | 27bd05abd1ab4be61a596e4ac59f3642522d8b7f | 3 | {
"blob_id": "27bd05abd1ab4be61a596e4ac59f3642522d8b7f",
"branch_name": "refs/heads/master",
"committer_date": 1420329907000,
"content_id": "76fe6ccbb73ca975e82cf77f59857acdd588fe15",
"detected_licenses": [
"MIT"
],
"directory_id": "0e2cc91d328a39674a08a8740ac4e341f401fdd5",
"extension": "py",
"fi... | 2.984375 | stackv2 | #! /usr/bin/env python
#coding=utf-8
from TestUtil import printLog
from subprocess import Popen, PIPE, call
import logging
class Shell(object):
def __init__(self):
pass
'''
used to get the command output
'''
def runShellCmd(self, cmd):
printLog("[runShellCmd] Running cmd:"+ cmd)
... | 37 | 30.27 | 91 | 15 | 280 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_dba51366e2017fb3_7952d546", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
17,
17,
32,
32
] | [
17,
17,
32,
32
] | [
15,
32,
12,
28
] | [
63,
36,
33,
32
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | Shell.py | /engine/Shell.py | xinquanking/test4u | MIT | |
2024-11-18T21:08:07.914137+00:00 | 1,625,149,285,000 | 9df886556740fd7cc1b9e5d59be1380b6569a5b5 | 3 | {
"blob_id": "9df886556740fd7cc1b9e5d59be1380b6569a5b5",
"branch_name": "refs/heads/master",
"committer_date": 1625149285000,
"content_id": "6a3d7030e2e15d0ec6fa10528033546ce0b5cf70",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "428193044f36337e681aadc6cb070e2cbd967db1",
"extension": "py"... | 3 | stackv2 | """
This is the deployments module and supports all the ReST actions for the
platform collection
"""
from pprint import pformat
from flask import abort, make_response
from config import app, db
from models import Platform, PlatformSchema
def read_all():
"""
This function responds to a request for /api/platf... | 163 | 28.69 | 81 | 14 | 1,079 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.xss.make-response-with-unknown-content_80bc2d6875a82d37_41f452c7", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "... | 1 | true | [
"CWE-79"
] | [
"rules.python.flask.security.audit.xss.make-response-with-unknown-content"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
159
] | [
159
] | [
16
] | [
73
] | [
"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"
] | platform.py | /tb_houston_service/platform.py | andy12838729/tb-houston-service | Apache-2.0 | |
2024-11-18T21:08:08.306292+00:00 | 1,626,970,509,000 | 5ca7484bb8fe2b9ea7ec8e345864e1d1c2def6ee | 2 | {
"blob_id": "5ca7484bb8fe2b9ea7ec8e345864e1d1c2def6ee",
"branch_name": "refs/heads/main",
"committer_date": 1626970509000,
"content_id": "8dbc87cc01b71bc2def55ef1e3dc2978b1a94db5",
"detected_licenses": [
"MIT"
],
"directory_id": "129797b4ad7c3e47a5e6ca2606c0554449b01a74",
"extension": "py",
"file... | 2.375 | stackv2 | import requests,os,sys
from N4Tools.Design import ThreadAnimation,Color,Text,Square
from bs4 import BeautifulSoup as Soup
sys.path.append(os.path.abspath(__file__).split('/bin')[0])
TOOL_NAME = __file__.split('/')[-1].split('.')[0]
from shell import BaseShell
Namelib=input(Color().reader('[$LYELLOW]SearchLib[$GREEN]~[$... | 81 | 32.48 | 116 | 20 | 818 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_37f3e5432dc32d66_f10b37ab", "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 ... | 5 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
60
] | [
60
] | [
4
] | [
22
] | [
"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"
] | lib-installer.py | /base/bin/lib-installer.py | terxbot/HackerMode | MIT | |
2024-11-18T21:08:09.336494+00:00 | 1,313,604,844,000 | c092ef955f636f2a8b9517c7937f1992da19f61e | 2 | {
"blob_id": "c092ef955f636f2a8b9517c7937f1992da19f61e",
"branch_name": "refs/heads/master",
"committer_date": 1313604844000,
"content_id": "a63c3348b0a35f2782b8faca11032ea6010e963d",
"detected_licenses": [
"MIT"
],
"directory_id": "20e220ae7ca583d200e3039fa5f4ed4be59e0fca",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/bin/env python
# Copyright (C) 2011 Michael Ranieri <michael.d.ranieri at gmail.com>
import sys
import json
import re
import shelve
def main(params):
msg, user, channel, users = params
receiver, msg = re.split(':', msg, 1)
receiver = receiver.lower()
for k, u in users.iteritems():
i... | 40 | 19.43 | 88 | 12 | 227 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_9a81f7876fc52c96_5a14fc53", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-shelve"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
21
] | [
21
] | [
10
] | [
32
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | store_tell.py | /isles/core/store_tell.py | michael-ranieri/Misty | MIT | |
2024-11-18T21:08:13.385922+00:00 | 1,542,017,745,000 | efc13f7b88d33eaf25fe919b9bdf415bdf48de44 | 3 | {
"blob_id": "efc13f7b88d33eaf25fe919b9bdf415bdf48de44",
"branch_name": "refs/heads/master",
"committer_date": 1542017745000,
"content_id": "c33739bbf9d6c62d2c0b6809c5b80509d5069776",
"detected_licenses": [
"MIT"
],
"directory_id": "b13a5eacfc7ee4024fd44dddf38d3d54ff4f72e5",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : evaluateSentence.py
# @Time : 18-3-15
# @Author : J.W.
import pickle
import matplotlib.pyplot as plt
import torch
from logger import logger
from train import evaluate
from train import evaluateAndShowAtten
from train import evaluateRandomly
input = 'eng... | 45 | 29.44 | 92 | 10 | 391 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_9e08783c3df6a7af_c5d27f11", "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"
] | [
20,
21,
22
] | [
20,
21,
22
] | [
14,
15,
9
] | [
86,
88,
76
] | [
"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"
] | evaluate_cmn_eng.py | /chapter7_序列预测模型/evaluate_cmn_eng.py | aictborder/pytorch-in-action | MIT | |
2024-11-18T21:08:16.223858+00:00 | 1,591,894,149,000 | 91c24434672fb955592e6abf0f304bc061ba70bd | 2 | {
"blob_id": "91c24434672fb955592e6abf0f304bc061ba70bd",
"branch_name": "refs/heads/master",
"committer_date": 1591894149000,
"content_id": "bddb85003e4b2a8ab8af7a21b277792dc931960a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "29087ae748f055d52a7b620d9bcca26448b4ee38",
"extension": "py"... | 2.453125 | stackv2 | import argparse
import json
import os
import subprocess
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('mode', choices=['get', 'put', 'delete-builds'])
parser.add_argument('file')
parser.add_argument('url')
parser.add_argument('jar_path')
args = parser.parse_a... | 57 | 37.53 | 87 | 19 | 520 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_be9b73c221d9e8c6_5d975d10", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 7 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
30,
31
] | [
31,
31
] | [
9,
13
] | [
43,
20
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functio... | [
7.5,
7.5
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"MEDIUM"
] | get-examples.py | /examples/get-examples.py | cloudify-cosmo/jenkins-cloudify-plugin | Apache-2.0 | |
2024-11-18T21:08:16.481975+00:00 | 1,622,626,903,000 | 2e163db04eda473155afbd3984e963d21bed6100 | 2 | {
"blob_id": "2e163db04eda473155afbd3984e963d21bed6100",
"branch_name": "refs/heads/master",
"committer_date": 1622626903000,
"content_id": "28805d00db27224fb408e5b8fbfc3d423144a1b4",
"detected_licenses": [
"MIT"
],
"directory_id": "350e6776296c995e39bbd56b153b94c26716258a",
"extension": "py",
"fi... | 2.40625 | stackv2 | # Copyright (c) 2020 DeNA Co., Ltd.
# Licensed under The MIT License [see LICENSE for details]
import io
import time
import struct
import socket
import pickle
import threading
import queue
import multiprocessing as mp
import multiprocessing.connection as connection
def send_recv(conn, sdata):
conn.send(sdata)
... | 264 | 28.07 | 94 | 18 | 1,654 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c96637212067adb3_606425d3", "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"
] | [
50,
60
] | [
50,
60
] | [
16,
15
] | [
44,
32
] | [
"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"
] | connection.py | /handyrl/connection.py | yonsweng/HandyRL | MIT | |
2024-11-18T21:08:21.508818+00:00 | 1,587,257,213,000 | 7aa0af370793b065ac987525efa437a501dbba67 | 2 | {
"blob_id": "7aa0af370793b065ac987525efa437a501dbba67",
"branch_name": "refs/heads/master",
"committer_date": 1587257213000,
"content_id": "09fb13fe480089fe7e21ff385e1f6c9f489b3e4e",
"detected_licenses": [
"MIT"
],
"directory_id": "613fbcf99a5ee83a52460bc46451a4b36fa2ad10",
"extension": "py",
"fi... | 2.5 | stackv2 | from argparse import Namespace
import csv
import pickle
import numpy as np
from tqdm import tqdm
from chemprop.data.utils import get_data, get_task_names
from chemprop.features import get_features_generator
from chemprop.sklearn_train import predict
from chemprop.utils import makedirs
def predict_sklearn(args: Name... | 51 | 32.04 | 116 | 13 | 369 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_66e7aa846176b878_15423f02", "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"
] | [
28
] | [
28
] | [
21
] | [
35
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | sklearn_predict.py | /chemprop/sklearn_predict.py | hassanmohsin/chemprop | MIT | |
2024-11-18T21:08:21.823807+00:00 | 1,438,872,193,000 | 5abac2f03b1779e629b1891c43cd2a73ef60af72 | 3 | {
"blob_id": "5abac2f03b1779e629b1891c43cd2a73ef60af72",
"branch_name": "refs/heads/master",
"committer_date": 1438872193000,
"content_id": "7c365a600b45464c776fda411b322941f0efcba1",
"detected_licenses": [
"MIT"
],
"directory_id": "cfc23ef321de098995cadbc867ce418ad39f54a2",
"extension": "py",
"fi... | 2.703125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import subprocess as sub
def runAndLogCommand(command, logfile):
'''Run a command and log StdErr to file'''
with open(logfile, "wb") as err:
sys.stdout.write("Executing %s and writing to logfile %s\n" % (command, logfile))
p = sub.Pope... | 38 | 25.92 | 90 | 14 | 238 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8d498e4c66006981_5c383f4a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
13,
13
] | [
13,
13
] | [
13,
67
] | [
72,
71
] | [
"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"
] | pipeline.py | /scripts/pipeline.py | dgaston/kvasir | MIT | |
2024-11-18T21:08:22.475734+00:00 | 1,687,452,448,000 | 56e1d2090642281d6422212155960314fa78dd74 | 2 | {
"blob_id": "56e1d2090642281d6422212155960314fa78dd74",
"branch_name": "refs/heads/master",
"committer_date": 1687452448000,
"content_id": "f79e017723edd19a8fb0e60f65b1475d1bb9ecfc",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "d8233a120f46fd07e604cfcf0fd05506e8b4a1ec",
"exten... | 2.390625 | stackv2 | """
DeepLesion database
"""
import cPickle
import cv2
import os
import numpy as np
# from scipy.io import loadmat
import csv
import sys
from ..logger import logger
from imdb import IMDB
from rcnn.config import config, default
DEBUG = False
class DeepLesion(IMDB):
def __init__(self, image_set, devkit_path):
... | 145 | 42.02 | 113 | 16 | 1,569 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_8fca390c4f2655ed_0eade8c9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
111,
117
] | [
111,
117
] | [
25,
17
] | [
42,
67
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `cPickle`, which is known to lead ... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | DeepLesion.py | /lesion_detector_3DCE/rcnn/dataset/DeepLesion.py | rsummers11/CADLab | MIT,Apache-2.0 | |
2024-11-18T21:08:25.981770+00:00 | 1,420,321,317,000 | 8debcbee7df89da8dd94e66843543cfa43e5a427 | 3 | {
"blob_id": "8debcbee7df89da8dd94e66843543cfa43e5a427",
"branch_name": "refs/heads/master",
"committer_date": 1420321317000,
"content_id": "3653dc9caf8d14049ed5f62e042c3d81745b4e38",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ca13e58ea77b527cd8a96b3fbd2a4d138cdde480",
"extension": "py"... | 3.484375 | stackv2 | """Utility methods to deal with serialization."""
import gzip
try:
import cPickle as pickle
except ImportError:
import pickle
class SerializableObject(object):
"""An object that can be dumped to and loaded from disk.
"""
@classmethod
def load(cls, path):
"""Deserialize an instance f... | 38 | 22.26 | 72 | 14 | 176 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_826975e23482d3b6_3b6a6fa3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
27,
27,
38,
38
] | [
27,
27,
38,
38
] | [
19,
19,
13,
13
] | [
42,
42,
42,
42
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | serialization.py | /gutenberg/common/serialization.py | glample/Gutenberg | Apache-2.0 | |
2024-11-18T21:08:26.164817+00:00 | 1,617,528,737,000 | 9d9316a64d83eb755af39001282d90706e02ffbe | 3 | {
"blob_id": "9d9316a64d83eb755af39001282d90706e02ffbe",
"branch_name": "refs/heads/main",
"committer_date": 1617528737000,
"content_id": "e158b3e6cc9dbbf9a8d12e3a918c1a332e7753fd",
"detected_licenses": [
"MIT"
],
"directory_id": "f290023174316682e3c73bba85be469de9a78d96",
"extension": "py",
"file... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
import torch
import torch.utils.data as data
import xml.etree.ElementTree as ET
import numpy as np
import datasets.data_utils as du
import itertools
import pdb
__author__ = "Pau Riba"
__email__ = "priba@cvc.uab.cat"
class HistoGraph(data.Dataset):
def __init__(self, root_path, file_list... | 151 | 31.35 | 115 | 19 | 1,162 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_75aeb7e1336da6e0_9fcb4767", "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",
"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"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
5,
106,
118
] | [
5,
106,
118
] | [
1,
12,
16
] | [
35,
31,
30
] | [
"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
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | HistoGraph.py | /datasets/HistoGraph.py | nadeemkajla/gnn-using-aml | MIT | |
2024-11-18T21:08:26.577591+00:00 | 1,618,960,786,000 | 305b930da058732744cf3641132400da54abf65d | 2 | {
"blob_id": "305b930da058732744cf3641132400da54abf65d",
"branch_name": "refs/heads/master",
"committer_date": 1618960786000,
"content_id": "a95f4b18e40cdd27e165593800c6d69c6a22e962",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bad2dd6da386c3e5771d85969329f40639457567",
"extension": "p... | 2.3125 | stackv2 | # -*- coding: utf-8 -*-
import urllib
import re
from xml.etree import ElementTree as ET
from collections import defaultdict
from .fetcher import Fetcher
class UCSF_XML_Fetcher(Fetcher):
def __init__(self, url_harvest, extra_data, page_size=100, **kwargs):
self.url_base = url_harvest
self.page_size... | 93 | 45.18 | 79 | 17 | 945 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_cea453be877eb8cd_8881d08b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
4
] | [
4
] | [
1
] | [
40
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | ucsf_xml_fetcher.py | /harvester/fetcher/ucsf_xml_fetcher.py | ucldc/harvester | BSD-3-Clause | |
2024-11-18T21:08:26.997922+00:00 | 1,558,002,979,000 | 84c578df6f8f3e3e692cb1d93d11c93c6bfd1c92 | 3 | {
"blob_id": "84c578df6f8f3e3e692cb1d93d11c93c6bfd1c92",
"branch_name": "refs/heads/master",
"committer_date": 1558002979000,
"content_id": "a6b52a64b82ffe0e62748f6b84f5eef078d042c3",
"detected_licenses": [
"MIT"
],
"directory_id": "15cdb1f998986e05e50e7e74deb1608a0eae821f",
"extension": "py",
"fi... | 3.140625 | stackv2 | import numpy as np
import os
import pickle
module_path = os.path.dirname(__file__)
def load_obj(name):
with open(name + '.pkl', 'rb') as f:
return pickle.load(f)
def simulate_signal(emissivity, projections_file_name):
"""Simulate the signals that would be expected with a line-of-sight approximation
... | 43 | 27 | 104 | 12 | 268 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0141c341660d2aaf_b7b785c4", "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"
] | [
9
] | [
9
] | [
16
] | [
30
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | simulateSignal.py | /simulateSignal.py | Europium-152/tomographySignalSimulation | MIT | |
2024-11-18T21:08:30.756969+00:00 | 1,598,422,693,000 | 115464f9d7fb433958e4238fa7320995fcd120a0 | 2 | {
"blob_id": "115464f9d7fb433958e4238fa7320995fcd120a0",
"branch_name": "refs/heads/master",
"committer_date": 1598422693000,
"content_id": "fe6158880a63a01cdd6b25087829478a1ccb75c9",
"detected_licenses": [
"MIT"
],
"directory_id": "b802e235498b3aca33f2484cd95d7325a44a59bd",
"extension": "py",
"fi... | 2.390625 | stackv2 | # -*- coding: utf-8 -*-
__author__ = 'JudePark'
__email__ = 'judepark@kookmin.ac.kr'
import argparse
import logging
import torch
import dill
import sys
import os
sys.path.append(os.pardir)
sys.path.append(os.path.join(os.pardir, os.pardir))
logger = logging.getLogger()
from tqdm import tqdm
from typing import Tuple... | 212 | 30.32 | 105 | 14 | 1,548 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-dill_ec0b5d86b5479fe8_54ef907a", "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"
] | [
111,
116
] | [
111,
116
] | [
9,
9
] | [
36,
28
] | [
"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"
] | data_iterator.py | /src/keyword/data/data_iterator.py | rheehot/textrank-nlp | MIT | |
2024-11-18T21:08:32.420276+00:00 | 1,645,549,272,000 | 37c6b8df89b330d3b9de08c629a35fa2381d02bd | 3 | {
"blob_id": "37c6b8df89b330d3b9de08c629a35fa2381d02bd",
"branch_name": "refs/heads/master",
"committer_date": 1645549272000,
"content_id": "230f3b2dcde1d2a134a22fbdbf403df4b0e74309",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8af49d144f19d5ec14e50e11c3ab97a0a31750bf",
"extension": "py"... | 2.546875 | stackv2 | from subprocess import run
from .python_util import filter_none
def create_devops_build_config(stage, project_root_path, module,
build_dir_name='target'):
return {'stage': stage,
'project_root_path': project_root_path,
'module': module,
'build_dir... | 52 | 29.52 | 76 | 12 | 345 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_eb248b047b0f7024_677db63b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
45,
45,
46,
46
] | [
45,
45,
46,
46
] | [
9,
50,
9,
52
] | [
55,
54,
57,
56
] | [
"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
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | devops_build.py | /src/main/python/ddadevops/devops_build.py | DomainDrivenArchitecture/dda-devops-build | Apache-2.0 | |
2024-11-18T21:08:32.571723+00:00 | 1,439,389,017,000 | 734e3bc1edd0e2b726afae679c0aed53ea322108 | 3 | {
"blob_id": "734e3bc1edd0e2b726afae679c0aed53ea322108",
"branch_name": "refs/heads/master",
"committer_date": 1439389017000,
"content_id": "60f13ee35c4e4bd375f9925908e5e734aff958f0",
"detected_licenses": [
"MIT"
],
"directory_id": "6eba775e077f5151346f5755957d98b820ae278d",
"extension": "py",
"fi... | 2.671875 | stackv2 | import os
from i3pystatus import IntervalModule, formatp
from i3pystatus.core.util import TimeWrapper
import subprocess
def _extract_artist_title(input):
for sep in ('-', ' - '):
split = input.split(sep)
if len(split) == 2:
return split[0], split[1]
# fallback
return (input.sp... | 129 | 31.28 | 91 | 20 | 1,004 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_59a12f321915016d_ef05e77c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
58,
58
] | [
60,
58
] | [
13,
87
] | [
55,
91
] | [
"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"
] | cmus.py | /i3pystatus/cmus.py | ismaelpuerto/i3pystatus | MIT | |
2024-11-18T21:08:33.183262+00:00 | 1,589,044,625,000 | 5901e40f75d06f881eb2ea76fedcda3ddbb7d66a | 3 | {
"blob_id": "5901e40f75d06f881eb2ea76fedcda3ddbb7d66a",
"branch_name": "refs/heads/master",
"committer_date": 1589044625000,
"content_id": "815ef30841712fde0c62e848ac44e8ac32fd5d97",
"detected_licenses": [
"MIT"
],
"directory_id": "66fb882d84a521a72868c25b37b34fba6289dfb5",
"extension": "py",
"fi... | 3.28125 | stackv2 | # Create API of ML model using flask
'''
This code takes the JSON data while POST request an performs the prediction using loaded model and returns
the results in JSON format.
'''
# Import libraries
import numpy as np
from flask import Flask, render_template, request, jsonify
import pickle
from sklearn.preprocessing ... | 82 | 31.11 | 154 | 15 | 608 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8dda736daf49bef1_29c04cc8", "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... | 7 | true | [
"CWE-502",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.securit... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
18,
30,
31,
32,
33,
34
] | [
18,
30,
31,
32,
33,
34
] | [
9,
20,
22,
22,
23,
25
] | [
52,
46,
50,
50,
52,
56
] | [
"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.",
"Found user input going directly into typecast f... | [
5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | app.py | /app.py | meganl1008/Dog-Adoption-Predictor | MIT | |
2024-11-18T21:08:33.361252+00:00 | 1,547,828,283,000 | 6aaec8d402689b4c691b7d1d031e1c59eb5c593f | 2 | {
"blob_id": "6aaec8d402689b4c691b7d1d031e1c59eb5c593f",
"branch_name": "refs/heads/master",
"committer_date": 1547828283000,
"content_id": "ebc0b4f8780f3a411e5f48456d81c4ac3bf4054a",
"detected_licenses": [
"MIT"
],
"directory_id": "ef3ef9b79d206a24df342140484037eb0c4d0aa2",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Tue May 10 20:54:54 2016
@author: drsmith
"""
from __future__ import print_function
import os.path
import xml.etree.ElementTree as ET
from warnings import warn
from ....lib.globals import FdpError, FdpWarning
from ....lib.utilities import isContainer
def loadConfig(container=... | 47 | 31.09 | 78 | 16 | 342 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_dc87eccccb8c1eac_c5f75ed6", "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"
] | [
10,
24
] | [
10,
24
] | [
1,
12
] | [
35,
33
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | configuration.py | /fdp/methods/nstxu/bes/configuration.py | Fusion-Data-Platform/fdp | MIT | |
2024-11-18T21:31:25.353116+00:00 | 1,522,263,212,000 | 9bf58a570825c52441d90f8a2503f0c48f524d93 | 2 | {
"blob_id": "9bf58a570825c52441d90f8a2503f0c48f524d93",
"branch_name": "refs/heads/master",
"committer_date": 1522263212000,
"content_id": "e63bee799e64b853f7f23fb6256e58398dd62dcd",
"detected_licenses": [
"MIT"
],
"directory_id": "00d435fab03341a82ac4e069e2471bf874ab7a3f",
"extension": "py",
"fi... | 2.484375 | stackv2 | import os
from django.conf import settings
from django.http import JsonResponse, HttpResponse, HttpResponseRedirect, Http404
from django.views.static import serve
from mimetypes import MimeTypes
from fnmatch import fnmatch
def _servefile(request, path):
mime = MimeTypes()
content_type = mime.guess_type(path)[0... | 72 | 28.67 | 81 | 18 | 478 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_2543b9de9da47eb0_ff1fa5f5", "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"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
14
] | [
14
] | [
24
] | [
50
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | glue_views.py | /grapher_admin/glue_views.py | aaldaber/owid-grapher | MIT | |
2024-11-18T21:31:27.605988+00:00 | 1,556,342,004,000 | 301e81ee177edd6bc02cd7c83060a4ef02eec94a | 3 | {
"blob_id": "301e81ee177edd6bc02cd7c83060a4ef02eec94a",
"branch_name": "refs/heads/master",
"committer_date": 1556342004000,
"content_id": "8444f3b9585921aefc9b8a5a4fed0ec5c4679042",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "60bead2227d3b60e891aff587ef438a284808d36",
"extension": "py"... | 3.0625 | stackv2 | import pickle
import random
import os
import jieba
import nltk
from django.conf import settings
class Bayes:
def __init__(self):
self.train_class = []
self.stopwords = []
self.train_data = []
self.model_dir = os.path.join(settings.BASE_DIR, 'txtrobo', 'classifier', 'models', 'Baye... | 103 | 28.06 | 106 | 16 | 791 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3646adcd2efff09c_0995056c", "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"
] | [
73,
75,
86,
88
] | [
73,
75,
86,
88
] | [
13,
13,
26,
32
] | [
39,
45,
40,
46
] | [
"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"
] | Bayes.py | /txtrobo/classifier/Bayes/Bayes.py | Soul-Code/challenge_txtrobo | Apache-2.0 | |
2024-11-18T21:31:32.524963+00:00 | 1,547,631,988,000 | 38d1ecadaf9480be1570f367a46d5b145db71a85 | 3 | {
"blob_id": "38d1ecadaf9480be1570f367a46d5b145db71a85",
"branch_name": "refs/heads/master",
"committer_date": 1547631988000,
"content_id": "d596a5866aadfaf320707815b57697962cf679da",
"detected_licenses": [
"MIT"
],
"directory_id": "0c7e3d79c611b11288ba064d1486cb331fc6091b",
"extension": "py",
"fi... | 2.53125 | stackv2 | import sys
import numpy as np
import numpy.random as rng
from scipy.misc import imread
import dill as pickle
import os
import matplotlib.pyplot as plt
with open("train.pickle", "r") as f:
(X,y,c) = pickle.load(f)
n_classes,n_ex,h,w=X.shape
s=3
k=8*s
m=19*s
if False:
img=[]
for j in range(m):
imgmatr... | 179 | 35.17 | 111 | 17 | 1,831 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9ddf5ddd65a252b4_f8e6bdc1", "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-dill",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
9,
9
] | [
9,
9
] | [
15,
15
] | [
29,
29
] | [
"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 `pickle`, which ... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | vis_utils.py | /vis_utils.py | smurli/keras-oneshot | MIT | |
2024-11-18T21:31:33.691359+00:00 | 1,621,918,893,000 | abccec27acb35086f4e486831aa2d06d334b3e03 | 4 | {
"blob_id": "abccec27acb35086f4e486831aa2d06d334b3e03",
"branch_name": "refs/heads/main",
"committer_date": 1621918893000,
"content_id": "1d324ad3f2b1a8e13ca6c1e75ccb4168ae20451b",
"detected_licenses": [
"MIT"
],
"directory_id": "85443d3c3d3291e08d825505e8703db72070a9f2",
"extension": "py",
"file... | 3.5 | stackv2 | # Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pickle
dataset = pd.read_csv('wage.csv')
dataset['age'].fillna(0, inplace=True)
dataset['match'].fillna(dataset['match'].mean(), inplace=True)
X = dataset.iloc[:, :3]
#Converting words to integer values
"""def c... | 39 | 26.51 | 96 | 9 | 313 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8944c7062fecefa7_78ca376a", "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"
] | [
35,
38
] | [
35,
38
] | [
1,
9
] | [
46,
43
] | [
"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 | debankur-ghosh/football-salary-ccl | MIT | |
2024-11-18T21:31:34.418498+00:00 | 1,554,104,121,000 | 69ff63b36f55e2ef3b7bde7f1161579bd1fab085 | 3 | {
"blob_id": "69ff63b36f55e2ef3b7bde7f1161579bd1fab085",
"branch_name": "refs/heads/master",
"committer_date": 1554104121000,
"content_id": "53bd5b7a92aa164bab3cc7c01e638bc1b570d75b",
"detected_licenses": [
"MIT"
],
"directory_id": "5ba0afbee555a4cbd1f33b4dac56254de7be3ab8",
"extension": "py",
"fi... | 2.859375 | stackv2 | # EVS Project Scraper Version 1.0
# MIT License by Milan Maximilain Mihaldinecz / Rosian.org . Source is available on GitHub.
# Importing libs
import json
import http.client
import datetime
import time
import re
import unicodedata
from concurrent.futures import ThreadPoolExecutor
from concurrent.futures import as_com... | 136 | 30.5 | 126 | 16 | 1,095 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.httpsconnection-detected_2a95a5a8a2e84c4d_2d13ace2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.httpsconnection-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The HTTPSConnection API has ch... | 4 | true | [
"CWE-295",
"CWE-295"
] | [
"rules.python.lang.security.audit.httpsconnection-detected",
"rules.python.lang.security.audit.httpsconnection-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
24,
39
] | [
24,
39
] | [
12,
12
] | [
54,
54
] | [
"A03:2017 - Sensitive Data Exposure",
"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,
5
] | [
"LOW",
"LOW"
] | [
"LOW",
"LOW"
] | start.py | /start.py | rosian-org/evs-scraper | MIT | |
2024-11-18T21:31:55.536756+00:00 | 1,578,318,910,000 | 73227dacaa423889e96224550e11e159dcc8c0d3 | 2 | {
"blob_id": "73227dacaa423889e96224550e11e159dcc8c0d3",
"branch_name": "refs/heads/master",
"committer_date": 1578318910000,
"content_id": "d6e395fb0acc14e8c9932304979959e6c3485f58",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "165820b57868480098dcfe16d73ef73ca4e76655",
"extension": "py"... | 2.375 | stackv2 | """
Parses the command-line arguments and runs a command.
"""
import argparse
import subprocess
import sys
import dns.resolver
import requests
from . import api, session
from .session import open_url
from .util import get_from_config, catalog_s3_url, QuiltException
from .registry import app
def cmd_config(catalog_u... | 222 | 27.79 | 115 | 14 | 1,522 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-timeout_1225f7a4178f5151_24b0582d", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-timeout", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Detected a 'requests' call without a timeo... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
57,
75
] | [
57,
75
] | [
5,
5
] | [
30,
30
] | [
"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"
] | main.py | /api/python/quilt3/main.py | battyone/quilt | Apache-2.0 | |
2024-11-18T21:32:00.221488+00:00 | 1,556,410,225,000 | 6dccab53ffbb30f27ba8a51afe0cb9297e9e6bba | 3 | {
"blob_id": "6dccab53ffbb30f27ba8a51afe0cb9297e9e6bba",
"branch_name": "refs/heads/master",
"committer_date": 1556410225000,
"content_id": "18664d2aa9ba66701ee04372bc1fb0b05b6ef6f0",
"detected_licenses": [
"MIT"
],
"directory_id": "56cd4a58491737184cea1b499c69150c60060bba",
"extension": "py",
"fi... | 2.546875 | stackv2 | import pickle
import os
from prettytable import PrettyTable
clone_results_folder = 'code/clone_results'
expert_results_folder = 'code/expert_results'
x = PrettyTable()
envnames = ['Ant-v2','HalfCheetah-v2','Hopper-v2','Humanoid-v2','Reacher-v2','Walker2d-v2']
x.field_names = ['Activities', 'Behavioral cloning', 'Ex... | 31 | 29.9 | 95 | 13 | 250 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_46222c3e255674e9_e4913603", "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"
] | [
20,
23
] | [
20,
23
] | [
25,
26
] | [
47,
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"
] | 2_2_draw_pickle.py | /hw1/2_2_draw_pickle.py | hsilva664/CS-294-112-Fall-2018-HW-solutions | MIT | |
2024-11-18T21:32:11.237862+00:00 | 1,449,263,858,000 | 4adf9f1c608acd85ab15b1164a5a91364e706261 | 3 | {
"blob_id": "4adf9f1c608acd85ab15b1164a5a91364e706261",
"branch_name": "refs/heads/master",
"committer_date": 1449263858000,
"content_id": "91bb71106b95f180ab5a2174cac95e582910d3e5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "89fd8be09fea8c823d7d93f0641ce600236d4507",
"extension": "py"... | 2.515625 | stackv2 | import jinja2
import json
import os
import webapp2
from apiclient.discovery import build
JINJA_ENVIRONMENT = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
extensions=['jinja2.ext.autoescape'])
REGISTRATION_INSTRUCTIONS = """
You must set up a project and get an API key to... | 121 | 33.93 | 109 | 19 | 990 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_32498207f6b91019_eaca8563", "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",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
8,
8,
117
] | [
10,
10,
117
] | [
21,
21,
25
] | [
42,
42,
57
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | main.py | /main.py | cpagoaga/LaureateChannelProject | Apache-2.0 | |
2024-11-18T21:32:12.499607+00:00 | 1,586,373,819,000 | e1d5f674451087336a650998cbc767f8bfdf5fc6 | 2 | {
"blob_id": "e1d5f674451087336a650998cbc767f8bfdf5fc6",
"branch_name": "refs/heads/master",
"committer_date": 1586373819000,
"content_id": "eb144376829d14c4d3019a1534d02eea663f5bc9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "69ec5bb0ef3f08f8e6ab968806b3fb187bf49cd0",
"extension": "py"... | 2.328125 | stackv2 | import subprocess
import os
import re
import pwd
from datetime import timedelta
from time import sleep
from ops.model import ModelError
from ops.charm import CharmEvents
from ops.framework import (
Object,
StoredState,
EventBase,
EventSource,
)
from jinja2 import Environment, FileSystemLoader
class... | 193 | 39.05 | 96 | 17 | 1,659 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ab60bb804a6f1e48_8aa6b22b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 15 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-79",
"CWE-116",
"CWE-79"
] | [
"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-audit",
"rules.python.lang.security.audit.dangerous-subpr... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"LOW",
"LOW",
"LOW",
"MEDIUM",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
84,
84,
90,
117,
130,
167,
167,
169
] | [
84,
84,
90,
117,
131,
167,
167,
169
] | [
13,
46,
13,
9,
19,
15,
15,
28
] | [
51,
50,
39,
82,
97,
64,
64,
49
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' f... | [
7.5,
7.5,
7.5,
7.5,
7.5,
5,
5,
5
] | [
"LOW",
"HIGH",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"LOW",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | db_instance_manager.py | /src/db_instance_manager.py | majduk/cockroachdb-operator-1 | Apache-2.0 | |
2024-11-18T21:32:13.973071+00:00 | 1,505,170,680,000 | 7fe2432618b44586674b8b32191f5fdcaba299ae | 3 | {
"blob_id": "7fe2432618b44586674b8b32191f5fdcaba299ae",
"branch_name": "refs/heads/master",
"committer_date": 1505170680000,
"content_id": "25cc32358da5607516af81ef050f931e1e63ea81",
"detected_licenses": [
"MIT"
],
"directory_id": "4bd4a26acd5559553b5f34b810f6bd26aa06d8a4",
"extension": "py",
"fi... | 2.578125 | stackv2 | import os, time, boto, uuid, datetime, redis
r = redis.Redis(host='redis-17715.c14.us-east-1-3.ec2.cloud.redislabs.com', port='17715', password='XXXX')
#r = redis.Redis(host='127.0.0.1', port='6379')
from flask import Flask, render_template, redirect, request, url_for, make_response
from werkzeug import secure_filename... | 167 | 39.57 | 147 | 18 | 1,783 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.xss.make-response-with-unknown-content_c511fe5bbc8631fa_1ad52bbd", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "... | 2 | true | [
"CWE-79"
] | [
"rules.python.flask.security.audit.xss.make-response-with-unknown-content"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
137
] | [
137
] | [
12
] | [
81
] | [
"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"
] | app.py | /app.py | drendums/WPJ-Foodblog | MIT | |
2024-11-18T21:32:18.315363+00:00 | 1,585,640,582,000 | 3b1587e45105f7a85befd77b6191bdc3df763276 | 3 | {
"blob_id": "3b1587e45105f7a85befd77b6191bdc3df763276",
"branch_name": "refs/heads/master",
"committer_date": 1585640582000,
"content_id": "3ebb27543c6e3394dba4bb3b083b05dcf303ee65",
"detected_licenses": [
"MIT"
],
"directory_id": "f5a956b74a6a761a862e3bdfd0cb6cf8f4147f92",
"extension": "py",
"fi... | 3.34375 | stackv2 | import os
import argparse
import requests
from pathlib import Path
from PIL import Image
IMAGES_PATH = os.path.join("images",'')
def get_image(url):
response = requests.get(url, verify=False)
response.raise_for_status()
image = response.content
return image
def save_image(image, filename, image... | 74 | 28.76 | 129 | 14 | 489 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-timeout_7514bf3e5f190687_a214ae02", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-timeout", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Detected a 'requests' call without a timeo... | 2 | true | [
"CWE-295"
] | [
"rules.python.requests.security.disabled-cert-validation"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
13
] | [
13
] | [
16
] | [
47
] | [
"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"
] | prepare_images.py | /prepare_images.py | rimprog/SpaceInstagram | MIT | |
2024-11-18T21:32:19.524207+00:00 | 1,612,743,300,000 | 4af8524f69f404b906f02b1288b45c0f23507e60 | 2 | {
"blob_id": "4af8524f69f404b906f02b1288b45c0f23507e60",
"branch_name": "refs/heads/main",
"committer_date": 1612743300000,
"content_id": "bbbb3cfabbc2621e47d8260c1883de04b119715b",
"detected_licenses": [
"MIT"
],
"directory_id": "ee047a9d7d3bef343beb7279ee99f9aa3dab06b8",
"extension": "py",
"file... | 2.46875 | stackv2 | from rest_framework import serializers
from .models import User, SocialAccounts
class ShowUserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('username', 'email')
class SocialAccountsSerializer(serializers.ModelSerializer):
class Meta:
model = SocialAccoun... | 35 | 25.77 | 62 | 14 | 180 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_867c6d580a1f3f89_ca5ab36a", "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"
] | [
32
] | [
32
] | [
9
] | [
54
] | [
"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 | /backend/accounts/serializers.py | a-samir97/medium-clone | MIT | |
2024-11-18T21:32:22.794883+00:00 | 1,611,335,559,000 | 38a06c665b2d11e06ca2d694c33e09c8c6447c4d | 3 | {
"blob_id": "38a06c665b2d11e06ca2d694c33e09c8c6447c4d",
"branch_name": "refs/heads/master",
"committer_date": 1611335559000,
"content_id": "635fe77a08fcd5ff159ec26ee874eb907e20482f",
"detected_licenses": [
"MIT"
],
"directory_id": "10516033d6a6873dbcead50da291e4b7607f7909",
"extension": "py",
"fi... | 2.703125 | stackv2 | """
Utilities. Partially based on code from
https://github.com/modestyachts/CIFAR-10.1
"""
import io
import json
import os
import pickle
import numpy as np
import pathlib
from models.wideresnet import WideResNet
from models.shake_shake import ShakeNet
from models.cifar_resnet import ResNet
import torch.nn as nn
imp... | 219 | 35.35 | 98 | 17 | 1,968 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_fde0d452feae64a0_984c01bf", "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"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
126
] | [
126
] | [
22
] | [
36
] | [
"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"
] | utils.py | /utils.py | yguooo/semisup-adv | MIT | |
2024-11-18T21:32:22.971076+00:00 | 1,617,646,667,000 | 7bc9d8b1393a404bd6ec4b260e9a63929e5a41ce | 3 | {
"blob_id": "7bc9d8b1393a404bd6ec4b260e9a63929e5a41ce",
"branch_name": "refs/heads/main",
"committer_date": 1617646667000,
"content_id": "180ae937158c8268af320c378fce94f541eea958",
"detected_licenses": [
"MIT"
],
"directory_id": "bf491219bbccb99f488f81b7ad84cadd00c9ec45",
"extension": "py",
"file... | 2.59375 | stackv2 | from z3 import *
import math
import time
import glob
#Initial File Count
file_count=0
#Grid Size
grid_Size=int(input("Enter the grid size to be considered!\n"))
#Array of Vector Names
Array=['X'+str(i) for i in range(1,grid_Size+1)]
#Variables for Vectors for the grid size considered
for i in range(grid_Size):
Arr... | 150 | 21.77 | 82 | 20 | 1,075 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_e3f05cd427bb4ace_1ae5180f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 5 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
105
] | [
105
] | [
18
] | [
32
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | sudoku_Solver.py | /Solver/sudoku_Solver.py | yashkumar065/Sudoku | MIT | |
2024-11-18T21:32:26.804163+00:00 | 1,614,029,149,000 | 65a1591c814ac5534a3a05d0516499f80761e341 | 2 | {
"blob_id": "65a1591c814ac5534a3a05d0516499f80761e341",
"branch_name": "refs/heads/main",
"committer_date": 1614029149000,
"content_id": "9c9ac2991e0ce881c6f20c79a44128a7438c8351",
"detected_licenses": [
"MIT"
],
"directory_id": "bde2df95e63ae378dd01a6ed62a786c0911faa64",
"extension": "py",
"file... | 2.46875 | stackv2 | #!/usr/bin/env python
""" Simple way to do backups.
"""
import datetime
import json
import logging
import logging.config
import optparse
import os
from shlex import quote
import subprocess
import sys
# https://serverfault.com/questions/470046/rsync-from-linux-host-to-fat32
PARAMS = '-rtD --modify-window=1 --size-onl... | 203 | 27.65 | 114 | 17 | 1,407 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_d393468351fcf19a_e8af703f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 6 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"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"
] | [
125,
125,
133,
133,
141,
141
] | [
125,
125,
133,
133,
141,
141
] | [
5,
42,
5,
42,
5,
42
] | [
47,
46,
47,
46,
47,
46
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' f... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW"
] | backup.py | /backup.py | lcordier/backup | MIT | |
2024-11-18T21:32:28.505416+00:00 | 1,548,495,707,000 | b5603243debce5883ca437a3ada2713743499d23 | 3 | {
"blob_id": "b5603243debce5883ca437a3ada2713743499d23",
"branch_name": "refs/heads/master",
"committer_date": 1548495707000,
"content_id": "795cb41b6ea3e0445c98054dc920500b86708e73",
"detected_licenses": [
"MIT"
],
"directory_id": "2e04e9c8f5eb01d5c425225e69493bcb86505d03",
"extension": "py",
"fi... | 2.859375 | stackv2 | # Author: Samuel Genheden samuel.genheden@gmail.com
"""
Program to analyse chemical groups of solutes
Requires that the program checkmol is downloaded and installed
Examples:
chemical_groups.py -f mol1.sdf mol2.sdf
chemical_groups.py -f mol1.sdf mol2.sdf -o Groups/
"""
import argparse
import os
import subprocess
im... | 52 | 33.96 | 117 | 16 | 428 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_404b09960ce59e72_decc1a07", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 5 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
23,
23
] | [
23,
23
] | [
16,
61
] | [
98,
65
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | chemical_groups.py | /Mol/chemical_groups.py | samech-git/Scripts | MIT | |
2024-11-18T21:32:28.866491+00:00 | 1,644,969,743,000 | 81399e6a7c8c262927e3cda5ed8ed4c37755f917 | 2 | {
"blob_id": "81399e6a7c8c262927e3cda5ed8ed4c37755f917",
"branch_name": "refs/heads/main",
"committer_date": 1644969743000,
"content_id": "a55ce892cd59d44b0a91900788dcf5a5cade4f1d",
"detected_licenses": [
"BSL-1.0"
],
"directory_id": "4b8dcad2393e3b1d7a8e7c90ad141ee8d4a4e976",
"extension": "py",
"... | 2.328125 | stackv2 | import sys
import os
TMP = "/tmp/demacro"
os.system("mkdir -p %s" %TMP)
arg = sys.argv[1]
if ".tex" in arg:
file_root_name = arg[0:-4]
elif arg[-1] == ".":
file_root_name = arg[0:-1]
else:
file_root_name = arg
current_dir = os.getcwd()
preamble = ""
doc_started = False
with open("%s.tex" %file_root_name) as f, o... | 47 | 30.43 | 79 | 14 | 483 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_8ea2fbc8cad3175d_fdf41db1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 8 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"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-tainted-env-args",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangero... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
5,
46,
46,
47,
47
] | [
5,
46,
46,
47,
47
] | [
1,
1,
1,
1,
1
] | [
30,
71,
71,
71,
71
] | [
"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",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | demacro.py | /py-scripts/demacro.py | MoldovanAndrei1/dotfiles | BSL-1.0 | |
2024-11-18T21:32:30.735363+00:00 | 1,579,171,207,000 | 0bb58939716ee518bfc1078684148a86881b7c33 | 3 | {
"blob_id": "0bb58939716ee518bfc1078684148a86881b7c33",
"branch_name": "refs/heads/master",
"committer_date": 1579171207000,
"content_id": "234462a5098d8f7b0f3d32d6ad0344713fcda1e0",
"detected_licenses": [
"MIT"
],
"directory_id": "224ad7dabdd6916c53bd448d1c4056b5cfdc7502",
"extension": "py",
"fi... | 3.328125 | stackv2 | try:
import pickle
import numpy as np
import pandas as pd
except ImportError:
raise ImportError(
"In order to run the model you must have the libraries: " +
"`numpy`, `pandas`, and 'pickle' installed.")
def load_models(model_name, X):
''' A function that predicts class probabi... | 189 | 29.11 | 134 | 15 | 1,246 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_488ec451e01ad581_7e55cb80", "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"
] | [
35
] | [
35
] | [
13
] | [
48
] | [
"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"
] | ConfidenceMeasure.py | /ConfidenceMeasure/ConfidenceMeasure.py | ChemCryst/ConfidenceMeasure | MIT | |
2024-11-18T21:33:00.051060+00:00 | 1,624,537,000,000 | 8ca151153818848a5ccedc41f8cc18dc1616c426 | 3 | {
"blob_id": "8ca151153818848a5ccedc41f8cc18dc1616c426",
"branch_name": "refs/heads/master",
"committer_date": 1624537000000,
"content_id": "085bed688844adbc836c142d42e8627588a935cb",
"detected_licenses": [
"MIT"
],
"directory_id": "233591c9569c3594df2b6156b687ff3cd2022e00",
"extension": "py",
"fi... | 2.875 | stackv2 | #!/usr/bin/env python3
import datetime
import time
from twilio.rest import Client
import creds
import number_list
debug = True
if not debug:
client = Client(creds.creds['account_sid'], creds.creds['auth_token'])
# This is the actual call method used.
def make_call(n, client, t_number, s_number, twiml):
cl... | 67 | 33.63 | 120 | 16 | 595 | python | [{"finding_id": "semgrep_rules.python.twilio.security.twiml-injection_1b1561bb819aff27_3da45055", "tool_name": "semgrep", "rule_id": "rules.python.twilio.security.twiml-injection", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Using non-constant TwiML (Twilio Markup Language) arg... | 1 | true | [
"CWE-91"
] | [
"rules.python.twilio.security.twiml-injection"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
21
] | [
21
] | [
15
] | [
20
] | [
"A03:2021 - Injection"
] | [
"Using non-constant TwiML (Twilio Markup Language) argument when creating a Twilio conversation could allow the injection of additional TwiML commands"
] | [
5
] | [
"HIGH"
] | [
"MEDIUM"
] | main.py | /main.py | HH0718/ScamCaller | MIT | |
2024-11-18T21:33:10.453630+00:00 | 1,431,457,256,000 | ea1bb15070941bb22a48318253817dad79a29ba6 | 2 | {
"blob_id": "ea1bb15070941bb22a48318253817dad79a29ba6",
"branch_name": "refs/heads/master",
"committer_date": 1431457256000,
"content_id": "d19e421ef9859d2f385fc1e11d1d7ce8cf83f769",
"detected_licenses": [
"MIT"
],
"directory_id": "7044e16447f8ffea95100293c538855f4b770cb0",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/python
import ldap
import json
import sqlite3
import datetime
import ConfigParser
from time import sleep
# Timestamps
print "Running Checks : %s" % str(datetime.datetime.now())
# Read our config file
config = ConfigParser.RawConfigParser()
config.read('/etc/group_monitor.conf')
# Set our base variables
se... | 159 | 36.28 | 122 | 17 | 1,484 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_8699dd7a28f99575_71f24511", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 7 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
68,
68,
140,
146,
151
] | [
68,
68,
140,
146,
151
] | [
1,
1,
5,
9,
9
] | [
31,
31,
56,
63,
63
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | run_groupmonitor.py | /run_groupmonitor.py | giftcards/group_monitor | MIT | |
2024-11-18T21:33:11.213173+00:00 | 1,559,930,142,000 | 76deeef3c883d1255db0c97de36a627edf17346d | 3 | {
"blob_id": "76deeef3c883d1255db0c97de36a627edf17346d",
"branch_name": "refs/heads/master",
"committer_date": 1559930142000,
"content_id": "89ea5d30114b53b5ea21b05173c258e4c276467b",
"detected_licenses": [
"MIT"
],
"directory_id": "3d22bb86be195e286f7337577a206c79f1332557",
"extension": "py",
"fi... | 3.296875 | stackv2 | import psycopg2
# Re Enter
dbname = 'eczastgf'
user = 'eczastgf'
password = ''
host = 'raja.db.elephantsql.com'
# Connect to ElephantSQL
pg_conn = psycopg2.connect(dbname=dbname, user=user, password=password, host=host)
# Read the ElephantSQL database
pg_curs = pg_conn.cursor()
# Df to titanic database
import panda... | 104 | 23.25 | 82 | 9 | 641 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.sqli.psycopg-sqli_e9dd687b2bde1eb9_3ad44f40", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.sqli.psycopg-sqli", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected string concatenation with a non-lit... | 2 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.sqli.psycopg-sqli",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
57,
57
] | [
57,
57
] | [
5,
5
] | [
32,
32
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected string concatenation with a non-literal variable in a psycopg2 Python SQL statement. This could lead to SQL injection if the variable is user-controlled and not properly sanitized. In order to prevent SQL injection, use parameterized queries or prepared statements instead. You can use prepared statements ... | [
5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | insert_titanic.py | /module2-sql-for-analysis/insert_titanic.py | dustiny5/DS-Unit-3-Sprint-2-SQL-and-Databases | MIT | |
2024-11-18T21:48:59.488808+00:00 | 1,617,256,839,000 | 101f5bd4ac806ce2da75f61706e6de94c3e000d3 | 2 | {
"blob_id": "101f5bd4ac806ce2da75f61706e6de94c3e000d3",
"branch_name": "refs/heads/master",
"committer_date": 1617256839000,
"content_id": "dc90d661aa109ffcd26cc18beb7bfa0d109d7fa4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6f417c5224981b2eb101739b1b72c9b60c7a91d3",
"extension": "py"... | 2.34375 | stackv2 | #!/usr/bin/env python
from sys import exit
from time import sleep
from argparse import ArgumentParser
from pyVim import connect
from pyVmomi import vim
from manage_dvs_pg import wait_for_task, get_obj, get_dvs_pg_obj
def get_args():
"""
Get CLI arguments.
"""
parser = ArgumentParser(description='Argum... | 102 | 36.58 | 109 | 18 | 809 | python | [{"finding_id": "semgrep_rules.python.lang.security.unverified-ssl-context_347fc52e49eec315_554406b7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.unverified-ssl-context", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Unverified SSL context detected. This will pe... | 1 | true | [
"CWE-295"
] | [
"rules.python.lang.security.unverified-ssl-context"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
70
] | [
70
] | [
18
] | [
50
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"Unverified SSL context detected. This will permit insecure connections without verifying SSL certificates. Use 'ssl.create_default_context' instead."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | fix_mac.py | /playbooks/roles/vcenter/tools/fix_mac.py | xiaoruiguo/tf-ansible-deployer | Apache-2.0 | |
2024-11-18T21:49:01.843206+00:00 | 1,623,493,729,000 | ea6f73d1d5300dd498c37a656bde8e19c95f16a2 | 2 | {
"blob_id": "ea6f73d1d5300dd498c37a656bde8e19c95f16a2",
"branch_name": "refs/heads/master",
"committer_date": 1623493729000,
"content_id": "7bd4fb2b95a134f3aa1822f756c9aea8af0aa4d5",
"detected_licenses": [
"MIT"
],
"directory_id": "bf8a0c0d11879f6a157182519b5a2bf213a7e334",
"extension": "py",
"fi... | 2.453125 | stackv2 | """
Core functionality for roast.vim plugin. This module is inteded to be testable outside vim, so MUST NOT import the `vim`
module.
"""
import shlex
from itertools import takewhile
from typing import List, Dict, Optional
import json
from pathlib import Path
from xml.dom import minidom
from xml.parsers.expat import Ex... | 245 | 29.34 | 120 | 18 | 1,717 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_a6cc832335ce8580_4f3e214d", "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"
] | [
11,
12
] | [
11,
12
] | [
1,
1
] | [
28,
41
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | roast_api.py | /python3/roast_api.py | sharat87/roast.vim | MIT | |
2024-11-18T21:49:05.129371+00:00 | 1,528,558,345,000 | a0f7b5eda8e899e72e306c495b47210d38157c01 | 3 | {
"blob_id": "a0f7b5eda8e899e72e306c495b47210d38157c01",
"branch_name": "refs/heads/master",
"committer_date": 1528558345000,
"content_id": "eeff6a9394e46d4ba92d95ad1627a6a57ac3f5ca",
"detected_licenses": [
"MIT"
],
"directory_id": "7a4edbde15679a6f94f8fff4759e34de9c61f8e4",
"extension": "py",
"fi... | 2.609375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create preprocessed dataset."""
from __future__ import print_function
import logging
import sys
import os
import yaml
try: # Python 2
import cPickle as pickle
except ImportError: # Python 3
import pickle
import time
# hwrt modules
from . import utils
from . ... | 121 | 35.45 | 79 | 13 | 931 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_54c81d03b22ca6f7_9d228b38", "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",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
77,
77,
88,
88
] | [
77,
77,
92,
92
] | [
14,
14,
5,
5
] | [
51,
51,
19,
19
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | preprocess_dataset.py | /hwrt/preprocess_dataset.py | lyqsr/hwrt | MIT | |
2024-11-18T21:49:07.556604+00:00 | 1,547,225,176,000 | 12214b6e7617b23463ab31248dd6d88067ded379 | 3 | {
"blob_id": "12214b6e7617b23463ab31248dd6d88067ded379",
"branch_name": "refs/heads/master",
"committer_date": 1547225176000,
"content_id": "f61fba3147bc9cbbaadd15544adc53b324f45733",
"detected_licenses": [],
"directory_id": "fa3728d911f4de99f387a72e593a3feee4463111",
"extension": "py",
"filename": "pha... | 2.703125 | stackv2 | import fileinput
import os
import re
import xml.etree.ElementTree as ET
import mini_project_2
MINI_PROJECT_2_PATH = os.path.dirname(os.path.realpath(mini_project_2.__file__))
ads_file = os.path.join(MINI_PROJECT_2_PATH, "data/ads.txt")
terms_file = os.path.join(MINI_PROJECT_2_PATH, "data/terms.txt")
pdates_file = os.... | 117 | 26.77 | 84 | 20 | 811 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_0c42ddf650045635_b08d739f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 5 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
4
] | [
4
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | phase1.py | /mini_project_2/phase1.py | CMPUT291F18MP2/Mini-Project-2 | ||
2024-11-18T21:49:08.418676+00:00 | 1,480,741,741,000 | 0316cc2578ae8ab4af5ae449f5a23eefc675df84 | 3 | {
"blob_id": "0316cc2578ae8ab4af5ae449f5a23eefc675df84",
"branch_name": "refs/heads/master",
"committer_date": 1480741741000,
"content_id": "ae064193646122b8d449fc3a0d53da6559789ff3",
"detected_licenses": [
"MIT"
],
"directory_id": "96b0e34e570ff892983424ff6f99a377b7adf849",
"extension": "py",
"fi... | 3.4375 | stackv2 |
# Import Libraries
import os
import re
import urllib2
from zipfile import ZipFile
import csv
import cPickle as pickle
def downloadNames():
u = urllib2.urlopen('https://www.ssa.gov/oact/babynames/names.zip')
localFile = open('names.zip', 'w')
localFile.write(u.read())
localFile.close()
def getNameLis... | 130 | 25.08 | 86 | 17 | 789 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0959a421f4852862_7920e6b4", "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",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
50,
50,
56,
56
] | [
50,
50,
56,
56
] | [
9,
9,
15,
15
] | [
33,
33,
29,
29
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | Gender_Prediction.py | /src/Gender_Prediction.py | tapilab/is-hparik11 | MIT | |
2024-11-18T21:49:11.155607+00:00 | 1,419,519,177,000 | e244220c8aece0891e3025f5342400b2a3e15592 | 3 | {
"blob_id": "e244220c8aece0891e3025f5342400b2a3e15592",
"branch_name": "refs/heads/master",
"committer_date": 1419519177000,
"content_id": "305502a5adcb91ccc8434fcaef2c0db1590d1613",
"detected_licenses": [
"MIT"
],
"directory_id": "623287122763f47057648b6154cc3a47132d75a5",
"extension": "py",
"fi... | 2.65625 | stackv2 | import xml.etree.ElementTree as ET
import random
windows_browsers = []
linux_browsers = []
mac_browsers = []
with open("useragentswitcher.xml") as xml:
tree = ET.parse(xml)
for browser in tree.findall('.//folder[@description="Browsers - Windows"]/useragent'):
windows_browsers.append(browser.attrib['useragent'])
... | 34 | 27.5 | 87 | 11 | 242 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_3040fb203ff83f3f_384d3827", "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"
] | [
1,
9
] | [
1,
9
] | [
1,
9
] | [
35,
22
] | [
"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"
] | user_agent.py | /user_agent.py | gagandeep/GetUserAgent | MIT | |
2024-11-18T21:49:11.314237+00:00 | 1,673,360,293,000 | 32375552099198dabfe42e669101b491934bc628 | 2 | {
"blob_id": "32375552099198dabfe42e669101b491934bc628",
"branch_name": "refs/heads/master",
"committer_date": 1673360293000,
"content_id": "77f258b8d468c0e215dfce1c5920fb0c3e870681",
"detected_licenses": [
"MIT"
],
"directory_id": "54c56c67083bfc8c779372f6b48031befafda76c",
"extension": "py",
"fi... | 2.46875 | stackv2 | import os
import sys
import numpy
import amadeus
import pickle
from sklearn.preprocessing import scale
from random import randint
numpy.set_printoptions(suppress=True)
#ds_path='./dataset/cal500/';
ds_path='./dataset/mss/';
#Actual listened songs
rockSongs=[203,512,560,1084,1247,1417,2575,3067,3847,7364,8077,8845,8... | 95 | 27.34 | 94 | 10 | 853 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_8842093c2034e385_1de70066", "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... | 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"
] | [
30,
34
] | [
30,
34
] | [
12,
13
] | [
31,
32
] | [
"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"
] | recommendation.py | /amadeus/recommendation.py | vitaglianog/amadeus | MIT | |
2024-11-18T21:49:11.794306+00:00 | 1,598,850,048,000 | 90e4fd9ec4048d920c8fe0c0325757190f3c024c | 3 | {
"blob_id": "90e4fd9ec4048d920c8fe0c0325757190f3c024c",
"branch_name": "refs/heads/master",
"committer_date": 1598850048000,
"content_id": "6163b95a542a36de72f7d18aad184e66bc858864",
"detected_licenses": [
"MIT"
],
"directory_id": "c3c34e058a6f9c8d2760299820e07bbf411b7639",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/python
__author__ = "Bassim Aly"
__EMAIL__ = "basim.alyy@gmail.com"
import MySQLdb
SQL_IP = "10.10.10.130"
SQL_USERNAME = "root"
SQL_PASSWORD = "EnterpriseAutomation"
SQL_DB = "TestingPython"
sql_connection = MySQLdb.connect(SQL_IP, SQL_USERNAME, SQL_PASSWORD, SQL_DB)
employee1 = {
"id": 1,
"fnam... | 62 | 27.66 | 119 | 10 | 355 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_1e2020a49b73d8c1_10893c8b", "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"
] | [
57,
57
] | [
57,
57
] | [
9,
9
] | [
36,
36
] | [
"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"
] | mysql_insert.py | /Chapter12/mysql_insert.py | frankethp/Hands-On-Enterprise-Automation-with-Python | MIT | |
2024-11-18T21:49:14.972852+00:00 | 1,496,906,578,000 | dda9d922e87f88a97a4977844cc48b81a63be4dc | 3 | {
"blob_id": "dda9d922e87f88a97a4977844cc48b81a63be4dc",
"branch_name": "refs/heads/master",
"committer_date": 1496906578000,
"content_id": "c8aa960373c702e9567dac42c67b294d7996d36d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9e10e6c28a91e3b21e617d5a622f1228e05874b0",
"extension": "py"... | 2.703125 | stackv2 | #
# Copyright 2014-2016 Appetizer.io (https://www.appetizer.io)
#
# 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 applicabl... | 253 | 42.4 | 117 | 15 | 2,409 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ece98cf2e1db7342_442a7d59", "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-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
246,
250,
253
] | [
246,
250,
253
] | [
9,
16,
16
] | [
45,
60,
96
] | [
"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()'.",
"Detected subprocess functi... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | appetizer.py | /appetizer/appetizer.py | alex1491163117/replaykit.py | Apache-2.0 | |
2024-11-18T21:49:16.308701+00:00 | 1,572,571,045,000 | 06961ae058524bc6a412f4937007c8a4f25bfc7b | 3 | {
"blob_id": "06961ae058524bc6a412f4937007c8a4f25bfc7b",
"branch_name": "refs/heads/master",
"committer_date": 1572571045000,
"content_id": "d06b083fbbe381296dbee82b546f2ebad351c715",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "97fa3e4e96f802df153820fc0a578590f0a2ecc5",
"extension": "py"... | 3.109375 | stackv2 | import os
import pickle
def cache(dataset, file_name):
print("Caching dataset to {} ... ".format(file_name), end='', flush=True)
pickle.dump(dataset, open(file_name, 'wb'))
print("done")
def retreive_from_cache(file_name):
if os.path.exists(file_name):
print("Retrieving {} from cache... ".fo... | 19 | 28 | 83 | 13 | 127 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c2b033daaedf4598_44c1c563", "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"
] | [
7,
14
] | [
7,
14
] | [
5,
19
] | [
48,
53
] | [
"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"
] | cache_manager.py | /pytorch_datasets/utils/cache_manager.py | hitersyw/pytorch_datasets | Apache-2.0 | |
2024-11-18T21:49:16.936517+00:00 | 1,434,275,191,000 | 2e982886fffc1830fd5dc484c96a8e80614fdd0b | 2 | {
"blob_id": "2e982886fffc1830fd5dc484c96a8e80614fdd0b",
"branch_name": "refs/heads/master",
"committer_date": 1434275191000,
"content_id": "77f33904cd8cd285b7b697fb652ac3c30e974804",
"detected_licenses": [
"MIT"
],
"directory_id": "e7d80f6a4e5d46d8f774a4f9eb189a5be23e46d7",
"extension": "py",
"fi... | 2.40625 | stackv2 | # -*- coding: utf-8 -*-
import os
import random
import time
import threading
from math import sin, cos, sqrt, atan2, radians
from constants import STATUS, REAL_DEVICE_INDEX, REAL_DEVICE_IP, OK_MOCK_FILE, ERROR_MOCK_FILE, ALARMED_DEVICE
from device_interface import remove_real_device_event
device_positions = [(45.05... | 152 | 31.25 | 110 | 14 | 1,327 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.string-concat-in-list_48a7302c6d5957df_f9cf4ddf", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.string-concat-in-list", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Dete... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
126
] | [
128
] | [
9
] | [
108
] | [
"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"
] | device_data_builder.py | /device_data_builder.py | GitHK/spacehack | MIT | |
2024-11-18T21:49:17.002701+00:00 | 1,269,386,526,000 | ccee1f22d1f6490fae45c54c748000708289e045 | 3 | {
"blob_id": "ccee1f22d1f6490fae45c54c748000708289e045",
"branch_name": "refs/heads/master",
"committer_date": 1269386526000,
"content_id": "477ae0c12b8d25dfaed2118909407e9e003cb7e7",
"detected_licenses": [
"MIT"
],
"directory_id": "deb390326182b293aa63e8e36aa8d33d3a7be288",
"extension": "py",
"fi... | 2.921875 | stackv2 | from Errors import *
try: import cPickle as pickle
except: import pickle as pickle
class Packet:
def __init__(self,data):
self.data = data
def SendData(sock,data):
#pickle data
try:
data = pickle.dumps(Packet(data))
data = str(len(data))+"||"+data
except:
sock.close(... | 46 | 24.89 | 82 | 14 | 293 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_563c15044ff7fa12_3cc4b781", "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"
] | [
12,
42
] | [
12,
42
] | [
16,
16
] | [
42,
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"
] | Communicate.py | /Net/Communicate.py | sarahschofield120/coffeeworlds | MIT | |
2024-11-18T22:26:06.647371+00:00 | 1,494,057,433,000 | ea2806a39bf9e7de6e1f8c23a6d94b1ee9daf361 | 3 | {
"blob_id": "ea2806a39bf9e7de6e1f8c23a6d94b1ee9daf361",
"branch_name": "refs/heads/master",
"committer_date": 1494057433000,
"content_id": "223dc677c8c5245f1b86b8c69e22a564cd6bc459",
"detected_licenses": [
"MIT"
],
"directory_id": "3805f9f484d36965be6180b573fa1f2d982b265c",
"extension": "py",
"fi... | 2.71875 | stackv2 | import datetime
import os
import cgi
from functools import wraps
import webapp2
import jinja2
from google.appengine.ext import db
import handlers
TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), *[os.pardir, 'templates'])
JINJA_ENV = jinja2.Environment(autoescape=True, loader=jinja2.FileSystemLoader(TEMPLATE_DIR... | 174 | 35.52 | 93 | 17 | 1,416 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_d28b2cf2217b8331_a45bd544", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 2 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
11,
23
] | [
11,
23
] | [
13,
16
] | [
94,
35
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected direct use of jinja2. If n... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | handler.py | /handlers/handler.py | cstieg/Multi-User-Blog | MIT | |
2024-11-18T22:26:06.935257+00:00 | 1,578,274,751,000 | 0eafa43e179335425a479954b26dac8acfbb7a98 | 3 | {
"blob_id": "0eafa43e179335425a479954b26dac8acfbb7a98",
"branch_name": "refs/heads/master",
"committer_date": 1578274751000,
"content_id": "a6f7f4aaab3ea3e575725e219afb81d2421416b4",
"detected_licenses": [
"MIT"
],
"directory_id": "8fb533aa8dd6d83b31e3d7c35831cd4377d08e52",
"extension": "py",
"fi... | 2.71875 | stackv2 | import threading
import socket
import pickle
import time
import os
from colorama import init
from colorama import Fore, Back, Style
init()
from playsound import playsound
# GLOBAL variables
HEADER_SIZE = 10
IP = socket.gethostname()
PORT = 5555
CMD_PORT = 6000
ENCRYPT_PORT = 6500
connected_users = {}
cmd_connection... | 195 | 31.83 | 145 | 20 | 1,351 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.network.avoid-bind-to-all-interfaces_a2ba585ec261e30c_e29ab2a2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.network.avoid-bind-to-all-interfaces", "finding_type": "security", "severity": "low", "confidence": "high", "message": "Running ... | 5 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
169
] | [
169
] | [
20
] | [
62
] | [
"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"
] | server.py | /server.py | cybervoyager/LiveChat | MIT | |
2024-11-18T22:42:08.835331+00:00 | 1,583,923,098,000 | feaaecd746c4da5aa3b810533d8415f2f0affe36 | 3 | {
"blob_id": "feaaecd746c4da5aa3b810533d8415f2f0affe36",
"branch_name": "refs/heads/master",
"committer_date": 1583923098000,
"content_id": "f84c824b8dc7fb31d743f8ec3cde686898ddc2fe",
"detected_licenses": [
"MIT"
],
"directory_id": "4fc749002c585ebdd57be3d5d0ec26cb6d90476b",
"extension": "py",
"fi... | 2.6875 | stackv2 | """
data_prep.py - Extract data from date range and create models
Usage:
data_prep.py [options]
data_prep.py -h | --help
Options:
-h --help Show this message.
--output_folder=OUT Output folder for the data and reports to be saved.
--country=CNT Arg for filtering by a specific ... | 314 | 30.62 | 125 | 18 | 2,456 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.useless-assignment-keyed_b9ccd6e8a2519c8d_ad582f1b", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-assignment-keyed", "finding_type": "maintainability", "severity": "low", "confidence": "medium", "message": "key `numeric_cols` in... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
294
] | [
294
] | [
5
] | [
38
] | [
"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"
] | data_prep.py | /src/covidify/data_prep.py | jsgenan/covid-19-analysis | MIT | |
2024-11-18T22:42:13.162478+00:00 | 1,516,479,616,000 | ca759933c5dc7d189eed1d932de36b29af249a79 | 3 | {
"blob_id": "ca759933c5dc7d189eed1d932de36b29af249a79",
"branch_name": "refs/heads/master",
"committer_date": 1516479616000,
"content_id": "ee430db693c7fc762711b0fa525f94b115306e1c",
"detected_licenses": [
"MIT"
],
"directory_id": "0295fdc333d7212eaa4c3b43ccf73181c18aa4ba",
"extension": "py",
"fi... | 3.0625 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 24 20:10:22 2017
@author: HCHO
"""
import sqlite3
conn=sqlite3.connect('history.db')
cur=conn.cursor()
class Apriori(object):
def __init__(self,readingList):
self.fictionList=[] #全部文章的列表
self.readingList=[] #子项为列表,“用户名,fiction,fiction,...”
s... | 66 | 34.38 | 113 | 20 | 516 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_558e387a4e39f00a_98804944", "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"
] | [
58,
58
] | [
58,
58
] | [
13,
13
] | [
36,
36
] | [
"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"
] | writing recommend3.py | /writing recommend3.py | HCH2CHO/creative-writing-system | MIT | |
2024-11-18T22:42:14.429597+00:00 | 1,580,009,645,000 | 3acafa1d959e66346f688479d60fd51773a431fa | 2 | {
"blob_id": "3acafa1d959e66346f688479d60fd51773a431fa",
"branch_name": "refs/heads/master",
"committer_date": 1580009645000,
"content_id": "89a89904d3439f2752dd58f7c342115d1137df8d",
"detected_licenses": [
"MIT"
],
"directory_id": "169b57a1c247e25cb17593868c213bfe687b59b0",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python3
import pickle
import yaml
import feedparser
import os.path
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
STATE_FILE = 'feed_email.state'
CONFIG_FILE = 'config.yaml'
config = yaml.load(open(CONFIG_FILE, 'r'), Loader=yaml.FullLoader)
state = ... | 63 | 24.9 | 80 | 16 | 451 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_4de228df35932156_d0492ef1", "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-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
20,
63
] | [
20,
63
] | [
11,
3
] | [
25,
24
] | [
"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"
] | feed_email.py | /feed_email.py | ngsankha/feed-mailer | MIT | |
2024-11-18T22:42:16.899054+00:00 | 1,605,784,297,000 | 926c4def2155d373e203e42266f626d794c18a90 | 2 | {
"blob_id": "926c4def2155d373e203e42266f626d794c18a90",
"branch_name": "refs/heads/master",
"committer_date": 1605784297000,
"content_id": "f53f16b4814bbaa8f52b07a756596ebdcc236f5f",
"detected_licenses": [
"MIT"
],
"directory_id": "3d077360de7afbe829cf2ccabdb699074c4ca53a",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python
#******************************************************************************
# Name: crossvalidate.py
# Purpose: IPython parallelized cross-validation
# Usage:
# python crossvalidate.py [options] infile trainshapefile
#
# Copyright (c) 2018, Mort Canty
import auxil.... | 150 | 30.69 | 79 | 15 | 1,292 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_0bc2452334a89709_464db3ff", "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 ... | 4 | true | [
"CWE-95",
"CWE-95",
"CWE-95",
"CWE-95"
] | [
"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"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
55,
57,
59,
61
] | [
55,
57,
59,
61
] | [
19,
22,
24,
17
] | [
30,
33,
35,
28
] | [
"A03:2021 - Injection",
"A03:2021 - Injection",
"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,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | crossvalidate.py | /src/scripts/crossvalidate.py | luke202001/CRC4Docker | MIT | |
2024-11-18T20:53:25.710927+00:00 | 1,563,888,990,000 | ec3691830d655ba0893ac1705e2a4f849cb6244e | 3 | {
"blob_id": "ec3691830d655ba0893ac1705e2a4f849cb6244e",
"branch_name": "refs/heads/master",
"committer_date": 1563888990000,
"content_id": "254ef06cfaa75f08328b7ff4c30a104039100495",
"detected_licenses": [
"MIT"
],
"directory_id": "5d18af59720227a65ca9d93f1bf86033110be2ca",
"extension": "py",
"fi... | 2.625 | stackv2 | import numpy as np
from utils import get_fullpath, Config
from utils.dataloaders import FolderLoader, CSVLoader, PickleLoader, StatementsLoader
import pickle
class ArticlesProvider:
def __init__(self, config: Config):
"""
:param config: config dictionary
:type config: dict
"""
... | 137 | 40.84 | 117 | 20 | 1,255 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b65f42cdbd194c6a_4085c608", "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"
] | [
42
] | [
42
] | [
13
] | [
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"
] | ArticlesProvider.py | /utils/ArticlesProvider.py | anuj0405/misinformation-detection-tensor-embeddings | MIT | |
2024-11-18T20:53:26.552404+00:00 | 1,539,069,735,000 | a14fb3e83be9ffd02c62e4fc766f85c76fd25593 | 3 | {
"blob_id": "a14fb3e83be9ffd02c62e4fc766f85c76fd25593",
"branch_name": "refs/heads/master",
"committer_date": 1539069735000,
"content_id": "773abfa93dfa70eb013de66bae6d1bb776fe5be2",
"detected_licenses": [
"MIT"
],
"directory_id": "3bd09e08a4acdc84699a9069fe709f5ee80fd6cf",
"extension": "py",
"fi... | 2.578125 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import print_function
import hashlib
import logging
import xml.dom.minidom
from requests import Session
from .errors import (InvalidError, LoginError)
_LOGGER = logging.getLogger(__name__)
def get_text(nodelist):
"""Get the value from a text node."""
value = []
f... | 520 | 31.11 | 79 | 18 | 3,772 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_876590e08cc36b23_5c4aee45", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
6
] | [
6
] | [
1
] | [
23
] | [
"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"
] | fritzhome.py | /pyfritzhome/fritzhome.py | syssi/python-fritzhome | MIT | |
2024-11-18T20:53:31.445456+00:00 | 1,691,555,297,000 | 9a242a01d09def32aed012a0c9c517c9b988c71f | 2 | {
"blob_id": "9a242a01d09def32aed012a0c9c517c9b988c71f",
"branch_name": "refs/heads/main",
"committer_date": 1691555297000,
"content_id": "3e148aa77714faa39bca634150bbde8652477c80",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3982e6daf88e453c726f6b39a081fc37ce15a08a",
"extension": "py",
... | 2.46875 | stackv2 | import random
import subprocess
import requests
def main():
host = random.choice((requests.get("https://api.audius.co")).json()["data"])
with open("../last_few.csv", "r") as f:
for line in f:
track_id = int(line.split(",")[0])
# get track data
track_response = r... | 71 | 31.13 | 120 | 24 | 483 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_3257e60be1236833_01563cdf", "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 ... | 10 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
34
] | [
34
] | [
17
] | [
77
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | last_few.py | /monitoring/scripts/track-cid-backfill/python/last_few.py | AudiusProject/audius-protocol | Apache-2.0 | |
2024-11-18T20:53:35.969341+00:00 | 1,605,600,969,000 | 94781c47cff3cb81375f7fdd2d0bcebb02c5b07c | 3 | {
"blob_id": "94781c47cff3cb81375f7fdd2d0bcebb02c5b07c",
"branch_name": "refs/heads/master",
"committer_date": 1605600969000,
"content_id": "813afc2bd8d5d6d62cbdfa15f5c1a844d10e6b82",
"detected_licenses": [
"MIT"
],
"directory_id": "b07d727ca347ac3bf10d76332f6f7b0b3068f5a2",
"extension": "py",
"fi... | 2.625 | stackv2 | from RestrictedPython import compile_restricted
from RestrictedPython import Eval
from RestrictedPython import Guards
from RestrictedPython import safe_globals
from RestrictedPython import utility_builtins
from multiprocessing import Process, Manager
import time
import os # os is unavailable in user code scope e... | 68 | 31.59 | 101 | 13 | 502 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_fcfb437d42d7c645_c3b1184b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
42
] | [
42
] | [
18
] | [
48
] | [
"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"
] | calculator.py | /local_libs/calculator.py | smartnikocj/wechaty | MIT | |
2024-11-18T20:53:45.086951+00:00 | 1,595,180,445,000 | 862ba1e8b996bd26e7b2f993ffa66a9bd1b2f14c | 3 | {
"blob_id": "862ba1e8b996bd26e7b2f993ffa66a9bd1b2f14c",
"branch_name": "refs/heads/master",
"committer_date": 1595180445000,
"content_id": "ff8ef35024030678335084a2586ee00e1aa8fa23",
"detected_licenses": [
"MIT"
],
"directory_id": "03a61ffa6d0deb0a3636cb5df01ac786e0a45114",
"extension": "py",
"fi... | 2.796875 | stackv2 | '''
Collection of helpful subroutines used in an assortment of calculations
SUBROUTINES: (in no particular order)
read_gmail_info - read gmail account information from secret file
calc_effenergy - calculate effective monochromatic energy
calc_flux - calculate flux parameters and bounds using aprates
cal... | 316 | 38.95 | 127 | 17 | 3,216 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_5e03b1a7ac0f8fde_10782cbe", "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",
"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"
] | [
249,
251
] | [
249,
251
] | [
14,
14
] | [
66,
67
] | [
"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"
] | ToolBox.py | /GeneralUse/Misc/ToolBox.py | crhea93/AstronomyTools | MIT | |
2024-11-18T21:10:24.479966+00:00 | 1,520,810,707,000 | 17c3d38476726489a0db35e60af4649aa91bacac | 3 | {
"blob_id": "17c3d38476726489a0db35e60af4649aa91bacac",
"branch_name": "refs/heads/master",
"committer_date": 1520810707000,
"content_id": "101e5d69ee8012cf2af748d6e794225b18cdede2",
"detected_licenses": [
"MIT"
],
"directory_id": "ce05bb3ef449bea289662fb56d5b202eab62590a",
"extension": "py",
"fi... | 2.671875 | stackv2 | from sklearn.preprocessing import MinMaxScaler
import pickle
import pandas as pd
def preprocess(X):
min_max_scaler = MinMaxScaler()
return min_max_scaler.fit_transform(X)
def predict(X):
clf2 = pickle.load(open("best_radiation.pkl", "rb"))
X= pd.Series({"barometric": X[0], "humidity": X[1],
... | 19 | 31.05 | 68 | 11 | 152 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ce7ff5be47ba1bd7_1f61df9d", "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"
] | [
10
] | [
10
] | [
12
] | [
57
] | [
"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"
] | utils.py | /app/utils.py | kantologist/Space-Hackathon | MIT | |
2024-11-18T21:10:33.514272+00:00 | 1,444,387,360,000 | 7717e13ca1ad3484d80f4d90cef56af10c97f308 | 2 | {
"blob_id": "7717e13ca1ad3484d80f4d90cef56af10c97f308",
"branch_name": "refs/heads/master",
"committer_date": 1444387360000,
"content_id": "a92da4402db332aef898fe2d651c7ed012482bf0",
"detected_licenses": [
"MIT"
],
"directory_id": "035e4f76b07abeb3f6a7a6e5de36cf1e4b8e8bb3",
"extension": "py",
"fi... | 2.453125 | stackv2 |
import cv2
import utils
from skimage.feature import hog
import cPickle
import numpy
from sklearn.externals import joblib
from sklearn import svm
def get_set(metadataFile, classType):
set = []
with open(metadataFile, "r") as f:
entries = f.readlines()
for entry in entries:
entry = entry.s... | 89 | 32.94 | 94 | 12 | 872 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_cb7de1f25207381c_95bedbdb", "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-cPickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
76,
81
] | [
76,
81
] | [
5,
11
] | [
75,
49
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `cPickle`, which is known to lead ... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | hog_train_set.py | /detection/hog_train_set.py | mataevs/persondetector | MIT | |
2024-11-18T21:11:14.035149+00:00 | 1,551,985,749,000 | a1f4b614e297eed2fc1c94cba3d3946a70bda9eb | 2 | {
"blob_id": "a1f4b614e297eed2fc1c94cba3d3946a70bda9eb",
"branch_name": "refs/heads/master",
"committer_date": 1551985749000,
"content_id": "9720a387ae936dd4b60198675cff63efcb6145c4",
"detected_licenses": [
"MIT"
],
"directory_id": "8bc285848f77323ae26c9b5c4b19eae2b47784c8",
"extension": "py",
"fi... | 2.328125 | stackv2 | from datetime import timedelta, datetime
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
from requests.auth import HTTPBasicAuth
from pprint import pprint
import yaml
import json
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
def get_token():
url = 'https:/... | 46 | 35.57 | 116 | 12 | 409 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_b87a3fa5d709fca2_45bf7e39", "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 ... | 11 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"rules.python.requests.security.disabled-cert-validation",
"rules.python.requests.security.disabled-cert-validation",
"rules.python.requests.security.disabled-cert-validation"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
14,
26,
43
] | [
14,
26,
43
] | [
6,
6,
5
] | [
117,
54,
65
] | [
"A03:2017 - Sensitive Data Exposure",
"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.",
"Certificate v... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"LOW",
"LOW",
"LOW"
] | list_maintenance.py | /list_maintenance.py | JNPRAutomate/northstar_SDN_controller_automation | MIT | |
2024-11-18T21:11:14.838012+00:00 | 1,575,193,145,000 | 74ca2674cbb8df9b64faf51fea4dff2ba16b6293 | 2 | {
"blob_id": "74ca2674cbb8df9b64faf51fea4dff2ba16b6293",
"branch_name": "refs/heads/master",
"committer_date": 1575193145000,
"content_id": "7b31c9daeaba14e1c543340f4ca2dea8bff00ddf",
"detected_licenses": [
"MIT"
],
"directory_id": "b68ea020a58fa2d649a1b35afe0c44ea1f755414",
"extension": "py",
"fi... | 2.390625 | stackv2 | # XTREMELAB 1
# Samet Köser
# Salih Kuloğlu
# Reyhan Yürük
# Serkan Helvacıoğlu
# Elif Ünlü
# References:
# https://gist.github.com/mertyildiran/957b8c9f7631f6ab7f21 : sound to text
# https://realpython.com/python-encodings-guide/ : unicode
# https://www.8bitavenue.com/python-convert-unicode-to-string/ : unicode
# ht... | 190 | 35.25 | 131 | 19 | 1,842 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_90b5b1a4ed370dc6_ab364c28", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 7 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
161,
164
] | [
161,
164
] | [
13,
21
] | [
43,
44
] | [
"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"
] | Yaz_Kızım.py | /Yaz_Kızım.py | sametkkoserk/Yaz_Kizim_XtremeLab_1 | MIT | |
2024-11-18T21:11:15.061711+00:00 | 1,592,387,856,000 | d27a769f138560042eb5af202b26902fece97c0c | 2 | {
"blob_id": "d27a769f138560042eb5af202b26902fece97c0c",
"branch_name": "refs/heads/master",
"committer_date": 1592387856000,
"content_id": "17cac3f00f68e5817498bc198c47464eab68ca9e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "16670e3ba9725a1caca5f321a5f0f5ec1f97b3e9",
"extension": "py"... | 2.3125 | stackv2 | # add one or more computing nodes
import psycopg2
import mysql.connector
import argparse
import json
# config file format:
#
#[
# {
# "id":1,
# "name":"comp1",
# "ip":"127.0.0.1",
# "port":5431,
# "user":"abc",
# "password":"abc"
# "datadir":"/data/pg_data_dir1"
# },
# {... | 142 | 40.89 | 177 | 17 | 1,515 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1fd2ea523251845a_62cf39ed", "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-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
61,
64,
71
] | [
61,
64,
71
] | [
5,
5,
9
] | [
88,
94,
173
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | add_comp_nodes.py | /scripts/add_comp_nodes.py | xingyingone/Kunlun | Apache-2.0 | |
2024-11-18T21:11:16.441979+00:00 | 1,535,912,796,000 | 7f68e7e066d7be371f24aa148d9104a09307d453 | 4 | {
"blob_id": "7f68e7e066d7be371f24aa148d9104a09307d453",
"branch_name": "refs/heads/master",
"committer_date": 1535912796000,
"content_id": "1aa488d9e56b6bfb4bdfde0b0b6810fd5346ef3b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4ec239aba047d0ff36348bea2e59595b9fb845ac",
"extension": "py"... | 3.515625 | stackv2 | """ Elliptic Curve Diffie-Hellman key exchange exercise
This is an optional exercise once you've completed dhkeyexchange.py
Tasks:
1) Generate a private key using the curve parameters obtained from the server
2) Create a public key based on the private key and send it to the server
3) Combine the server public and ou... | 78 | 38.56 | 117 | 10 | 739 | python | [{"finding_id": "semgrep_rules.python.cryptography.security.crypto-mode-without-authentication_e5926a6c04801a61_4d2a0f1f", "tool_name": "semgrep", "rule_id": "rules.python.cryptography.security.crypto-mode-without-authentication", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "An en... | 1 | true | [
"CWE-327"
] | [
"rules.python.cryptography.security.crypto-mode-without-authentication"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
73
] | [
73
] | [
10
] | [
83
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"An encryption mode of operation is being used without proper message authentication. This can potentially result in the encrypted content to be decrypted by an attacker. Consider instead use an AEAD mode of operation like GCM. "
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | ecdhkeyexchange.py | /Intro_to_encryption_safari/py2/solutions/ecdhkeyexchange.py | Dmdv/PythonPlayground | Apache-2.0 | |
2024-11-18T21:46:31.074627+00:00 | 1,548,051,375,000 | 15f17cfd72540b0de31309880e8c797f737d98b7 | 2 | {
"blob_id": "15f17cfd72540b0de31309880e8c797f737d98b7",
"branch_name": "refs/heads/master",
"committer_date": 1548051375000,
"content_id": "0e08c657b2f498217de958fb18c56406350d2754",
"detected_licenses": [
"MIT"
],
"directory_id": "827dc5791a5753c3ef0489275a6ba7d4ba487dad",
"extension": "py",
"fi... | 2.453125 | stackv2 | # Check if cache has been updated, if so, dump table and reinsert. Run at
# 4:30am.
# We can do future case of if I have more than X reviews and what not
import asyncio
import aiohttp
import aiosqlite
import time
from config import my_wk_api_key
async def process_subjects(session, db):
cursor = await db.execute("... | 58 | 35.43 | 124 | 13 | 502 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_19bfe1d02576bde8_df5e8519", "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"
] | [
35,
35
] | [
35,
35
] | [
11,
11
] | [
110,
110
] | [
"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"
] | refresh_subjects.py | /refresh_subjects.py | ApolloFortyNine/WaniKani-Pushover-Notifications | MIT | |
2024-11-18T21:46:31.149836+00:00 | 1,664,368,507,000 | 4111c1413968f8d433bb2292071686d8cc716304 | 2 | {
"blob_id": "4111c1413968f8d433bb2292071686d8cc716304",
"branch_name": "refs/heads/master",
"committer_date": 1664368507000,
"content_id": "c35029efc81abc71b0b5b2ea21b06b4392d3bd1e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4267a8cb8182ad2ad34061cb903ed4c2a89b28ff",
"extension": "py"... | 2.375 | stackv2 | from flask import Flask
from flask import request
from flask import jsonify
from flask_cors import CORS
import os
import sys
import pandas as pd
import numpy as np
import joblib
import pickle
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from utils.preprocess_data import remove_time_sta... | 72 | 40.04 | 152 | 14 | 681 | python | [{"finding_id": "semgrep_rules.python.flask.security.insecure-deserialization_22bf568e099bb925_c91e1fc8", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.insecure-deserialization", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected the use of an insecure deserializ... | 7 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.flask.security.insecure-deserialization",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.flask.security.insecure-deserialization",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.flask.security.insecure-deserialization",
"rules.python.lang.s... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM"
] | [
40,
40,
47,
47,
62,
62
] | [
40,
40,
47,
47,
62,
62
] | [
22,
22,
26,
26,
31,
31
] | [
50,
50,
58,
58,
57,
57
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Detected the use of an insecure deserialization library in a Flask route. These libraries are prone to code execution vulnerabilities. Ensure user data does not enter this function. To fix this, try to avoid serializing whole objects. Consider instead using a serializer such as JSON.",
"Avoid using `pickle`, whi... | [
7.5,
5,
7.5,
5,
7.5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | deployment.py | /MachineLearningPrototype/Deployment/deployment.py | llxia/openjdk-test-tools | Apache-2.0 | |
2024-11-18T21:46:32.818894+00:00 | 1,615,791,834,000 | 4ceaa5c2b9cd397c35be1265db949343504fdbec | 2 | {
"blob_id": "4ceaa5c2b9cd397c35be1265db949343504fdbec",
"branch_name": "refs/heads/main",
"committer_date": 1615791834000,
"content_id": "a05c1c85634d626f78beecb8ffea35c4076e98e4",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "06684dfb9719cd0f81baf272f63c2f0e661b4c8d",
"extension": "py"... | 2.390625 | stackv2 | import pandas
from skbio.stats.composition import clr
from scipy.stats import mannwhitneyu
from scipy.stats import kruskal
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler
import pickle
df=pandas.read_csv("./../../../MASTER-TABLES/VIRFINDER/c10k_abundance_demovir_Family.csv",index_col=... | 56 | 25.04 | 102 | 11 | 440 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1f78ed9db474215b_5683fadb", "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"
] | [
53
] | [
53
] | [
1
] | [
27
] | [
"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"
] | pre-process_phage.py | /data/feature_sel_LEFSe/pre-process_phage.py | Jayanth-kumar5566/CAMEB2-machine-learning | BSD-3-Clause | |
2024-11-18T21:46:34.895687+00:00 | 1,668,025,722,000 | ea5c5400670bb22c02536b6fcc8e9706a212cd62 | 3 | {
"blob_id": "ea5c5400670bb22c02536b6fcc8e9706a212cd62",
"branch_name": "refs/heads/master",
"committer_date": 1668025722000,
"content_id": "a9e0429d8d2e7d6e2f15744968b7c0e8b4fd4d05",
"detected_licenses": [
"MIT"
],
"directory_id": "b35831afb2c0ad70f3e24f185f3d23e89786afe3",
"extension": "py",
"fi... | 2.703125 | stackv2 | import sys
import pickle
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from cycler import cycler
font = {'size': 14}
mpl.rc('font', **font)
use_grayscale = True
if use_grayscale:
suffix = "_pb"
cmap = 'gray'
color = ['k']
graphics_cycler = (cycler('color', color) * cycle... | 127 | 42.09 | 149 | 14 | 1,552 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_127b2691420951e3_c2653525", "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"
] | [
33
] | [
33
] | [
19
] | [
36
] | [
"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"
] | real_instance.py | /report/graphics/real_instance.py | lapic-ufjf/evolutionary-ACS-benchmark | MIT | |
2024-11-18T21:47:35.156846+00:00 | 1,509,692,245,000 | 2d101a95fd1e81769a1df16e3de6a6e4d637ec68 | 3 | {
"blob_id": "2d101a95fd1e81769a1df16e3de6a6e4d637ec68",
"branch_name": "refs/heads/master",
"committer_date": 1509692245000,
"content_id": "4bb967e32081705c0ce193cc22f2d725671948fc",
"detected_licenses": [
"MIT"
],
"directory_id": "50517138ac1cfcd8b1b492a749b14166e613c65d",
"extension": "py",
"fi... | 2.625 | stackv2 | #! /usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
import pickle
if 0:
k1=0.5
k2=0.5
k3=0.5
x0=0.0
sample=400
x = np.arange(sample)/100
x2 = x/(1.0+np.exp(-1.0*k1*(x-x0)))
l_targ = -0.1+0.4*np.sin(np.pi*x2)
r_targ = -0.1+0.4*np.sin(np.pi*x2+np.pi)
plt.p... | 125 | 25.7 | 78 | 17 | 1,177 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0f41073e315f0522_fa05a9cf", "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"
] | [
122
] | [
122
] | [
21
] | [
35
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | plot.py | /src/plot.py | mepster/trpo | MIT | |
2024-11-18T21:47:37.619592+00:00 | 1,449,739,883,000 | 2348ee58bf2960bbf18cb0789fcbb32c5d107873 | 2 | {
"blob_id": "2348ee58bf2960bbf18cb0789fcbb32c5d107873",
"branch_name": "refs/heads/master",
"committer_date": 1449739921000,
"content_id": "0f3465b12e7a228614944e402183034a587efc74",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "6a5acc05a5320bbe0a5790600a043e938487718d",
"extension": "p... | 2.375 | stackv2 | #filename views.py
from django.template.loader import get_template
from django.template import Context
from django.http import HttpResponse, Http404
from django.shortcuts import render_to_response
import datetime
from mysite.models import author
from mysite.forms import ContactForm
def index(request):
return render... | 89 | 29.44 | 83 | 15 | 662 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_caca2f9740559b38_0fa1ae9f", "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... | 7 | true | [
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"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",
"rules.python.django.security.injection... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
21,
22,
31,
61,
61,
82,
86
] | [
21,
22,
31,
61,
61,
82,
86
] | [
12,
12,
12,
9,
9,
9,
9
] | [
56,
30,
30,
58,
58,
28,
27
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected data rendered directly to ... | [
5,
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | views.py | /mysite/mysite/views.py | lz1988/django-web2015 | BSD-2-Clause | |
2024-11-18T21:47:40.288445+00:00 | 1,621,176,606,000 | 0c222404bf40c55f20d017a2332146ca88f8486e | 3 | {
"blob_id": "0c222404bf40c55f20d017a2332146ca88f8486e",
"branch_name": "refs/heads/main",
"committer_date": 1621176606000,
"content_id": "308c5aa0a1a037f1fc3092509475fac42c5ce283",
"detected_licenses": [
"MIT"
],
"directory_id": "d0f5a19bc0150b8b6a3e93ac6b449b7727bb91c3",
"extension": "py",
"file... | 2.734375 | stackv2 | import os
from pathlib import Path
import datetime
from tqdm import tqdm
import time
import datetime
import subprocess
from hachoir.parser import createParser
from hachoir.metadata import extractMetadata
def get_mov_date_taken(filename):
parser = createParser(filename)
metadata = extractMetadata(parser)
... | 71 | 24.14 | 58 | 14 | 483 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1c1ded960ae2c79b_ed4bf65f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
28,
28
] | [
28,
28
] | [
14,
49
] | [
54,
53
] | [
"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"
] | set_modification_time.py | /set_modification_time.py | vivanov879/photo_clean | MIT | |
2024-11-18T21:47:44.030896+00:00 | 1,630,068,648,000 | dcce24050d193c21634d5e15caaf7aaaa95a7243 | 4 | {
"blob_id": "dcce24050d193c21634d5e15caaf7aaaa95a7243",
"branch_name": "refs/heads/master",
"committer_date": 1630068648000,
"content_id": "362122d9589868626750552fcdb91e4fe90af4af",
"detected_licenses": [
"MIT"
],
"directory_id": "5b3f9cac85d27c91160cfc1fb10bbea85afa4074",
"extension": "py",
"fi... | 3.859375 | stackv2 | '''
This script should be successful
'''
#for handling errors/exceptions:
class Error(Exception):
"""Base class for other exceptions"""
pass
class ExitApp(Error):
pass
# User input: are you ready?
def start_section():
print("\nReady to test the script? (Y/N)")
start = input()
if "y" in star... | 120 | 22.02 | 88 | 16 | 642 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_0bfce111ab2994d2_a793aff4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 3 | true | [
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"HIGH"
] | [
71,
71,
107
] | [
71,
71,
107
] | [
9,
9,
13
] | [
23,
23,
35
] | [
"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,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | sql_exercise_functions.py | /deep_learning_acoustics/sql_exercise_functions.py | a-n-rose/workshops | MIT | |
2024-11-18T22:28:50.773284+00:00 | 1,611,788,394,000 | eff0944c10ce0701509ecd754e9423b2e1f76ea9 | 2 | {
"blob_id": "eff0944c10ce0701509ecd754e9423b2e1f76ea9",
"branch_name": "refs/heads/master",
"committer_date": 1611788394000,
"content_id": "96c3a2b08b4d524bb5bcc3cdd6a6866595873ac2",
"detected_licenses": [
"MIT"
],
"directory_id": "88a1b48386510320728339b58ea927dba4366732",
"extension": "py",
"fi... | 2.359375 | stackv2 | import pkg_resources
from Bio import SeqIO, SearchIO
import os
import subprocess
import pandas as pd
from collections import OrderedDict
import joblib
import sys
import shutil
import glob
"""
TODO:
Check that input fastas are DNA and output is amino acids
Check for suspiciously short/long genome lengths
Al... | 368 | 45.43 | 144 | 20 | 3,793 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_10bb4fc287f3b2e9_d5562ef8", "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-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
217
] | [
217
] | [
13
] | [
103
] | [
"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"
] | bacphlip.py | /bacphlip/bacphlip.py | liupfskygre/bacphlip | MIT | |
2024-11-18T22:29:01.855313+00:00 | 1,561,579,945,000 | d0da1ab261d2e97cb4e15d13e58403675f9a79cb | 3 | {
"blob_id": "d0da1ab261d2e97cb4e15d13e58403675f9a79cb",
"branch_name": "refs/heads/master",
"committer_date": 1561579945000,
"content_id": "c8c7e10d5c606f0a7a807f25ceede73f6590e7a9",
"detected_licenses": [
"MIT"
],
"directory_id": "610f02b520b5c3afc905ad74635dc0ef634be5f2",
"extension": "py",
"fi... | 2.625 | stackv2 | from flask import Flask, jsonify, request
from flask_reverse_proxy_fix.middleware import ReverseProxyPrefixFix
from flask_cors import CORS
import mysql.connector
from mysql.connector import Error
import json
from sklearn.svm import SVR
import pandas as pd
import numpy as np
import datetime
# Setup the API to work Cr... | 366 | 27.01 | 113 | 19 | 2,763 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_9a0b58eff629bf1c_5d3b3c97", "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... | 12 | true | [
"CWE-89",
"CWE-89",
"CWE-704",
"CWE-89",
"CWE-89",
"CWE-704",
"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.flask.security.injection.tainted-sql-string",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rul... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"HIGH",
"MEDIUM",
"HIGH",
"HIGH",
"MEDIUM",
"HIGH",
"HIGH",
"HIGH"
] | [
81,
81,
81,
96,
96,
96,
186,
186,
227,
246
] | [
82,
82,
82,
97,
97,
97,
187,
187,
227,
246
] | [
5,
5,
22,
5,
5,
22,
5,
5,
5,
5
] | [
43,
43,
42,
43,
43,
42,
36,
36,
63,
27
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"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,
7.5,
5,
7.5,
7.5,
5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"HIGH",
"HIGH",
"MEDIUM",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | restV1.py | /dockers/API/restV1.py | FlorisFok/DataVisualisation | MIT | |
2024-11-18T22:29:03.991153+00:00 | 1,690,840,560,000 | 7391f6359a6bdefd86a649d57f04283b0e0c0a70 | 2 | {
"blob_id": "7391f6359a6bdefd86a649d57f04283b0e0c0a70",
"branch_name": "refs/heads/master",
"committer_date": 1690841831000,
"content_id": "014e14e7aef5e8748118b248bdf3cef79b06824c",
"detected_licenses": [
"MIT"
],
"directory_id": "e7218bd915f7aeecd4c222b7bd8190e356d8c854",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python3
import argparse
import logging
import os
import re
import requests
import simplediskimage
logging.basicConfig(level=logging.DEBUG)
def get_file(path):
if re.search(r'https?://', path):
request = requests.get(path, allow_redirects=True)
request.raise_for_status()
fil... | 54 | 30.24 | 75 | 13 | 403 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-timeout_b52ecc40a974091f_1c972140", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-timeout", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Detected a 'requests' call without a timeo... | 3 | true | [
"CWE-93"
] | [
"rules.python.django.security.injection.request-data-write"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
18
] | [
18
] | [
13
] | [
37
] | [
"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"
] | create-uboot.py | /create-uboot.py | Linaro/kir | MIT | |
2024-11-18T22:29:19.506023+00:00 | 1,633,183,906,000 | 06c95ef8bbf6449a51335590aec28454769f1dcd | 3 | {
"blob_id": "06c95ef8bbf6449a51335590aec28454769f1dcd",
"branch_name": "refs/heads/main",
"committer_date": 1633183906000,
"content_id": "139ec023aafa4f188335924cca69ff9785f3cab7",
"detected_licenses": [
"MIT"
],
"directory_id": "425f42dd1efb0a4159e0e1f54ffea9dc8abcceb1",
"extension": "py",
"file... | 3.015625 | stackv2 | import json
from collections import OrderedDict
from decimal import Decimal
import pyperclip
from .json_encoder import Encoder
def clean(text: str):
try:
text = eval(text, {"OrderedDict": OrderedDict, "Decimal": Decimal})
except:
pass
return text
def text_to_json(text: str):
clean_t... | 34 | 18.56 | 76 | 13 | 167 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_153ed840a14a882b_09592978", "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"
] | [
11
] | [
11
] | [
16
] | [
76
] | [
"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"
] | pydict2json.py | /pydict2json/pydict2json.py | sisi100/pydict2json | MIT | |
2024-11-18T22:29:21.173725+00:00 | 1,637,178,007,000 | 450692e3911da7c523cf25332d849a16104c4274 | 3 | {
"blob_id": "450692e3911da7c523cf25332d849a16104c4274",
"branch_name": "refs/heads/main",
"committer_date": 1637178007000,
"content_id": "e4edde1d8ef6ff26da72e9743811e8ec13f0a6d8",
"detected_licenses": [
"MIT"
],
"directory_id": "73243a5652c4d19023631825f4f64ac1a7b8df84",
"extension": "py",
"file... | 3.28125 | stackv2 | import numpy as np
def gram_schmidt_factorization(matrix):
matrix = np.array(matrix)
m, n = matrix.shape
q = np.zeros((m, n))
r = np.zeros((n, n))
matrix = np.transpose(matrix)
r[0][0] = np.linalg.norm(matrix[0], 2)
q[:, 0] = matrix[0]/r[0][0]
for i in range(1, n):
q[:, i] = ma... | 36 | 32.53 | 96 | 15 | 372 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_aaac7aa5af65bcdf_17c93d6a", "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"
] | [
33,
34
] | [
33,
34
] | [
27,
30
] | [
97,
77
] | [
"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"
] | Gram-Schmidt QR.py | /Gram-Schmidt QR.py | Cosmina02/Numerical-methods | MIT | |
2024-11-18T22:29:24.393165+00:00 | 1,599,571,429,000 | 45a0d89cbe8bd008dd33400108082cce2cab5a73 | 3 | {
"blob_id": "45a0d89cbe8bd008dd33400108082cce2cab5a73",
"branch_name": "refs/heads/master",
"committer_date": 1599571429000,
"content_id": "ee35530ad65944cea29a56f85e52a8484e751736",
"detected_licenses": [
"MIT"
],
"directory_id": "07e4320027e211cc28b19aeefebf1aeab501895c",
"extension": "py",
"fi... | 2.5625 | stackv2 | import re
import json
import argparse
import pandas
from tqdm import tqdm
import os
import string
from nltk.tokenize import word_tokenize
import models.Constants as Constants
import wget
import nltk
import pickle
from collections import defaultdict
import spacy
my_mapping = {}
content = [
[["``", "''", ",", "-LRB... | 339 | 33.09 | 121 | 19 | 3,151 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.code-after-unconditional-return_fc516f3c348eb330_a1f767e4", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.code-after-unconditional-return", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "code... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
149,
166,
293
] | [
149,
166,
293
] | [
16,
12,
5
] | [
61,
51,
57
] | [
"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"
] | msvd_prepross.py | /msvd_prepross.py | ybCliff/VideoCaptioning | MIT | |
2024-11-18T22:29:26.184574+00:00 | 1,494,133,691,000 | 89cfda811b3950af47a64edd2dbca8059d6c5afd | 3 | {
"blob_id": "89cfda811b3950af47a64edd2dbca8059d6c5afd",
"branch_name": "refs/heads/master",
"committer_date": 1494133691000,
"content_id": "cc8f39a993e6ebe29bff0f999b19e3e3547080df",
"detected_licenses": [
"MIT"
],
"directory_id": "751b4b04b41d7a601ce42c9f3ad9537df178c599",
"extension": "py",
"fi... | 2.703125 | stackv2 | import xml.etree.ElementTree as ET
import json
import sys
from Constants import *
from GraphUtils import *
class CodeWriter:
def __init__(self, config):
self.config = config
self.indent = config["indent"]
self.comment = config["comment"]
self.code = []
def write(self, line, ind... | 51 | 43.63 | 97 | 17 | 544 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_b533b38fdb474052_5ed845e4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
1
] | [
1
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | CodeWriter.py | /src/CodeWriter.py | MichaelMGonzalez/JFlapToCode | MIT | |
2024-11-18T22:29:27.514973+00:00 | 1,619,359,946,000 | 089e43f9d5f16ad012dd3c3623873f7a6d4c1db7 | 3 | {
"blob_id": "089e43f9d5f16ad012dd3c3623873f7a6d4c1db7",
"branch_name": "refs/heads/master",
"committer_date": 1619359946000,
"content_id": "2019327ca614fdaf3cb4185275e8e98441475c17",
"detected_licenses": [
"MIT"
],
"directory_id": "3f3a87f7ec57b3e696aa982becc42ee3882de581",
"extension": "py",
"fi... | 2.75 | stackv2 | # -*- coding: utf8 -*-
import copy
from subprocess import Popen, PIPE
class GitClient:
GIT_STATUS_CMD = ['git', 'status', '--porcelain']
GIT_STAGE_CMD = ['git', 'add', '.']
GIT_RESET_HARD_CMD = ['git', 'reset', '--hard', 'HEAD']
GIT_REMOVE_HEAD_COMMIT_CMD = ['git', 'reset', '--hard', 'HEAD~1']
GIT... | 106 | 34 | 78 | 17 | 832 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_59b6c44a82145efc_b25618c4", "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
] | [
19
] | [
74
] | [
"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"
] | Client.py | /app/Git/Client.py | OpenTwinCities/site_bot | MIT | |
2024-11-18T22:29:29.879679+00:00 | 1,481,889,611,000 | 3c4653b5ea5967d153beb7676f2f8a7c020d3b1a | 3 | {
"blob_id": "3c4653b5ea5967d153beb7676f2f8a7c020d3b1a",
"branch_name": "refs/heads/master",
"committer_date": 1481889611000,
"content_id": "6025f73ac972f97679ebd0fa2e0df105627e7120",
"detected_licenses": [
"MIT"
],
"directory_id": "3944acf881aced2cd61010367b1b20da1e8a4ef4",
"extension": "py",
"fi... | 2.609375 | stackv2 | import datetime
import os
import sqlite3
import time
from collections import defaultdict
from xml.etree import ElementTree as Et
import requests
SAMPLES_MARKER = 'meta:measurement'
def analyze_xml(data):
ts = datetime.datetime.now()
print(data)
environments = defaultdict(int)
resources = defaultdict... | 91 | 25.91 | 72 | 18 | 584 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8509d166371806c9_8c685f3b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
6
] | [
6
] | [
1
] | [
40
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | jobqueue.py | /gocdmon/jobqueue.py | peterrosell/gocddash | MIT | |
2024-11-18T22:29:33.933096+00:00 | 1,579,670,919,000 | 2621af5b923ce5d26d191d17b3f34a2ec61bd17e | 3 | {
"blob_id": "2621af5b923ce5d26d191d17b3f34a2ec61bd17e",
"branch_name": "refs/heads/master",
"committer_date": 1579670919000,
"content_id": "8359e4f5973bdc5347d3c2998818a0c0cba052d5",
"detected_licenses": [
"MIT"
],
"directory_id": "766d55171fd6f44d9368de2fa2c1ef4dbffea10e",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/python3
from sys import argv
from subprocess import Popen, PIPE
from wsgiref.simple_server import make_server
process = Popen(argv[1:], stdin=PIPE, stdout=PIPE)
def app(env, response):
response('200 OK', [('Content-type', 'text/plain; charset=utf-8')])
process.stdin.write(env['QUERY_STRING'].enco... | 21 | 24.95 | 71 | 11 | 147 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_277f68773311ba61_280932c4", "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"
] | [
7
] | [
7
] | [
11
] | [
51
] | [
"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"
] | ppgi.py | /ppgi.py | henriquegogo/ppgi | MIT | |
2024-11-18T22:29:33.988663+00:00 | 1,686,326,985,000 | a09e62853cec286a65947a4e382249c75e701650 | 3 | {
"blob_id": "a09e62853cec286a65947a4e382249c75e701650",
"branch_name": "refs/heads/master",
"committer_date": 1686326985000,
"content_id": "754e10a415d0f8ebb6f8353283e62fd1fa0f7a7e",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "c4b276ae99211db38d8c7b04eda0f5077efc53ce",
"extension": "p... | 2.609375 | stackv2 | import json
import pickle
import datetime
from emmaa.statements import EmmaaStatement
from emmaa.priors.cancer_prior import TcgaCancerPrior
from emmaa.priors.prior_stmts import get_stmts_for_gene_list
from emmaa.priors.reactome_prior import find_drugs_for_genes
from emmaa.priors.reactome_prior import make_prior_from_ge... | 78 | 35.88 | 76 | 13 | 738 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9a58292ba1f4f908_a06a93cd", "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-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
42,
48
] | [
42,
48
] | [
9,
17
] | [
31,
32
] | [
"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"
] | priors_from_muts.py | /scripts/priors_from_muts.py | kkaris/emmaa | BSD-2-Clause | |
2024-11-18T22:29:34.893856+00:00 | 1,566,040,065,000 | 812d8f6451e6ccbfdba5da72b7f6095b2256de8a | 3 | {
"blob_id": "812d8f6451e6ccbfdba5da72b7f6095b2256de8a",
"branch_name": "refs/heads/master",
"committer_date": 1566040065000,
"content_id": "800424971e1f3084e4a436337479a1a0f23d3b7c",
"detected_licenses": [
"MIT"
],
"directory_id": "d1dafe247d80c00ba0856cfa89bfa976651accb8",
"extension": "py",
"fi... | 2.71875 | stackv2 | import pickle
from typing import List
from google.auth.transport.requests import Request
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from autoleagueplay.ladder import Ladder
from autoleagueplay.paths import PackageFiles
SHEET_ID = '1XULvW97g46EdrYRuhiHBfARDkviUL... | 101 | 40.02 | 132 | 21 | 1,075 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4edb4c31e411a180_40f2c5ea", "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"
] | [
54,
73
] | [
54,
73
] | [
21,
13
] | [
39,
38
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | sheets.py | /autoleagueplay/sheets.py | NicEastvillage/AutoLeague | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.