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-18T18:05:43.388874+00:00
1,567,036,262,000
912041d1cee909d29a9b46991268ac30470556ff
3
{ "blob_id": "912041d1cee909d29a9b46991268ac30470556ff", "branch_name": "refs/heads/master", "committer_date": 1567036262000, "content_id": "c6d2536833fc35c3e025cd9d5cea56298f7fe360", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "ca5fc43049f94a794d90a561fd8126f02b603599", "extension": "p...
2.5625
stackv2
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2016-2017 by I3py Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ----------------...
90
28.24
79
16
535
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_715a30efc2342539_ee5be2eb", "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" ]
[ 60 ]
[ 60 ]
[ 9 ]
[ 35 ]
[ "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" ]
alias.py
/i3py/core/features/alias.py
Exopy/i3py
BSD-3-Clause
2024-11-18T18:05:44.308384+00:00
1,578,981,575,000
8d0411d1a3851550c8d731400213ff48f1c3b0c7
2
{ "blob_id": "8d0411d1a3851550c8d731400213ff48f1c3b0c7", "branch_name": "refs/heads/master", "committer_date": 1578981575000, "content_id": "e86b6be15675ecfb59b4c74485893d83221a5f43", "detected_licenses": [ "MIT" ], "directory_id": "8142e588999503979e1cd9d1989cdd43dc9417d6", "extension": "py", "fi...
2.390625
stackv2
from evkit.models.taskonomy_network import TaskonomyDecoder from tlkit.utils import SINGLE_IMAGE_TASKS, TASKS_TO_CHANNELS, FEED_FORWARD_TASKS import torch import torch.nn.functional as F def softmax_cross_entropy(inputs, target, weight=None, cache={}, size_average=None, ignore_index=-100, reduce=None...
235
47.47
151
20
2,680
python
[{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.default-mutable-dict_4f869c82d83d165c_241b7cca", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.default-mutable-dict", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Function...
12
true
[ "CWE-95", "CWE-95", "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 169, 174, 217, 226 ]
[ 169, 174, 217, 226 ]
[ 40, 35, 40, 38 ]
[ 57, 52, 57, 55 ]
[ "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.", "Detected the use of eval(). eval() can be dangerous if used...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
losses.py
/evkit/utils/losses.py
lilujunai/side-tuning
MIT
2024-11-18T18:05:52.300596+00:00
1,599,152,646,000
9185695cb36d6614095277825baed9bb945a49c2
2
{ "blob_id": "9185695cb36d6614095277825baed9bb945a49c2", "branch_name": "refs/heads/master", "committer_date": 1599152646000, "content_id": "048a36508be52d7c1697a055f4fb3d12039a6fca", "detected_licenses": [ "MIT" ], "directory_id": "3bc4d9a4f7744126cf5af8b56c75ec188476f6aa", "extension": "py", "fi...
2.390625
stackv2
# Import Packages import pandas as pd import os import sklearn as sk import numpy as np import pickle from imblearn.over_sampling import ADASYN from sklearn.metrics import roc_curve, auc # Global Vars pathto_data = '/app_io' pathto_spacefeats = os.path.join(pathto_data, 'spatial_features_model', 'output') pathto_damd...
238
37.82
126
15
2,175
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6951a5a14fd5279c_3e755086", "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" ]
[ 209 ]
[ 209 ]
[ 22 ]
[ 36 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
assess.py
/assess.py
kravitsjacob/phase_2_assessment
MIT
2024-11-18T18:05:52.919914+00:00
1,625,584,497,000
7d79c06f8af3e0bcfa88e9703b177b44978569de
2
{ "blob_id": "7d79c06f8af3e0bcfa88e9703b177b44978569de", "branch_name": "refs/heads/master", "committer_date": 1625584497000, "content_id": "162fc4cf197c00de108895d7889162b40d2c8cc9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "279c70e0c1ee0625bf0940d6644def5c6f294c43", "extension": "py"...
2.34375
stackv2
import re try: # py3 from configparser import ConfigParser except ImportError: # py2 from ConfigParser import ConfigParser import xml.etree.ElementTree as ET import http.client import urllib.error import urllib.request from flask import current_app, request from .exceptions import ConfigurationError TOPO...
114
30.61
112
19
777
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_2d92585431a64ceb_1c0d98ab", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 8 ]
[ 8 ]
[ 1 ]
[ 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" ]
sources.py
/registry/sources.py
yongleyuan/open-science-pool-registry
Apache-2.0
2024-11-18T18:05:53.886832+00:00
1,514,819,429,000
360ee762aee9a172e998864ffe800eb47944b45b
2
{ "blob_id": "360ee762aee9a172e998864ffe800eb47944b45b", "branch_name": "refs/heads/master", "committer_date": 1514819429000, "content_id": "de0cc0d573d2a9d26887c60b416eb7d3793d2e74", "detected_licenses": [ "Apache-2.0" ], "directory_id": "087ba04bd4fae34a3f90b002b6fcb736728a4467", "extension": "py"...
2.421875
stackv2
from typing import List, Dict, Any from collections import defaultdict, deque from itertools import tee import pandas as pd import numpy as np import numba as nb from copy import deepcopy from functools import reduce class op: @staticmethod def mul(a, b): return a * b def sub(a, b): return a - b de...
176
24.82
127
19
1,075
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_ab989d7f8edafb13_5e4e872b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
3
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 30, 33 ]
[ 30, 33 ]
[ 40, 36 ]
[ 62, 56 ]
[ "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" ]
collections.py
/freestyle/collections.py
thautwarm/Stardust
Apache-2.0
2024-11-18T18:05:56.044170+00:00
1,486,668,271,000
503503ca77386d7ad226326d25fcb3c96f7f2b8e
3
{ "blob_id": "503503ca77386d7ad226326d25fcb3c96f7f2b8e", "branch_name": "refs/heads/master", "committer_date": 1486668271000, "content_id": "8048eed32403f9de7e81c67432f8bff406690966", "detected_licenses": [ "MIT" ], "directory_id": "d728338358b7acc7a40c4717417a81bfd0088e5c", "extension": "py", "fi...
2.625
stackv2
#!/usr/bin/env python3.6 #CONFIGURATION################################################ #STORAGE CONFIG configpath = "" scanstorage = "" #SAFETY GUARD CONFIG safetyguard = True #Input min value in percent for cloning file override safety guard. #Backup will be aborted if change counter passes this value. minwarnin...
473
27.42
90
29
3,794
python
[{"finding_id": "semgrep_rules.python.lang.correctness.useless-eqeq_0e922a795ec58cd2_35ffc569", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.useless-eqeq", "finding_type": "correctness", "severity": "low", "confidence": "medium", "message": "This expression is always True: `configpath == configpath...
21
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-tainted-env-args", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 225, 225, 361, 448 ]
[ 225, 225, 361, 448 ]
[ 17, 17, 17, 15 ]
[ 71, 71, 71, 75 ]
[ "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 user-controll...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
btsoot.py
/btsoot.py
bbartsch/btsoot
MIT
2024-11-18T18:05:57.515247+00:00
1,468,295,893,000
c73d3e7066b96575595f2f1a6c248b401b619175
2
{ "blob_id": "c73d3e7066b96575595f2f1a6c248b401b619175", "branch_name": "refs/heads/master", "committer_date": 1468295893000, "content_id": "73ffb2feacf4cfa1afe6e30179e7ee53e40417d3", "detected_licenses": [ "MIT" ], "directory_id": "9540905f89036fe28834f6e2ada10205caa1a244", "extension": "py", "fi...
2.40625
stackv2
__author__ = "Nicole" # This script should be used to fill the pokemon_caught table for the first time to indicate # that the pokemon are not caught yet. import sqlite3 conn = sqlite3.connect('..//database/pokedex.sqlite3') c = conn.cursor(); c.execute("delete from " + "pokemon_caught") c.execute("delete from " + "...
16
29.31
92
8
126
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_637da270d87c2137_a6284c8e", "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" ]
[ 11, 12 ]
[ 11, 12 ]
[ 1, 1 ]
[ 45, 77 ]
[ "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" ]
scraper_notCaught.py
/Scrapper/scraper_notCaught.py
narottaman/ECE-Pokedex
MIT
2024-11-18T18:05:58.858841+00:00
1,512,579,339,000
6f34cc872c1ab543bca3c9b907be9aba77c80fd5
3
{ "blob_id": "6f34cc872c1ab543bca3c9b907be9aba77c80fd5", "branch_name": "refs/heads/master", "committer_date": 1512579339000, "content_id": "04d63eaed1e4799994a767c8e3cde534555d4e84", "detected_licenses": [ "MIT" ], "directory_id": "69190e914331e3b7dc7604fc7d34b14bb8ec8906", "extension": "py", "fi...
2.53125
stackv2
from RedmineAPI.Utilities import FileExtension, create_time_log import shutil import os from RedmineAPI.Access import RedmineAccess from RedmineAPI.Configuration import Setup from Utilities import CustomKeys, CustomValues class Automate(object): def __init__(self, force): # create a log, can be written...
139
50.22
140
21
1,557
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ada93e3c599f09bc_8e98b2e3", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 89, 109 ]
[ 89, 109 ]
[ 13, 13 ]
[ 27, 27 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
GeneSippr.py
/GeneSippr.py
lowandrew/GeneSippr_Automator
MIT
2024-11-18T18:06:00.349183+00:00
1,592,291,030,000
9ea54ae4c590f4199e1d99b096429cbb0f1fb704
4
{ "blob_id": "9ea54ae4c590f4199e1d99b096429cbb0f1fb704", "branch_name": "refs/heads/master", "committer_date": 1592291030000, "content_id": "9dcbbd296612a5efc0257d563e0bdbb440a7103a", "detected_licenses": [ "MIT" ], "directory_id": "18c5d373e52fab2f0541f0b2b3fda5043910732b", "extension": "py", "fi...
3.984375
stackv2
# 用户输入两个正整数,求他们的最小公倍数。 num1 = eval(input("请输入第一个数字: ")) num2 = eval(input("请输入第二个数字: ")) if num1<= 0 or num2 <= 0: print("两个数必须是正整数") exit(0) if num1>num2: max=num1 min=num2 else: max=num2 min=num1 for i in range(1,min+1): numtemp=max*i if numtemp % min == 0: numresult=nu...
22
15.73
32
9
144
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_cd8d8c484902d7b2_21239cde", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
3
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 2, 3 ]
[ 2, 3 ]
[ 8, 8 ]
[ 51, 51 ]
[ "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.", "Detected the use of eval(). eval() can be dangerous if used...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
4-最小公倍数.py
/Week 6/4-最小公倍数.py
BleShi/PythonLearning-CollegeCourse
MIT
2024-11-18T18:06:00.458625+00:00
1,611,605,318,000
a02298e2d7f53746fba252e49d71b05fb1c9cb54
2
{ "blob_id": "a02298e2d7f53746fba252e49d71b05fb1c9cb54", "branch_name": "refs/heads/master", "committer_date": 1611605318000, "content_id": "42fd304e56fb47ec8b825138f0b5bc910fa9e4f5", "detected_licenses": [ "ISC" ], "directory_id": "2b8a258ba9e4c61efa87a7bdcde3f3584254bd5f", "extension": "py", "fi...
2.46875
stackv2
#!/usr/bin/env python """Exploit script for mars-express.""" import subprocess import sys import os import pwn pwn.context.log_level = "info" pwn.context.terminal = ["tmux", "splitw", "-p", "75"] BINARY = "../src/mars-express" HOST = "vulnbox-test.faust.ninja" PORT = 8888 GDB_COMMANDS = [] MENU = """What do you...
144
21.17
98
13
957
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_5fbea8111a456e96_e3778d23", "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" ]
[ 129 ]
[ 129 ]
[ 9 ]
[ 34 ]
[ "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" ]
x.py
/exploit/x.py
fausecteam/faustctf-2020-mars-express
ISC
2024-11-18T18:06:02.252388+00:00
1,608,557,697,000
3054934136b078311cd7cb03154364ec20d14bfa
3
{ "blob_id": "3054934136b078311cd7cb03154364ec20d14bfa", "branch_name": "refs/heads/master", "committer_date": 1608557697000, "content_id": "7b40ba0dab867de21b545e3364e008d2089357eb", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "c033a814d418b10d1c8a3f739c410a1cf8f8d212", "extension": "p...
2.78125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import MySQLdb def readInput(inputFile): newlines = [] with open(inputFile,"r") as f: lines = f.readlines() for line in lines: fileName = line.split(",")[0] dataKey = line.split(",")[1] result = getTaskId(dataKey) newlines.append(line.strip()+","+str(res...
45
19.64
61
16
273
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1ec1719d09d8fa92_18ae5a75", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 31 ]
[ 31 ]
[ 3 ]
[ 22 ]
[ "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" ]
celloud_mysql.py
/celloud/celloud_mysql.py
sdyz5210/python
BSD-3-Clause
2024-11-18T18:06:03.792326+00:00
1,569,089,543,000
51cb6e8c13e7e4dadf31388b033eb9c70ab96649
3
{ "blob_id": "51cb6e8c13e7e4dadf31388b033eb9c70ab96649", "branch_name": "refs/heads/master", "committer_date": 1569089543000, "content_id": "d95e0ef39696de282c4a7e0c1b5f5363162356eb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "84fb2513f5b38d02dccd4cc158593973eb46e32c", "extension": "py"...
2.78125
stackv2
import sys import os from os.path import stat from argparse import ArgumentParser import pickle layer_files = ["/home/nannan/dockerimages/layers/hulk1/hulk1_layers_less_1g.lst"]#, "/home/nannan/dockerimages/layers/hulk4/hulk4_layers_less_1g.lst"] out_dir = "/home/nannan/dockerimages/layers/hulk1/" stored_dat_file = os...
93
36.59
150
16
875
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_279717cb4676db67_d2b42f0f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
6
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 37, 82 ]
[ 37, 82 ]
[ 9, 35 ]
[ 65, 49 ]
[ "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" ]
layer_sampler.py
/layer_sampler.py
nnzhaocs/docker-performance
Apache-2.0
2024-11-18T18:06:04.421296+00:00
1,521,550,476,000
b421f924ea0a1b3d49e62b82f4270ad46bc0d6e2
3
{ "blob_id": "b421f924ea0a1b3d49e62b82f4270ad46bc0d6e2", "branch_name": "refs/heads/master", "committer_date": 1521550476000, "content_id": "e7e9f01607a7bb96d9cf37f02e3a92b3a2628967", "detected_licenses": [ "MIT" ], "directory_id": "ae4d7c74d4f202bb73c20d556667fa6472a4bb51", "extension": "py", "fi...
2.828125
stackv2
#!/usr/bin/env python3 import sqlite3 from subprocess import check_output, CalledProcessError from time import time from re import findall from sys import argv from pprint import pprint path = "/home/kevin/homeChecker/home.db" def getOnlineClients(): try: arpOutput = check_output("sudo arp-scan -l", shel...
88
24.1
106
20
602
python
[{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_54cc545c2d1d6b40_2a208f4b", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.use-sys-exit", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected use of `exit`. Use `sys.exit` over the python...
2
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 73 ]
[ 73 ]
[ 9 ]
[ 106 ]
[ "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" ]
macLookup.py
/macLookup.py
KevinMidboe/homeChecker
MIT
2024-11-18T18:15:56.701855+00:00
1,690,534,950,000
bfb925a90477c2f3ae47690fe36914a9961b3f98
3
{ "blob_id": "bfb925a90477c2f3ae47690fe36914a9961b3f98", "branch_name": "refs/heads/master", "committer_date": 1690534950000, "content_id": "ac7441ba8a8c6700cd9631edb9574289ad32848b", "detected_licenses": [ "MIT" ], "directory_id": "92bdf73588634c9376e9c060fd04933a675e0817", "extension": "py", "fi...
2.53125
stackv2
# -*- coding: utf-8 -*- import six if six.PY2: from urllib import quote, unquote else:# pragma: no cover from urllib.parse import quote, unquote import re import logging from .url_converters import default_converters, ConvertError logger = logging.getLogger(__name__) def urlquote(value): if isinstance(v...
170
36.06
82
23
1,287
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_3fe337b711103b97_6ed7b1e8", "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" ]
[ 92 ]
[ 93 ]
[ 24 ]
[ 41 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
url_templates.py
/iktomi/web/url_templates.py
SmartTeleMax/iktomi
MIT
2024-11-18T18:16:00.896196+00:00
1,586,974,776,000
47b319fa4a07e0dad76820e360420cfbdcc7997b
3
{ "blob_id": "47b319fa4a07e0dad76820e360420cfbdcc7997b", "branch_name": "refs/heads/master", "committer_date": 1586974776000, "content_id": "52f4b1c998369de71a9d8a92e708d54f8849d700", "detected_licenses": [ "MIT" ], "directory_id": "72f1cb7b9aed9ab1e56265c845597f3340dcfe13", "extension": "py", "fi...
2.859375
stackv2
import glob import re import jinja2 import ruamel.yaml as yaml import config _CREDITS_TEMPLATE = """\ # {{country.flag}} Photo credits for flags of {{country.name}} ({{country.code}}) {% if photos is iterable -%} {% for photo in photos %} - `{{photo.filename}}` by {{photo.author}}, licensed under the {{photo.l...
40
28.3
116
12
293
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3087dcf1815ccec3_8e54d525", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 35 ]
[ 35 ]
[ 29 ]
[ 50 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
credits.py
/utils/credits.py
Tamjid2000/flagnet
MIT
2024-11-18T18:16:05.673901+00:00
1,618,560,685,000
1fe328c13ac559c8ce9f07013ff869c27e88622a
3
{ "blob_id": "1fe328c13ac559c8ce9f07013ff869c27e88622a", "branch_name": "refs/heads/master", "committer_date": 1618560685000, "content_id": "719959cbcc6b0560557eef2fa80b86d177fb9204", "detected_licenses": [ "MIT" ], "directory_id": "f634ad99439c856eab934cdd3085d9e3f8e8e899", "extension": "py", "fi...
3.125
stackv2
import subprocess def scan_image(outfile): """Gets an image from a connected scanning device and saves it as a TIF file at specified location. Throws a IOError if there is an error reading from the scanning device. Parameters: outfile (str): Path where scanned image should be saved. """ ...
22
29.82
87
12
146
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_e5c80b6e4aec74c3_dd64893e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 15 ]
[ 15 ]
[ 19 ]
[ 72 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
Scanner.py
/src/Scanner.py
saifkhichi96/authentica-desktop
MIT
2024-11-18T18:16:13.733478+00:00
1,596,808,707,000
e854f5625b2e6a9bef4995dba8daa0af4d1ad961
3
{ "blob_id": "e854f5625b2e6a9bef4995dba8daa0af4d1ad961", "branch_name": "refs/heads/master", "committer_date": 1596808707000, "content_id": "e0b3661c87c4fdb51baf65eb76e3d60f6594b174", "detected_licenses": [ "MIT" ], "directory_id": "6caf6d0fda88ffb306bf606a83a32844ebfb4b3d", "extension": "py", "fi...
2.796875
stackv2
# Databricks notebook source # MAGIC %md ## Pandas - Extracting data # COMMAND ---------- import pandas as pd import numpy as np # Load data from CSV data = pd.read_csv('/dbfs/FileStore/tables/titanic.csv') # COMMAND ---------- # MAGIC %md ## Pandas - Cleaning data # COMMAND ---------- # Drop rubbish columns w...
129
29
156
15
1,015
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e2569b74f84f5922_0e7829ff", "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" ]
[ 107, 111, 115 ]
[ 107, 111, 115 ]
[ 5, 5, 5 ]
[ 29, 30, 29 ]
[ "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" ]
scikit-titanic.py
/archive/notebooks/scikit-titanic.py
benc-uk/batcomputer
MIT
2024-11-18T18:16:14.418691+00:00
1,476,576,743,000
a292a6051cbeaec96155366fa63d875b27e8a0f4
2
{ "blob_id": "a292a6051cbeaec96155366fa63d875b27e8a0f4", "branch_name": "refs/heads/master", "committer_date": 1476576743000, "content_id": "c24794d8637801e8eb8e67ebe9c29650def6f3d9", "detected_licenses": [ "MIT" ], "directory_id": "7f89fb972c346b73fbcadbe7a682a75f9143dd72", "extension": "py", "fi...
2.359375
stackv2
""" This module is based on a rox module (LGPL): http://cvs.sourceforge.net/viewcvs.py/rox/ROX-Lib2/python/rox/mime.py?rev=1.21&view=log This module provides access to the shared MIME database. types is a dictionary of all known MIME types, indexed by the type name, e.g. types['application/x-python'] Applications c...
474
28.68
90
19
3,347
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_522776996d096cd6_c88a1708", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
4
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 29 ]
[ 29 ]
[ 1 ]
[ 49 ]
[ "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" ]
Mime.py
/AppDirAssistant.AppDir/usr/bin/AppImageKit/xxdg/Mime.py
hideout/AppImageKit
MIT
2024-11-18T19:31:06.911050+00:00
1,689,234,174,000
91fd019be600fc0b587711b10c6639c9ef7fe3ab
2
{ "blob_id": "91fd019be600fc0b587711b10c6639c9ef7fe3ab", "branch_name": "refs/heads/master", "committer_date": 1689234174000, "content_id": "e9e6b93871ea59cec6cf7b76c47341f9c39d4709", "detected_licenses": [ "MIT" ], "directory_id": "f250267b20972b9f8d50c60a89dda36e7ccfc1b3", "extension": "py", "fi...
2.40625
stackv2
# -*- coding: utf-8 -*- """ Created on Fri Mar 8 13:34:44 2019 You are not expected to understand my codes! @Author: Kotori_Y @Blog: blog.moyule.me @Weibo: Michariel @Mail: yzjkid9@gmial.com I love Megumi forerver! """ import xml.etree.ElementTree as ET import os import pandas as pd os.chdir(r'C:\DrugBank\ver5.1....
110
20.83
96
16
639
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_f6a6a94e43d457ec_fccc520c", "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" ]
[ 15 ]
[ 15 ]
[ 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" ]
ExtractFromDrugbank.py
/py_work/spider/xml/ExtractFromDrugbank.py
kotori-y/kotori_work
MIT
2024-11-18T18:59:36.430865+00:00
1,526,898,153,000
1aa086829453a678f6572098d89e4caf5e38f4a0
3
{ "blob_id": "1aa086829453a678f6572098d89e4caf5e38f4a0", "branch_name": "refs/heads/master", "committer_date": 1526898153000, "content_id": "6b01882afa0205a97dacd85c19b41e33b565045f", "detected_licenses": [ "MIT" ], "directory_id": "bdd3934561bc49bb05f55839ece1d069bf6e37ca", "extension": "py", "fi...
2.53125
stackv2
from pyglet.gl import * from cocos.director import director def exec(): return 0 def test_a(): assert exec()==0 # Direct OpenGL commands to this window. director.init() window = director.window joysticks = pyglet.input.get_joysticks() if joysticks: joystick = joysticks[0] print(joystick) @window.event d...
35
16.97
43
9
164
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_bbdbbc32cf01cb2e_a79b24ae", "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" ]
[ 8 ]
[ 8 ]
[ 12 ]
[ 18 ]
[ "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" ]
temp_display.py
/src/temp_display.py
LLNT/3X-Project
MIT
2024-11-18T18:59:37.115418+00:00
1,613,983,506,000
cb29b50b92d78ae271482bf5bd67b09e0c87512d
3
{ "blob_id": "cb29b50b92d78ae271482bf5bd67b09e0c87512d", "branch_name": "refs/heads/main", "committer_date": 1613983506000, "content_id": "cef0983fb9fb5ac5fae6765b5c97a66d232db152", "detected_licenses": [ "MIT" ], "directory_id": "357aee5b738c06e7127ca0473a0a69c1637f034a", "extension": "py", "file...
2.921875
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Oct 2 15:13:41 2020 @author: rjn """ from deeplearning.utils import batch_iterator from tabulate import tabulate import sys from tqdm import tqdm import time import datetime import pickle import cupy as cp import numpy as np class NeuralNetwork(): ...
234
33.29
102
22
1,721
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cd4e17849ddc841d_50a1d56c", "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" ]
[ 139 ]
[ 139 ]
[ 9 ]
[ 68 ]
[ "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" ]
neural_network.py
/Layers/neural_network.py
rjnp2/deep_learning_from_scratch
MIT
2024-11-18T18:59:37.343794+00:00
1,445,805,382,000
f64434934d03860bb94a292acddbbab4077f4d2c
2
{ "blob_id": "f64434934d03860bb94a292acddbbab4077f4d2c", "branch_name": "refs/heads/master", "committer_date": 1445805382000, "content_id": "5f0340eb56bc03372bc8037ae43e60b2db16825e", "detected_licenses": [ "MIT" ], "directory_id": "eaaddeb092cb8f4625e86f0ccc8b90515fa3d66e", "extension": "py", "fi...
2.390625
stackv2
from urllib import request __author__ = 'James' import json import requests from django.http import HttpResponse from django.views import generic from .models import portal import api.soql import urllib.parse import http.client class SoQL: def __init__(self, resourceId): self.resourceId = resourceI...
87
23.1
103
18
510
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.httpsconnection-detected_d1dec74ca54bdee7_4fd861c0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.httpsconnection-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The HTTPSConnection API has ch...
1
true
[ "CWE-295" ]
[ "rules.python.lang.security.audit.httpsconnection-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 32 ]
[ 32 ]
[ 16 ]
[ 67 ]
[ "A03:2017 - Sensitive Data Exposure" ]
[ "The HTTPSConnection API has changed frequently with minor releases of Python. Ensure you are using the API for your version of Python securely. For example, Python 3 versions prior to 3.4.3 will not verify SSL certificates by default. See https://docs.python.org/3/library/http.client.html#http.client.HTTPSConnecti...
[ 5 ]
[ "LOW" ]
[ "LOW" ]
soql.py
/api/soql.py
jthidalgojr/greengov2015-TeamAqua
MIT
2024-11-18T18:59:39.654360+00:00
1,438,457,330,000
164018e3ee2ed78a7a06bcd8da83dde0586b2472
3
{ "blob_id": "164018e3ee2ed78a7a06bcd8da83dde0586b2472", "branch_name": "refs/heads/master", "committer_date": 1438457330000, "content_id": "51077a2a95fc620fa479fc18a63256e627cda92f", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "8e695d33405365e68ffabee6ceeaef9f6af7fa34", "extension": "p...
2.71875
stackv2
# -*- coding: utf-8 -*- import copy import re import random PATTERN_VAR = r"<[^>\n]+>" PATTERN_INCLUDE = r"\[[^\]\n]+\]" PATTERN_FOR_TOKENS = r'>|>=|<|<=|==|or|and|[\w\d]+' def get_sub_tpl_by_name(sub_tpl, name_tpl): for tpl in sub_tpl: if tpl['name'] == name_tpl: return copy.deepcopy(tpl) ...
170
28.35
99
17
1,137
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_a2a49a52ba56a476_f6852be5", "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" ]
[ 162 ]
[ 162 ]
[ 16 ]
[ 26 ]
[ "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" ]
engine.py
/textgenerator/engine.py
yespon/text-generator
BSD-2-Clause
2024-11-18T19:11:47.990876+00:00
1,677,595,148,000
b7e89f481982b05cb185314a461e40ee6ec37c27
3
{ "blob_id": "b7e89f481982b05cb185314a461e40ee6ec37c27", "branch_name": "refs/heads/master", "committer_date": 1677595148000, "content_id": "ed0d92bc2a439d45d05234af0b41939d6b49a8a7", "detected_licenses": [ "MIT" ], "directory_id": "ab218a8c6e1d994c5eae3f6abb5940a4a2d46fe3", "extension": "py", "fi...
3.25
stackv2
from subprocess import Popen, PIPE # Necessary modules ready_for_rssi = False command = "btmon" # command for scanning uuid = "" # uuid of beacon to scan threshold = 0 # threshold for proximity """------------------------------------------------------- run function opens up a shell process and runs command in it...
70
31.16
63
14
480
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f3901ddbc60162ed_34c28bce", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 14, 14 ]
[ 14, 14 ]
[ 15, 49 ]
[ 54, 53 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
proximity.py
/examples/bluetooth/proximity.py
datacentricdesign/wheelchair-design-platform
MIT
2024-11-18T19:11:50.446868+00:00
1,609,520,116,000
fe1fa2de13792a09ee317e1a450643dcc9be7f21
3
{ "blob_id": "fe1fa2de13792a09ee317e1a450643dcc9be7f21", "branch_name": "refs/heads/main", "committer_date": 1609520116000, "content_id": "580fdc8fc6aeaeeb2bc666eb87e9c357b38d71e3", "detected_licenses": [ "MIT" ], "directory_id": "db21579153245f5424f5a5b80a10b318291b8ebf", "extension": "py", "file...
2.5625
stackv2
""" Implementation of multiple visualization algorithms. Uses the following repos: - Repo: nn_interpretability - Autor: hans66hsu - URL: https://github.com/hans66hsu/nn_interpretability - Repo: - Author: Yuchi Ishikawa - URL: https://github.com/yiskw713/SmoothGradCAMplusplus ""...
556
26.2
98
18
3,554
python
[{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_7911f1683666d755_23297473", "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" ]
[ 533 ]
[ 533 ]
[ 21 ]
[ 57 ]
[ "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" ]
visualization_with_nn.py
/code/visualization_with_nn.py
RobinMaas95/GTSRB_Visualization
MIT
2024-11-18T19:11:52.604000+00:00
1,466,075,427,000
35424c8147c33cbb94ba41f8afde589d6da9dda2
2
{ "blob_id": "35424c8147c33cbb94ba41f8afde589d6da9dda2", "branch_name": "refs/heads/master", "committer_date": 1466075427000, "content_id": "f1f0fcd57f85c2d456a8c49537392e4a19a0c564", "detected_licenses": [ "Apache-2.0" ], "directory_id": "66e4e79ef7d6265879bf4aeadbbaa988ebcf7881", "extension": "py"...
2.34375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # IkaLog # ====== # Copyright (C) 2015 ExceptionError # Copyright (C) 2015 Takeshi HASEGAWA # Copyright (C) 2015 AIZAWA Hina # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
90
28.5
78
16
649
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_6205b8f20cc47167_325198fa", "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...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 42 ]
[ 42 ]
[ 13 ]
[ 27 ]
[ "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" ]
say.py
/ikalog/outputs/osx/say.py
ExceptionError/IkaLog
Apache-2.0
2024-11-18T19:23:56.767731+00:00
1,412,296,764,000
4aa75caa976d1498bbc755b6c56690e983e0276c
2
{ "blob_id": "4aa75caa976d1498bbc755b6c56690e983e0276c", "branch_name": "refs/heads/master", "committer_date": 1412296764000, "content_id": "909ba0c787abf8a896af084a044c7f6041ed28c7", "detected_licenses": [ "MIT" ], "directory_id": "0bd1542bdece22dfd1a51d67e5eb51597f820fb8", "extension": "py", "fi...
2.484375
stackv2
from django.template import loader, Context, RequestContext import stomp import json def push_with_template(template, context, destination): ''' Pushes content through stomp / morbidQ to comet listeners. This drives a lot of the "live" content on our site. ''' t = loader.get_template(template) #Pro...
36
37.86
163
9
309
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_694fcb5e9a63d4d5_96d09143", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
1
true
[ "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 16 ]
[ 16 ]
[ 15 ]
[ 26 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
functions.py
/what_apps/push/functions.py
jMyles/WHAT
MIT
2024-11-18T19:23:57.885757+00:00
1,610,141,259,000
0e1f5192eb432979ace9c427fb6bf98878c98fb6
3
{ "blob_id": "0e1f5192eb432979ace9c427fb6bf98878c98fb6", "branch_name": "refs/heads/main", "committer_date": 1610141259000, "content_id": "d0b0a066db2e25ecc23563ba8f5d2466d35c4012", "detected_licenses": [ "MIT" ], "directory_id": "a73327658349142b348a0a981e1282588cd0fc35", "extension": "py", "file...
2.625
stackv2
import flask as fl from flask import Flask, redirect, url_for, request, jsonify import tensorflow.keras as kr from speedPowerModel import LinearRegressionModel, PolynomialRegressionModel, KNNRegressionModel app = fl.Flask(__name__) # Add root route. @app.route("/") def home(): return app.send_static_file("index....
62
22.69
96
13
330
python
[{"finding_id": "semgrep_rules.python.flask.security.injection.nan-injection_609dcba71fd88f50_5990aeaa", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.nan-injection", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found user input going directly into type...
6
true
[ "CWE-704", "CWE-704", "CWE-704", "CWE-704", "CWE-704" ]
[ "rules.python.flask.security.injection.nan-injection", "rules.python.flask.security.injection.nan-injection", "rules.python.flask.security.injection.nan-injection", "rules.python.flask.security.injection.nan-injection", "rules.python.flask.security.injection.nan-injection" ]
[ "security", "security", "security", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 18, 29, 40, 51, 54 ]
[ 18, 29, 40, 51, 54 ]
[ 8, 8, 8, 8, 13 ]
[ 20, 20, 20, 20, 25 ]
[ "", "", "", "", "" ]
[ "Found user input going directly into typecast for bool(), float(), or complex(). This allows an attacker to inject Python's not-a-number (NaN) into the typecast. This results in undefind behavior, particularly when doing comparisons. Either cast to a different type, or add a guard checking for all capitalizations ...
[ 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
app.py
/app.py
WilliamVida/EmergingTechnologiesProject
MIT
2024-11-18T19:23:59.482901+00:00
1,534,870,631,000
58587ca7ebae4099d24d64f415463cce3c1a091d
3
{ "blob_id": "58587ca7ebae4099d24d64f415463cce3c1a091d", "branch_name": "refs/heads/master", "committer_date": 1534870631000, "content_id": "d6c3177e4bb785f4a4318763cab19e6f76518fc1", "detected_licenses": [ "MIT" ], "directory_id": "546f7435f1303d98b169eb30d56fb973e2efc5e1", "extension": "py", "fi...
2.5625
stackv2
#!/usr/bin/env python # edit-question.py # ---------------- # Edit your FAQ in the console. Because consoles rock. from subprocess import call import lh3.api import os import sys import tempfile # Takes two command line arguments, FAQ ID and Question ID. faq_id, question_id = sys.argv[1:] client = lh3.api.Client(...
32
22.22
100
12
195
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_39fc9331bf43f9cb_bc1d8bb6", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 28, 28 ]
[ 28, 28 ]
[ 1, 6 ]
[ 21, 20 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functi...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "MEDIUM" ]
edit-question.py
/libraryh3lp-sdk-python/examples/edit-question.py
GeorgetownMakerHubOrg/libraryh3lpListener
MIT
2024-11-18T19:58:22.310775+00:00
1,603,890,688,000
930068ac11bf4149de5041da273d4f216486250a
2
{ "blob_id": "930068ac11bf4149de5041da273d4f216486250a", "branch_name": "refs/heads/master", "committer_date": 1603890688000, "content_id": "37e734897563d2b53b2bba230d5f85e28babb833", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "1c018251f6f89e0fbe170283b76ac5e679546c80", "extension": "p...
2.5
stackv2
#! /usr/bin/env python3 import os, sys, time, re curr = os.getcwd() spl = curr.split("/") short = spl[-1] dir_list = spl #probably don't need this #maybe continuously update dir list and only allow redirects if in current list def ls(): directory_list = os.listdir(curr) for i in directory_list: print(i, end =...
238
20.46
87
25
1,543
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-if-body_7273a5405fa19dfd_66955eea", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-if-body", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Useless if statement; both blocks ha...
6
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-os-exec-audit", "rules.python.lang.security.audit.dangerous-os-exec-tainted-env-args", "rules.python.lang.security.audit.dangerous-os-exec-audit", "rules.python.lang.security.audit.dangerous-os-exec-tainted-env-args" ]
[ "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 130, 130, 229, 229 ]
[ 130, 130, 229, 229 ]
[ 7, 7, 4, 4 ]
[ 55, 55, 43, 43 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here.", "Found user controlled content when spawning a process. This is dangerous because it allows a malicious a...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
shell.py
/shell/shell.py
utep-cs-systems-courses/project1-shell-Llibarra2
BSD-3-Clause
2024-11-18T19:58:33.327596+00:00
1,692,617,757,000
454496596a5016cb1d0bff0f0918c75f96699e5c
3
{ "blob_id": "454496596a5016cb1d0bff0f0918c75f96699e5c", "branch_name": "refs/heads/master", "committer_date": 1692617757000, "content_id": "463da85d9f26779d281a3548f721cd414d574e5c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "db987bc58a44d6bfbc4d29407b2cb4e98746f0a7", "extension": "py"...
2.71875
stackv2
import ast from inspect import getsource from textwrap import dedent import numpy as np class Vectorizer(ast.NodeTransformer): def visit_ListComp(self, node): """ transform [elt for gen.target in gen.iter] into gen.target = np.asarray(gen.iter); elt (1 expression t...
77
30.36
71
20
523
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_0ae1c9ccf52fc5d6_0df0109e", "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" ]
[ 66 ]
[ 66 ]
[ 5 ]
[ 26 ]
[ "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" ]
vectorize.py
/fun/vectorize.py
jburgy/blog
Apache-2.0
2024-11-18T19:58:33.813913+00:00
1,621,602,480,000
b5516177c87d7adb439257528df5e13cde90b6ff
3
{ "blob_id": "b5516177c87d7adb439257528df5e13cde90b6ff", "branch_name": "refs/heads/master", "committer_date": 1621602480000, "content_id": "bd5ac860546b0876396ab221d15f8af5ddbbe932", "detected_licenses": [ "MIT" ], "directory_id": "2bca49bc44fa9c8f7c2e5c3b092b84b140de3e76", "extension": "py", "fi...
2.921875
stackv2
from typing import List from . import base_event from .method_enter import MethodEnterEvent, MethodExitEvent, LineExecutionEvent from ..file_system.human_readable_size import HumanReadableByteSize from ..file_system.session_store import SessionStore import pickle def count_every_element(self, cleanup_function= None...
109
28.17
89
14
671
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e2826d277b87ac51_4c17244b", "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" ]
[ 16 ]
[ 16 ]
[ 18 ]
[ 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" ]
size_prediction.py
/pycrunch_trace/events/size_prediction.py
lixinli123/pycrunch-trace
MIT
2024-11-18T19:58:33.954974+00:00
1,497,250,589,000
fcba0f309089a958250921246ebdfc0fa1993691
3
{ "blob_id": "fcba0f309089a958250921246ebdfc0fa1993691", "branch_name": "refs/heads/master", "committer_date": 1497250589000, "content_id": "ca52a08e7fcae2d3c3ce178b5f1fa424e074ec88", "detected_licenses": [ "MIT" ], "directory_id": "a431bbe8e9078119316a909d1df6cbb2d3d77067", "extension": "py", "fi...
2.765625
stackv2
import argparse import timesuck from collections import namedtuple from datetime import date, datetime, timedelta, time class Report(object): def __init__(self, ranges, db, type=None, minlength=None): """db is sqlite3 db connection""" self.db = db self.type = type self.ranges = r...
117
29.61
91
20
743
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_976c1bc38dfe9fdb_1c6f1d82", "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" ]
[ 27, 31 ]
[ 29, 32 ]
[ 13, 13 ]
[ 53, 42 ]
[ "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" ]
reports.py
/reporter/timesuck/reports.py
kyleconroy/timesuck
MIT
2024-11-18T19:58:34.309646+00:00
1,311,309,595,000
ab3a5b71ff0e56bebe089a810373358f5ba302ee
2
{ "blob_id": "ab3a5b71ff0e56bebe089a810373358f5ba302ee", "branch_name": "refs/heads/master", "committer_date": 1314040997000, "content_id": "aa1119f31be67532371048cc59ba5a65d6a5bdbf", "detected_licenses": [ "MIT" ], "directory_id": "4c965d1a5d94d72e966bc48faba52f2ad8da8cc3", "extension": "py", "fi...
2.3125
stackv2
__author__ = 'erik' """ Command for restoring a database """ import os, time from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Backup database. Only Mysql and Postgresql engines are implemented" def handle(self, *args, **options): from django.db import connecti...
57
37.98
136
14
514
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_caecaae6a21961cb_c27287dd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
3
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 43, 56, 57 ]
[ 43, 56, 57 ]
[ 9, 9, 9 ]
[ 62, 137, 95 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
restoredb.py
/django_extensions/management/commands/restoredb.py
easel/django-extensions
MIT
2024-11-18T19:58:34.409911+00:00
1,422,019,134,000
f114c86ae27ba02d532dc6de403bec9eb123d666
3
{ "blob_id": "f114c86ae27ba02d532dc6de403bec9eb123d666", "branch_name": "refs/heads/master", "committer_date": 1422019134000, "content_id": "af5530cd1c47a754dade34f5cc224f2879d004ed", "detected_licenses": [ "MIT" ], "directory_id": "a0766da72b6db4c04f986ca3fcec9a525dcac141", "extension": "py", "fi...
2.671875
stackv2
#!/usr/bin/env python """ ================================================================================ :mod:`composition` -- Composition XML handler ================================================================================ .. module:: composition :synopsis: Composition XML handler .. inheritance-diagram...
73
31.51
88
14
493
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_c2b741883e650953_6c1af3fa", "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" ]
[ 22 ]
[ 22 ]
[ 1 ]
[ 38 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
composition.py
/pyhmsa/fileformat/xmlhandler/condition/composition.py
gitter-badger/pyhmsa
MIT
2024-11-18T19:58:37.337218+00:00
1,676,139,610,000
2bc04b2bcdd726fe206a5b48bbae9788a8d3229e
2
{ "blob_id": "2bc04b2bcdd726fe206a5b48bbae9788a8d3229e", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "00aa6d1b66c0f649518e62693a9338c7bf69cc70", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
2.359375
stackv2
def GenericCSVExport(qs, fields=None): from django.db.models.loading import get_model from django.http import HttpResponse, HttpResponseForbidden from django.template.defaultfilters import slugify import csv model = qs.model response = HttpResponse(mimetype='text/csv') response['Content...
34
32.82
93
18
218
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_4830a9a31a12a595_2a1359cd", "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 ...
2
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 8 ]
[ 8 ]
[ 16 ]
[ 49 ]
[ "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" ]
snippet.py
/all-gists/1418860/snippet.py
gistable/gistable
MIT
2024-11-18T19:34:37.555042+00:00
1,669,146,016,000
89ce2347f47b3d5fd85ba9774a91355bd6af1c7c
2
{ "blob_id": "89ce2347f47b3d5fd85ba9774a91355bd6af1c7c", "branch_name": "refs/heads/main", "committer_date": 1669146016000, "content_id": "4984acc3f8eff05966855f8307a380cf27c038ea", "detected_licenses": [ "MIT" ], "directory_id": "895a7638653a191d704d4740672a7f6211eb9d1d", "extension": "py", "file...
2.4375
stackv2
""" Build SSW scripts from Jinja 2 templates """ import os import datetime import pathlib import subprocess import tempfile import jinja2 from scipy.io import readsav from .filters import string_list_filter from .read_config import defaults from .util import SSWIDLError, IDLLicenseError from .filters import * class...
204
40.01
97
19
1,833
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_ca0fddc699b84e91_af872f12", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
9
true
[ "CWE-79", "CWE-116", "CWE-78", "CWE-78" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.jinja2.security.audit.missing-autoescape-disabled", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "HIGH", "HIGH" ]
[ 58, 58, 183, 183 ]
[ 58, 58, 184, 183 ]
[ 20, 20, 26, 65 ]
[ 89, 89, 64, 69 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected a Jinja2 environment witho...
[ 5, 5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "HIGH" ]
[ "MEDIUM", "MEDIUM", "HIGH", "LOW" ]
environment.py
/hissw/environment.py
wtbarnes/hissw
MIT
2024-11-18T19:34:37.612903+00:00
1,625,573,774,000
798dfb6381a0d5ba653f52d20b559d6d11a9ecb8
3
{ "blob_id": "798dfb6381a0d5ba653f52d20b559d6d11a9ecb8", "branch_name": "refs/heads/master", "committer_date": 1625573774000, "content_id": "c4e8c3fd0f7118239452679411db41c635295609", "detected_licenses": [ "MIT" ], "directory_id": "c822c02381fd78198cbd79fdd729efe83ccf3bde", "extension": "py", "fi...
2.828125
stackv2
import json # to encode items as JSON from source.models.EventModel import EventModel from source.models.NewsModel import NewsModel import jinja2 from icalendar import Calendar, Event from datetime import datetime from source.Constants import * class NewsFeedView: def __init__(self): self.loader = jinja...
223
43.31
115
16
1,955
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_d488871e9984e8ff_1b7a80d4", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
4
true
[ "CWE-79", "CWE-116", "CWE-79", "CWE-116" ]
[ "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", "rules.python.jinja2.security.audit.missing-autoescape-disabled" ]
[ "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 15, 15, 16, 16 ]
[ 15, 15, 16, 16 ]
[ 21, 21, 20, 20 ]
[ 64, 64, 58, 58 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection", "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected a Jinja2 environment witho...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
NewsFeedView.py
/server/source/views/NewsFeedView.py
Ali-Alhasani/UniSaarApp
MIT
2024-11-18T18:39:23.384050+00:00
1,609,845,233,000
87c4064c4fa3bb900d7dd55e35951f54d1724a12
2
{ "blob_id": "87c4064c4fa3bb900d7dd55e35951f54d1724a12", "branch_name": "refs/heads/master", "committer_date": 1609845233000, "content_id": "5a59f92cb1aa30c15b0b1fc5da2c9e86c1ac21e8", "detected_licenses": [ "MIT" ], "directory_id": "e342a154d99b52f403204d56cea2dd80a2bec088", "extension": "py", "fi...
2.4375
stackv2
# Expands a SMILES string to a 3D structure # in mol2 format with am1bcc charges and sybyl atom types try: import argparse parser = argparse.ArgumentParser() parser.add_argument('out_prefix', default='1hnn/ligand', \ help='Output prefix') parser.add_argument('inp', default='1hnn/ligand_in.mol2', \ help...
219
33.21
117
16
2,183
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_e014560c10163856_ac620877", "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...
12
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args", "rules.python.lang.security.au...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 49, 49, 135, 135, 179, 179, 219, 219 ]
[ 49, 49, 135, 135, 179, 179, 219, 219 ]
[ 5, 5, 7, 7, 5, 5, 5, 5 ]
[ 32, 32, 25, 25, 23, 23, 49, 49 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
prep_ligand_for_dock.py
/Pipeline/prep_ligand_for_dock.py
CCBatIIT/AlGDock
MIT
2024-11-18T18:39:24.556163+00:00
1,585,737,203,000
1337813755af1e5191bf7ac6a8d2f4ba9aace96c
2
{ "blob_id": "1337813755af1e5191bf7ac6a8d2f4ba9aace96c", "branch_name": "refs/heads/master", "committer_date": 1585737203000, "content_id": "d182a167721331d0d87065a28827c0bf8bd76e3d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4bf9157cf697a6a841f2b0d27777480d3f759846", "extension": "py"...
2.4375
stackv2
#coding: utf-8 import allspark import io import numpy as np import json import threading import pickle import jieba from sklearn.naive_bayes import MultinomialNB def MakeWordsSet(words_file): words_set = set() with open(words_file, 'r', encoding='utf-8') as fp: for line in fp.readlines(): ...
80
27.81
117
15
567
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_bbf0d4c0eca9b830_59fc8d1e", "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" ]
[ 32, 51 ]
[ 32, 51 ]
[ 22, 16 ]
[ 74, 60 ]
[ "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" ]
app.py
/packages/plugins/bayesian-classifier-eas-model-deploy/src/assets/app.py
imsobear/pipcook
Apache-2.0
2024-11-18T18:39:28.611153+00:00
1,537,913,144,000
791217fea6172ce2d2b817154b0e69f217eb406b
3
{ "blob_id": "791217fea6172ce2d2b817154b0e69f217eb406b", "branch_name": "refs/heads/master", "committer_date": 1537913144000, "content_id": "a950b7068615ec07c1866ca77eba121cf162ac82", "detected_licenses": [ "MIT" ], "directory_id": "d5cbd52f8027950b1f91fdf87c32d9019cfcb99d", "extension": "py", "fi...
2.640625
stackv2
from __future__ import division import os import operator import pickle import random from kivy.app import App from kivy.clock import Clock from kivy.uix.label import Label from kivy.uix.popup import Popup from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.uix.screenmanager import S...
361
28.76
105
22
2,647
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f5beac4c9043f97c_8ff94341", "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" ]
[ 199 ]
[ 199 ]
[ 17 ]
[ 95 ]
[ "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" ]
game.py
/game/game.py
AleksaC/LightsOut
MIT
2024-11-18T18:39:32.579146+00:00
1,522,797,805,000
e3794c362fd1b979a606306d61f1637f3bd25acf
2
{ "blob_id": "e3794c362fd1b979a606306d61f1637f3bd25acf", "branch_name": "refs/heads/master", "committer_date": 1522797805000, "content_id": "5e4458b0cfb7937575503c59cf3b012deeedaa2b", "detected_licenses": [ "MIT" ], "directory_id": "4b5696dc96aa3ec7c5853dc9303c057a0359070a", "extension": "py", "fi...
2.34375
stackv2
#! /usr/bin/env python3 """Do API management CLI.""" import sys import os from subprocess import run import click from helpers import load_settings from helpers.db import apply_migrations, create_migrations from helpers.shell import success os.environ.setdefault('SETTINGS_MODULE', 'settings') settings = load_settin...
86
20.57
72
15
430
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_0f010fb62a05822c_e5ed9dde", "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" ]
[ 30 ]
[ 30 ]
[ 5 ]
[ 18 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
cli.py
/do/cli.py
florimondmanca/do-api
MIT
2024-11-18T18:39:33.189772+00:00
1,546,025,066,000
5aea711dc1ef824fba3fe3c822ee26496be14036
3
{ "blob_id": "5aea711dc1ef824fba3fe3c822ee26496be14036", "branch_name": "refs/heads/master", "committer_date": 1546025066000, "content_id": "560e4bf62355116394a55cf8590e9617839b9e34", "detected_licenses": [ "MIT" ], "directory_id": "fdd61a91c7692faece9f22ea9540070caa705960", "extension": "py", "fi...
2.78125
stackv2
import argparse from collections import defaultdict as dd import cPickle import numpy as np import os from scipy import sparse as sp def add_arguments(): parser = argparse.ArgumentParser() # General settings parser.add_argument('--x', help = 'train features filename' , type = str) parser.add_argument('...
102
34.29
97
15
935
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_f14c10c8d25730d2_14eac69f", "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...
13
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 83, 87, 91, 95, 99 ]
[ 83, 87, 91, 95, 99 ]
[ 2, 2, 2, 2, 2 ]
[ 48, 35, 37, 35, 37 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `cPickle`, which is known to lead ...
[ 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
convert_data.py
/baselines/planetoid/convert_data.py
kojino/lpn
MIT
2024-11-18T18:39:34.670577+00:00
1,485,099,424,000
246d7dfa7bd6119cd0ff2839322857c3754f22e4
3
{ "blob_id": "246d7dfa7bd6119cd0ff2839322857c3754f22e4", "branch_name": "refs/heads/master", "committer_date": 1485099424000, "content_id": "9b490eee8aa527986adbc692590abd0c040e2d7c", "detected_licenses": [ "MIT" ], "directory_id": "6de29238393d7548058c4d5739c7c50879c629a2", "extension": "py", "fi...
2.5625
stackv2
from peewee import * from pprint import pprint from copy import copy import sys, os, inspect, traceback import argparse import inspect from datetime import datetime from datetime import time db = SqliteDatabase('activitylog.db') ################ # Model classes ################ class BaseModel(Model): is_abstrac...
221
26.43
87
16
1,376
python
[{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_d1f7736fb7e101c5_15d00036", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.use-sys-exit", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected use of `exit`. Use `sys.exit` over the python...
6
true
[ "CWE-96", "CWE-96", "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use", "rules.python.lang.security.dangerous-globals-use", "rules.python.lang.security.dangerous-globals-use" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 95, 108, 209 ]
[ 95, 108, 209 ]
[ 13, 25, 13 ]
[ 33, 45, 32 ]
[ "A03:2021 - Injection", "A03:2021 - Injection", "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()'.", "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute...
[ 5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
activitylog.py
/activity/activitylog.py
awynne/scripts
MIT
2024-11-18T18:39:35.070924+00:00
1,644,080,793,000
11ba08c4e8547496f13577188db24abec2866624
3
{ "blob_id": "11ba08c4e8547496f13577188db24abec2866624", "branch_name": "refs/heads/master", "committer_date": 1644080793000, "content_id": "a668e0faa067e76d3c2dfdefa39c28776cfcad14", "detected_licenses": [ "MIT" ], "directory_id": "5368768a91c242037776f39f480e8fe93984815b", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python3 import glob import os import re import subprocess import sys def main(): src_dir = os.path.join('glossika_source', 'audio') out_dir = os.path.join('glossika_output', 'audio') if not os.path.exists(src_dir): os.makedirs(src_dir) sys.exit('\nCreated {}\n' ...
91
34.01
75
16
840
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8b79d7cc27e0d638_7bb525ad", "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" ]
[ 61 ]
[ 65 ]
[ 14 ]
[ 66 ]
[ "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" ]
glossika_split_audio.py
/glossika-to-anki/glossika_split_audio.py
emesterhazy/glossika-to-anki
MIT
2024-11-18T18:39:36.243430+00:00
1,477,036,417,000
f2c3cbce847210a7cad7c1ea53ecb3cce16dca0f
2
{ "blob_id": "f2c3cbce847210a7cad7c1ea53ecb3cce16dca0f", "branch_name": "refs/heads/master", "committer_date": 1477036417000, "content_id": "aceda20e8fcfb5550f0a35f3088b710f39639a23", "detected_licenses": [ "Apache-2.0" ], "directory_id": "114d45d502b53f739aee6e5df61b20edfbac07f2", "extension": "py"...
2.359375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys import json try: import apiai except ImportError: sys.path.append( os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir) ) import apiai CLIENT_ACCESS_TOKEN = '9837df6bcc2a435cbcfac3698d24db42' def main():...
60
21.75
107
15
371
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_98d9cc297a1f8e0b_c44d9aa3", "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-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 57, 57 ]
[ 57, 57 ]
[ 5, 5 ]
[ 25, 25 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
api_connection.py
/api_connection.py
wangejay/smartoffice2
Apache-2.0
2024-11-18T18:39:37.600510+00:00
1,674,000,526,000
7eb7f4a97c9b1a514e863344aa96cc80a38ae3d2
3
{ "blob_id": "7eb7f4a97c9b1a514e863344aa96cc80a38ae3d2", "branch_name": "refs/heads/master", "committer_date": 1674000526000, "content_id": "65bc732acdb4978384d6339f0d314108a5ca8d82", "detected_licenses": [ "Apache-2.0" ], "directory_id": "cf8f5c5181466078f6d58bd0e22f5667e131c848", "extension": "py"...
2.78125
stackv2
import pandas as pd import pickle import sys, os sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) from Preprocessor import Preprocessor import os import argparse import requests from pathlib import Path parser = argparse.ArgumentParser(description='Try classification') parser.add_argum...
51
29.12
127
13
357
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-timeout_6c9530b9b892b563_ee334b11", "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...
4
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 39 ]
[ 39 ]
[ 11 ]
[ 45 ]
[ "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" ]
demo.py
/src/demo/demo.py
SoftwareUnderstanding/rolf
Apache-2.0
2024-11-18T18:39:40.101426+00:00
1,518,979,038,000
fbfac6c2603026765589f936e80329e545efddba
3
{ "blob_id": "fbfac6c2603026765589f936e80329e545efddba", "branch_name": "refs/heads/master", "committer_date": 1518979038000, "content_id": "802569b996a3bf774b4cb7f303db02a4f0c8dc34", "detected_licenses": [ "MIT" ], "directory_id": "a2b2496eaf3e9e3afd6e0098e955f4321d53e30b", "extension": "py", "fi...
2.703125
stackv2
'''z Created on Feb 3, 2017 @author: chris ''' from guiUtil.pref import pref import os import re import warnings class guiData( object ): """ class with functionality for storing default data options the default dictionary will have a data fields which can be stored in persistent memory if the data h...
158
36.08
108
19
1,302
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_5cbc7e00ee74e0f5_e503df4c", "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" ]
[ 61 ]
[ 61 ]
[ 9 ]
[ 46 ]
[ "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" ]
guidata.py
/guiUtil/guidata.py
cjsantucci/h5Widget
MIT
2024-11-18T18:39:44.747575+00:00
1,636,814,357,000
7728e8247e8ecc8add2045c6b2db54e0f8795994
3
{ "blob_id": "7728e8247e8ecc8add2045c6b2db54e0f8795994", "branch_name": "refs/heads/master", "committer_date": 1636814357000, "content_id": "a8c6fa1fbbda8366f719a34926f25a6b6996daa7", "detected_licenses": [ "MIT" ], "directory_id": "629acdf83cf05e8bbe876bcc4dedd4e476ff60f5", "extension": "py", "fi...
2.578125
stackv2
# -*- coding: utf-8 -*- import xml.etree.ElementTree as ET from lxml import etree class Entity(object): TEI_NAMESPACE = "http://www.tei-c.org/ns/1.0" TEI = "{%s}" % TEI_NAMESPACE XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace" XML = "{%s}" % XML_NAMESPACE NSMAP = {None: TEI_NAMESPACE, "xml"...
112
31.71
75
16
879
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_85f24a3d65a38128_9f1d9258", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 2 ]
[ 2 ]
[ 1 ]
[ 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" ]
entities.py
/src/ddhi_aggregator/entities/entities.py
agile-humanities/ddhi-aggregator
MIT
2024-11-18T18:39:45.823818+00:00
1,542,662,335,000
586bdc3ee7abb02109945311c563ca2d20c8e37e
3
{ "blob_id": "586bdc3ee7abb02109945311c563ca2d20c8e37e", "branch_name": "refs/heads/master", "committer_date": 1542662335000, "content_id": "599964c880ca0f346cb09b12db46ddb4db3bd135", "detected_licenses": [ "Apache-2.0" ], "directory_id": "37e9e6257a667eecb079e3757e5c540a039ec51d", "extension": "py"...
2.609375
stackv2
# 1_xml_to_csv.py # Note: substantial portions of this code, expecially the actual XML to CSV conversion, are credit to Dat Tran # see his website here: https://towardsdatascience.com/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9 # and his GitHub here: https://github.com/datit...
150
44.44
155
18
1,574
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_97185584b9575e32_ecf320b0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
2
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 10, 134 ]
[ 10, 134 ]
[ 1, 16 ]
[ 35, 34 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The native Python `xml` library is vulnerable to XML Exter...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
xml_to_csv.py
/Pre-Processing/Augmentation_Toolkit/xml_to_csv.py
beric7/COCO-Bridge
Apache-2.0
2024-11-18T18:39:51.074795+00:00
1,585,944,162,000
50f22674d0372824148186701b8793b239bd069d
2
{ "blob_id": "50f22674d0372824148186701b8793b239bd069d", "branch_name": "refs/heads/master", "committer_date": 1585944162000, "content_id": "4bfdc473175bd89a3a37039cc196a0a0defa7d29", "detected_licenses": [ "MIT" ], "directory_id": "483caeb81061387fe1097bb6bc0e13778985c213", "extension": "py", "fi...
2.3125
stackv2
# -*- coding: utf-8 -*- from .mysql import mysql from .sqlite import sqlite from kcweb import config from kcweb import common class model: table=None fields={} __db=None config=config.database def __init__(self): if not self.table: self.table=self.__class__.__name__ self....
220
26.09
151
16
1,534
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_b70349a0fc9c0d61_33036c45", "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" ]
[ 26 ]
[ 26 ]
[ 9 ]
[ 32 ]
[ "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" ]
model.py
/utill/db/model.py
fengshukun/kcweb
MIT
2024-11-18T18:39:53.311843+00:00
1,580,852,926,000
958f46fec4a640ce0c7042179a055a7d51cecb9b
2
{ "blob_id": "958f46fec4a640ce0c7042179a055a7d51cecb9b", "branch_name": "refs/heads/master", "committer_date": 1580852926000, "content_id": "67a9ac31ba869a4a1666c09d36ee11e7b35d3f14", "detected_licenses": [ "Apache-2.0" ], "directory_id": "dd2a5af3cb7338cf434626d46be64cf76be306ce", "extension": "py"...
2.421875
stackv2
#------------------------------------------------------------------------------- # Name: CLUS_GDAL_Rasterize_VRI # Purpose: This script is designed to read a list of input PostGIS source # Vectors and Rasterize them to GeoTiff using GDAL Rasterize and # then load them into PostGIS...
189
40.51
156
20
2,134
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_37e035776bd78f16_c0c1c811", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
8
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 115, 115, 132, 132 ]
[ 115, 115, 132, 132 ]
[ 9, 44, 9, 44 ]
[ 49, 48, 49, 48 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess'...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW" ]
CLUS_GDAL_Rasterize_VRI.py
/Python/VRI/CLUS_GDAL_Rasterize_VRI.py
ElizabethKleynhans/clus
Apache-2.0
2024-11-18T18:39:56.084935+00:00
1,671,611,487,000
258974f7767b64eae422bdc688f06fff85c9aee9
3
{ "blob_id": "258974f7767b64eae422bdc688f06fff85c9aee9", "branch_name": "refs/heads/master", "committer_date": 1671611487000, "content_id": "81a8474823268faed986932af13fbefe157f0593", "detected_licenses": [ "MIT" ], "directory_id": "c1179a2582304b499026a07e0fceb696239adc31", "extension": "py", "fi...
2.765625
stackv2
#!python3 from xml.etree import ElementTree as et import glob import os import pathlib import string import collections import copy import inspect import shlex import zipfile try: import zlib compression = zipfile.ZIP_DEFLATED except: compression = zipfile.ZIP_STORED class SearchModelContext(collections.M...
103
28.49
86
21
656
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_972abfc4c87aabe6_a7ea718d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 3 ]
[ 3 ]
[ 1 ]
[ 40 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
smmx.py
/scanners/smmx.py
psxvoid/simple-mind-quick-search
MIT
2024-11-18T18:39:58.198406+00:00
1,612,321,096,000
7d9fdebc58e5d419d1e049d1cfb9091413b522f9
3
{ "blob_id": "7d9fdebc58e5d419d1e049d1cfb9091413b522f9", "branch_name": "refs/heads/main", "committer_date": 1612321096000, "content_id": "7f415e5899e10e166069c951d41093f7dc8f3f06", "detected_licenses": [ "MIT" ], "directory_id": "92da826e149485eb59923ac3bbe81a4649eca47f", "extension": "py", "file...
2.96875
stackv2
import sys import numpy as np import pandas as pd from sqlalchemy import create_engine import re import pickle import nltk from nltk.tokenize import word_tokenize,sent_tokenize from nltk.stem import WordNetLemmatizer from nltk.corpus import stopwords from sklearn.metrics import confusion_matrix from sklearn....
158
25.84
130
14
921
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ac0f7f5950790475_1b711990", "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" ]
[ 125 ]
[ 125 ]
[ 5 ]
[ 51 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
train_classifier.py
/models/train_classifier.py
JayaPrakas/udacity_disaster_pipeline
MIT
2024-11-18T18:40:01.906695+00:00
1,522,405,345,000
e9bb616b98d0614b0eceee8a84515fdc17bddb51
3
{ "blob_id": "e9bb616b98d0614b0eceee8a84515fdc17bddb51", "branch_name": "refs/heads/master", "committer_date": 1522405345000, "content_id": "01be7501f6c6c25d33ded3c68566b9e3bd415d1b", "detected_licenses": [ "MIT" ], "directory_id": "e2f9d4359c547c42373157e691ab40ad3cd947c5", "extension": "py", "fi...
2.53125
stackv2
""" Executes benchmarks and filters generated data. .. moduleauthor:: Fabian Hirschmann <fabian@hirschmann.email> :copyright: PenchY Developers 2011-2012, see AUTHORS :license: MIT License, see LICENSE """ import logging import xmlrpclib import signal from penchy.util import load_config, load_job from penchy.log...
85
32.07
81
18
596
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_a8b0193252d4b618_cd7a20d5", "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" ]
[ 11 ]
[ 11 ]
[ 1 ]
[ 17 ]
[ "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" ]
client.py
/penchy/client.py
fhirschmann/penchy
MIT
2024-11-18T18:40:03.098319+00:00
1,507,070,412,000
3d31725efeb72dbaa4390ce5afce5f598af8e2cb
3
{ "blob_id": "3d31725efeb72dbaa4390ce5afce5f598af8e2cb", "branch_name": "refs/heads/master", "committer_date": 1507070412000, "content_id": "3305809bbc33a9d6f5e9611d7623989944040990", "detected_licenses": [ "MIT" ], "directory_id": "ac037e19ac5d7bd2c0947615a52364a14986c9f3", "extension": "py", "fi...
2.78125
stackv2
import os import time import threading from thermometer import Thermometer SAMPLE_SIZE = 10 INTERVAL = 2 LOW_CUTOFF = -30.0 HI_CUTOFF = 600.0 ERR_VAL = -666 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) class Ktype(Thermometer): """ K Type thermocouple using MAX6675 amplifier Runs an executable "...
37
29.86
75
18
308
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_0a4933e7faa91f09_26e2eff5", "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 ]
[ 17 ]
[ 65 ]
[ "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" ]
ktype.py
/thermometers/ktype.py
danielsbonnin/smokerpi
MIT
2024-11-18T18:40:04.431472+00:00
1,545,003,860,000
a2caaae070aca8e1448e676796b09fe626c878dd
2
{ "blob_id": "a2caaae070aca8e1448e676796b09fe626c878dd", "branch_name": "refs/heads/master", "committer_date": 1545003860000, "content_id": "31afba31df465637328219cb7cded0dde605483b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "516816cf06033962cff9dfab6ac2937ad3a48cec", "extension": "py"...
2.34375
stackv2
import json from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.models import User from v1.accounts.models import Profile from v1.accounts.validators.authenticate import ( verify_auth, is_owner ) @csrf_exempt def update_profile_view(req): data ...
32
35.44
74
15
236
python
[{"finding_id": "semgrep_rules.python.django.security.audit.no-csrf-exempt_19e5dfa12cd47c05_ceb4ac13", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.no-csrf-exempt", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected usage of @csrf_exempt, which indicate...
1
true
[ "CWE-352" ]
[ "rules.python.django.security.audit.no-csrf-exempt" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 11 ]
[ 32 ]
[ 1 ]
[ 74 ]
[ "A01:2021 - Broken Access Control" ]
[ "Detected usage of @csrf_exempt, which indicates that there is no CSRF token set for this route. This could lead to an attacker manipulating the user's account and exfiltration of private data. Instead, create a function without this decorator." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
update_profile.py
/Backend/v1/accounts/views/update_profile.py
softbenefits000/Django-Project
Apache-2.0
2024-11-18T18:40:08.684886+00:00
1,556,970,572,000
d1423e864da501f4846914b8d872647553c9b197
3
{ "blob_id": "d1423e864da501f4846914b8d872647553c9b197", "branch_name": "refs/heads/master", "committer_date": 1556970572000, "content_id": "83a7ee297ff6d9dc32cfb3c18ed864e642f745f2", "detected_licenses": [ "MIT" ], "directory_id": "043ec7d1a8e2959e8d322f67129143a159d8bad1", "extension": "py", "fi...
2.609375
stackv2
import requests import tarfile import os import json def download_pkg(pkg): print('==> Collecting %s' % pkg) url = "https://pypi.org/pypi/%s/json" % pkg meta_data = requests.get(url).json() link = meta_data['urls'][0]['url'] pkg_name = link.split('/')[-1] print(' -> Downloding %s' % link) ...
36
24.53
65
16
264
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_cd423f153df73bcd_fbd89b23", "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 ...
7
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" ]
[ 35, 36 ]
[ 35, 36 ]
[ 5, 5 ]
[ 29, 56 ]
[ "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" ]
pypi.py
/emptool/pypi.py
EasyMicroPython/EMP-TOOL
MIT
2024-11-18T18:40:14.335755+00:00
1,521,477,781,000
6fce042ac3ea442d4133bb3d82a9a274f845d004
2
{ "blob_id": "6fce042ac3ea442d4133bb3d82a9a274f845d004", "branch_name": "refs/heads/master", "committer_date": 1521477781000, "content_id": "24bb7862565e711a483a7e1057838409b2cb53ab", "detected_licenses": [ "MIT" ], "directory_id": "1bcebf9f4c205872670379369a288b1e212886eb", "extension": "py", "fi...
2.390625
stackv2
import os import os.path import sys import torch import torch.utils.data as data import torchvision.transforms as transforms from PIL import Image, ImageDraw, ImageFont import cv2 import numpy as np import boto3 import tempfile if sys.version_info[0] == 2: import xml.etree.cElementTree as ET else: import xml....
176
33.75
117
18
1,551
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_418d434430a1124a_f33c692d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
8
true
[ "CWE-611", "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 15, 17, 140 ]
[ 15, 17, 140 ]
[ 5, 5, 18 ]
[ 40, 39, 36 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The Python documentation recommends using `defusedxml` ins...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
bhjc.py
/data/bhjc20180123_bball/bhjc.py
keithdlandry/ssd.pytorch
MIT
2024-11-18T20:52:22.989998+00:00
1,626,962,413,000
fa2df6c7f31f40dafa6215d3d4691605674c9738
3
{ "blob_id": "fa2df6c7f31f40dafa6215d3d4691605674c9738", "branch_name": "refs/heads/main", "committer_date": 1626962413000, "content_id": "cece1d1ca150c2c525cd177b2e66a3574ab35d1e", "detected_licenses": [ "MIT" ], "directory_id": "ecb8914e309afd09d798b2aafa5511ac1c40ccdf", "extension": "py", "file...
2.765625
stackv2
import os.path import pickle from typing import Tuple, List from folder import Folder def load_cv_object_ids( filepath: str = os.path.join(Folder.FOLD, 'train_validation_object_ids.pkl') ) -> Tuple[List[str], List[str]]: """[summary] Parameters ---------- filepath : str, optional [descri...
25
29.64
97
11
181
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5e86d1be13521d79_add003ef", "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" ]
[ 24 ]
[ 24 ]
[ 27 ]
[ 41 ]
[ "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" ]
cross_validation.py
/scripts/cross_validation.py
Quvotha/atmacup11
MIT
2024-11-18T18:46:58.849712+00:00
1,466,891,244,000
470bd9a8e440434e43a31751e25ee343199f12db
3
{ "blob_id": "470bd9a8e440434e43a31751e25ee343199f12db", "branch_name": "refs/heads/master", "committer_date": 1466891244000, "content_id": "7d6adafdc905039aeb47a6bf326108dffce2dbef", "detected_licenses": [ "MIT" ], "directory_id": "fc7a28107c2b3697917c348252ee987509c3270e", "extension": "py", "fi...
2.71875
stackv2
""" The MIT License (MIT) Copyright (c) 2016 Jake Lussier (Stanford University) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
147
34.44
84
14
1,273
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_858a87d668c8a96e_24158a42", "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" ]
[ 75 ]
[ 75 ]
[ 45 ]
[ 54 ]
[ "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" ]
general_utils.py
/backend/python/utils/general_utils.py
fridgeresearch/kitchen
MIT
2024-11-18T18:47:03.297154+00:00
1,507,551,189,000
357ae40fd7e870c6462505d62c7120c1569d0a95
3
{ "blob_id": "357ae40fd7e870c6462505d62c7120c1569d0a95", "branch_name": "refs/heads/master", "committer_date": 1507551189000, "content_id": "5260179471f1fed19d39b1ff49d547d8911af870", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8817539e2bb026efcf08101c79b7c1fb98adc8d9", "extension": "py"...
2.9375
stackv2
# predict.py: Uses a previously trained TensorFlow model to make predictions on a test set # Copyright 2016 Ramon Vinas # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apac...
77
42.61
108
11
755
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0b7fad8d01220826_67f483ed", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 32 ]
[ 32 ]
[ 14 ]
[ 28 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
predict.py
/predict.py
sylimu/lstm_bigdata
Apache-2.0
2024-11-18T18:47:03.932052+00:00
1,579,684,526,000
e67b97d14885f91df5bb3b304f14139717602ac1
3
{ "blob_id": "e67b97d14885f91df5bb3b304f14139717602ac1", "branch_name": "refs/heads/master", "committer_date": 1579684526000, "content_id": "723384413f9dcf4f54585f637e7e16c98335e0ff", "detected_licenses": [ "MIT" ], "directory_id": "81db4df1f1a98ba6e24026a221421cba05e70ba4", "extension": "py", "fi...
2.796875
stackv2
#!/usr/bin/python3 import requests import sys import os import hashlib from pymarkovchain import MarkovChain API_URI = "http://lyrics.wikia.com/api.php?action=lyrics&fmt=realjson" if __name__ == '__main__': if len(sys.argv) != 3: raise "Usage: python3 py-simple-lyric-generator \"[Save Slot]\" [number_of_phrases_t...
51
33.06
132
15
489
python
[{"finding_id": "semgrep_rules.python.lang.correctness.exceptions.raise-not-base-exception_86961ff9b91986e8_c89bc08f", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.exceptions.raise-not-base-exception", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "In Python3...
8
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 34, 34 ]
[ 34, 34 ]
[ 14, 14 ]
[ 52, 52 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
generate.py
/module/Assistant/extension/Assistant_LiteratureGenerator_Ported/code/generate.py
Questandachievement7Developer/q7os
MIT
2024-11-18T18:47:04.046867+00:00
1,614,199,198,000
cca4995d1a3ca202df47c456cd761c15f848bcdc
3
{ "blob_id": "cca4995d1a3ca202df47c456cd761c15f848bcdc", "branch_name": "refs/heads/main", "committer_date": 1614199198000, "content_id": "73cc5a285aa68316d9d4a6ba8c014e5fde13cf20", "detected_licenses": [ "MIT" ], "directory_id": "4f525bd48e675f6446022e63daa63d53c1361526", "extension": "py", "file...
3.109375
stackv2
import argparse import glob import h5py import numpy as np import PIL.Image as pil_image from util import rgb2y def scale_ops(hr): # --- image resizing & preparation --- hr_width = (hr.width // args.scale) * args.scale hr_height = (hr.height // args.scale) * args.scale # resize to a multiple of 3 to g...
95
31.75
86
17
802
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_8d14e3a3beee217a_8f451c29", "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" ]
[ 94 ]
[ 94 ]
[ 9 ]
[ 19 ]
[ "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" ]
prepare.py
/Torch/prepare.py
Fivefold/SRCNN
MIT
2024-11-18T18:47:05.653861+00:00
1,553,113,532,000
8a1a8fd467f6c1598913d1feb2bdc84a6dcff637
3
{ "blob_id": "8a1a8fd467f6c1598913d1feb2bdc84a6dcff637", "branch_name": "refs/heads/master", "committer_date": 1553113532000, "content_id": "a8bad410ee4bd8194ee65e67c1aa373bba78cbb1", "detected_licenses": [ "MIT" ], "directory_id": "b5bc791096ba657a2e2492641a3c09d21f3a2c2d", "extension": "py", "fi...
2.828125
stackv2
import subprocess from exception.client import ClientException from util.client_utils import clear_terminal_chars class SimpleClientManager: def __init__(self, client_path, verbose=None) -> None: super().__init__() self.verbose = verbose self.client_path = client_path def send_reques...
43
28.98
128
16
268
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_3a9eca0a57cce4b3_4530fed0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 19, 19 ]
[ 19, 19 ]
[ 19, 53 ]
[ 106, 57 ]
[ "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" ]
simple_client_manager.py
/src/cli/simple_client_manager.py
Twente-Mining/tezos-reward-distributor
MIT
2024-11-18T20:58:18.879461+00:00
1,627,640,358,000
be694ca7b15458d0813c47d26203a79ba25328be
3
{ "blob_id": "be694ca7b15458d0813c47d26203a79ba25328be", "branch_name": "refs/heads/master", "committer_date": 1627640358000, "content_id": "3271b11c886b192add26e73eaef18851b9ae9d05", "detected_licenses": [ "Apache-2.0" ], "directory_id": "eca443cc1c26b9c831992fb34abdd4d9a8a4e0f5", "extension": "py"...
2.75
stackv2
import optparse import pickle #converts urls to wiki_id parser = optparse.OptionParser() parser.add_option('-i','--input', dest = 'input_file', help = 'input_file') parser.add_option('-o','--output', dest = 'output_file', help = 'output_file') (options, args) = parser.parse_args() if options.input_file is None: ...
133
21.85
94
18
733
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_6f3f9fb6fd4b8495_4007168d", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
4
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 133 ]
[ 133 ]
[ 1 ]
[ 95 ]
[ "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" ]
page_links_to_edge_list_wiki.py
/scripts/old/page_links_to_edge_list_wiki.py
D2KLab/entity2vec
Apache-2.0
2024-11-18T19:09:59.532731+00:00
1,605,168,502,000
6ebea4fee8a2596afafac0867efb88995a9add3f
2
{ "blob_id": "6ebea4fee8a2596afafac0867efb88995a9add3f", "branch_name": "refs/heads/master", "committer_date": 1605168502000, "content_id": "eba3e73030e077605fa94ba7d906d8a044ff3701", "detected_licenses": [ "MIT" ], "directory_id": "2e280cbdb5b24af6e216a09f246a7e009dea7141", "extension": "py", "fi...
2.46875
stackv2
import logging import operator import os import pickle import socket import time import coloredlogs import torch import torchvision from matplotlib import pyplot as plt from Utils.shortcuts import get_logger plt.switch_backend("Agg") def build_logger(folder=None, args=None, logger_name=None): FORMAT = "%(ascti...
119
30.84
80
18
915
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f7e6177d14043997_26061525", "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" ]
[ 119 ]
[ 119 ]
[ 13 ]
[ 39 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
logger.py
/DeepEBM/Utils/checkpoints/logger.py
pkulwj1994/FD-ScoreMatching
MIT
2024-11-18T19:10:00.318060+00:00
1,504,601,945,000
bc7595ce7e96f46190dca472d746a75055af62df
2
{ "blob_id": "bc7595ce7e96f46190dca472d746a75055af62df", "branch_name": "refs/heads/master", "committer_date": 1504601945000, "content_id": "3b81a27c3b4345e5456a1d56a1960a7a83e42af8", "detected_licenses": [ "MIT" ], "directory_id": "a3a9b63b9b2cac05be8e6a2727aebdcf334395c4", "extension": "py", "fi...
2.453125
stackv2
# -*- test-case-name: xmantissa.test.test_websession -*- # Copyright 2005 Divmod, Inc. See LICENSE file for details """ Sessions that persist in the database. Every L{SESSION_CLEAN_FREQUENCY} seconds, a pass is made over all persistent sessions, and those that are more than L{PERSISTENT_SESSION_LIFETIME} seconds ol...
396
32.9
84
16
2,799
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.directly-returned-format-string_a0606fa0192dfee5_096f1fe2", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.directly-returned-format-string", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected Fl...
1
true
[ "CWE-79" ]
[ "rules.python.flask.security.audit.directly-returned-format-string" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 293 ]
[ 293 ]
[ 13 ]
[ 30 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected Flask route directly returning a formatted string. This is subject to cross-site scripting if user input can reach the string. Consider using the template engine instead and rendering pages with 'render_template()'." ]
[ 5 ]
[ "HIGH" ]
[ "MEDIUM" ]
websession.py
/xmantissa/websession.py
isabella232/mantissa
MIT
2024-11-18T20:15:43.794471+00:00
1,553,947,464,000
6c79be39237b0545d805788364741b74f17e92a3
2
{ "blob_id": "6c79be39237b0545d805788364741b74f17e92a3", "branch_name": "refs/heads/master", "committer_date": 1553947464000, "content_id": "82a6fa83d092a5882db2fa82fc54c89c77ef740e", "detected_licenses": [ "MIT" ], "directory_id": "bf9d7bc2406e317726ed6583243aaafd73d71d4c", "extension": "py", "fi...
2.359375
stackv2
"""Author: Brandon Trabucco, Copyright 2019 Loads images from the conceptual captions dataset and trains a show and tell model.""" import tensorflow as tf import pickle as pkl import os import time import numpy as np import itertools from tensorflow.contrib.slim.python.slim.nets.resnet_v2 import resnet_v2_101 from te...
171
49.24
126
20
2,113
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7d301f72c3d35dc3_c0401502", "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" ]
[ 96 ]
[ 96 ]
[ 25 ]
[ 36 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
up_down.py
/up_down.py
zmskye/conceptual_captions
MIT
2024-11-18T20:15:46.648569+00:00
1,644,885,874,000
7037cfcfdf0d7fdd860cbe695ae367173e3babe2
3
{ "blob_id": "7037cfcfdf0d7fdd860cbe695ae367173e3babe2", "branch_name": "refs/heads/master", "committer_date": 1644885874000, "content_id": "01e0e028e02871b36113d7ef9e983db539e2bc9f", "detected_licenses": [ "MIT" ], "directory_id": "8e5e5bb63357ac0dbe22c43b8c3c1374b7c263c7", "extension": "py", "fi...
2.59375
stackv2
# Created by Rudy Pikulik 04/17 # Forked by Tim Clifford 12/17 # Last updated 12/17 import praw import pickle import time from random import choice from Structures.Queue import Queue GARLIC = [ 'https://i.imgur.com/dYGNvmR.jpg', 'https://i.imgur.com/etMqixE.jpg', 'https://i.imgur.com/NHbZOT6.jpg', 'htt...
203
35.59
115
17
1,813
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ca24cd6c46345092_3f271e46", "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...
15
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 45, 48, 94, 99, 136, 137, 176, 180, 183, 186, 197, 202 ]
[ 45, 48, 94, 99, 136, 137, 176, 180, 183, 186, 197, 202 ]
[ 17, 16, 12, 5, 20, 18, 17, 9, 18, 9, 21, 13 ]
[ 46, 52, 48, 47, 56, 56, 46, 45, 54, 53, 50, 49 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserial...
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
garlicbot.py
/RedditBotCore/garlicbot.py
tim-clifford/RedditGarlicRobot
MIT
2024-11-18T20:15:47.824924+00:00
1,590,014,526,000
cb271fee9a9002df0ba423467e9e862cfb381529
2
{ "blob_id": "cb271fee9a9002df0ba423467e9e862cfb381529", "branch_name": "refs/heads/master", "committer_date": 1590014526000, "content_id": "ff1195a0652ca2885ae300825d538c9f98a57bc5", "detected_licenses": [ "MIT" ], "directory_id": "2999d161a66e7f41dc40a6f1e719b0954a96973d", "extension": "py", "fi...
2.40625
stackv2
# !pip install from __future__ import print_function import io import os.path import pickle from google.auth.transport.requests import Request from google_auth_oauthlib.flow import InstalledAppFlow from googleapiclient.discovery import build # If modifying these scopes, delete the file token.pickle. from googleapicli...
75
42.52
116
23
663
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e1f5335193f45d60_94b0d262", "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" ]
[ 62, 73 ]
[ 62, 73 ]
[ 25, 17 ]
[ 43, 42 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
gSheetDownloader.py
/scripts/gSheetDownloader.py
Elyspio/robocup_pepper-scenario_data_generator
MIT
2024-11-18T20:15:52.068309+00:00
1,588,836,473,000
8fbb99967f0a34e91e27b691cdad74d5d534fd1b
2
{ "blob_id": "8fbb99967f0a34e91e27b691cdad74d5d534fd1b", "branch_name": "refs/heads/master", "committer_date": 1588836473000, "content_id": "e80c6b9692a068ea24ea6aa85ebfa60eef590b72", "detected_licenses": [ "MIT" ], "directory_id": "b197eb7d40d03a96217776e3f88b91c7ff1ec368", "extension": "py", "fi...
2.46875
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ run all flux convert and inventory runs Things to change if rerun is needed: - path - volumesandmats.txt """ import matplotlib.pyplot as plt import os import numpy as np outputfile='NESSA-Neutron-Openo' path='NESSA0505open' sourceRate=1e11 #1/s materia...
169
33.14
144
21
1,771
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_194bce666e34c12c_30daa353", "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...
20
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-c...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "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" ]
[ 56, 63, 68, 73, 78, 83, 117, 118, 119, 140, 141, 142, 143, 144, 146 ]
[ 56, 63, 68, 73, 78, 83, 117, 118, 119, 140, 141, 142, 143, 144, 146 ]
[ 46, 16, 16, 16, 16, 16, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ 83, 64, 62, 62, 62, 62, 86, 78, 80, 56, 56, 58, 56, 46, 65 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01...
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "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" ]
runAllFluxConvert.py
/runAllFluxConvert.py
ezsolti/FGS2Mbackup
MIT
2024-11-18T20:15:57.750120+00:00
1,565,870,709,000
fcee7b7ae27e31d5ce7011187041f437a153ff30
2
{ "blob_id": "fcee7b7ae27e31d5ce7011187041f437a153ff30", "branch_name": "refs/heads/master", "committer_date": 1565870709000, "content_id": "2cae82456e034a9583df06a9086d2073ebb55579", "detected_licenses": [ "MIT" ], "directory_id": "416b6873f605a1fba85999956889bb7a7e7f05c3", "extension": "py", "fi...
2.484375
stackv2
from core.logger import Logger from core.database import Database import argparse logger = Logger() db = Database() arg_parser = argparse.ArgumentParser(description='Segment trajectories.') arg_parser.add_argument('dbname', help='The database name.', type=str) arg_parse...
285
38.7
122
14
2,701
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_1988414227e14f24_3a38136b", "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" ]
[ 176 ]
[ 176 ]
[ 5 ]
[ 35 ]
[ "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" ]
trajectory_filtering.py
/dataset-utils/trajectory_filtering.py
falcaopetri/trajectory-data
MIT
2024-11-18T20:16:00.249116+00:00
1,692,453,874,000
439f1ad8009adccaca295aff3afbcb1fa981d828
3
{ "blob_id": "439f1ad8009adccaca295aff3afbcb1fa981d828", "branch_name": "refs/heads/master", "committer_date": 1692453874000, "content_id": "a4c25dbe635d43277245eaa72ec7605d740af394", "detected_licenses": [ "MIT" ], "directory_id": "d05c946e345baa67e7894ee33ca21e24b8d26028", "extension": "py", "fi...
2.859375
stackv2
from sklearn.neural_network import MLPClassifier from sklearn.metrics import accuracy_score from utils import load_data import os import pickle # load RAVDESS dataset X_train, X_test, y_train, y_test = load_data(test_size=0.25) # print some details # number of samples in training data print("[+] Number of training s...
50
27.36
61
8
373
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_bda2f11476aac5e8_cc0ad261", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 50 ]
[ 50 ]
[ 1 ]
[ 62 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
ser.py
/machine-learning/speech-emotion-recognition/ser.py
x4nth055/pythoncode-tutorials
MIT
2024-11-18T20:16:01.186573+00:00
1,521,490,617,000
f697dd21d273b80246e12ef8afac9238f88e9e52
3
{ "blob_id": "f697dd21d273b80246e12ef8afac9238f88e9e52", "branch_name": "refs/heads/master", "committer_date": 1521490617000, "content_id": "4cbbfff7052b638fde346f7d1e276d26742079da", "detected_licenses": [ "MIT" ], "directory_id": "bc955feefe7f07ff338994280af9b6dfece23682", "extension": "py", "fi...
2.96875
stackv2
import os from time import time import PIL.ImageGrab import cv2 import numpy as np from lib.condition import wait_for MIN_SIM = 0.92 WAIT_TIME = 5 class Controller: def __init__(self): self.directory = os.path.dirname(os.path.dirname(__file__)) self.binary_cliclick = '{0}/bin/cliclick'.format(s...
94
47.73
120
16
1,168
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_d4884b693b5056f6_f4884d42", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
8
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-c...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 27, 38, 42, 43, 44, 48, 52, 53 ]
[ 27, 38, 42, 43, 44, 48, 52, 53 ]
[ 9, 9, 9, 9, 9, 9, 9, 9 ]
[ 86, 87, 62, 86, 62, 86, 86, 70 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
controller.py
/lib/controller.py
andriykislitsyn/ApplePie
MIT
2024-11-18T20:16:04.291997+00:00
1,607,614,809,000
ce8ef0ddaa6148f09883b0b1ddb1f6bc58259745
2
{ "blob_id": "ce8ef0ddaa6148f09883b0b1ddb1f6bc58259745", "branch_name": "refs/heads/master", "committer_date": 1607614809000, "content_id": "5372a488881000ac731f03d4b31a6237ea55b947", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b324bf6e5eff78440c7fe597e97253a86a2f0e6b", "extension": "py"...
2.484375
stackv2
import json import sqlite3 import subprocess from dotenv import load_dotenv from os import getenv load_dotenv() db = getenv('db_filepath') folder = getenv('folder') def create_connection(db_file): connect = None try: connect = sqlite3.connect(db_file) print("connect success") return c...
58
36.48
108
12
518
python
[{"finding_id": "semgrep_rules.python.correctness.suppressed-exception-handling-finally-break_d1af45eb4206f6ed_a9db79df", "tool_name": "semgrep", "rule_id": "rules.python.correctness.suppressed-exception-handling-finally-break", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Ha...
7
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.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" ]
[ 41, 41, 41, 58, 58, 58 ]
[ 41, 41, 41, 58, 58, 58 ]
[ 5, 22, 59, 5, 22, 56 ]
[ 64, 51, 63, 61, 48, 60 ]
[ "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()'.", "Detected subprocess funct...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "HIGH", "LOW", "MEDIUM", "HIGH" ]
[ "HIGH", "MEDIUM", "LOW", "HIGH", "MEDIUM", "LOW" ]
sam_records_json_reports.py
/sam_records_json_reports.py
Varigarble/serial-number-format-validator
Apache-2.0
2024-11-18T20:16:05.162325+00:00
1,595,052,734,000
b6ec9fe5bee30d885bf25791ae32db5d0c635dcf
2
{ "blob_id": "b6ec9fe5bee30d885bf25791ae32db5d0c635dcf", "branch_name": "refs/heads/master", "committer_date": 1595052734000, "content_id": "0bfac47bde911cc38d5ef921f6060fa37673206b", "detected_licenses": [ "MIT" ], "directory_id": "a8b0832819d97010a071ff59615aa6fd163f4eca", "extension": "py", "fi...
2.390625
stackv2
import argparse import pickle as pkl import numpy as np import tensorflow as tf import params import model as model FLAGS = None def remove_eos(sentence, eos = '<EOS>', pad = '<PAD>'): if eos in sentence: return sentence[:sentence.index(eos)] + '\n' elif pad in sentence: return sentence[:sent...
172
45.41
140
19
1,761
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_bbddfff95784592f_c805a0b5", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 22 ]
[ 22 ]
[ 20 ]
[ 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
/main.py
yanghoonkim/NQG_ASs2s
MIT
2024-11-18T20:16:05.820351+00:00
1,435,580,900,000
0f8f8c2a132dc4b5f32f59e3caeec2ca41fa62fd
2
{ "blob_id": "0f8f8c2a132dc4b5f32f59e3caeec2ca41fa62fd", "branch_name": "refs/heads/master", "committer_date": 1435580900000, "content_id": "3d645751e738fe862b42f2f2f4e85fd3d1f828ce", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "48894ae68f0234e263d325470178d67ab313c73e", "extension": "p...
2.328125
stackv2
## -*- coding: utf-8 -*- ##---------------------------------------------------------------------- ## Various utilities ##---------------------------------------------------------------------- ## Copyright (C) 2007-2014 The NOC Project ## See LICENSE for details ##--------------------------------------------------------...
75
30.29
72
17
480
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_a3748e6309cda9f2_794f8130", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ...
10
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.p...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 34, 34, 39, 39, 45, 45, 57, 57, 62, 62 ]
[ 35, 35, 40, 40, 45, 45, 58, 58, 63, 63 ]
[ 23, 23, 23, 23, 26, 26, 23, 23, 23, 23 ]
[ 72, 72, 69, 69, 67, 67, 72, 72, 69, 69 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserial...
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead t...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
utils.py
/pm/pmwriter/utils.py
DreamerDDL/noc
BSD-3-Clause
2024-11-18T20:16:07.081949+00:00
1,569,962,969,000
50ea31be027e63c0163a1bc09635a412e96456d2
2
{ "blob_id": "50ea31be027e63c0163a1bc09635a412e96456d2", "branch_name": "refs/heads/master", "committer_date": 1569962969000, "content_id": "8ef7493098b631b296444c1f19ec67c812fee7a2", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "dba1d1f78767ed28af327af9adf445a574d87c42", "extension": "p...
2.328125
stackv2
import uuid from app.db.model import RequestState, RequestType, Request, DocumentState, TextRegion, TextLine, Annotation from app.db.general import get_document_by_id, get_request_by_id, get_image_by_id, get_text_region_by_id, get_text_line_by_id from app.db import db_session from flask import jsonify, current_app impo...
83
45.58
133
17
832
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_962b6d8c3efa09f9_9a772336", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
2
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 6, 41 ]
[ 6, 41 ]
[ 1, 16 ]
[ 35, 34 ]
[ "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" ]
general.py
/app/ocr/general.py
Endrych/pero_ocr_web
BSD-2-Clause
2024-11-18T19:23:05.301928+00:00
1,492,122,467,000
808f7540cec211a8a7ca0fd2d8423970b0825525
3
{ "blob_id": "808f7540cec211a8a7ca0fd2d8423970b0825525", "branch_name": "refs/heads/master", "committer_date": 1492122467000, "content_id": "3642ee5b60f552cb8b3de41d05a0f6fd4eac2021", "detected_licenses": [ "MIT" ], "directory_id": "57c77501abeb30838fa822dcf31708fc7a0847c5", "extension": "py", "fi...
2.765625
stackv2
import threading import subprocess import os class TestExecutor(threading.Thread): """ The general thread to perform the tests executions """ def __init__(self, run_id, test_name, queue): super().__init__() self.run_id = run_id self.test_name = test_name self.queue = q...
32
29.06
77
13
218
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ce4be6259c90f6f9_33e19a11", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 30, 30 ]
[ 30, 30 ]
[ 27, 64 ]
[ 69, 68 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
executor.py
/scheduler/executor.py
yangjourney/test-manager
MIT
2024-11-18T19:23:05.405997+00:00
1,513,375,715,000
059fa0e9f820fdd259f715cdc0d5379992010214
3
{ "blob_id": "059fa0e9f820fdd259f715cdc0d5379992010214", "branch_name": "refs/heads/master", "committer_date": 1513375715000, "content_id": "3a962ac4309a59bffa62234e37a7ab02c30c188d", "detected_licenses": [ "MIT" ], "directory_id": "3f8f165b3a0deab912e98f291640530f9e7b4f9d", "extension": "py", "fi...
3.15625
stackv2
import pandas as pd import matplotlib.pyplot as plt import pickle with open('naive_bayes/train_prediction.p', 'rb') as file: train_prediction = pickle.load(file) wrong = train_prediction[train_prediction['after'] != train_prediction['predicted']] # Examine whether the tokens are transformed transform_ratio = sum...
40
41.6
87
10
387
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f87f62b0a3f870b5_fb7da844", "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" ]
[ 6 ]
[ 6 ]
[ 24 ]
[ 41 ]
[ "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" ]
error_analysis_token_nb.py
/naive_bayes/error_analysis_token_nb.py
chris522229197/iTalk
MIT
2024-11-18T19:23:06.309977+00:00
1,563,233,406,000
d868ea090a733a04664cb48ed4c09b2648e6326b
3
{ "blob_id": "d868ea090a733a04664cb48ed4c09b2648e6326b", "branch_name": "refs/heads/master", "committer_date": 1563233406000, "content_id": "ac8da7845e95c449fc4c25c9f01e88b096aeb515", "detected_licenses": [ "MIT" ], "directory_id": "cdc4da1b1fa3f241fc7152da5d2278d408945dbc", "extension": "py", "fi...
2.75
stackv2
import pygame from random import randint, choice import config # tutorial: import tutorial tutorial.__dict__ # because flake8 ;-; # Boiler-plate: pygame.init() window = pygame.display.set_mode((config.window_width, config.window_height)) pygame.display.set_caption(config.window_title) clock = pygame.time.Clock() all...
381
34.67
100
17
3,033
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_7e6817c924d235b3_3317cd95", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
3
true
[ "CWE-95", "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 348, 353, 357 ]
[ 348, 353, 357 ]
[ 25, 22, 25 ]
[ 36, 33, 36 ]
[ "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.", "Detected the use of eval(). eval() can be dangerous if used...
[ 5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
main.py
/just_jaguars/main.py
python-discord/code-jam-5
MIT
2024-11-18T19:23:06.783049+00:00
1,619,456,990,000
1dec05c548af0ec65328ecf05da464221e04206c
3
{ "blob_id": "1dec05c548af0ec65328ecf05da464221e04206c", "branch_name": "refs/heads/main", "committer_date": 1619456990000, "content_id": "bdefaea6dc31d13efa9462081de3ccb5da620721", "detected_licenses": [ "MIT" ], "directory_id": "1aac782ec29aa67558448085e4562bf1679c7e9e", "extension": "py", "file...
2.515625
stackv2
import time import unittest import pickle import csv import os.path # < -- For checking if the file exists from os import path # < -- For checking if the file exists from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.common...
160
41.21
179
19
1,411
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_950f30669d7dc9e8_9330a083", "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...
10
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, 74 ]
[ 61, 74 ]
[ 13, 23 ]
[ 173, 155 ]
[ "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" ]
intento3.py
/intento3.py
Chrisvimu/tesseract-python
MIT
2024-11-18T19:23:07.769879+00:00
1,626,464,490,000
6dee853b7c0c68eace46353d5ca2838243689107
2
{ "blob_id": "6dee853b7c0c68eace46353d5ca2838243689107", "branch_name": "refs/heads/master", "committer_date": 1626464490000, "content_id": "bfd809f56ae955a503f32fcde3545137be459a69", "detected_licenses": [ "MIT" ], "directory_id": "a26c6a4ed61440b3b62771aeea31ef467f51fab3", "extension": "py", "fi...
2.4375
stackv2
import sys import os import numpy as np import scipy import cv2 from common.utils import readPlaneLocations, readCase import matplotlib.pyplot as plt sys.path.append('/export/home/pcorrado/.local/bin') import streamlit as st import OneShotCNN.Model as oneShotModel import OneShotCNN.DataGenerator as generator import ten...
181
39.5
153
21
2,345
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_d5fa1faf25aedc4d_c0338cf7", "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" ]
[ 120 ]
[ 120 ]
[ 5 ]
[ 57 ]
[ "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" ]
streamlit_app.py
/streamlit_app.py
pcorrado/DL-Vessel-Localization
MIT
2024-11-18T19:38:01.581438+00:00
1,582,515,041,000
7719c8491758bfd42f2cdfd254446faf83ea5da9
3
{ "blob_id": "7719c8491758bfd42f2cdfd254446faf83ea5da9", "branch_name": "refs/heads/master", "committer_date": 1582515041000, "content_id": "8a66cdc81089d3db287b789b7c175aa87b45817e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f8a9c2b00c7667a24560fb8ae6d75f546c3384a7", "extension": "py"...
3.234375
stackv2
import speech_recognition as sr import pygame import time from pynput import mouse def recognize_speech_from_mic(recognizer, microphone): # check that recognizer and microphone arguments are appropriate type if not isinstance(recognizer, sr.Recognizer): raise TypeError("`recognizer` must be `Recognize...
134
27.02
87
16
804
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_b7cd6df16a5e391b_b8859da6", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `checkclick` is...
3
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 133 ]
[ 133 ]
[ 9 ]
[ 22 ]
[ "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" ]
api.py
/Google API/api.py
baokhanh92/Voice_detection_API_controlling
Apache-2.0
2024-11-18T19:38:08.144040+00:00
1,551,892,655,000
f1c7fc6a6a8c2d659b5b547ad6827c17b8d5b1b6
3
{ "blob_id": "f1c7fc6a6a8c2d659b5b547ad6827c17b8d5b1b6", "branch_name": "refs/heads/master", "committer_date": 1551892655000, "content_id": "d4e418f3ba20d8771108f20772a7130b6442b17e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4acba479a4ae2deb08bcc89302fb612049a1dbca", "extension": "py"...
2.71875
stackv2
#!/usr/bin/python # # Get interface operational state using NETCONF # # darien@sdnessentials.com # from interfaces import Interface from ncclient import manager import re import sys import xml.dom.minidom # the variables below assume the user is requesting access # to a IOS-XE device running in the DevNet Always On ...
95
36.42
105
18
760
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_71027367ff356097_58bccd31", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
2
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 12 ]
[ 12 ]
[ 1 ]
[ 23 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
get_interfaces_csr1000V.py
/netconf-103/get_interfaces_csr1000V.py
CiscoDevNet/netconf-examples
Apache-2.0
2024-11-18T19:38:10.538037+00:00
1,670,925,117,000
4b99b9e06468854046cb3d13f154fe930f086364
3
{ "blob_id": "4b99b9e06468854046cb3d13f154fe930f086364", "branch_name": "refs/heads/master", "committer_date": 1670925117000, "content_id": "a439cabb4a5ecb88b9d1c7eb4982540393c1a73f", "detected_licenses": [ "MIT" ], "directory_id": "85373d45a83e4096affafa4f4e5b400787413e57", "extension": "py", "fi...
3.09375
stackv2
import re import pickle import sys from collections import Counter if __name__ == '__main__': def all_words(text): return re.findall(r'\w+', text.upper()) def create_corpus(text_filename, corpus_filename): words = Counter(all_words(open(text_filename).read())) sum_of_words = sum(wor...
24
22.33
62
16
130
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3bfc7999d6592c77_3537e6b7", "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" ]
[ 19 ]
[ 19 ]
[ 13 ]
[ 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" ]
corpus_creator.py
/src/utils/corpus_creator/corpus_creator.py
keiffster/program-y
MIT
2024-11-18T19:38:10.875289+00:00
1,678,439,299,000
7dd49c3103795745e9b3c4792e7825749155e21b
2
{ "blob_id": "7dd49c3103795745e9b3c4792e7825749155e21b", "branch_name": "refs/heads/main", "committer_date": 1678439299000, "content_id": "3f63cbf3062c4761592f4cef023ed3840130c751", "detected_licenses": [ "MIT" ], "directory_id": "22f7e831f11d61789712dd59f96b8d02b1dea926", "extension": "py", "file...
2.375
stackv2
import json, pickle import logging from typing import Any, Dict, List, Tuple, Optional, Iterable from copy import deepcopy import numpy as np from allennlp.data.fields import MetadataField, ArrayField from overrides import overrides from allennlp.common.file_utils import cached_path from allennlp.data.dataset_readers...
320
45.49
151
22
3,168
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_19339ece72be429e_60cecc0d", "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" ]
[ 160, 172 ]
[ 160, 172 ]
[ 35, 27 ]
[ 60, 52 ]
[ "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" ]
seq2seq_transformer_reader.py
/denoising_event_lm/data/dataset_readers/seq2seq/seq2seq_transformer_reader.py
jjasonn0717/TemporalBART
MIT
2024-11-18T19:38:12.595961+00:00
1,682,433,340,000
295b5a8780a162029c98e77d2397e0b5d36f3c09
3
{ "blob_id": "295b5a8780a162029c98e77d2397e0b5d36f3c09", "branch_name": "refs/heads/master", "committer_date": 1682433340000, "content_id": "126fecd471a1dde420a938e564e59203e97766c0", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "afdba742744666c81681f11645aba24f2bf52877", "extension": "p...
2.96875
stackv2
# (Be in -*- python -*- mode.) # # ==================================================================== # Copyright (c) 2000-2008 CollabNet. All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of ...
143
28.06
77
14
981
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.marshal-usage_877a63178604909f_80040938", "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...
12
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.audit.marshal-usage", "rules.python.lang.security.audit.marshal-usage", "rules.python.lang.security.audit.marshal-usage", "rules.python.lang.security.audit.marshal-usage", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.av...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 55, 58, 61, 64, 87, 91, 98, 112, 132, 135, 138, 141 ]
[ 55, 58, 61, 64, 87, 91, 98, 112, 132, 135, 138, 141 ]
[ 5, 12, 12, 12, 15, 17, 15, 17, 5, 12, 46, 46 ]
[ 28, 33, 27, 28, 37, 68, 37, 37, 65, 70, 61, 62 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserial...
[ "The marshal module is not intended to be secure against erroneous or maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. See more details: https://docs.python.org/3/library/marshal.html?highlight=security", "The marshal module is not intended to be secure agai...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
serializer.py
/cvs2svn_lib/serializer.py
mhagger/cvs2svn
BSD-2-Clause
2024-11-18T19:38:13.011887+00:00
1,414,259,823,000
bf4d3221c1ffb977fd26fea8d07af831eacef141
2
{ "blob_id": "bf4d3221c1ffb977fd26fea8d07af831eacef141", "branch_name": "refs/heads/master", "committer_date": 1414259823000, "content_id": "1c6afa97678e8bac29887e34ba398b8e0b67a673", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "ebda67ed1d202e51ff742ea03652ed612cc0c380", "extension": "p...
2.390625
stackv2
import xml.etree.ElementTree as ET baxter_robot = ET.parse('baxter_robot.urdf') baxter_moveit = ET.parse('baxter_moveit.urdf') robot_root = baxter_robot.getroot() moveit_root = baxter_moveit.getroot() float_fields = ['radius', 'mass', 'value', 'ix', 'ixx', 'ixy', 'ixz', 'iyy', 'iyz', 'izz', 'length'] for element i...
50
20.68
48
15
300
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_e6811259cf59421c_e34f69ad", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 1 ]
[ 1 ]
[ 1 ]
[ 35 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
combine.py
/baxter_description/urdf/combine.py
CURG-archive/baxter_common
BSD-2-Clause
2024-11-18T19:38:17.166917+00:00
1,553,728,130,000
e3ce8aaf04c9b42c877e998e75e69f4add609f70
3
{ "blob_id": "e3ce8aaf04c9b42c877e998e75e69f4add609f70", "branch_name": "refs/heads/master", "committer_date": 1553728130000, "content_id": "8eae9f7958a42958aac303cd7b51ed335181c485", "detected_licenses": [ "MIT" ], "directory_id": "eb720c6583e7d7c76f42fdae159df39935a7b2a3", "extension": "py", "fi...
2.734375
stackv2
import boilerplate def process_data(file): """Split all files contents and then combine unique words into resulting file. """ # result = set() # # for _, contents in data_to_process.items(): # if isinstance(contents, bytes): # text = contents.decode('utf-8') # else: ...
48
34.83
112
18
431
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_6a8382e569d02309_acd9a61b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
3
true
[ "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "HIGH" ]
[ 34, 34, 38 ]
[ 35, 35, 39 ]
[ 9, 9, 17 ]
[ 113, 113, 63 ]
[ "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" ]
process.py
/hseling_api_anti_slovari/process.py
hseling/hseling-api-anti-slovari
MIT
2024-11-18T19:38:38.995368+00:00
1,558,324,782,000
260773af52972efbe6622dd0270282b4702b87c7
2
{ "blob_id": "260773af52972efbe6622dd0270282b4702b87c7", "branch_name": "refs/heads/master", "committer_date": 1558324782000, "content_id": "de319a3b5e789db11973709293ed9c5dbc9bce10", "detected_licenses": [ "Apache-2.0" ], "directory_id": "03568ca3864708e29c163813122d77f3ea057889", "extension": "py"...
2.40625
stackv2
from torch.utils.data import Dataset from torch.nn.utils import clip_grad_norm_ import torch.nn as nn import torch from collections import defaultdict from typing import NamedTuple, List, Dict, Tuple, Optional, Union import argparse import json import nltk import pickle from qanta.helpers import logger from qanta.emb...
413
31.8
121
19
3,356
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_e169d83f0c842e9f_a927aadc", "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-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 298, 299, 300, 301, 327, 374, 375, 406 ]
[ 298, 299, 300, 301, 328, 374, 375, 406 ]
[ 19, 17, 18, 15, 4, 5, 5, 5 ]
[ 57, 53, 55, 49, 76, 58, 54, 56 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserial...
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
guesser_model.py
/src/qanta/guesser_model.py
ExSidius/qanta-codalab
Apache-2.0
2024-11-18T20:10:39.785350+00:00
1,612,662,003,000
38315cf4028f50aa0f5aeaa4df1ea8a3a2a63fa3
3
{ "blob_id": "38315cf4028f50aa0f5aeaa4df1ea8a3a2a63fa3", "branch_name": "refs/heads/main", "committer_date": 1612662003000, "content_id": "6df864acd38c9ffe04e186113b537362246eaabb", "detected_licenses": [ "MIT" ], "directory_id": "4550f6bbeb292157680c5858e05c34f9ef8401c4", "extension": "py", "file...
2.75
stackv2
import pickle from pprint import PrettyPrinter pp = PrettyPrinter() import matplotlib.dates as dates import matplotlib.pyplot as plt from collections import Counter #load dataset - run cagedata.py with open('cagewatched.pickle', 'rb') as handle: b = pickle.load(handle) count = 0 tmin = 0 timeRem = 0 valcount=0 ...
236
24.61
104
19
1,765
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fd82f0b934246fa7_0a1aaaa8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 11 ]
[ 11 ]
[ 9 ]
[ 28 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
cage_burndown.py
/cage_burndown.py
brahbby/Cam3r0np03
MIT
2024-11-18T20:10:46.706864+00:00
1,539,853,074,000
1c3604ce6b5c204f2e8d4c934bc4a46bfe2e559f
2
{ "blob_id": "1c3604ce6b5c204f2e8d4c934bc4a46bfe2e559f", "branch_name": "refs/heads/master", "committer_date": 1539853074000, "content_id": "1def47cb7540794f0847dc42e0919f49e98df7e1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0f98a2f32f81ab9c3440cddf9b7088f90b0e8cd8", "extension": "py"...
2.3125
stackv2
import argparse import subprocess import sys import logging logger = logging.getLogger("helper") def azcli(command): process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out,err = process.communicate() logger.debug(str(out,"utf-8")) exit_code = process.returncode if ...
17
26
87
14
101
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_09e6e9486fee063f_a3206c07", "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" ]
[ 9 ]
[ 9 ]
[ 15 ]
[ 88 ]
[ "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" ]
helper.py
/src/helper.py
kennyb7322/azure-audit
Apache-2.0
2024-11-18T20:10:47.951672+00:00
1,606,318,090,000
f1ebfa0041f423a1248e290c8f1918c0787db3af
3
{ "blob_id": "f1ebfa0041f423a1248e290c8f1918c0787db3af", "branch_name": "refs/heads/main", "committer_date": 1606318090000, "content_id": "d0d5a184847b173d893851552612ae552cd12e54", "detected_licenses": [ "MIT" ], "directory_id": "30890f9f7edc49e1b0a8c648022093abb5503e75", "extension": "py", "file...
3.140625
stackv2
import numpy as np import pickle from sklearn.utils import class_weight, shuffle from sklearn.metrics import classification_report from sklearn.feature_extraction.text import CountVectorizer from sklearn.linear_model import LogisticRegression #import tensorflowjs as tfjs # Seeding for reproducibility np.random.seed(0...
88
33.48
92
9
776
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a6cd7c648f8c6358_9dbc5cde", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
7
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 19, 22, 25, 28, 34, 38 ]
[ 19, 22, 25, 28, 34, 38 ]
[ 16, 16, 16, 16, 19, 16 ]
[ 41, 41, 41, 41, 47, 41 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
logistic_regression.py
/logistic_regression.py
aljhn/TDT4173-Project
MIT
2024-11-18T20:10:53.766614+00:00
1,450,256,045,000
d2e40d2b1f23444d2659adb60a568de78f1933a5
2
{ "blob_id": "d2e40d2b1f23444d2659adb60a568de78f1933a5", "branch_name": "refs/heads/master", "committer_date": 1450256045000, "content_id": "e589311d36fce508d2facc1475030cfd5c44f20f", "detected_licenses": [ "MIT" ], "directory_id": "ce5dd008a85b5fc53f9a831e083f88e8efd31727", "extension": "py", "fi...
2.375
stackv2
from asyncio import coroutine from contextlib import contextmanager from functools import wraps from enum import Enum import aiopg from aiopg import create_pool, Pool, Cursor import psycopg2 _CursorType = Enum('CursorType', 'PLAIN, DICT, NAMEDTUPLE') def dict_cursor(func): """ Decorator that provides a dic...
378
34.63
116
18
3,008
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_1c96c529d83eb849_28f61602", "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.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 241, 268, 303 ]
[ 241, 268, 303 ]
[ 20, 20, 20 ]
[ 62, 79, 46 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
sql.py
/cauldron/sql.py
nerandell/cauldron
MIT
2024-11-18T20:10:55.812086+00:00
1,600,073,640,000
56bf64556e9e210e3b89a2818da0adac22f0a203
3
{ "blob_id": "56bf64556e9e210e3b89a2818da0adac22f0a203", "branch_name": "refs/heads/master", "committer_date": 1600073640000, "content_id": "99223e4041abdb84f34c275496665397f972fa91", "detected_licenses": [ "Apache-2.0" ], "directory_id": "13d918b1fd8bcdeffac8a662493d91254fc7cdad", "extension": "py"...
3.28125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Francesco Lumachi <francesco.lumachi@gmail.com> import cPickle from itertools import izip_longest class Vocabulary: """ Provide a way to organize words and provide translation to a main dictionary of terms. """ def __ini...
97
34.6
79
15
872
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_90b90780353bfac4_9dd970b9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 93, 97 ]
[ 93, 97 ]
[ 16, 16 ]
[ 53, 47 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `cPickle`, which is known to lead ...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
vocabulary.py
/vocabulary.py
lum4chi/chinltk
Apache-2.0
2024-11-18T20:10:56.655736+00:00
1,322,445,748,000
c1b4cbbffb4e771417772e1c357811911ed1aca8
3
{ "blob_id": "c1b4cbbffb4e771417772e1c357811911ed1aca8", "branch_name": "refs/heads/master", "committer_date": 1322445748000, "content_id": "8ffe32e4b9ea5fd0bc84e08d318aa58b94102bed", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "d38f20a65948486bb4e87b8a2a1753216876ce74", "extension": "p...
2.890625
stackv2
import sys class classproperty(property): def __get__(self, cls, owner): return self.fget.__get__(None, owner)() def render_to(template): from django.shortcuts import render_to_response from django.template import RequestContext """ Decorator for Django views that sends returned dict...
114
34.1
163
19
827
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_693d120a8c3dd1a8_6137f4e1", "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" ]
[ 87 ]
[ 87 ]
[ 16 ]
[ 63 ]
[ "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" ]
helpers.py
/qi_toolkit/helpers.py
skoczen/qi-toolkit
BSD-3-Clause
2024-11-18T20:10:58.522407+00:00
1,427,296,226,000
5798b4d979e47c51336bb44b9bfdc1a71f33da0f
3
{ "blob_id": "5798b4d979e47c51336bb44b9bfdc1a71f33da0f", "branch_name": "refs/heads/master", "committer_date": 1427296226000, "content_id": "b088539f744f3ee781024e5ded0f6baf4886f5d4", "detected_licenses": [ "MIT" ], "directory_id": "5f83294aacac285bb8da7684b1a9ffb3c0b7ae8c", "extension": "py", "fi...
2.53125
stackv2
import json import fm.mathengine.problems as problems from django.http import Http404 from django.http import HttpResponse from django.views.decorators.http import require_http_methods def index(request): return HttpResponse("This should return a list of problem types") @require_http_methods(["GET"]) def problem...
27
30.89
77
16
192
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_25497cf9e1b889ae_73378225", "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 ...
2
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 17, 27 ]
[ 19, 27 ]
[ 9, 9 ]
[ 46, 78 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.", "Detected data rendered directly to the end user via 'HttpRes...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
views.py
/fm/mathengine/views.py
zequequiel/fastmath
MIT
2024-11-18T20:10:59.774125+00:00
1,541,990,678,000
8d34ef0255d0a8f85f605a5840fc795744e5f1b0
3
{ "blob_id": "8d34ef0255d0a8f85f605a5840fc795744e5f1b0", "branch_name": "refs/heads/master", "committer_date": 1541990678000, "content_id": "05475637f37d145a95b79391eb4273fe186871fd", "detected_licenses": [ "MIT" ], "directory_id": "2b0f9d88ec8194aa13a2d6094b38e50293b2f46b", "extension": "py", "fi...
2.6875
stackv2
import click import os import platform import subprocess from os import path from converter import decrypt_html, convert_html, convert_pdf @click.command('salary') @click.argument("filename") @click.option('-p', '--password', prompt=True, help="password") @click.option('-c', '--pdf', is_flag=True, default='y', promp...
42
29.48
91
15
291
python
[{"finding_id": "semgrep_rules.python.lang.correctness.unchecked-subprocess-call_3be5600f258a1dae_e2aa9925", "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...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 36 ]
[ 36 ]
[ 13 ]
[ 67 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
show_me_my_salary.py
/show_me_my_salary.py
hyerim-kim/show-me-my-salary
MIT