added
stringdate
2024-11-18 17:59:49
2024-11-19 03:44:43
created
int64
126B
1,694B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.09
source
stringclasses
1 value
text
stringlengths
257
22.3k
num_lines
int64
16
648
avg_line_length
float64
15
61
max_line_length
int64
31
179
ast_depth
int64
8
40
length
int64
101
3.8k
lang
stringclasses
1 value
sast_semgrep_findings
stringlengths
1.56k
349k
sast_semgrep_findings_count
int64
1
162
sast_semgrep_success
bool
1 class
sast_semgrep_error
stringclasses
1 value
cwe_ids
listlengths
1
162
rule_ids
listlengths
1
162
subcategories
listlengths
1
162
confidences
listlengths
1
162
severities
listlengths
1
162
line_starts
listlengths
1
162
line_ends
listlengths
1
162
column_starts
listlengths
1
162
column_ends
listlengths
1
162
owasp_categories
listlengths
1
162
messages
listlengths
1
162
cvss_scores
listlengths
1
162
likelihoods
listlengths
1
162
impacts
listlengths
1
162
filename
stringlengths
4
105
path
stringlengths
5
372
repo_name
stringlengths
5
115
license
stringclasses
385 values
2024-11-18T20:10:52.966564+00:00
1,601,392,963,000
770c3a5e25f793d32f481e8ed0e80ae50d7f1b02
2
{ "blob_id": "770c3a5e25f793d32f481e8ed0e80ae50d7f1b02", "branch_name": "refs/heads/master", "committer_date": 1601392963000, "content_id": "658dac53126df10e75f8ec87d70fecfce6c8df51", "detected_licenses": [ "Apache-2.0" ], "directory_id": "cc160fe08adcdae18ce3c759e81904bde1d09693", "extension": "py"...
2.4375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import zipfile import logging import requests import subprocess import urllib.request __all__ = ["update"] logger = logging.getLogger(__file__) def update(repository: str, path: str) -> bool: version_file = os.path.join(path, 'VERSION') if os.path.ex...
75
31.75
109
16
576
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_6b5aceeaec14c12f_b201615f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 44, 44 ]
[ 44, 44 ]
[ 13, 41 ]
[ 46, 45 ]
[ "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" ]
utils.py
/core/utils.py
Ovi3/webanalyzer
Apache-2.0
2024-11-18T20:10:54.704183+00:00
1,614,181,199,000
ba7f27a77f1f195ddedeb722307ee467b7e85730
2
{ "blob_id": "ba7f27a77f1f195ddedeb722307ee467b7e85730", "branch_name": "refs/heads/master", "committer_date": 1614181199000, "content_id": "6943327015321e7fd23750227f8b75ea32b6b8ce", "detected_licenses": [ "Python-2.0", "MIT" ], "directory_id": "50008b3b7fb7e14f793e92f5b27bf302112a3cb4", "exten...
2.453125
stackv2
import wx import wx.lib.mixins.listctrl as listmix import sys import time #---------------------------------------------------------------------- class Log: r"""\brief Needed by the wxdemos. The log output is redirected to the status bar of the containing frame. """ def WriteText(self,text_...
254
36.31
107
14
2,492
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_ab526ecfdd4ce799_3b5c8b28", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ...
1
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.exec-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 90 ]
[ 90 ]
[ 13 ]
[ 20 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
recipe-426407.py
/recipes/Python/426407_ColumnSorterMixVirtual/recipe-426407.py
betty29/code-1
Python-2.0,MIT
2024-11-18T20:10:59.072549+00:00
1,539,685,987,000
8cb2d34be63249668f2be5724f14216525b2dc7a
3
{ "blob_id": "8cb2d34be63249668f2be5724f14216525b2dc7a", "branch_name": "refs/heads/master", "committer_date": 1539685987000, "content_id": "7457000372a7ab59a2c8bb3b9418b515f799d381", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7931d3c0a4277a658c3a63e605bac8a71bf7cd0f", "extension": "py"...
2.53125
stackv2
from StopSignal import * from psychopy import core # Kill all background processes (macOS only) try: import appnope appnope.nope() except: pass try: # Kill Finder during execution (this will be fun) applescript="\'tell application \"Finder\" to quit\'" shellCmd = 'osascript -e '+ applescript ...
128
31.66
124
18
1,012
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_281b3697eb95c344_887522ab", "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" ]
[ 22 ]
[ 22 ]
[ 10 ]
[ 69 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
run_stop_task.py
/IMCN-stoptask/run_stop_task.py
IMCN-UvA/IMCN-stoptask
Apache-2.0
2024-11-18T20:11:00.088405+00:00
1,567,999,497,000
e2f04ac2df9edb15c835b7ba8f49302416526d58
2
{ "blob_id": "e2f04ac2df9edb15c835b7ba8f49302416526d58", "branch_name": "refs/heads/master", "committer_date": 1567999497000, "content_id": "a1dbe02a832c819abbd024b01cdacb35f501862e", "detected_licenses": [ "MIT" ], "directory_id": "6760278e68f456ece58290052edd87759be4ca32", "extension": "py", "fi...
2.3125
stackv2
import numpy as np from numpy import * import tensorflow as tf import os import re import pickle import nltk from utils import * def vectorize_data(data, word2idx, memory_size, sentence_size): S = [] Q = [] domains = [] word_len = [] sentence_len = [] for review, domain, label in data: ...
163
30.85
132
20
1,426
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9ceed2dfc5b82b18_14cce83d", "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
[ "", "" ]
[ "rules.python.lang.correctness.dict-del-while-iterate", "rules.python.lang.correctness.dict-del-while-iterate" ]
[ "correctness", "correctness" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 130, 134 ]
[ 132, 136 ]
[ 5, 5 ]
[ 34, 34 ]
[ "", "" ]
[ "It appears that `pos_pivots[pivot]` is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration", "It appears that `neg_pivots[pivot]` is a dict with items being deleted while in a for loop. This is usually a ...
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
data_utils_pivots.py
/data_utils_pivots.py
hsqmlzno1/HATN
MIT
2024-11-18T20:11:00.916571+00:00
1,343,426,977,000
ed036dff5c51ad511cf4448e6a91f0d13d8604b7
2
{ "blob_id": "ed036dff5c51ad511cf4448e6a91f0d13d8604b7", "branch_name": "refs/heads/master", "committer_date": 1343426977000, "content_id": "e5eb7697330dbf8a543828fe937a8fa5cb1a35db", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "87c9983636fee505b6ec1cdc73b0b71970b58a41", "extension": "p...
2.390625
stackv2
# Import a WordPress DB dump, outputting to the posts/ directory # Currently imports: # * Posts (published) # * Draft posts # * Categories, tags (as tags) # Supported formats (from phpMyAdmin): # * TODO: SQL (uncompressed) # * XML # TODO: mynt compatibility import os import os.path import sys import re import ...
113
29.69
117
15
893
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_32743dd57e6af79b_e9fc9561", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
3
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 21, 29 ]
[ 21, 29 ]
[ 1, 13 ]
[ 36, 31 ]
[ "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" ]
wpimport.py
/makeblog/wpimport.py
fyhuang/makeblog
BSD-2-Clause
2024-11-18T20:48:06.256502+00:00
1,450,405,860,000
a61aa63c817168505c311938a699a49c7ea46db6
3
{ "blob_id": "a61aa63c817168505c311938a699a49c7ea46db6", "branch_name": "refs/heads/master", "committer_date": 1450405860000, "content_id": "fd4623aec2c70ca9426537f2d6f27b8c532587eb", "detected_licenses": [ "NCSA" ], "directory_id": "a06171524752f15eed1db93545274a934174c02a", "extension": "py", "f...
2.609375
stackv2
import sys import subprocess import os.path import re import time TEST_DIR = "test1/" TABLE_OUTPUT = "/home/klee/paper527/tables/table1.tex" NUM_TESTS = 1 def create_combined_fil(i): #print("python pre_processing.py " + TEST_DIR + "testbase.c " + TEST_DIR + "test" + str(i) + ".c") #p = subprocess.Popen(["pyth...
114
34.95
137
16
1,155
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2009b58f8ac027bf_66c1ab7a", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 40 ]
[ 40 ]
[ 93 ]
[ 97 ]
[ "A01:2017 - Injection" ]
[ "Found 'subprocess' function 'Popen' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead." ]
[ 7.5 ]
[ "HIGH" ]
[ "LOW" ]
run_experiment.py
/scripts/run_experiment.py
Wajihulhassan/klee
NCSA
2024-11-18T20:48:06.878837+00:00
1,607,415,883,000
42ff467f92a3ac06c43fd0740ad4651ff406b22e
3
{ "blob_id": "42ff467f92a3ac06c43fd0740ad4651ff406b22e", "branch_name": "refs/heads/main", "committer_date": 1607415883000, "content_id": "7dd078dd78d3f1546be07bb59c6a8a22a8f89bba", "detected_licenses": [ "MIT" ], "directory_id": "7127e0824c0c14de7faab8caf3667414707e86b9", "extension": "py", "file...
3.359375
stackv2
# @author Duke Chain # @File:CreateStockInfo.py # @createTime 2020/11/05 22:54:05 import pymysql class CreateStockInfo: """ 为新收集的数据在stock_info数据库中创建表 表命名规则:stockID Args: stockID:传入股票ID database:目标位于的数据库(daily,weekly,monthly) content:判断数据库类型(d(日),t(秒),m(分钟)) """ d...
87
31.68
96
17
581
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_84eb371972846328_571291a9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
2
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "HIGH" ]
[ 41, 41 ]
[ 41, 41 ]
[ 21, 21 ]
[ 76, 76 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
CreateStockInfo.py
/DBOperate/CreateStockInfo.py
dukechain2333/BossaNova
MIT
2024-11-18T20:48:10.055739+00:00
1,683,033,018,000
1caa085649926cec6c1c8174c3280de8acc97e5c
3
{ "blob_id": "1caa085649926cec6c1c8174c3280de8acc97e5c", "branch_name": "refs/heads/master", "committer_date": 1683033018000, "content_id": "55bb082bbc0e1b828be4d90e4b6d36bbc4a7223f", "detected_licenses": [ "MIT" ], "directory_id": "d5be74d2de6fa0ded61d6c3ee7c91a403c0f90db", "extension": "py", "fi...
3.015625
stackv2
# -*- coding: utf-8 -*- """Logging module of the Quantarhei package """ import traceback import quantarhei as qr def init_logging(): """Initialization of logging We test if the logging is parallel or not """ manager = qr.Manager().log_conf try: from mpi4py import MPI co...
244
24.42
78
17
1,467
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_a0a473987ce9d2cd_09758064", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
9
true
[ "CWE-95", "CWE-96", "CWE-95", "CWE-96" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.dangerous-globals-use", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.dangerous-globals-use" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 219, 219, 231, 231 ]
[ 219, 219, 231, 231 ]
[ 15, 20, 19, 24 ]
[ 35, 34, 39, 38 ]
[ "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.", "Found non static data as an index to 'globals()'. This is e...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "HIGH", "MEDIUM" ]
logging.py
/quantarhei/utils/logging.py
tmancal74/quantarhei
MIT
2024-11-18T20:48:12.257712+00:00
1,585,404,904,000
561bea9b7a400576be7361120c1def288ade7028
3
{ "blob_id": "561bea9b7a400576be7361120c1def288ade7028", "branch_name": "refs/heads/master", "committer_date": 1585404904000, "content_id": "22eb22a20fc18c68176ef53729619830eda24e1d", "detected_licenses": [ "MIT" ], "directory_id": "b661ba915a20e7d488c4ce8d99b5027a1e1b1d66", "extension": "py", "fi...
2.734375
stackv2
import logging def purge_schema_except(db, schema_list): # this will run through and drop all schemas except for those in the schema_list sql_all_schemas = '' drop_schema_list = [] sql_drop_schema = """DROP schema {} """ dbtype = db._dbtype if dbtype in ['POSTGRES', 'MAPD']: sql_all_s...
89
39.09
116
21
803
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_a436bca50e03988c_70c0d401", "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...
3
true
[ "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "HIGH" ]
[ 37, 89, 89 ]
[ 37, 89, 89 ]
[ 21, 5, 5 ]
[ 68, 28, 28 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
utils.py
/src/py_dbutils/utils.py
pchoengtawee/py-dbutils
MIT
2024-11-18T20:48:19.630257+00:00
1,599,053,689,000
f77bc4d9d9e67c91fc341ee2b75f66fd93d87592
2
{ "blob_id": "f77bc4d9d9e67c91fc341ee2b75f66fd93d87592", "branch_name": "refs/heads/master", "committer_date": 1599053689000, "content_id": "9e31108a557377af6923a4e3e6f1feb01c83a0c2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5fe72bb13baf3649058ebe11aa86ad4fc56c69ed", "extension": "py"...
2.453125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' A lint tool for robotframework cases, only one py file script. There is one lint tool for robotframework on github https://github.com/boakley/robotframework-lint, but it only support static analysis on plain text. We have many case in html format, and once more, the pa...
411
35.67
107
17
3,557
python
[{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_0dda5df5226d611b_6f950c78", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.dangerous-globals-use", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Found non static data as an index to 'globals()'...
2
true
[ "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 97 ]
[ 97 ]
[ 24 ]
[ 38 ]
[ "A03:2021 - Injection" ]
[ "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
snippet.py
/hard-gists/35723b58d238a67234d8/snippet.py
dockerizeme/dockerizeme
Apache-2.0
2024-11-18T20:48:21.359742+00:00
1,595,338,228,000
adde0047baec03ff4fa19a0610513c6cb1e82606
3
{ "blob_id": "adde0047baec03ff4fa19a0610513c6cb1e82606", "branch_name": "refs/heads/master", "committer_date": 1595338228000, "content_id": "64eee36801d7420701e5fe2ca8c0f7242d9f9845", "detected_licenses": [ "Unlicense" ], "directory_id": "1d17759d2864cd8ebf4006cf9193ac4eb6090f77", "extension": "py",...
2.515625
stackv2
import os import zipfile import datetime import time import winsound import platform import readchar #### CONFIG BACKGROUND_COLOR = '0' #You can only use this values: 0 to 9, A, B, C, D, E, F' TEXT_COLOR = 'a' #You can only use this values: 0 to 9, A, B, C, D, E, F' HOTKEY_EXIT = b'\x10' #ctrl + p HOTKEY_SAVE = b'\x1a...
115
35.46
125
14
2,165
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_686a3600a2d57ab0_1c8cb6e2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 20 ]
[ 20 ]
[ 1 ]
[ 68 ]
[ "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" ]
minecraft_backupper_hotkey.py
/minecraft_backupper_hotkey.py
dobrosketchkun/minecraft_backupper
Unlicense
2024-11-18T20:48:23.517918+00:00
1,557,109,866,000
18e297af0d684684123ffdf71519a5e75e755012
3
{ "blob_id": "18e297af0d684684123ffdf71519a5e75e755012", "branch_name": "refs/heads/master", "committer_date": 1557109866000, "content_id": "0eb87e4c0bc0228ef2f7d361c9a5f2e2c4ee91ca", "detected_licenses": [ "MIT" ], "directory_id": "4ede33c2e817f2160221bd323d141e03bf46863b", "extension": "py", "fi...
2.84375
stackv2
#!/usr/bin/python #coding: utf-8 import sqlite3 import matplotlib.pyplot as plt import numpy as np from snownlp import SnowNLP import sys reload(sys) sys.setdefaultencoding( "utf-8" ) def emotionParser(name): conn = conn = sqlite3.connect("end.db") conn.text_factory = str cursor = conn.cursor() likeSt...
33
32.45
91
15
266
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_a94c1a5f75ad1741_510a823d", "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" ]
[ 17 ]
[ 17 ]
[ 5 ]
[ 79 ]
[ "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" ]
EmotionParser.py
/EmotionParser.py
Pinned/Endgame
MIT
2024-11-18T20:48:27.915560+00:00
1,624,397,021,000
4dce7a43b64f19520d4b8a7e8b4cbc6bb616935a
3
{ "blob_id": "4dce7a43b64f19520d4b8a7e8b4cbc6bb616935a", "branch_name": "refs/heads/main", "committer_date": 1624397021000, "content_id": "6d92d836258cb7225797aa3a3dcd6cd71f38c3e0", "detected_licenses": [ "MIT" ], "directory_id": "7e13aa63fb60059a16a8130fdbbbb429cc767d9f", "extension": "py", "file...
2.796875
stackv2
import sys import json import argparse import pathlib import sqlite3 import subprocess import shlex from db_creator import DB_FILENAME FFPROBE_BIN = pathlib.Path(r""".\bin_ffmpeg\ffprobe.exe""") assert FFPROBE_BIN.exists() FFPROBE_ARGS = [r"""%s""" % FFPROBE_BIN, "-v", "quiet", "-print_format", "json", "-show_strea...
84
26.37
100
17
517
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_fc77a2d74d9430fb_8fd1fc97", "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-78" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "HIGH" ]
[ 33, 33, 59 ]
[ 33, 33, 59 ]
[ 13, 13, 15 ]
[ 101, 101, 60 ]
[ "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" ]
db_repair_duration.py
/scratchpads/data_scratchpad/db_repair_duration.py
devdave/pysongman
MIT
2024-11-18T20:48:28.453987+00:00
1,621,270,222,000
5406f8cd71928304e6609ea91962a641e0c26669
3
{ "blob_id": "5406f8cd71928304e6609ea91962a641e0c26669", "branch_name": "refs/heads/main", "committer_date": 1621270222000, "content_id": "42d6c20497fcb3dcd677eed482e28ae5d3005cac", "detected_licenses": [ "MIT" ], "directory_id": "45949a63fffa9d0bd1a789b070d96b8caaedfeca", "extension": "py", "file...
2.640625
stackv2
class Write(object): # The navigate class will be used to navigate around the whatsapp web client. # Its functionas are accompanied by dictionaries that containt the class names that the functions use to navigate. # Create an instance of the Navigate Class in order to use some of it's functions. # ...
373
46.73
146
17
3,613
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_fc2f4174c8dbec54_f681dec9", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi...
5
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 329 ]
[ 329 ]
[ 22 ]
[ 71 ]
[ "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" ]
Write.py
/whatsapp-selenium-api/Write.py
luyandadhlamini/whatsapp-selenium-api
MIT
2024-11-18T20:48:29.373686+00:00
1,550,768,926,000
c6cbef971ba159e84998660ceb9a65794d7bd2fe
3
{ "blob_id": "c6cbef971ba159e84998660ceb9a65794d7bd2fe", "branch_name": "refs/heads/master", "committer_date": 1550768926000, "content_id": "ce5707054c88ee9b5a3dc12239bda26befeff865", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ed8e4786bf824b3c2412f49e32def13168837ec3", "extension": "py"...
2.953125
stackv2
# from django.shortcuts import render from django.http import HttpResponse from .models import Person # Create your views here. def index(request): return HttpResponse("Test URL") # newPerson, all, update, moreThan21 def newPerson(request): newObject = Person(name = "Kevin", age=22, birthday = "1996-01-01")...
36
24.42
71
10
233
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_ce011768418f3184_c5176b3d", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ...
4
true
[ "CWE-79", "CWE-79", "CWE-79", "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 15, 24, 29, 36 ]
[ 15, 24, 29, 36 ]
[ 12, 12, 12, 12 ]
[ 35, 34, 50, 39 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.", "Detected data rendered directly to the end user via 'HttpRes...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
views.py
/morningDjangoProject/lecture2App/views.py
cs-fullstack-2019-spring/django-models3-ic-Kenn-CodeCrew
Apache-2.0
2024-11-18T20:48:29.483706+00:00
1,691,399,521,000
e5d901eed27b73c78b690f4b17d5a0e928e5cb11
3
{ "blob_id": "e5d901eed27b73c78b690f4b17d5a0e928e5cb11", "branch_name": "refs/heads/master", "committer_date": 1691399521000, "content_id": "f27ee89eb1682af0f834335df0d96ad317998e18", "detected_licenses": [ "MIT" ], "directory_id": "6b5ffc003053d4aaacbf200c119cf2344c289da2", "extension": "py", "fi...
2.90625
stackv2
""" This script will create 50 random large sized file and upload it to specified bucket. Install boto package on machine to run this script. """ import os from random import randint import boto3 session = boto3.session.Session() access_key = "<s3 access key>" secret_key = "<s3 secret key>" s3 = session.client( ...
55
26.58
74
16
432
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_cd0ab9c0b041354b_3f6a5f2c", "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" ]
[ 25, 27 ]
[ 25, 27 ]
[ 5, 5 ]
[ 70, 70 ]
[ "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" ]
s3_multipart.py
/rgw/standalone/s3_multipart.py
red-hat-storage/ceph-qe-scripts
MIT
2024-11-18T20:48:33.512776+00:00
1,594,697,117,000
7fe10eba6c05d62b757d3e8169f9529a937bcd2d
3
{ "blob_id": "7fe10eba6c05d62b757d3e8169f9529a937bcd2d", "branch_name": "refs/heads/master", "committer_date": 1594697117000, "content_id": "6d7d1e656b52222af1b91711875b0ea66019b2fb", "detected_licenses": [ "MIT" ], "directory_id": "79d6aa5856b63fa767b447ebb4bef29e08c6e86f", "extension": "py", "fi...
2.609375
stackv2
# coding: utf-8 import re import subprocess class SvnDiff(): def __init__(self): pass def get_diff_lines(self, base_rev: int = None) -> dict: if base_rev is None: get_base_commit_cmd = 'svn log -l 10' result = subprocess.check_output(get_base_commit_cmd.split()) ...
66
27.85
76
17
425
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_4c9bf60a0eac8ed9_461ae5d2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 15, 30 ]
[ 15, 30 ]
[ 22, 18 ]
[ 74, 63 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subproces...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
svndiff.py
/bracketdot/svndiff.py
shotaIDE/BracketDot
MIT
2024-11-18T20:48:34.391810+00:00
1,536,868,230,000
a7a053edc1e6725a1e45d7eff05a14e82adec042
2
{ "blob_id": "a7a053edc1e6725a1e45d7eff05a14e82adec042", "branch_name": "refs/heads/master", "committer_date": 1536868230000, "content_id": "52d3546aa34c6f3df80a52a5f6034c6f8e8189f2", "detected_licenses": [ "MIT" ], "directory_id": "b1cc1621bdcc8781a6278de6e9e3ead0b9bdebac", "extension": "py", "fi...
2.421875
stackv2
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # Copyright 2018 Daniel Rodriguez. All Rights Reserved. # Use of this source code is governed by the MIT license #############################################################...
85
27.8
79
15
545
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ea72a75317c4e0d7_9171ba42", "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" ]
[ 50 ]
[ 50 ]
[ 19 ]
[ 43 ]
[ "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" ]
uwsgi-run.py
/flaskpylar/uwsgi-run.py
anpylar/flaskpylar
MIT
2024-11-18T21:11:25.881573+00:00
1,677,641,953,000
e5e334b8712102524fbd219cfaf2f6ff0263405a
3
{ "blob_id": "e5e334b8712102524fbd219cfaf2f6ff0263405a", "branch_name": "refs/heads/master", "committer_date": 1677641953000, "content_id": "180f44189af5b0bf43aacf4507d963b7d9072451", "detected_licenses": [ "MIT" ], "directory_id": "40ed327ce10ec58367426008996916dbf3c204ed", "extension": "py", "fi...
2.59375
stackv2
""" Filename: calc_durack_ocean_maps.py Author: Damien Irving, irving.damien@gmail.com Description: Calculate the zonal and vertical mean ocean anomaly fields from the Durack and Wijffels (2010) data files """ # Import general Python modules import sys, os, pdb import argparse, math import n...
130
39.25
178
19
1,187
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_c89e985d36602ed2_b03c6058", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.python-debugger-found", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Importing the python debugger;...
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" ]
[ 104, 105 ]
[ 104, 105 ]
[ 37, 42 ]
[ 76, 86 ]
[ "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" ]
calc_durack_ocean_maps.py
/data_processing/obs/calc_durack_ocean_maps.py
DamienIrving/ocean-analysis
MIT
2024-11-18T21:11:29.595124+00:00
1,604,823,207,000
5fbf1c24da7cedca83ffe7d59478b38a9177ab2b
3
{ "blob_id": "5fbf1c24da7cedca83ffe7d59478b38a9177ab2b", "branch_name": "refs/heads/master", "committer_date": 1604824414000, "content_id": "2f1ecf32813763be52d3d55d057d4e11b03a5043", "detected_licenses": [ "MIT" ], "directory_id": "ae93451fc1eaab03f14bf0d08842c51a44d09d55", "extension": "py", "fi...
2.75
stackv2
"""Reflexec Inotify watcher plugins module. Implements file system watching using Inotify Linux kernel subsystem. .. autoclass:: InotifyWatcherPlugin :members: name :show-inheritance: """ import re import pyinotify from .base import WatcherPlugin, convert_patterns_to_paths, log class InotifyHandler(pyinoti...
101
29.81
84
18
687
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_d07d1ed77b0d9f23_e76652fb", "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" ]
[ 67 ]
[ 67 ]
[ 41 ]
[ 84 ]
[ "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" ]
inotify.py
/reflexec/watcher/plugin/inotify.py
ookull/reflexec
MIT
2024-11-18T21:11:32.551230+00:00
1,496,917,056,000
f023791cf9cd1e5f0e371910957c9d9ec92f2d0e
2
{ "blob_id": "f023791cf9cd1e5f0e371910957c9d9ec92f2d0e", "branch_name": "refs/heads/master", "committer_date": 1496917056000, "content_id": "333332a6575a06056ff5b8b261ba58de84b08310", "detected_licenses": [ "MIT" ], "directory_id": "2157b70b18b091ea4de4b816746e4f2b41521b9e", "extension": "py", "fi...
2.3125
stackv2
import time import subprocess as sp # NEW_IMG_LOCATION = '/home/niravraham/workspace/saper-project/new_input_img.jpg' MAIN_FCN_FILE = 'python /home/niravraham/workspace/saper-project/tensorflow-deeplab-resnet/inference.py ' # ANALYZED_IMG_LOC = '/home/niravraham/workspace/saper-project/tf-image-segmentation/output/new_...
41
33.07
117
11
418
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_e9329b80f9064f2f_2abe50e2", "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" ]
[ 33 ]
[ 33 ]
[ 10 ]
[ 51 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
timeTesting.py
/tf-image-segmentation/timeTesting.py
dav-sap/school_project
MIT
2024-11-18T21:11:36.623493+00:00
1,603,057,428,000
0d1b5e8a31ebf266bf5d8492b1fa1abdc8f09bd7
2
{ "blob_id": "0d1b5e8a31ebf266bf5d8492b1fa1abdc8f09bd7", "branch_name": "refs/heads/master", "committer_date": 1603057428000, "content_id": "a4da3cabba4c75f2ecbf1443200f95066b6e815a", "detected_licenses": [ "MIT" ], "directory_id": "4bb4ba294f311192d73292eb2e3c0cedd49a6193", "extension": "py", "fi...
2.46875
stackv2
import psycopg2 from psycopg2 import pool from psycopg2 import extras import logging from .db_config import DbConfig from typing import Tuple import numbers query_response = Tuple[object, str] class DbExecuter: ''' Writes data to postgres ''' def __init__(self, db_config_instance:DbConfig): ...
272
38.51
120
25
2,037
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_19a48c5bb8c275b1_20608c09", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
2
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 174, 215 ]
[ 174, 215 ]
[ 17, 17 ]
[ 65, 58 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
db_executer.py
/data/db_executer.py
tcristi74/yamsleu_server
MIT
2024-11-18T21:11:45.020630+00:00
1,527,086,265,000
53ff602420636d8cb0d0c598ee476ae40bd524db
2
{ "blob_id": "53ff602420636d8cb0d0c598ee476ae40bd524db", "branch_name": "refs/heads/master", "committer_date": 1527086265000, "content_id": "38b8a3f7bb30a3c77c621e2e801d1328fd26656e", "detected_licenses": [ "MIT" ], "directory_id": "a6162a2bbd5d8b69ec9eba08725ef442d2ab8ff1", "extension": "py", "fi...
2.484375
stackv2
#!/usr/bin/python import os import subprocess import logging import traceback class history_command_manager(): def __init__(self): pass def get_history_list(self,history_file): #run_command = ['bash', '-i', '-c', 'history -r; history'] run_command = ['...
47
33.64
105
15
305
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_929ca5e1dd937ec8_2309b0cc", "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" ]
[ 21 ]
[ 21 ]
[ 29 ]
[ 106 ]
[ "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" ]
history_command_manager.py
/terminaloverflow/history_command_manager.py
dazcode/terminaloverflow
MIT
2024-11-18T21:25:46.623005+00:00
1,508,362,191,000
de68a4f81ce0fa5e179ad44f7b02302a627ba920
3
{ "blob_id": "de68a4f81ce0fa5e179ad44f7b02302a627ba920", "branch_name": "refs/heads/master", "committer_date": 1508362191000, "content_id": "2860f18baf605d8775edd90cf7fd96fb037c46be", "detected_licenses": [ "MIT" ], "directory_id": "8c33eb2d30ea1a031e55bdc72ab3b3b3a4f7f6eb", "extension": "py", "fi...
2.796875
stackv2
#! /bin/python3 """ # Purpose To batch process raw fastq files for adaptor trimming and QC trimming with trimmomatic. basedir is the top level output dir inputdirectory should contain all folders with .fastq.gz reads to be processed processed is where the trimmed read files will go log is self explanatory trim is dir...
113
30.27
147
30
970
python
[{"finding_id": "semgrep_rules.python.lang.correctness.unchecked-subprocess-call_e4a35bf75c774ad7_430c3ded", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.unchecked-subprocess-call", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "This is not checking the ret...
8
true
[ "CWE-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.dangerous-subprocess-use-tainted-env-args", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dang...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM", "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 69, 69, 76, 86, 87, 93 ]
[ 76, 75, 76, 94, 92, 93 ]
[ 17, 22, 28, 5, 10, 16 ]
[ 33, 52, 32, 6, 40, 20 ]
[ "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()'.", "Detected subprocess functi...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "HIGH", "LOW", "MEDIUM", "HIGH" ]
[ "HIGH", "MEDIUM", "LOW", "HIGH", "MEDIUM", "LOW" ]
batch_trim.py
/batch_trim.py
leticia-castro/rnaseq_pipe
MIT
2024-11-18T21:25:50.030065+00:00
1,530,403,039,000
3253f6008c7fc8c21c48acac4bd623db301faa0d
3
{ "blob_id": "3253f6008c7fc8c21c48acac4bd623db301faa0d", "branch_name": "refs/heads/master", "committer_date": 1530403039000, "content_id": "466ca781563d7be040a5afecdbefbb59683d172f", "detected_licenses": [ "MIT" ], "directory_id": "4940a995823af1411718cde6d07d9a62c5f89a9b", "extension": "py", "fi...
3.328125
stackv2
"""Contains class for parsing and housing point generation constraints.""" import re class Constraint(): """Constraints loaded from a file.""" def __init__(self, fname): """ Construct a Constraint object from a constraints file :param fname: Name of the file to read the Constraint from (string) "...
89
32.82
79
18
689
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_7b281b611b2ba3c6_99daeb23", "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-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 74, 87 ]
[ 74, 87 ]
[ 14, 14 ]
[ 24, 24 ]
[ "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" ]
constraints.py
/citrine_point_sampler/constraint_parser/constraints.py
LeanAndMean/citrine_point_generator
MIT
2024-11-18T21:25:51.674543+00:00
1,380,130,926,000
938c8350feee646c8fc4ee5051321d600e1830a3
3
{ "blob_id": "938c8350feee646c8fc4ee5051321d600e1830a3", "branch_name": "refs/heads/master", "committer_date": 1380130926000, "content_id": "a45510235c122405625f1592bb8ed28f2e1e4a5c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "199f4a81fbdb59542a9e5b69b2cdd9dea661caf5", "extension": "py"...
2.734375
stackv2
import datetime import warnings from connection import DB from group_by import GroupBy from join import TableBuilder from table import Table from main import get_class from build_sql import SQLBuilder class Fact(Table): """ Fact base class. """ historical_iterations = 100 def __ini...
287
33.11
123
20
1,979
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_8f344dac0eca5bca_5b05a35b", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
2
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 161, 241 ]
[ 162, 241 ]
[ 26, 17 ]
[ 58, 66 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
fact.py
/pylytics/library/fact.py
pombredanne/pylytics
Apache-2.0
2024-11-18T21:25:52.167563+00:00
1,575,842,055,000
7fb6192cce4b3b07de85e560bad083bc24a7156b
2
{ "blob_id": "7fb6192cce4b3b07de85e560bad083bc24a7156b", "branch_name": "refs/heads/master", "committer_date": 1575842055000, "content_id": "6f447793ee868fb799561048603389e4752c4dc6", "detected_licenses": [ "MIT" ], "directory_id": "e6683202f97190f8a5230fbb0b99d9692f10872c", "extension": "py", "fi...
2.3125
stackv2
# Python modules import requests import json import os from packaging import version import urllib.request from glob import glob import shutil import sys import distutils.dir_util # Core modules from core import colors from core import info from core import getpath from core import mscop def check_for_updates(): t...
104
23.07
92
19
631
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-timeout_1772f306c12170d3_0a3abe13", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-timeout", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Detected a 'requests' call without a timeo...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 71 ]
[ 71 ]
[ 2 ]
[ 80 ]
[ "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" ]
update.py
/core/update.py
swagkarna/arissploit
MIT
2024-11-18T21:25:54.037488+00:00
1,591,632,242,000
aa3ccc25ec24db79e2b850a9848a07ffc69ca367
3
{ "blob_id": "aa3ccc25ec24db79e2b850a9848a07ffc69ca367", "branch_name": "refs/heads/master", "committer_date": 1591632242000, "content_id": "26a333313fb59223326a9e8e38247571f5f0513a", "detected_licenses": [ "MIT" ], "directory_id": "a970ff245a3a4bfbdacb34a349f2ed0b712a877b", "extension": "py", "fi...
2.625
stackv2
import glob import xml.etree.ElementTree as ET import os import numpy as np from Kmeans import kmeans, avg_iou ANNOTATIONS_PATH = "Annotations" CLUSTERS = 9 def load_dataset(): dataset = [] file = open('/home/jackzhou/PycharmProjects/mask_detection/Data/Trainset.txt', 'r') for line in file: boxes...
33
26.58
87
20
263
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_e1ee9ee9ccc7b960_7ab980b4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
3
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 2 ]
[ 2 ]
[ 1 ]
[ 35 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
Count_anchor.py
/Count_anchor.py
Jackzhou1999/Mask_detection
MIT
2024-11-18T21:25:57.631453+00:00
1,603,696,947,000
1ec462fbe5f8d83d224eb2214299cffa4ae9bf13
3
{ "blob_id": "1ec462fbe5f8d83d224eb2214299cffa4ae9bf13", "branch_name": "refs/heads/master", "committer_date": 1603696947000, "content_id": "40f4e99813a83625ee72f39f24d7643a1c44ed11", "detected_licenses": [ "MIT" ], "directory_id": "0a4453cd30efc2c324b0d0ef2eb11a7ba0fe15ad", "extension": "py", "fi...
2.515625
stackv2
#!/usr/bin/python3 import os import sys import motiflib import argparse import math import statistics #dnafile optional, pa pc pg pt # setup parser = argparse.ArgumentParser( description='Will test MEME parameters on fasta files of promoters.') parser.add_argument('--jasparfile', required=True, type=str, metavar='...
191
38.04
82
19
2,067
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_715d6fbe941c1e62_ed739c75", "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" ]
[ 89, 101 ]
[ 89, 101 ]
[ 2, 2 ]
[ 16, 16 ]
[ "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" ]
memeOP.py
/sporecore/memeOP.py
lilymaryam/UC_Davis_iGEM
MIT
2024-11-18T21:26:01.905257+00:00
1,640,111,233,000
12b64d7a8cdbafd3ac804987c17aff815b33442a
3
{ "blob_id": "12b64d7a8cdbafd3ac804987c17aff815b33442a", "branch_name": "refs/heads/master", "committer_date": 1640111233000, "content_id": "f2de31c227dbce4af6a3f1a0f669dd1f7caabf30", "detected_licenses": [ "MIT" ], "directory_id": "e885a46c240a8579d01489787c9b03f4e6e0f0a2", "extension": "py", "fi...
2.546875
stackv2
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Picker(Component): """A Picker component. Keyword arguments: - id (string; required): Picker ID. - format (string; default ""): Format to be used in displaying date. The slashes between ...
48
36.6
164
17
430
python
[{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_4d39de4ce6fb4673_313f7be4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.dangerous-globals-use", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Found non static data as an index to 'globals()'...
1
true
[ "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 43 ]
[ 43 ]
[ 20 ]
[ 30 ]
[ "A03:2021 - Injection" ]
[ "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
Picker.py
/sd_material_ui/Picker.py
StratoDem/sd-material-ui
MIT
2024-11-18T21:26:05.326836+00:00
1,621,005,183,000
a6e7434d48d2a5ea2f83960b987e4932d6a6fa7a
3
{ "blob_id": "a6e7434d48d2a5ea2f83960b987e4932d6a6fa7a", "branch_name": "refs/heads/master", "committer_date": 1621005183000, "content_id": "a8a0b9605dc500321cec1a5ac8dcf9510c10aaec", "detected_licenses": [ "MIT" ], "directory_id": "bca4f799c090c62ccda6aad37ac0265850dc8749", "extension": "py", "fi...
2.78125
stackv2
#autor : Tomas E. García Fernández #email : tomas.garcia.fisica@gmail.com # tomas.garcia.fisica@hotmail.com #Linkedin: www.linkedin.com/in/tomas-garcia-fisica # Desarrollo en PROCESO import pickle def Cargar(name): """Cargar archivos""" with open (name, "rb") as hand: dic=pickle.load(hand) re...
17
21.94
50
11
118
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fd6ce300f02eb371_4626938e", "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" ]
[ 13 ]
[ 13 ]
[ 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" ]
Basic.py
/Neuro_Visual_Navigation_Analysis/modules/Basic.py
TomasFisica/portafolio
MIT
2024-11-18T21:26:06.819563+00:00
1,561,378,268,000
5ad114e5d18c9ff8172918774ecad6acc69644a3
3
{ "blob_id": "5ad114e5d18c9ff8172918774ecad6acc69644a3", "branch_name": "refs/heads/master", "committer_date": 1561378268000, "content_id": "a24d8488c7a9ba6851c0abe696a11672ff1ff0ea", "detected_licenses": [ "Unlicense" ], "directory_id": "c7d5cb909dffeda62f891df309619de1a1c6975c", "extension": "py",...
3.15625
stackv2
import numpy as np import csv from aeronet import dataset as ds import shapely import pickle def smart_interp(array, value): # Runs the linear interpolation if it is necessary # If there's any value that not follows the array - return Exception for i in range(len(array)): if value == array[i][0]: ...
203
35.56
75
19
2,058
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_73bb934ff22a4002_f154f9ef", "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-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" ]
[ 165, 167, 169, 184, 187 ]
[ 165, 167, 169, 184, 187 ]
[ 9, 9, 9, 13, 13 ]
[ 32, 32, 34, 56, 51 ]
[ "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" ]
Preprocessing.py
/Preprocessing.py
oiynick/ADR-Diploma
Unlicense
2024-11-18T21:26:06.999892+00:00
1,466,186,388,000
d88cbe3996ccbf9bf5e243ebe7befe3bd780a946
2
{ "blob_id": "d88cbe3996ccbf9bf5e243ebe7befe3bd780a946", "branch_name": "refs/heads/master", "committer_date": 1466186388000, "content_id": "7d9bf1b3a92973bc28b88e5e5332406fc440e224", "detected_licenses": [ "MIT" ], "directory_id": "2c2cc563597f561aec2d6cdcaafedef07b767c9b", "extension": "py", "fi...
2.484375
stackv2
__author__ = 'gabriel' from django.db import connection from database import models import numpy as np from django.contrib.gis import geos def create_table(): cursor = connection.cursor() cursor.execute( """CREATE TABLE crimes ( pk integer); SELECT AddGeometryColumn('crimes', 'loc...
39
29.59
111
11
322
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_b9378c7f457147c4_b2ce72ac", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
2
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "HIGH" ]
[ 36, 36 ]
[ 36, 36 ]
[ 9, 9 ]
[ 28, 28 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
runner.py
/runner.py
SpaceTimeJames/geo-network
MIT
2024-11-18T21:26:09.991186+00:00
1,593,666,438,000
8d63bb8a7db5f7619d509c2a1d40125a6530d056
2
{ "blob_id": "8d63bb8a7db5f7619d509c2a1d40125a6530d056", "branch_name": "refs/heads/master", "committer_date": 1593666438000, "content_id": "f1928785c7e46ddac9326afc5984749ce2d09b3b", "detected_licenses": [ "MIT" ], "directory_id": "8befdf19d59426223cd6a36b80d57449609bb631", "extension": "py", "fi...
2.359375
stackv2
# -*- coding: utf-8 -*- # html.py - sublimelint package for checking html files # Example error messages # # line 1 column 1 - Warning: missing <!DOCTYPE> declaration # line 200 column 1 - Warning: discarding unexpected </div> # line 1 column 1 - Warning: inserting missing 'title' element import re import subprocess ...
41
33.78
156
18
346
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7d88a30295e87993_e978eb80", "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" ]
[ 26 ]
[ 26 ]
[ 30 ]
[ 120 ]
[ "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" ]
html.py
/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/SublimeLinter/sublimelinter/modules/html.py
Iristyle/ChocolateyPackages
MIT
2024-11-18T21:26:10.936688+00:00
1,564,216,697,000
cdbd6e1de28bf20278ab048b7a1952decab9bec1
3
{ "blob_id": "cdbd6e1de28bf20278ab048b7a1952decab9bec1", "branch_name": "refs/heads/master", "committer_date": 1564216697000, "content_id": "6dc4664eda6c7ef1382b812ef460f8215803de63", "detected_licenses": [ "MIT" ], "directory_id": "e71667130c0f5f30c8b13978e4a7c5603dc586fc", "extension": "py", "fi...
2.765625
stackv2
import smtplib, ssl from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart def send_error_msg_via_email(port=587, smtp_server="smtp.gmail.com", sender_email="ai.insights.au@gmail.com", receiver_email="shane.zhong@gmail.com", ...
66
31.18
81
13
467
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.hardcoded-password-default-argument_49769016fb10f1b0_b499666a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.hardcoded-password-default-argument", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Hardcode...
1
true
[ "CWE-798" ]
[ "rules.python.lang.security.audit.hardcoded-password-default-argument" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 6 ]
[ 66 ]
[ 1 ]
[ 11 ]
[ "A07:2021 - Identification and Authentication Failures" ]
[ "Hardcoded password is used as a default argument to 'send_error_msg_via_email'. This could be dangerous if a real password is not supplied." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
fn_SendEmail.py
/twitter/fn_SendEmail.py
lucmski/gpt-2-twitter-bot
MIT
2024-11-18T21:26:12.983758+00:00
1,607,444,810,000
ee495074211d9de4ce61aa380fff53e26f3c2b4c
3
{ "blob_id": "ee495074211d9de4ce61aa380fff53e26f3c2b4c", "branch_name": "refs/heads/master", "committer_date": 1607444810000, "content_id": "326c4973ba089326be3366cef0ec4e30d74ba0f3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c837a856cc32a1aa652f8d044148c15a2a735ff2", "extension": "py"...
3.078125
stackv2
''' To connect to postgresql database as defined in oli.config Read subjects and write subjects Created on 14 apr. 2017 @author: GerbenRienk Copyright 2020 TrialDataSolutions ''' import psycopg2 from utils.dictfile import readDictFile class ConnToOliDB(object): '''Class for connecting to the postgresql database a...
227
39.99
172
15
2,078
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_60bce995dc799489_972dcf21", "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...
18
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-611" ]
[ "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.sqlalchemy.security.sqlalchemy-execute-raw-query", ...
[ "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" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "HIGH" ]
[ 47, 47, 61, 61, 74, 113, 113, 128, 128, 145, 145, 162, 162, 179, 179, 199 ]
[ 47, 47, 61, 61, 74, 113, 113, 128, 128, 145, 145, 162, 162, 179, 179, 199 ]
[ 13, 13, 13, 13, 13, 13, 13, 13, 13, 17, 17, 13, 13, 13, 13, 9 ]
[ 42, 42, 42, 42, 42, 42, 42, 42, 42, 46, 46, 42, 42, 42, 42, 43 ]
[ "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, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 7.5 ]
[ "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", "MEDIUM" ]
pg_api.py
/src/utils/pg_api.py
GerbenRienk/casi
Apache-2.0
2024-11-18T21:51:45.500889+00:00
1,624,964,531,000
6af4d1daeaa59082798f3685cb0c881eb5248747
3
{ "blob_id": "6af4d1daeaa59082798f3685cb0c881eb5248747", "branch_name": "refs/heads/main", "committer_date": 1624964531000, "content_id": "2c63aa97619ad8a647077c5f58e5ce817dea95a7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5a4fe803f39f26ee214069466aa99ce651f8d22b", "extension": "py", ...
2.90625
stackv2
#!/usr/bin/env python """ Script for obtaining AUC per annotated TE Between sample1 and sample2 """ import logging import argparse import os import numpy as np import pandas as pd import pickle __author__ = "Dominik Burri" __date__ = "2020-11-19" __license__ = "Apache" __version__ = "0.0.1" __maintainer__ = "Dominik...
359
40.16
149
21
3,732
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7a6a9dcd493ad68c_9c603f1e", "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" ]
[ 43 ]
[ 43 ]
[ 5 ]
[ 35 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
calculation_auc.py
/scripts/calculation_auc.py
BIT-VS-IT/SCUREL
Apache-2.0
2024-11-18T21:51:46.654309+00:00
1,635,423,766,000
03c7e8e480a33023a9bc2a06a99342171d6b69eb
3
{ "blob_id": "03c7e8e480a33023a9bc2a06a99342171d6b69eb", "branch_name": "refs/heads/master", "committer_date": 1635423766000, "content_id": "5bfeeadc1d85b9043aa31369c7f678198abd3987", "detected_licenses": [ "Unlicense" ], "directory_id": "4d69fce2d365df235d07526e444c30353d8b50ed", "extension": "py",...
2.59375
stackv2
# opens an url in streamlink, along with the chat if the stream is on youtube import sys import subprocess from urllib import parse DEFAULT_QUALITY = 'best' BROWSER_PATH = r'C:\Program Files\Mozilla Firefox\firefox.exe' BROWSER_ARGS = '-new-window' CHAT_URL = 'https://www.youtube.com/live_chat?is_popout=1&v=' if 2 <...
24
29.54
77
15
194
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.subprocess-shell-true_d868d5d879b67fb4_839d0282", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.subprocess-shell-true", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found 'subprocess' function 'run' w...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 20 ]
[ 20 ]
[ 60 ]
[ 64 ]
[ "A01:2017 - Injection" ]
[ "Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead." ]
[ 7.5 ]
[ "HIGH" ]
[ "LOW" ]
openyt.py
/openyt.py
llyyr/vtuber-tools
Unlicense
2024-11-18T21:51:47.341472+00:00
1,647,833,979,000
9d94e81d2484121d918c4f720ddc212bd5ecf44a
2
{ "blob_id": "9d94e81d2484121d918c4f720ddc212bd5ecf44a", "branch_name": "refs/heads/master", "committer_date": 1647833979000, "content_id": "6818c89dedce03a7f9fde30f01d78e7f25ec225f", "detected_licenses": [ "MIT" ], "directory_id": "47ef6997d03f4d5c921c83cc09aef1dfc6828e2c", "extension": "py", "fi...
2.40625
stackv2
#!/usr/bin/env python import os import sys import yaml import argparse import subprocess import shutil from datetime import datetime def get_bm_fix_path(bm_info, key_seq, last_path=None): """Get model path of benchmark yaml.""" _bm_path_seq = [bm_info[_key] for _key in key_seq] if last_path: _bm_p...
124
30.79
87
18
936
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2b610c3738c91789_948ebedc", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 113 ]
[ 113 ]
[ 9 ]
[ 73 ]
[ "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" ]
benchmark_within_ci.py
/scripts/benchmark_within_ci.py
huawei-noah/xingtian
MIT
2024-11-18T21:51:47.760977+00:00
1,482,340,443,000
fe4a99a868127ec9dee46b99c2e38daf511dc83d
3
{ "blob_id": "fe4a99a868127ec9dee46b99c2e38daf511dc83d", "branch_name": "refs/heads/master", "committer_date": 1482340443000, "content_id": "865689fbe58b07a7f79eea892d0f3dcd07dc2e39", "detected_licenses": [ "MIT" ], "directory_id": "2e7e528275a8ca5af6ac502514b9e0132b7dbf62", "extension": "py", "fi...
2.609375
stackv2
# @Author: cody # @Date: 2016-09-14 17:55:07 # @Last Modified 2016-09-14 # @Last Modified time: 2016-09-14 18:37:38 # since netbeens needs a package name on the top of java files # to indicate that it is using the folder it is put in, this # workaround will do what you need in order to test netbeens built # java fi...
45
22.91
151
9
309
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_ec65c1abb368e25c_3eea473a", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 26 ]
[ 26 ]
[ 1 ]
[ 43 ]
[ "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" ]
java-build-run-netbeens.py
/build-scripts/java-build-run-netbeens.py
CodyKochmann/sublime_builds
MIT
2024-11-18T21:51:47.913946+00:00
1,557,516,216,000
bd726b7ff864d8f195fde06a77f168002c8bdf01
3
{ "blob_id": "bd726b7ff864d8f195fde06a77f168002c8bdf01", "branch_name": "refs/heads/master", "committer_date": 1557516216000, "content_id": "3b74c44e4de373157dcb1b8a89071c21264ddad7", "detected_licenses": [ "MIT" ], "directory_id": "0587f9bfff689990cff8f53b70f7f824b546c1b7", "extension": "py", "fi...
2.640625
stackv2
import socket import random import pickle def storeData(obj, filename): pickleFile = open(filename, 'wb') pickle.dump(obj, pickleFile) pickleFile.close() def loadData(filename): pickleFile = open(filename, 'rb') obj = pickle.load(pickleFile) pickleFile.close() return obj s = socket.socke...
49
24.96
68
16
307
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1837799b1961e73c_ce043a60", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 7, 12 ]
[ 7, 12 ]
[ 5, 11 ]
[ 33, 34 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
server_template_for_request_response.py
/server_template_for_request_response.py
pumperknickle/Intelligent-IoT-Honeypot
MIT
2024-11-18T21:51:48.040342+00:00
1,566,608,307,000
8c415f1db4ce6f7a23369f7a4497805202a329eb
3
{ "blob_id": "8c415f1db4ce6f7a23369f7a4497805202a329eb", "branch_name": "refs/heads/master", "committer_date": 1566608307000, "content_id": "489ef1bce726ac22437fce058d6d6fd3359f1a4c", "detected_licenses": [ "MIT" ], "directory_id": "74f7f634a349272bcfd93425cccce2a4fe2e1939", "extension": "py", "fi...
2.59375
stackv2
from tkinter import * import tkinter as tk import mysql.connector from tkinter import messagebox from tkcalendar import DateEntry from tkinter import ttk top=Tk() top.title('SEARCH') top.geometry('1000x550+200+50') #===============================================database conectivity=====================================...
94
39.86
164
14
1,147
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_6e7936b5655744f5_7b35bace", "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" ]
[ 23, 23, 32, 32 ]
[ 23, 23, 32, 32 ]
[ 9, 9, 9, 9 ]
[ 30, 30, 30, 30 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
SEARCH.py
/rishi_raj/SEARCH.py
wabrishi/student
MIT
2024-11-18T21:51:48.420452+00:00
1,571,163,578,000
52c5eecd4dfc33c7e88494f1f2bfbf29a64be862
2
{ "blob_id": "52c5eecd4dfc33c7e88494f1f2bfbf29a64be862", "branch_name": "refs/heads/master", "committer_date": 1571163578000, "content_id": "f6c1406cb13089d647243324b59a7b64e834ce60", "detected_licenses": [ "Apache-2.0" ], "directory_id": "aaa762ce46fa0347cdff67464f56678ea932066d", "extension": "py"...
2.40625
stackv2
from __future__ import division import argparse import logging import os from appscale.common.appscale_utils import ssh from appscale.common.constants import KEY_DIRECTORY from appscale.common.constants import LOG_FORMAT from subprocess import (CalledProcessError, check_output) from ..cassandra...
195
30.41
77
16
1,551
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_9394afa6b84b448a_17d8738a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
3
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 28, 49, 144 ]
[ 28, 49, 144 ]
[ 15, 15, 3 ]
[ 60, 54, 74 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subproces...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
rebalance.py
/AppDB/appscale/datastore/cassandra_env/rebalance.py
obino/appscale
Apache-2.0
2024-11-18T21:52:12.757920+00:00
1,597,069,611,000
9b37f8da445a46c3a003577784bc21f6d187314e
3
{ "blob_id": "9b37f8da445a46c3a003577784bc21f6d187314e", "branch_name": "refs/heads/master", "committer_date": 1597069611000, "content_id": "9ab970f1e915c9bb0a02b7cce28dd0eff05227dc", "detected_licenses": [ "Apache-2.0" ], "directory_id": "98f3fd3d20df4f9f2825430792136c828f8a48c2", "extension": "py"...
2.859375
stackv2
#!usr/bin/env # -*- encoding:utf -8-*- # control层:检查用户是否设置了自动登陆 # 否:启动登陆窗口EnterWindow,验证用户信息成功后启动主界面窗口UserWindow # 是:直接启动主界面窗口 from model import login from view import frame from model.entry import userhabit import pickle from model.entry.userinfo import UserInfo def sample_userinfo(userinfo): if not ...
48
28.19
89
14
389
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_d0f7fb1396589739_55bdbdbf", "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" ]
[ 23 ]
[ 23 ]
[ 9 ]
[ 33 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
Main.py
/control/Main.py
WareLee/LANTIM
Apache-2.0
2024-11-18T21:52:16.537466+00:00
1,600,007,483,000
d73e1bdae13c11e43db3a80040595d7244cc8067
2
{ "blob_id": "d73e1bdae13c11e43db3a80040595d7244cc8067", "branch_name": "refs/heads/master", "committer_date": 1600007483000, "content_id": "081c77b6823ac102e001dbb45a1b33298903fc65", "detected_licenses": [ "MIT" ], "directory_id": "a6fa17a37e608de9cb932aea528c1766313e6b68", "extension": "py", "fi...
2.3125
stackv2
import csv import easygui import requests import webbrowser from bs4 import BeautifulSoup from config import * """*************************菜单设置*************************""" # 菜单设置 home_list = ['[1]白嫖机场', '[2]高端机场', '[3]机场汇总', '[4]返回', '[5]退出'] func_list = ['[1]查看', '[2]保存', '[3]返回'] """*************************INIT**...
190
27.82
117
21
1,325
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defusedcsv_b8eff8c46bc65ffa_264983b8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defusedcsv", "finding_type": "security", "severity": "low", "confidence": "low", "message": "Detected the generation of a CSV file using the built-in `csv` mo...
5
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 181 ]
[ 181 ]
[ 17 ]
[ 46 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
all_airPort.py
/V2RaycSpider0825/Panel/all_airPort.py
TOMJERRY23333/V2RayCloudSpider
MIT
2024-11-18T21:52:23.601895+00:00
1,588,564,161,000
0dfd3d9befec37053ffe22fa1c2cdfcf06d6195f
3
{ "blob_id": "0dfd3d9befec37053ffe22fa1c2cdfcf06d6195f", "branch_name": "refs/heads/master", "committer_date": 1588564161000, "content_id": "9cf1cf86a8aa12add7c101bd945c1365f29a7a1e", "detected_licenses": [ "MIT" ], "directory_id": "fccb2e13225d0390540c41e6e490e3461510f9a9", "extension": "py", "fi...
2.9375
stackv2
import os import glob import pandas as pd from docx import Document import re import thulac from wordcloud import WordCloud, ImageColorGenerator from PIL import Image import matplotlib.pyplot as plt import numpy as np # 函数 def draw_words_to_art(text_dict: dict, bg_pic='py_logo', seed=42): ''' :param text_dict...
207
24.26
77
13
1,668
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_3d62062889df7725_1dee5fb2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
4
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 62, 81 ]
[ 62, 81 ]
[ 5, 5 ]
[ 19, 19 ]
[ "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" ]
doc_and_text.py
/doc_and_text.py
zzzzzzhu/py_application
MIT
2024-11-18T21:52:26.780071+00:00
1,576,189,719,000
e48a8e1b8ebb5167b4b208233c59ab34c497aad9
3
{ "blob_id": "e48a8e1b8ebb5167b4b208233c59ab34c497aad9", "branch_name": "refs/heads/master", "committer_date": 1576189719000, "content_id": "e3495ef72696fc2253a4380a4da22c1456a6977f", "detected_licenses": [ "MIT" ], "directory_id": "8a2d418002058d50dc37a36ba056d721ef9b9bff", "extension": "py", "fi...
2.53125
stackv2
""" Definition of views. """ from datetime import datetime from django.shortcuts import render from django.http import HttpRequest def home(request): """Renders the home page.""" assert isinstance(request, HttpRequest) code = request.POST.get('codearea','na') if code != 'na': print(code) ...
29
19.34
44
12
125
python
[{"finding_id": "semgrep_rules.python.django.security.injection.request-data-write_f5b24deb79812cd0_68f3915f", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.request-data-write", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Found user-controlled reque...
2
true
[ "CWE-93" ]
[ "rules.python.django.security.injection.request-data-write" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 13 ]
[ 18 ]
[ 5 ]
[ 25 ]
[ "A03:2021 - Injection" ]
[ "Found user-controlled request data passed into '.write(...)'. This could be dangerous if a malicious actor is able to control data into sensitive files. For example, a malicious actor could force rolling of critical log files, or cause a denial-of-service by using up available disk space. Instead, ensure that requ...
[ 5 ]
[ "MEDIUM" ]
[ "MEDIUM" ]
views.py
/spikes/CodemirrorMakeCFile/app/views.py
CharlesDDNoble/broncode
MIT
2024-11-18T21:52:28.735402+00:00
1,664,308,684,000
b466f7a0b0b59dd35da4d09291e6cd2f47171b3d
3
{ "blob_id": "b466f7a0b0b59dd35da4d09291e6cd2f47171b3d", "branch_name": "refs/heads/master", "committer_date": 1664308684000, "content_id": "8c117a37e930e4f670c2980e634592a978cce965", "detected_licenses": [ "MIT" ], "directory_id": "63296f125af1754de2156e7ef0a95d9346814949", "extension": "py", "fi...
2.5625
stackv2
""" <Program Name> views.py <Started> September 2010 <Author> Alex Hanson <Purpose> Provides an XML-RPC handler as a Django view. Note: The actual XML-RPC functions are stored elsewhere, in functions.py. This code was inspired by dispatcher.py in the earlier custom_installer_website, written by Jus...
60
23.18
77
13
327
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_16de62f0d55eb772_007146f3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr...
1
true
[ "CWE-776" ]
[ "rules.python.lang.security.use-defused-xmlrpc" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 21 ]
[ 21 ]
[ 1 ]
[ 55 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
views.py
/xmlrpc/views.py
SeattleTestbed/custominstallerbuilder
MIT
2024-11-18T21:52:33.085407+00:00
1,478,297,462,000
0d9d73b109288df2436f4bc19bc4e7cd1b709a8b
2
{ "blob_id": "0d9d73b109288df2436f4bc19bc4e7cd1b709a8b", "branch_name": "refs/heads/master", "committer_date": 1478297462000, "content_id": "cd64b8c126cb346f7eb1952a246e1e10dc86a795", "detected_licenses": [ "MIT" ], "directory_id": "19f340610594c7661a402a5f0ba30f50f6670b8b", "extension": "py", "fi...
2.375
stackv2
from discord.ext import commands from .utils import utils import glob import discord import asyncio import traceback import datetime import inspect def list_cogs(): #Check a list and load it cogs = glob.glob("cogs/*.py") clean = [] for c in cogs: c = c.replace("/", "\\") # Linux fix if "__...
302
37.33
146
21
2,559
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_5d5b32696cc9aab6_b586d773", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
14
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 125 ]
[ 125 ]
[ 22 ]
[ 37 ]
[ "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" ]
tools.py
/Bot/cogs/tools.py
Thorgott2/Nurevam
MIT
2024-11-18T20:31:24.655956+00:00
1,692,828,071,000
5ef20746242421e85759f2d39a9d33e40840d97e
2
{ "blob_id": "5ef20746242421e85759f2d39a9d33e40840d97e", "branch_name": "refs/heads/main", "committer_date": 1692828071000, "content_id": "442257732080f528442ce75ed7ea091d25637eef", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a3d6556180e74af7b555f8d47d3fea55b94bcbda", "extension": "py"...
2.328125
stackv2
# Copyright 2019 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Templatize a file based on wayland specifications. The templating engine takes an input template and one or more wayland specifications (see third_party/wayland/src/protocol/wa...
250
29.21
80
14
1,800
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b62d3ddcb95a09a2_00b124e3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
6
true
[ "CWE-78", "CWE-79", "CWE-116", "CWE-79" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.jinja2.security.audit.missing-autoescape-disabled", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "MEDIUM", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 66, 221, 221, 227 ]
[ 67, 225, 225, 227 ]
[ 10, 9, 9, 16 ]
[ 71, 24, 24, 39 ]
[ "A01:2017 - Injection", "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected direct use of ji...
[ 7.5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM", "MEDIUM" ]
wayland_templater.py
/components/exo/wayland/fuzzer/wayland_templater.py
chromium/chromium
BSD-3-Clause
2024-11-18T20:31:32.074494+00:00
1,576,861,792,000
d7c768b8fb8a68fc81946d5cfa85d38c145de481
3
{ "blob_id": "d7c768b8fb8a68fc81946d5cfa85d38c145de481", "branch_name": "refs/heads/master", "committer_date": 1576861792000, "content_id": "dc858747a8ec8158e59eb93b21769bc9259dd2a7", "detected_licenses": [ "MIT" ], "directory_id": "782b382dc9ab45241ad40e5962f2db536493eee1", "extension": "py", "fi...
2.671875
stackv2
from data import DataSeq from bubblesort import BubbleSort from bucketsort import BucketSort from combsort import CombSort from cyclesort import CycleSort from heapsort import HeapSort from insertionsort import InsertionSort from mergesort import MergeSort from monkeysort import MonkeySort from quicksort import QuickSo...
51
36.04
113
12
443
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_e2b9aa64f08b7a8c_cc8c9b99", "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" ]
[ 39 ]
[ 39 ]
[ 22 ]
[ 36 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
main.py
/source/application/Sorting_Visualization/main.py
Lewic1201/pythonDemo
MIT
2024-11-18T20:31:33.082189+00:00
1,571,995,546,000
71f92ccc0e752af6c7c1fc40a6b3a368358bf4c8
3
{ "blob_id": "71f92ccc0e752af6c7c1fc40a6b3a368358bf4c8", "branch_name": "refs/heads/master", "committer_date": 1571995546000, "content_id": "ede3cb8f48d34ffdfe2c13993fd66eb87d0c44ac", "detected_licenses": [ "MIT" ], "directory_id": "61dc18356763953c9a0e548ff8134bdc9341db97", "extension": "py", "fi...
2.671875
stackv2
from datetime import date, datetime, timedelta import json, time, requests, os, sys, shutil from markdown2 import markdown from jinja2 import Environment, FileSystemLoader import sass # Start the timer... startTime = time.time() def altConfig(configFile): defaultConfig = { "outputFolder": "site", ...
247
35.89
107
26
1,969
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_81541b47be46b1b2_85410d83", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
9
true
[ "CWE-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" ]
[ 150, 150, 154 ]
[ 150, 150, 154 ]
[ 15, 15, 22 ]
[ 46, 46, 108 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected a Jinja2 environment witho...
[ 5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
main.py
/main.py
dottyssg/dotty
MIT
2024-11-18T20:59:45.313989+00:00
1,626,099,416,000
1f5f4514403a5e4a208be42e8d1644ab3ac974e2
3
{ "blob_id": "1f5f4514403a5e4a208be42e8d1644ab3ac974e2", "branch_name": "refs/heads/master", "committer_date": 1626099416000, "content_id": "90c54ae839baa2d72697cdb357e4c6bcc69e83bc", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "d09f814e652f1c42b8e92f9cba5a6653b0c776e7", "extension": "p...
2.640625
stackv2
""" Get, read, and parse data from `PVGIS <https://ec.europa.eu/jrc/en/pvgis>`_. For more information, see the following links: * `Interactive Tools <https://re.jrc.ec.europa.eu/pvg_tools/en/tools.html>`_ * `Data downloads <https://ec.europa.eu/jrc/en/PVGIS/downloads/data>`_ * `User manual docs <https://ec.europa.eu/j...
278
38.14
79
18
2,963
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_aa18b094a36c3521_995906f4", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
2
true
[ "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 264 ]
[ 264 ]
[ 24 ]
[ 79 ]
[ "A03:2021 - Injection" ]
[ "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
pvgis.py
/pvlib/iotools/pvgis.py
YoannUniKS/pvlib-python
BSD-3-Clause
2024-11-18T20:59:58.117712+00:00
1,560,239,566,000
ef7f97adef0125f7dc794244ed57ec40e67ae813
3
{ "blob_id": "ef7f97adef0125f7dc794244ed57ec40e67ae813", "branch_name": "refs/heads/master", "committer_date": 1560239566000, "content_id": "d48f60ef668af2acd686af5c52f50e0164755893", "detected_licenses": [ "Apache-2.0" ], "directory_id": "118dd349dc47a58de80687b590dd221a2688c52c", "extension": "py"...
3.09375
stackv2
#!/usr/bin/env python import argparse import os import re import sys from xml.dom import minidom import xml.etree.ElementTree as ET CHOICE_ELEMENTS = ('multiplechoiceresponse', 'choiceresponse') FEEDBACK_KEYS = {'multiplechoiceresponse': "answer['inputs'].index(1)]", 'choiceresponse': "tuple(answer['inputs'])"} def...
278
36.53
119
17
2,394
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_7cd6966e8d34bd84_f6ecad43", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
3
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 6, 7 ]
[ 6, 7 ]
[ 1, 1 ]
[ 28, 35 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The Python documentation recommends using `defusedxml` ins...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
transform_problems.py
/tools/transform_to_adapt/transform_problems.py
sumeshiit/edx-adapt
Apache-2.0
2024-11-18T21:10:21.827343+00:00
1,621,843,309,000
756bf1594ac9674a30f8c56d7f022243150be6bd
3
{ "blob_id": "756bf1594ac9674a30f8c56d7f022243150be6bd", "branch_name": "refs/heads/main", "committer_date": 1621922858000, "content_id": "3cc493aa775122655e62b544a4434b339866c7fe", "detected_licenses": [ "MIT", "BSD-3-Clause" ], "directory_id": "3a6a211ea0d32405497fbd6486c490bb147e25f9", "exten...
3.171875
stackv2
''' altgraph.Dot - Interface to the dot language ============================================ The :py:mod:`~altgraph.Dot` module provides a simple interface to the file format used in the `graphviz <http://www.research.att.com/sw/tools/graphviz/>`_ program. The module is intended to offload the most tedious part of th...
300
31.74
168
20
2,373
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_17805ca99784e3c3_0876303a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
5
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 185, 190, 292, 300 ]
[ 185, 190, 292, 300 ]
[ 13, 9, 13, 9 ]
[ 33, 28, 33, 30 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
Dot.py
/telemetry/third_party/altgraph/altgraph/Dot.py
catapult-project/catapult
MIT,BSD-3-Clause
2024-11-18T21:10:33.844529+00:00
1,455,554,687,000
69b1e25a85e64d20bf190d486b1712d4d9dd7c73
3
{ "blob_id": "69b1e25a85e64d20bf190d486b1712d4d9dd7c73", "branch_name": "refs/heads/master", "committer_date": 1455554687000, "content_id": "729f8ae4acae1e7b420bd09d8078d3a60bc44855", "detected_licenses": [ "BSL-1.0" ], "directory_id": "46a23bdce6775f57f330463963ef48445863c61d", "extension": "py", ...
2.640625
stackv2
import os import sys if __name__ == '__main__': script, protocPath, workingDir, sourcePath, outputPath, depPath, logPath, rspPath = sys.argv def shell_escape_path(path): return path.replace(" ", "\\ ") def extract_include_paths(optionsStr): endindex = optionsStr.find("|||") san...
85
34.11
99
19
650
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3e56da7bf72d528b_2f8c799a", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
6
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 66 ]
[ 66 ]
[ 20 ]
[ 34 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
protoc-invoke.py
/build/pynja/scripts/protoc-invoke.py
fifoforlifo/nstd
BSL-1.0
2024-11-18T21:10:34.106117+00:00
1,647,443,185,000
f4d7946e872a711cb178edb5db60e6310875e6aa
3
{ "blob_id": "f4d7946e872a711cb178edb5db60e6310875e6aa", "branch_name": "refs/heads/master", "committer_date": 1647443185000, "content_id": "3cebbcdbb54bf4b8254f7e13df4bc86d49d31607", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5dcd0ca27bb672687ff1727f50bb893c61bedaf1", "extension": "py"...
2.53125
stackv2
import os import sys import subprocess import shutil import yaml import csv import logging logger = logging.getLogger("main_logger") def create_path(path_name): # Create path if not os.path.exists(path_name): os.makedirs(path_name) # Absolute path abs_temp_file_dir = os.path.abspath(path_na...
112
23.68
67
19
616
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_50409ff8cccd614b_01ec9c23", "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" ]
[ 65 ]
[ 72 ]
[ 15 ]
[ 10 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
utils.py
/eneel/utils.py
mikaelene/eneel
Apache-2.0
2024-11-18T21:10:36.939656+00:00
1,544,992,947,000
4bf28bc7353c46ecf708c6bb3059c4f96d510296
3
{ "blob_id": "4bf28bc7353c46ecf708c6bb3059c4f96d510296", "branch_name": "refs/heads/master", "committer_date": 1544992947000, "content_id": "080ba85eea2313b0c131061054a9bd1ee9335885", "detected_licenses": [ "MIT" ], "directory_id": "d188f791dd2e096fb3b094e086b35f3c642cd40c", "extension": "py", "fi...
2.703125
stackv2
import xml.etree.cElementTree as et import pandas as pd def getvalueofnode(node): """ return node text or None """ return node.text if node is not None else None def users(): """ Convert PostHistory.xml to pandas dataframe """ parsed_xml = et.parse("../../data/raw/Users.xml") dfcols = ['Id','...
38
32.26
107
13
299
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_125d6aa793c68d7a_2aa1d4b7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 1 ]
[ 1 ]
[ 1 ]
[ 36 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
make_user_csv.py
/src/data/make_user_csv.py
ravitejau/User_Churning_Prediction_StackOverflow
MIT
2024-11-18T21:10:40.921220+00:00
1,502,677,683,000
91b5443b892ac9eb7e1d7cb59ee484e900c3b354
3
{ "blob_id": "91b5443b892ac9eb7e1d7cb59ee484e900c3b354", "branch_name": "refs/heads/master", "committer_date": 1502677683000, "content_id": "5bdceb50ed813517f700b8a45e7521bd1907989d", "detected_licenses": [ "MIT" ], "directory_id": "1f8a14833be33b942db55382c3cf42ec97a13b2c", "extension": "py", "fi...
2.65625
stackv2
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/Python3.6 # -*- coding: utf-8 -*- """ Created: 2017-08-07 @title: IMIR-VSM (In Memory Information Retrieval - Vector Space Model) @module: indexer_ps.py @author: Rafael Nunes - rnunes@cos.ufrj.br """ # Indexador - A função desse módulo é criar o modelo vetorial, ...
126
34.52
78
18
1,254
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_b7931cdeab244ff7_973e1627", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 90 ]
[ 90 ]
[ 5 ]
[ 44 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
indexer_PorterStemmer.py
/GitHub/PorterStemmer/indexer_PorterStemmer.py
rafaelscnunes/COS738-SearchEngineEvaluation
MIT
2024-11-18T21:10:41.639242+00:00
1,561,405,425,000
8a051279cba803aa7770869fbdd647109c1d0e33
3
{ "blob_id": "8a051279cba803aa7770869fbdd647109c1d0e33", "branch_name": "refs/heads/master", "committer_date": 1561405425000, "content_id": "084ea019685940d567b110ee1dce5a9c6130ad9a", "detected_licenses": [ "MIT" ], "directory_id": "852d8af595e09debe4f1d3ec4fa554958bf988e2", "extension": "py", "fi...
2.640625
stackv2
import discord from discord.ext import commands import aiosqlite class Tags(commands.Cog): def __init__(self, client): self.client = client async def get_tag(self, name): async with aiosqlite.connect('data.db') as con: await con.execute("CREATE TABLE IF NOT EXISTS tags(title TEXT, content TEXT)") ...
113
38.7
176
21
1,103
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_f0b5b0fefafe8513_842fae30", "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...
8
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.p...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 14, 14, 21, 21, 27, 27, 99, 99 ]
[ 14, 14, 21, 21, 27, 27, 99, 99 ]
[ 18, 18, 13, 13, 13, 13, 18, 18 ]
[ 89, 89, 83, 83, 76, 76, 93, 93 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
tags.py
/cogs/tags.py
karx1/TagBot
MIT
2024-11-18T21:10:41.994290+00:00
1,692,360,511,000
f943125eba7c244cf9cdc770bf295bbae27d9859
2
{ "blob_id": "f943125eba7c244cf9cdc770bf295bbae27d9859", "branch_name": "refs/heads/main", "committer_date": 1692360511000, "content_id": "b1665ca6e35dc6dcb769200fee567115d68400a9", "detected_licenses": [ "MIT" ], "directory_id": "f6aac61a48a87743be9c40fecdc24344bae4d263", "extension": "py", "file...
2.484375
stackv2
"""Hourly frequencies.""" import calendar import datetime import matplotlib.colors as mpcolors import numpy as np import pandas as pd from pyiem.exceptions import NoDataFound from pyiem.plot import figure_axes, get_cmap, pretty_bins from pyiem.util import get_autoplot_context, get_sqlalchemy_conn from sqlalchemy impor...
324
29.35
79
20
2,627
python
[{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.string-concat-in-list_26927961268a6bf4_e58ae32a", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.string-concat-in-list", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Dete...
2
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.audit.avoid-sqlalchemy-text" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 131 ]
[ 150 ]
[ 13 ]
[ 14 ]
[ "A01:2017 - Injection" ]
[ "sqlalchemy.text passes the constructed SQL statement to the database mostly unchanged. This means that the usual SQL injection protections are not applied and this function is vulnerable to SQL injection if user input can reach here. Use normal SQLAlchemy operators (such as `or_()`, `and_()`, etc.) to construct SQ...
[ 7.5 ]
[ "LOW" ]
[ "LOW" ]
p60.py
/htdocs/plotting/auto/scripts/p60.py
akrherz/iem
MIT
2024-11-18T21:10:42.243435+00:00
1,579,890,526,000
2d596c3c9834413a463fc37ba706e54415ecab43
2
{ "blob_id": "2d596c3c9834413a463fc37ba706e54415ecab43", "branch_name": "refs/heads/master", "committer_date": 1579890526000, "content_id": "36293c39bb9aba654255e2591824c4152fda5470", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e266d4f737d0d310537dc6dcdd6908072793e629", "extension": "py"...
2.328125
stackv2
#!/usr/bin/env python import os import shutil import subprocess import glob import argparse import codecs def get_curr_path(): return os.path.dirname(os.path.realpath(__file__)) def which(program): def is_exe(cmd_path): return os.path.exists(cmd_path) and os.access(cmd_path, os.X_OK) def ext_ca...
255
33.56
120
14
2,213
python
[{"finding_id": "semgrep_rules.python.lang.correctness.file-object-redefined-before-close_9a2b7ab51f09fe31_587345d2", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.file-object-redefined-before-close", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected a...
8
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 94 ]
[ 94 ]
[ 5 ]
[ 25 ]
[ "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" ]
publish.py
/publish.py
sxrsdk/sxrsdk-docs
Apache-2.0
2024-11-18T21:10:53.186725+00:00
1,693,387,108,000
7fcbc55e049a8f6eaa16e103780a0117257c1ed0
3
{ "blob_id": "7fcbc55e049a8f6eaa16e103780a0117257c1ed0", "branch_name": "refs/heads/master", "committer_date": 1693387108000, "content_id": "f1cf6c921f85039f2e6892b425780255157e5f71", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b5bac72c286e307a5e1185b946bcc6d89cdbb06e", "extension": "py"...
2.640625
stackv2
import json import subprocess import os import sys from subprocess import Popen, PIPE from proliantutils.ilo import client from json_parser import VaultJSONParser, JSONParser from getpass import getpass def get_key(): """ This function will get the vault key from the user """ try: vault_key = getpa...
313
41.77
108
34
2,776
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1d7f033e6e921936_f8d021ee", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
8
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.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" ]
[ 40, 41, 179, 180, 204, 205, 247, 249 ]
[ 41, 41, 180, 180, 205, 205, 249, 249 ]
[ 15, 33, 19, 37, 19, 37, 47, 69 ]
[ 38, 37, 42, 41, 42, 41, 74, 73 ]
[ "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 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW" ]
physical_node_labeling.py
/synergy/scalable/platform/physical-workerlabeling/physical_node_labeling.py
HewlettPackard/hpe-solutions-openshift
Apache-2.0
2024-11-18T21:10:56.564545+00:00
1,608,523,583,000
71c58178a1e021faea72db7557119a963405a49b
2
{ "blob_id": "71c58178a1e021faea72db7557119a963405a49b", "branch_name": "refs/heads/master", "committer_date": 1608523583000, "content_id": "f49ca781c5ce451241cc0e3a7da818f6bcded7af", "detected_licenses": [ "Unlicense" ], "directory_id": "9328efcec128187a7304120d70edb0ccb1d6c705", "extension": "py",...
2.390625
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import csv import multiprocessing as mp from xmlrpc import client as xmlrpclib from scriptconfig import URL, DB, UID, PSW, WORKERS # ==================================== P R O D U C T S ==================================== def update_product(pid, data_pool, product_id...
78
31.81
124
16
614
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_b45fd21848126a1e_d3ab40d7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr...
2
true
[ "CWE-776" ]
[ "rules.python.lang.security.use-defused-xmlrpc" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 6 ]
[ 6 ]
[ 1 ]
[ 39 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
48_product_stock_qty.py
/48_product_stock_qty.py
leangjia/odoo_import_scripts
Unlicense
2024-11-18T21:23:39.835681+00:00
1,576,181,139,000
9353dbd5195751df961c5266364af4bb0e8f68af
3
{ "blob_id": "9353dbd5195751df961c5266364af4bb0e8f68af", "branch_name": "refs/heads/master", "committer_date": 1576181139000, "content_id": "dab3d7edeaa95c30d76888c0d3590d81cdfdb00d", "detected_licenses": [ "MIT" ], "directory_id": "f8b0c421b0f9052578b822e3c3bd126e23b4864e", "extension": "py", "fi...
2.6875
stackv2
from py_parser import get_functions_in_main from pprint import pprint def reformat_tool_name_for_template(refer_tool_name): return refer_tool_name def reformat_module_name_for_template(refer_module_name): return refer_module_name def reformat_function_name_for_template(refer_function_name): return ref...
90
34.73
114
17
605
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_72aab61a21d63b57_500d5586", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ...
2
true
[ "CWE-95", "CWE-96" ]
[ "rules.python.lang.security.audit.exec-detected", "rules.python.lang.security.dangerous-globals-use" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 87, 90 ]
[ 87, 90 ]
[ 26, 23 ]
[ 57, 45 ]
[ "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.", "Found non static data as an index to 'globals()'. This is e...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "HIGH", "MEDIUM" ]
py_execution.py
/Tool_Functions/py_execution.py
zhawhjw/Tool_Functions
MIT
2024-11-18T21:23:46.522413+00:00
1,611,578,269,000
368d4448e338efd6921e8e23f7dec108b21ae536
3
{ "blob_id": "368d4448e338efd6921e8e23f7dec108b21ae536", "branch_name": "refs/heads/main", "committer_date": 1611578269000, "content_id": "6b239c46210072f7283899283799014ed4b5da0d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e6e3c1bc6d977a84f4bbf0a31b74b3d7646acddb", "extension": "py", ...
3.140625
stackv2
import re import requests import urllib3 import json # 忽略警告 urllib3.disable_warnings() def get_one_page(url, headers): """ 判断页面是否能正常访问,并得到页面转换成文本格式的内容 :param url: 页面URL地址 :param headers: 请求头 :return: 页面转换成文本的内容 """ try: response = requests.get(url, headers=headers, verify=False) ...
83
24.1
139
17
675
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-timeout_f61bb2e8bf3e549e_864af11e", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-timeout", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Detected a 'requests' call without a timeo...
2
true
[ "CWE-295" ]
[ "rules.python.requests.security.disabled-cert-validation" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 18 ]
[ 18 ]
[ 20 ]
[ 68 ]
[ "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" ]
猫眼电影信息抓取.py
/猫眼电影信息抓取.py
hgzerowzh/Python
Apache-2.0
2024-11-18T21:23:47.976726+00:00
1,628,568,483,000
70b022d4a99f4560a795901327074882c387770c
2
{ "blob_id": "70b022d4a99f4560a795901327074882c387770c", "branch_name": "refs/heads/main", "committer_date": 1628568483000, "content_id": "44c8d493a85598560202380252a46692be188207", "detected_licenses": [ "MIT" ], "directory_id": "54fad3aef1ccdb7f25fa421d93aa3df91f6c7524", "extension": "py", "file...
2.421875
stackv2
'''This script generates game records. The games are performed with the newest model or the strongest model. The generated game records are stored in the data directory. ''' import argparse import json import logging import multiprocessing.managers import pathlib import pickle import queue import time from typing impor...
225
31.82
102
23
1,653
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_8e619f18db62382e_76b8e99b", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 221 ]
[ 221 ]
[ 9 ]
[ 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" ]
generate.py
/src/generate.py
takedarts/hungry-geese
MIT
2024-11-18T21:23:48.081070+00:00
1,595,263,667,000
576a3fb5ed332d2abd493415ab848b4042210cff
3
{ "blob_id": "576a3fb5ed332d2abd493415ab848b4042210cff", "branch_name": "refs/heads/master", "committer_date": 1595263667000, "content_id": "4fba9df71985c2783d0134e25933498eea9cd729", "detected_licenses": [ "MIT" ], "directory_id": "44d03c04f071f900dbb8fdf0ce8be3db6d46be86", "extension": "py", "fi...
2.671875
stackv2
import numpy as np import pandas as pd import cv2 import os import glob import matplotlib.pyplot as plt import pickle def undistort_img(): # Prepare object points 0,0,0 ... 8,5,0 obj_pts = np.zeros((6*9,3), np.float32) obj_pts[:,:2] = np.mgrid[0:9, 0:6].T.reshape(-1,2) # Stores all object points & img p...
52
37.29
106
12
578
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cd91c6eda813d51b_e0a32ef1", "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" ]
[ 33, 37 ]
[ 33, 37 ]
[ 5, 16 ]
[ 107, 30 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
distortion.py
/distortion.py
ssunjoo98/ADAS_lane_detection_camcalib
MIT
2024-11-18T21:23:56.421430+00:00
1,309,187,766,000
aac0f169071d9b98d288903a664856172bb33303
3
{ "blob_id": "aac0f169071d9b98d288903a664856172bb33303", "branch_name": "refs/heads/master", "committer_date": 1309187766000, "content_id": "eebe2d146596451479ee87cb93bc865187bfd5b4", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "c5a750522ba30791f5a5f9110a689fa3f2cf5dd3", "extension": "p...
2.59375
stackv2
# Create your views here. import mimetypes from django.http import HttpResponse from django import shortcuts from sample import models def serve_mongo_download(request, mongo_id): obj = shortcuts.get_object_or_404(models.SampleModel, content=mongo_id) return get_mongo_response(obj.content) def get_mongo_re...
31
33.77
87
10
233
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_bf965a24dfd8b8b8_c03e0ce9", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ...
1
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 26 ]
[ 26 ]
[ 16 ]
[ 75 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
views.py
/sample/views.py
Rotzke/django-mongo-storage
BSD-2-Clause
2024-11-18T21:24:00.100558+00:00
1,565,011,645,000
d1585eaf0773f0878b5a0747ac7c57412d1ecb94
3
{ "blob_id": "d1585eaf0773f0878b5a0747ac7c57412d1ecb94", "branch_name": "refs/heads/master", "committer_date": 1565011645000, "content_id": "77d02f74764126edd91603e01b93821092a55b91", "detected_licenses": [ "MIT" ], "directory_id": "d16a81c025ce84de4db1ca86a5f743eabb296b00", "extension": "py", "fi...
2.734375
stackv2
import argparse import os import requests import shutil import sys import zipfile ap = argparse.ArgumentParser() ap.add_argument("-a", "--auth-file", required=True, help="Path to file containing authentication information.") args = vars(ap.parse_args()) username_password_path = args["auth_file"] DATAD...
44
29.86
101
12
338
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_cf77ee5efc01b383_fb6e4f0a", "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-523", "CWE-523" ]
[ "rules.python.requests.security.no-auth-over-http", "rules.python.requests.security.no-auth-over-http" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 30, 33 ]
[ 33, 33 ]
[ 1, 5 ]
[ 48, 48 ]
[ "A02:2017 - Broken Authentication", "A02:2017 - Broken Authentication" ]
[ "Authentication detected over HTTP. HTTP does not provide any encryption or protection for these authentication credentials. This may expose these credentials to unauthorized parties. Use 'https://' instead.", "Authentication detected over HTTP. HTTP does not provide any encryption or protection for these authent...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "LOW", "LOW" ]
download_datadivr.py
/download_datadivr.py
menchelab/datadivr-demo
MIT
2024-11-18T21:24:02.844299+00:00
1,608,896,264,000
db87a97446c5b06d7ce56ba02bbf9f2bc94cd046
3
{ "blob_id": "db87a97446c5b06d7ce56ba02bbf9f2bc94cd046", "branch_name": "refs/heads/main", "committer_date": 1608896264000, "content_id": "7c7d5206a77da650e1ee3f0366d52a75852226cf", "detected_licenses": [ "MIT" ], "directory_id": "3510de8733fff3411d784a2601d74347b08cec2b", "extension": "py", "file...
2.515625
stackv2
import hashlib import io import logging import re from xml.etree import ElementTree import requests from django.core.files import File from app.exceptions import PFPApiBadInputError from app.models import SchemaItemsID, Schema from settings.settings import PFP_API_URL_GET_SCHEMA logger = logging.getLogger(__name__)...
71
25.55
85
12
459
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_bcc4519d4ce77028_6474b2a3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
3
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 5 ]
[ 5 ]
[ 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" ]
svg.py
/demo/app/utils/svg.py
qvp/django-rest-fast
MIT
2024-11-18T21:37:18.683868+00:00
1,589,836,835,000
0385902379721dd1a9c84c8cb8d97177a2942431
3
{ "blob_id": "0385902379721dd1a9c84c8cb8d97177a2942431", "branch_name": "refs/heads/master", "committer_date": 1589836835000, "content_id": "eeb5f6e6c89339df360fd2ede807b3c05e12b496", "detected_licenses": [ "Apache-2.0" ], "directory_id": "59632d91522528c8ac09a555161b01e5ec65ad65", "extension": "py"...
2.546875
stackv2
#!/usr/bin/python """ This script will prompt end users to quit apps, or force quit apps depending on the options passed in the positional parameters """ # import modules from Cocoa import NSRunningApplication import sys import subprocess import os import time # jss side variables APPLIST = sys.argv[4].split(",") #...
193
32.46
109
13
1,533
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_a1b55713f722bc41_a30819c4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
4
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 92, 92, 141 ]
[ 92, 92, 141 ]
[ 12, 29, 12 ]
[ 81, 32, 81 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess funct...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "LOW" ]
[ "HIGH", "MEDIUM", "HIGH" ]
os_patcher.py
/os_patcher.py
zackn9ne/Auto-Update
Apache-2.0
2024-11-18T21:37:19.807897+00:00
1,634,227,526,000
63a7bf7be77e73a304b017c653a864a91cb7042e
3
{ "blob_id": "63a7bf7be77e73a304b017c653a864a91cb7042e", "branch_name": "refs/heads/master", "committer_date": 1634227526000, "content_id": "26dd78765afb044409bc4196496122826350416f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b6a39dd3569cd6d131a469c841148d2c06d49b83", "extension": "py"...
2.640625
stackv2
import subprocess import tempfile from core import constants from core.cli_helpers import CLIHelper def sorted_dict(d, key=None, reverse=False): """ Return dictionary sorted using key. If no key provided sorted by dict keys. """ if key is None: return dict(sorted(d.items(), key=lambda e: e[0]...
47
25.64
79
14
322
python
[{"finding_id": "semgrep_rules.python.lang.correctness.tempfile.tempfile-insecure_31891286c15f078f_50e2fa45", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.tempfile.tempfile-insecure", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Use tempfile.NamedTemporaryF...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 32 ]
[ 32 ]
[ 24 ]
[ 52 ]
[ "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" ]
utils.py
/core/utils.py
slashdd/hotsos
Apache-2.0
2024-11-18T21:37:23.923058+00:00
1,678,662,319,000
c880747aebb75a02bdf757680e04fcf10487f406
2
{ "blob_id": "c880747aebb75a02bdf757680e04fcf10487f406", "branch_name": "refs/heads/master", "committer_date": 1678662319000, "content_id": "aa02e181566d063509b2bc23dd01b4a426b1982b", "detected_licenses": [ "MIT" ], "directory_id": "c7527c7bd525b9ba5b3d52b4a451ef6c1e5edb7d", "extension": "py", "fi...
2.34375
stackv2
import subprocess from pathlib import Path from django.conf import settings from django.core.management.base import BaseCommand class NodePackageContext: def __init__(self): self.package_json = Path(settings.NODE_MODULES_ROOT).parent.joinpath( 'package.json' ) def __enter__(self)...
63
31.7
87
19
357
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ddf4f6c26e5aec62_2febf62e", "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" ]
[ 44 ]
[ 54 ]
[ 26 ]
[ 18 ]
[ "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" ]
npminstall.py
/django_node_assets/management/commands/npminstall.py
whitespy/django-node-assets
MIT
2024-11-18T21:37:24.395920+00:00
1,662,133,923,000
849ab0398b701afd93480f59f4be66a052db0ced
2
{ "blob_id": "849ab0398b701afd93480f59f4be66a052db0ced", "branch_name": "refs/heads/master", "committer_date": 1662133923000, "content_id": "2ad7554bc9e679f0a98eaec21fb9963c05d63616", "detected_licenses": [ "BSD-3-Clause", "BSD-2-Clause" ], "directory_id": "066f6f470baa83ae64b64080c240184f59b464a3...
2.453125
stackv2
""" DFfeatureselect.py - First step in the LD feature selection process, select features based on document frequency. Marco Lui January 2013 Copyright 2013 Marco Lui <saffsd@gmail.com>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that t...
164
38.91
155
16
1,475
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.marshal-usage_3efe3d937ce08766_0c24ff4f", "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" ]
[ "rules.python.lang.security.audit.marshal-usage" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 67 ]
[ 67 ]
[ 27 ]
[ 46 ]
[ "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" ]
DFfeatureselect.py
/py3langid/train/DFfeatureselect.py
adbar/py3langid
BSD-3-Clause,BSD-2-Clause
2024-11-18T21:37:41.837431+00:00
1,507,982,198,000
b0f48800ec60a60fb0a725d14c77152fc673f0b5
3
{ "blob_id": "b0f48800ec60a60fb0a725d14c77152fc673f0b5", "branch_name": "refs/heads/master", "committer_date": 1507982198000, "content_id": "d8eacdf10626b77b73e95c013ffcc8bbd31a0980", "detected_licenses": [ "MIT" ], "directory_id": "e5f10389ed55f7cec382eec92d547b1e8701b850", "extension": "py", "fi...
2.703125
stackv2
import sqlite3 as lite from enum import Enum from database.tables import CreationQueryFactory from database.table_type import TableType DB_FILE = 'db/database.db' class ReceiptStatus(Enum): EXTRACTED = 0 CORRECTED = 1 CLOSED = 2 class ExtractedReceiptTextStatus(Enum): NOT_MERGED = 0 MERGED = 1 ...
99
23.31
111
17
554
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_c9ae47438788baef_e08ba648", "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" ]
[ 79 ]
[ 79 ]
[ 9 ]
[ 87 ]
[ "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" ]
lite.py
/client_server/database/lite.py
stryku/hb
MIT
2024-11-18T21:37:43.626679+00:00
1,613,330,209,000
f784e69e7f9a20fb3785a56bb4654708fc416f9a
3
{ "blob_id": "f784e69e7f9a20fb3785a56bb4654708fc416f9a", "branch_name": "refs/heads/master", "committer_date": 1613330209000, "content_id": "ebe3b56d2a4823706f9cc3d86ad21a8ed44b3781", "detected_licenses": [ "ISC" ], "directory_id": "98e08416e7f9298adc95e9120755eb87f524c131", "extension": "py", "fi...
2.84375
stackv2
"""Cross-references module.""" import re from html import escape, unescape from typing import Any, Callable, List, Match, Tuple, Union from xml.etree.ElementTree import Element from markdown import Markdown from markdown.extensions import Extension from markdown.inlinepatterns import REFERENCE_RE, ReferenceInlineProc...
199
32.99
132
16
1,638
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8cb85887f4dca20f_6c5872d5", "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" ]
[ 6 ]
[ 6 ]
[ 1 ]
[ 42 ]
[ "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" ]
references.py
/src/mkdocs_autorefs/references.py
oprypin/mkdocs-autorefs
ISC
2024-11-18T21:37:50.049881+00:00
1,513,123,259,000
a0b5c5fa7d737aed0d282f3501990640d36502ce
2
{ "blob_id": "a0b5c5fa7d737aed0d282f3501990640d36502ce", "branch_name": "refs/heads/master", "committer_date": 1513123259000, "content_id": "9bdfab694efbac00792d6833eafca6da319b781f", "detected_licenses": [ "MIT" ], "directory_id": "f27819d8737d024e567d887a7e968f830dc33a88", "extension": "py", "fi...
2.375
stackv2
# standard library imports import re import json import sys import os import datetime as dt # related third party imports import cx_Oracle # local application/library specific imports from google_bridge.google_bridge import read_drive_file from pprint import pprint from dateutil.parser import parse def find_data_fil...
331
38.47
110
29
2,772
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ea11ccb14cc338ab_2c7f7950", "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-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" ]
[ 192, 192, 202, 202 ]
[ 192, 192, 202, 202 ]
[ 5, 5, 5, 5 ]
[ 26, 26, 26, 26 ]
[ "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" ]
oracle_bridge.py
/oracle_bridge/oracle_bridge.py
jdlauret/Oracle_Bridge
MIT
2024-11-18T21:58:59.754766+00:00
1,474,963,998,000
f84543a60fb1181e058baec9f10dcb3c94fce819
2
{ "blob_id": "f84543a60fb1181e058baec9f10dcb3c94fce819", "branch_name": "refs/heads/master", "committer_date": 1474963998000, "content_id": "49d4e82db1ffdccfb9ad4e91105b3ed77ab42424", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "03f037d0f6371856ede958f0c9d02771d5402baf", "extension": "p...
2.453125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ========================================================================= Program: Visualization Toolkit Module: TestNamedColorsIntegration.py Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www....
108
32.04
119
19
846
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_a6c0e881c9c7c73e_1194dc67", "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" ]
[ 63 ]
[ 63 ]
[ 17 ]
[ 78 ]
[ "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" ]
TestAllMaskBits.py
/graphics/VTK-7.0.0/Imaging/Core/Testing/Python/TestAllMaskBits.py
hlzz/dotfiles
BSD-3-Clause
2024-11-18T21:59:02.389803+00:00
1,575,047,610,000
0e9b81b8ddfb40d69a3c13c03143fe1b6636daaa
3
{ "blob_id": "0e9b81b8ddfb40d69a3c13c03143fe1b6636daaa", "branch_name": "refs/heads/master", "committer_date": 1575047610000, "content_id": "ba583cbe3fe9ebe2f0af1231f3e713fdc65c662b", "detected_licenses": [ "MIT" ], "directory_id": "da8652f3633bf016903c1b9431bb81f6a97d3ec4", "extension": "py", "fi...
2.78125
stackv2
#!/usr/bin/env python import subprocess from datetime import datetime import pickle import sys import os class pipeline_element : # Fields: # command : command to be run by the shell # status : Has it still to be run? How many times did it crash? Error status # err_msg : Error message to output ...
210
35.57
151
23
1,548
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_b1c20b6f2f8e3335_50ff150e", "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-502", "CWE-502" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
[ 104, 141, 151 ]
[ 104, 141, 151 ]
[ 25, 13, 20 ]
[ 86, 39, 39 ]
[ "A01:2017 - Injection", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "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()'.", "Avoid using `pickle`, whic...
[ 7.5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
pipeline_element.py
/pipeline_control/pipeline_element.py
mbosio85/ediva
MIT
2024-11-18T21:59:05.331400+00:00
1,415,324,909,000
0231f03be8b88a4e74921a02818c29f97078b51d
3
{ "blob_id": "0231f03be8b88a4e74921a02818c29f97078b51d", "branch_name": "refs/heads/master", "committer_date": 1415324922000, "content_id": "c31ca548bba1dd7c708c2f2d18f790bb0859d3b4", "detected_licenses": [ "ZPL-2.0" ], "directory_id": "c237dfae82e07e606ba9385b336af8173d01b251", "extension": "py", ...
3.140625
stackv2
"""Generate ast module from specification""" import fileinput import getopt import re import sys from StringIO import StringIO SPEC = "ast.txt" COMMA = ", " def load_boilerplate(file): f = open(file) buf = f.read() f.close() i = buf.find('### ''PROLOGUE') j = buf.find('### ''EPILOGUE') pro = ...
182
26.55
79
18
1,223
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_747757ca5419fa50_f369d699", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
2
true
[ "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 182 ]
[ 182 ]
[ 16 ]
[ 33 ]
[ "A03:2021 - Injection" ]
[ "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
astgen.py
/lib/python/RestrictedPython/compiler_2_1/astgen.py
OS2World/APP-SERVER-Zope
ZPL-2.0
2024-11-18T21:59:07.250261+00:00
1,551,993,530,000
f0bc9bc531a6ab4df98b22fbe074c69ddbd99c0a
2
{ "blob_id": "f0bc9bc531a6ab4df98b22fbe074c69ddbd99c0a", "branch_name": "refs/heads/master", "committer_date": 1551993530000, "content_id": "6dca4d22e1e7b86757b6261d6807c1159e5457b0", "detected_licenses": [ "MIT" ], "directory_id": "412ebbba081a74915ca93c90773b0a047ffe5d47", "extension": "py", "fi...
2.40625
stackv2
import os import sys import site import gettext import logging ######################################################################################################################## # Some helpers # ##############...
123
31.07
120
15
783
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_c51d634a75dd1070_11f76f9e", "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-95" ]
[ "rules.python.lang.security.audit.exec-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 55 ]
[ 55 ]
[ 9 ]
[ 42 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
helpers.py
/examples/helpers.py
oleglpts/easy_daemon
MIT
2024-11-18T21:59:09.070186+00:00
1,606,147,160,000
a86ef3b72a6b94cd0753b9baab44baddf24232cd
3
{ "blob_id": "a86ef3b72a6b94cd0753b9baab44baddf24232cd", "branch_name": "refs/heads/main", "committer_date": 1606147160000, "content_id": "bd220c906b1fb1feee7451adbd86cf52458a7e2a", "detected_licenses": [ "MIT" ], "directory_id": "131ce094d353b97ebdaa3586da574adf05d010e6", "extension": "py", "file...
2.546875
stackv2
from datetime import datetime import argparse, logging, pyodbc, csv parser = argparse.ArgumentParser() parser.add_argument("sqlserver", help="Name of the SQL Server") parser.add_argument("database", help="Name of the database") parser.add_argument("table", help="Name of the table") parser.add_argument("outputdir", hel...
77
35.81
178
18
723
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_bcf77632440e88e0_4dad0d8d", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
6
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 47, 47, 51, 51 ]
[ 47, 47, 51, 51 ]
[ 1, 1, 1, 1 ]
[ 26, 26, 22, 22 ]
[ "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" ]
pybcp.py
/pybcp.py
andrekamman/pybcp
MIT
2024-11-18T21:59:12.836261+00:00
1,449,242,193,000
3a03f86cc1b0b8652f1b10fe40dc6861efb01bc3
3
{ "blob_id": "3a03f86cc1b0b8652f1b10fe40dc6861efb01bc3", "branch_name": "refs/heads/master", "committer_date": 1449242193000, "content_id": "51bcfac1f84a199c087b308f1f6b43886f1c8fd0", "detected_licenses": [ "MIT" ], "directory_id": "36ad3e7a617fa4f1efdd61dbb606a4b328fc3324", "extension": "py", "fi...
2.75
stackv2
import sqlite3 nomBDD = 'example.db' class gestionnaire(): def __init__(self): self.conn = sqlite3.connect(nomBDD) print("gestionnaire de bd cree !") def setUti(self, nom, prenom, typeU): c = self.conn.cursor() c.execute("insert into utilisateur(nom, prenom, type) values (?,...
167
30.19
106
13
1,543
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_75548b11a55107fc_e1306364", "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...
5
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-exe...
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 60, 66, 72, 78, 84 ]
[ 60, 66, 72, 78, 84 ]
[ 9, 9, 9, 9, 9 ]
[ 69, 62, 62, 65, 91 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
bdd.py
/bdd.py
emeric254/UrCode
MIT
2024-11-18T21:59:16.857454+00:00
1,575,819,506,000
6be6d8830af6a1214ad5c4c2869b0db44dbf9a4f
3
{ "blob_id": "6be6d8830af6a1214ad5c4c2869b0db44dbf9a4f", "branch_name": "refs/heads/master", "committer_date": 1575819506000, "content_id": "2fe4bf2502a34bce592930c3fc09e9b2a3618df5", "detected_licenses": [ "MIT" ], "directory_id": "dfe2f1206a73442a451134be1f7c5986fe2a5d23", "extension": "py", "fi...
3.109375
stackv2
from sql.sql import c as c def getData(targetSub,topWordLimit=25): """ Args: targetSug, topWordLimit=25\n Return: Array of words in thier ranked order\n """ topRankedWords =[] if not type(targetSub) == str: raise TypeError('Please make sure the the target sub is a stirng') if not...
27
28.74
97
13
199
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_5a7125cedc031044_055cd6dd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
2
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "HIGH" ]
[ 16, 16 ]
[ 16, 16 ]
[ 5, 5 ]
[ 81, 81 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
retrieveData.py
/sql/retrieveData.py
oldManLemon/redditBotHotTopic
MIT
2024-11-18T21:59:18.392859+00:00
1,534,460,737,000
16fe20d7191140563363b6b21dbef2cceaa04d62
3
{ "blob_id": "16fe20d7191140563363b6b21dbef2cceaa04d62", "branch_name": "refs/heads/master", "committer_date": 1534460737000, "content_id": "906d9e6151f13aa20b624ea0e70da4dcd2d01dc1", "detected_licenses": [ "MIT" ], "directory_id": "063c35785f685054616061272a5dab47c6109ed5", "extension": "py", "fi...
2.65625
stackv2
from collections import defaultdict from textwrap import indent import requests from flask import Flask, make_response, request from constants import SERVER_URL, TELEGRAM_ID, TELEGRAM_TOKEN _handlers = defaultdict(dict) def handle_github_request(app: Flask): """Handle a request from GitHub.""" event = requ...
96
27.25
78
15
652
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_e682aee231fed6f8_7be71d51", "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-79", "CWE-79" ]
[ "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "rules.python.flask.security.audit.xss.make-response-with-unknown-content" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 66, 96 ]
[ 66, 96 ]
[ 16, 16 ]
[ 70, 70 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` will not autoescape HTML. If you are rendering HTML, write your HTML in a template file and use `flask.render_template()` which will take care ...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
handlers.py
/handlers.py
jecastro1/simple-telegram-github-integration
MIT
2024-11-18T21:59:20.422282+00:00
1,477,161,509,000
ec771fb4caa4c4d4bdc0de89db12fca40a6e49aa
2
{ "blob_id": "ec771fb4caa4c4d4bdc0de89db12fca40a6e49aa", "branch_name": "refs/heads/master", "committer_date": 1477161509000, "content_id": "9685c7d04913f011f0f3be3835e2b13cdded49ef", "detected_licenses": [ "MIT" ], "directory_id": "ca7abc6bcfb43825901ac521f96937f884317c39", "extension": "py", "fi...
2.359375
stackv2
# -*- coding: utf-8 -*- """ Created on Tue Jun 19 22:54:23 2012 @author: David """ import subprocess, os, glob, sys from time import time from Queue import Queue import threading import multiprocessing as mp from datetime import timedelta, datetime import utils # get APSIM install directory (where this module is run...
311
35
173
19
2,863
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ad0a573f7bec9981_c3cfe58c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
11
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.a...
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "MEDIUM", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 60, 67, 67, 127, 134 ]
[ 60, 67, 67, 127, 134 ]
[ 14, 9, 25, 14, 13 ]
[ 38, 117, 59, 38, 114 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'STARTUPINFO' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess...
[ 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "MEDIUM", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM", "HIGH", "HIGH" ]
ApsimRun.py
/scripts/apsimRun/ApsimRun.py
JustinWenzhaoLi/apsimRegions
MIT
2024-11-18T21:59:21.212658+00:00
1,614,800,670,000
b80dae3f635c733f220ce0e94ba0514d4de6f534
2
{ "blob_id": "b80dae3f635c733f220ce0e94ba0514d4de6f534", "branch_name": "refs/heads/master", "committer_date": 1614800670000, "content_id": "51121eb4744f36c6bfcd6867d7e20a7760a0c089", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "79dcd50a79eb29073b0a996835af1a9160540723", "extension": "p...
2.3125
stackv2
"""Script to fit Bolshoi or Multidark MAHs with a smooth model.""" import numpy as np import os from mpi4py import MPI import argparse from time import time from load_um_sfh_data import load_mdpl2_data, load_bpl_data from fit_mah import get_loss_data_fixed_logmp, get_loss_data_fixed_k_x0 from fit_mah import mse_loss_fi...
123
34.1
88
16
1,164
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9db03dbd85f02295_7e7049fa", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
4
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 123, 123, 123 ]
[ 123, 123, 123 ]
[ 22, 46, 61 ]
[ 66, 53, 65 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subproces...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "HIGH" ]
[ "HIGH", "MEDIUM", "LOW" ]
history_fitting_script.py
/scripts/history_fitting_script.py
abensonca/diffmah
BSD-3-Clause
2024-11-18T21:59:23.541774+00:00
1,606,551,987,000
a0b946e55e282e83483b29f56a281f9561e7aef5
3
{ "blob_id": "a0b946e55e282e83483b29f56a281f9561e7aef5", "branch_name": "refs/heads/master", "committer_date": 1606551987000, "content_id": "516d7f13997a8c0113e0f9d236bba4af921882b3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "46afa2d7d3c531c898d1ade4f9e8f896661b8db3", "extension": "py"...
2.984375
stackv2
# -*- coding: utf-8 -*- ############################################################################################## # This file is deprecated because Python 2.x is deprecated # # A Python 3.x version of this file can be found at: # # ...
47
34.55
94
16
326
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_554bb4b860fe74b7_352e83dd", "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" ]
[ 13 ]
[ 13 ]
[ 5 ]
[ 33 ]
[ "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" ]
return_dict_of_ISO_tracks.py
/return_dict_of_ISO_tracks.py
Guymer/PyGuymer
Apache-2.0
2024-11-18T22:11:25.822832+00:00
1,604,326,939,000
4072110112ba27fef2e1f69ef6d6b0c5e615645e
3
{ "blob_id": "4072110112ba27fef2e1f69ef6d6b0c5e615645e", "branch_name": "refs/heads/master", "committer_date": 1604326939000, "content_id": "2141d830b9422d0d9091fbd25a4e2fde61b6685b", "detected_licenses": [ "MIT" ], "directory_id": "6947d2cd0ac639d371015efc4a0be18d75740641", "extension": "py", "fi...
3.0625
stackv2
import os import re import docx2txt import fitz from pytesseract import image_to_string from subprocess import Popen, PIPE from PIL import Image def clean_text(text, dolower): ''' Accepts the plain text and makes use of regex for cleaning the noise :param: text :type:str :return:cleaned text :type ...
159
26.16
120
12
1,165
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b00e296a5a425708_d028283c", "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" ]
[ 44 ]
[ 44 ]
[ 9 ]
[ 32 ]
[ "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" ]
file_reader.py
/processit/file_reader.py
tatkaal/preprocessor
MIT
2024-11-18T22:11:26.723200+00:00
1,627,680,501,000
16791d93f3c140af78ad92e470c74b67e84a36d7
3
{ "blob_id": "16791d93f3c140af78ad92e470c74b67e84a36d7", "branch_name": "refs/heads/master", "committer_date": 1627680501000, "content_id": "9b2d5341502c862647cc80ce8ea68c87bf29e000", "detected_licenses": [ "BSD-2-Clause", "BSD-2-Clause-Views" ], "directory_id": "93a086f860c3f1c2e2b4c25a9c432efec8...
2.890625
stackv2
import pandas as pd import pickle import numpy as np from sklearn.neural_network import MLPRegressor from sklearn.datasets import make_regression NUM_FEATURES = 10 NUM_SAMPLES = 1000 # Make data def make_data(): X,y = make_regression(n_samples=NUM_SAMPLES,n_features=NUM_FEATURES, n_informat...
52
28.46
107
14
437
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f0e2a22d07ea5c26_f13c5b2a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 35, 41 ]
[ 35, 41 ]
[ 9, 11 ]
[ 27, 41 ]
[ "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" ]
mlp.py
/Memory-profiling/Scalene/mlp.py
chonlei/Machine-Learning-with-Python
BSD-2-Clause,BSD-2-Clause-Views
2024-11-18T22:11:27.787894+00:00
1,636,965,536,000
dfe7b87a8ddc335567ddfa4b300b9c2a04c991e0
3
{ "blob_id": "dfe7b87a8ddc335567ddfa4b300b9c2a04c991e0", "branch_name": "refs/heads/master", "committer_date": 1636965536000, "content_id": "3155de8e8544dfbda1636b61b47684933cb4dcaa", "detected_licenses": [ "MIT" ], "directory_id": "16ef5686f4bbc5206d25354ce7a419c97c45c8e3", "extension": "py", "fi...
2.71875
stackv2
# encoding: utf-8 """ This script contains functions for extracting low-level features for music boundary detection as presented in [1]. For this Mel log spectrograms (MLS) are extracted from audio files and sliced into context windows suitable for training convolutional neural networks (CNN). As dataset, t...
382
40.31
116
23
3,567
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_555c70bd7cb4ecd4_d0e62a83", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
3
true
[ "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 330, 363, 382 ]
[ 330, 363, 382 ]
[ 68, 9, 9 ]
[ 82, 83, 71 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
feature_extraction.py
/Python/feature_extraction.py
richieliuse/SegmentationCNN
MIT
2024-11-18T22:11:29.265966+00:00
1,474,780,472,000
d117f6c3d214e955e3ff8e1fe4ac7909f1888ea2
3
{ "blob_id": "d117f6c3d214e955e3ff8e1fe4ac7909f1888ea2", "branch_name": "refs/heads/master", "committer_date": 1474780472000, "content_id": "57519cd156b87a3730a33fc5d955a1555898a823", "detected_licenses": [ "MIT" ], "directory_id": "a7d77d851a363618b9ff72ab307232007ad989b9", "extension": "py", "fi...
2.734375
stackv2
import platform import sys import readline def file_path_verification_code_reader(path): def reader(image): with open(path, 'wb') as output: output.write(image) sys.stdout.write('Verification code picture is saved to %s, please open it manually and enter what you see.' % path) ...
41
32.34
124
13
291
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_0919c72a4c58402d_cba6b62d", "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" ]
[ 30 ]
[ 30 ]
[ 5 ]
[ 34 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
lixian_verification_code.py
/lixian_verification_code.py
slothg/xunlei-lixian
MIT
2024-11-18T22:11:36.783985+00:00
1,482,483,681,000
ebbb3724caef4574956130ea9ddb16ad666f3b43
2
{ "blob_id": "ebbb3724caef4574956130ea9ddb16ad666f3b43", "branch_name": "refs/heads/master", "committer_date": 1482483681000, "content_id": "a812adcb2db9a295987cb9a68daa9c946eabd2c9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5a2ddba3178f0d3fff966ca2f3774f0850a63e56", "extension": "py"...
2.5
stackv2
import argparse import subprocess import os from trexmo.factory import create_app class Command(): def __init__(self, argv, **kwargs): self.argv = argv def __call__(self): # Change the current directory to the root of the gui sources. root_dir = os.path.dirname(os.path.dirname(os.pa...
81
34.51
95
17
583
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_4cbe0e6683f93b52_d53c0d69", "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" ]
[ 51 ]
[ 51 ]
[ 13 ]
[ 80 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
gui.py
/trexmo/manage/commands/gui.py
kyouko-taiga/trexmo
Apache-2.0
2024-11-18T22:11:49.843249+00:00
1,570,062,109,000
04d465c3220e64f024161870413cffc9e53d9c52
3
{ "blob_id": "04d465c3220e64f024161870413cffc9e53d9c52", "branch_name": "refs/heads/master", "committer_date": 1570062109000, "content_id": "2b79cc0cb9ef91810d7c06d7bb53a360b4494f66", "detected_licenses": [ "MIT" ], "directory_id": "5a1dded58570df3782eab8935b57cb96d3fe6567", "extension": "py", "fi...
2.875
stackv2
import os, datetime; class ProcessLockException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class ProcessLock(): def __init__(self,lockKey): self.lockKey = lockKey+'.lock'; def aquire(self): ...
25
27.2
86
13
157
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_e61839f20f1b5a5b_612b2435", "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" ]
[ 16, 22 ]
[ 16, 22 ]
[ 18, 18 ]
[ 53, 50 ]
[ "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" ]
Synchronization.py
/S3/Synchronization.py
softwarespartan/AGT
MIT
2024-11-18T22:11:51.178430+00:00
1,577,019,166,000
4cfa255b2330293110078620367ec761e88f02ce
4
{ "blob_id": "4cfa255b2330293110078620367ec761e88f02ce", "branch_name": "refs/heads/master", "committer_date": 1577019166000, "content_id": "996ec18dc68af0cb0fada7ce258f71ee7bc1190e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d61a6df81bca12df0b743053643bc386d15a4b56", "extension": "py"...
3.5
stackv2
''' @Date: 2019-11-26 21:41:11 @Author: ywyz @LastModifiedBy: ywyz @Github: https://github.com/ywyz @LastEditors: ywyz @LastEditTime: 2019-11-26 21:48:39 ''' def format(number, width): n = str(number) if len(n) >= width: return n else: num = len(n) lenth = width - num for ...
31
16.97
60
13
191
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_703e63e416f2a8f3_2f2b4db0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
2
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 26, 27 ]
[ 26, 27 ]
[ 14, 13 ]
[ 48, 45 ]
[ "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" ]
6-48.py
/Exercise06/6-48.py
ywyz/IntroducingToProgrammingUsingPython
Apache-2.0
2024-11-18T22:11:54.105920+00:00
1,628,065,341,000
99b78796c5b0d7dbf9d47575b68f065e2a38bd3e
3
{ "blob_id": "99b78796c5b0d7dbf9d47575b68f065e2a38bd3e", "branch_name": "refs/heads/master", "committer_date": 1628065341000, "content_id": "304efd7300e352590b2f845a123b6d85e9e5ac75", "detected_licenses": [ "MIT" ], "directory_id": "50d1b07cc77d314cfec6961bc984320e5076effd", "extension": "py", "fi...
2.625
stackv2
#!/usr/bin/env python # coding: utf-8 # <center><img src='https://www.intel.com/content/dam/develop/external/us/en/images/infosim-logo-746616.png' style="width:300px"></center> # <h1 align="center">StableNet® WeatherMap Handling </h1> # <h2>Introduction</h2> # This script gives a simple example on how to # <ol> # ...
108
37.31
144
16
1,104
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_45173dd9edb963ab_7d20f08c", "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...
10
true
[ "CWE-611", "CWE-295", "CWE-295", "CWE-295" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.requests.security.disabled-cert-validation", "rules.python.requests.security.disabled-cert-validation", "rules.python.requests.security.disabled-cert-validation" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 23, 45, 71, 105 ]
[ 23, 46, 73, 107 ]
[ 1, 8, 7, 6 ]
[ 34, 100, 79, 81 ]
[ "A04:2017 - XML External Entities (XXE)", "A03:2017 - Sensitive Data Exposure", "A03:2017 - Sensitive Data Exposure", "A03:2017 - Sensitive Data Exposure" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "Certificate verification has been explicitly disabled. Thi...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "LOW", "LOW", "LOW" ]
alarms.py
/alarms/alarms.py
Infosim/advanced_weathermap_handling
MIT
2024-11-18T22:11:55.046921+00:00
1,533,197,354,000
930461fe70bc30d234022d57b35849b8c8692ef5
2
{ "blob_id": "930461fe70bc30d234022d57b35849b8c8692ef5", "branch_name": "refs/heads/master", "committer_date": 1533197354000, "content_id": "cdf4b579610ae28b019e943c106bb3bbb3892232", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "1a4e4ec41b0f4da95c8d48f086e2634ea2dea3bf", "extension": "p...
2.359375
stackv2
# -*- coding: UTF-8 -*- import os import wx from shanghai8 import User, Trade from GUI import LoginFrame from common import current_time, WorkerThread from jd import fetch_genius_data def send_notification(title, content): noti = "osascript -e" + "\'display notification" + " \" " + content noti += "\" with ...
124
26.68
74
16
824
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_cfdd9942a3ce0d66_b6a938bb", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 15 ]
[ 15 ]
[ 5 ]
[ 20 ]
[ "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
/app/main.py
rex11458/financing_trading
BSD-2-Clause
2024-11-18T22:24:08.003115+00:00
1,619,170,828,000
d79f068285b18edb557f62c26b27f81ced4beaa4
3
{ "blob_id": "d79f068285b18edb557f62c26b27f81ced4beaa4", "branch_name": "refs/heads/master", "committer_date": 1619170828000, "content_id": "fecdf2ee3da21eadf2cc8c3ec8b416183eff55d0", "detected_licenses": [ "MIT" ], "directory_id": "4733562e5685a9d06dddc04d6b7ca8ee87b2a5db", "extension": "py", "fi...
2.625
stackv2
from pickle import load, dump from logging import getLogger from multiprocessing import Pool import warnings from numpy import (array, diff, empty, mean, percentile, pi, stack, roll, ...
139
29.73
103
16
1,182
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6d68d05035375d5b_94bade5a", "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" ]
[ 61, 68 ]
[ 61, 68 ]
[ 16, 9 ]
[ 23, 22 ]
[ "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" ]
broadband.py
/grvx/nodes/ieeg/broadband.py
UMCU-RIBS/grvx
MIT
2024-11-18T22:24:09.267735+00:00
1,558,686,892,000
45a992d63d8d16a7c73e4c84bc3c554e7367662b
2
{ "blob_id": "45a992d63d8d16a7c73e4c84bc3c554e7367662b", "branch_name": "refs/heads/master", "committer_date": 1558686908000, "content_id": "4b2fcee0048dd5d349dba942aef84226a85c8fa4", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9a16994c816fd519f49914603b583344a8e15caf", "extension": "py"...
2.5
stackv2
#!/usr/bin/env python -tt # encoding: utf-8 # # File: sms.py # # Created by Holger Rapp on 2009-03-10. # Copyright (c) 2009 HolgerRapp@gmx.net. All rights reserved. # # Last Modified: $Date$ # from BeautifulSoup import BeautifulSoup import cPickle import cookielib import os import re import urllib2, urllib #### confi...
250
25.86
77
18
1,629
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-range_b83da3f8792de407_879299ec", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.pass-body-range", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "`pass` is the body of for status in self.n...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 148 ]
[ 149 ]
[ 28 ]
[ 71 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
Sms.py
/Sms.py
SirVer/GMXSmsSend
Apache-2.0