added
stringdate
2024-11-18 17:59:49
2024-11-19 03:44:43
created
int64
126B
2,086B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.41
source
stringclasses
1 value
text
stringlengths
259
26.9k
num_lines
int64
16
649
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.17k
878k
sast_semgrep_findings_count
int64
1
629
sast_semgrep_success
bool
1 class
sast_semgrep_error
stringclasses
1 value
cwe_ids
listlengths
1
561
rule_ids
listlengths
1
561
subcategories
listlengths
1
561
confidences
listlengths
1
561
severities
listlengths
1
561
line_starts
listlengths
1
561
line_ends
listlengths
1
561
column_starts
listlengths
1
561
column_ends
listlengths
1
561
owasp_categories
listlengths
1
561
messages
listlengths
1
561
cvss_scores
listlengths
1
561
likelihoods
listlengths
1
561
impacts
listlengths
1
561
filename
stringlengths
4
105
path
stringlengths
5
372
repo_name
stringlengths
5
115
license
stringclasses
452 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:43.895243+00:00
1,619,674,139,000
c814a34864a4158acf4e1abbbb583376f3efad66
3
{ "blob_id": "c814a34864a4158acf4e1abbbb583376f3efad66", "branch_name": "refs/heads/master", "committer_date": 1619674139000, "content_id": "8b45c9393b96c8f7482a7754a3078e8eb2a7bbc4", "detected_licenses": [ "MIT" ], "directory_id": "4790aa158050f52b2f0fa990467774c5276b4bc8", "extension": "py", "fi...
2.640625
stackv2
import numpy as np import torch import torch.nn.functional as F def sample_gumbel(shape, eps=1e-10): """ NOTE: Stolen from https://github.com/YongfeiYan/Gumbel_Softmax_VAE/blob/master/gumbel_softmax_vae.py Sample from Gumbel(0, 1) based on https://github.com/ericjang/gumbel-softmax/blob/3c858492...
201
30.78
118
16
1,799
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_a2b042502ae2f5b4_d50af3ea", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
4
true
[ "", "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 31, 55, 162, 177 ]
[ 31, 55, 162, 177 ]
[ 8, 12, 8, 8 ]
[ 22, 26, 22, 22 ]
[ "", "", "", "" ]
[ "Is \"is_cuda\" a function or an attribute? If it is a function, you may have meant logits.is_cuda() because logits.is_cuda is always true.", "Is \"is_cuda\" a function or an attribute? If it is a function, you may have meant y_soft.is_cuda() because y_soft.is_cuda is always true.", "Is \"is_cuda\" a function o...
[ 5, 5, 5, 5 ]
[ "", "", "", "" ]
[ "", "", "", "" ]
utils_math.py
/utils/utils_math.py
yff12345/bsc_lcs
MIT
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:44.364393+00:00
1,611,199,867,000
ee5b19626616ec7568a5cb774bc5a76529f3c51e
3
{ "blob_id": "ee5b19626616ec7568a5cb774bc5a76529f3c51e", "branch_name": "refs/heads/main", "committer_date": 1611199867000, "content_id": "18f2c7b9a15197f4a4144413fbc6b994a8d3c99f", "detected_licenses": [ "MIT" ], "directory_id": "6803e1834d76c7a9c1fd2484bbfb438615c341a2", "extension": "py", "file...
2.921875
stackv2
from more_itertools import split_at grps = split_at(map(str.rstrip, open('d22.txt')), pred=lambda e: e == '') grps = list(grps) grp1 = list(map(int, grps[0][1:])) grp2 = list(map(int, grps[1][1:])) FIRST_DECK_WON = 0 SECOND_DECK_WON = 1 old_print=print print=lambda *args: None def match(grp1, grp2, depth=0): memo...
61
34.2
87
17
668
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_55824a47a9bd1ce1_67992cf1", "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
[ "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 2, 11 ]
[ 2, 11 ]
[ 66, 21 ]
[ 73, 25 ]
[ "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
d22b.py
/d22b.py
jogloran/advent-of-code-2020
MIT
2024-11-18T18:05:45.157547+00:00
1,430,934,893,000
9936379ea8ae076b9b0c4ce5b322d8a12497e38a
2
{ "blob_id": "9936379ea8ae076b9b0c4ce5b322d8a12497e38a", "branch_name": "refs/heads/master", "committer_date": 1431212320000, "content_id": "92a5167070c5a64bd70518f188bd927997a14043", "detected_licenses": [ "MIT" ], "directory_id": "7492f373430262e8ba95c4cc52517ed23107dc67", "extension": "py", "fi...
2.359375
stackv2
from formatter import Formatter from textwrap import dedent from socket import AF_INET, AF_INET6, inet_pton, error as socket_error def try_inet_pton(af, ip): try: inet_pton(af, ip) return True except socket_error: return False class _DNSFormatter(Formatter): filters = { ...
139
29.15
85
20
851
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_7d37b03fc19e01cb_971f0af9", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 17, 18 ]
[ 17, 18 ]
[ 29, 29 ]
[ 58, 59 ]
[ "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
dns_formatter.py
/dns_formatter.py
sargon/icvpn-scripts
MIT
2024-11-18T18:05:50.995077+00:00
1,681,380,941,000
e318ef477e6416a2771f439d3ccca329e22e093b
3
{ "blob_id": "e318ef477e6416a2771f439d3ccca329e22e093b", "branch_name": "refs/heads/master", "committer_date": 1681380941000, "content_id": "ac6bb68abe5cfe57022afe0a29bb34005b6b4d36", "detected_licenses": [ "Apache-2.0" ], "directory_id": "af84dbfbdca0ee1a354924881b6578c37a66efcf", "extension": "py"...
2.828125
stackv2
# _*_ coding:utf8 _*_ import numpy as np import pandas as pd import tensorflow as tf import sys #import ncf.metrics import metrics class NCF(object): def __init__(self, embed_size, user_size, item_size, lr, optim, initializer, loss_func, activation_func, regularizer_rate, iterat...
227
44.54
87
16
2,121
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_8de0869020318ad0_586c3271", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 37, 220 ]
[ 37, 220 ]
[ 9, 12 ]
[ 25, 28 ]
[ "", "" ]
[ "Is \"is_training\" a function or an attribute? If it is a function, you may have meant self.is_training() because self.is_training is always true.", "Is \"is_training\" a function or an attribute? If it is a function, you may have meant self.is_training() because self.is_training is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
NCF.py
/ML/DL/ncf/NCF.py
Johnwei386/Warehouse
Apache-2.0
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:55.246166+00:00
1,657,390,380,000
dfdbab317ffa3b29e94e2c2e170bb41d630eec72
2
{ "blob_id": "dfdbab317ffa3b29e94e2c2e170bb41d630eec72", "branch_name": "refs/heads/main", "committer_date": 1657390380000, "content_id": "c109cd2fd026f8414ae5d53012232891f107e2a6", "detected_licenses": [ "Apache-2.0" ], "directory_id": "74a2da6daa4fb7acc42e7eb2f1aa2a3fcd983a53", "extension": "py", ...
2.328125
stackv2
# -*- test-case-name: openid.test.test_fetchers -*- """ This module contains the HTTP fetcher interface and several implementations. """ __all__ = [ 'fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse', 'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', 'HTTPError' ] import urllib.request i...
493
31.21
79
19
3,533
python
[{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.identical-is-comparison_bdb9f963e9fa869f_baf2c473", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.identical-is-comparison", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Fo...
3
true
[ "", "", "" ]
[ "rules.python.lang.correctness.common-mistakes.identical-is-comparison", "rules.python.lang.correctness.common-mistakes.identical-is-comparison", "rules.python.lang.correctness.common-mistakes.identical-is-comparison" ]
[ "correctness", "correctness", "correctness" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 56, 319, 437 ]
[ 56, 319, 437 ]
[ 8, 12, 12 ]
[ 22, 26, 28 ]
[ "", "", "" ]
[ "Found identical comparison using is. Ensure this is what you intended.", "Found identical comparison using is. Ensure this is what you intended.", "Found identical comparison using is. Ensure this is what you intended." ]
[ 7.5, 7.5, 7.5 ]
[ "", "", "" ]
[ "", "", "" ]
fetchers.py
/openid/fetchers.py
necaris/python3-openid
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.correctness.useless-eqeq", "rules.python.lang.correctness.useless-eqeq", "rules.python.lang.correctness.useless-eqeq", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args", "rules.python.lang.correctnes...
[ "correctness", "correctness", "correctness", "security", "security", "correctness", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "LOW", "MEDIUM", "MEDIUM", "LOW", "LOW" ]
[ "LOW", "LOW", "LOW", "HIGH", "HIGH", "LOW", "HIGH", "HIGH" ]
[ 27, 29, 31, 225, 225, 324, 361, 448 ]
[ 27, 29, 31, 225, 225, 324, 361, 448 ]
[ 4, 4, 4, 17, 17, 7, 17, 15 ]
[ 20, 21, 18, 71, 71, 26, 71, 75 ]
[ "", "", "", "A01:2017 - Injection", "A01:2017 - Injection", "", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "This expression is always True: `configpath == configpath` or `configpath != configpath`. If testing for floating point NaN, use `math.isnan(configpath)`, or `cmath.isnan(configpath)` if the number is complex.", "This expression is always True: `scanstorage == scanstorage` or `scanstorage != scanstorage`. If tes...
[ 3, 3, 3, 7.5, 7.5, 3, 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:57.639639+00:00
1,509,542,127,000
1624c4387534dfc6bd8353d87de3cd32427f3459
3
{ "blob_id": "1624c4387534dfc6bd8353d87de3cd32427f3459", "branch_name": "refs/heads/main", "committer_date": 1509542127000, "content_id": "81e00557b4688c143b61d49af8a7268a97d5e66b", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "f9d50d72f90168aedf6981bf884b65a008774c80", "extension": "py"...
2.875
stackv2
# Copyright © 2017 Zandr Martin # 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, copy, modify, merge, publish, distribut...
175
25.71
78
22
1,069
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_68747e6e729272b1_40a4728f", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
5
true
[ "", "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 79, 101, 105, 150 ]
[ 79, 101, 105, 150 ]
[ 9, 46, 13, 20 ]
[ 22, 56, 26, 33 ]
[ "", "", "", "" ]
[ "Is \"is_alive\" a function or an attribute? If it is a function, you may have meant self.is_alive() because self.is_alive is always true.", "Is \"is_alive\" a function or an attribute? If it is a function, you may have meant n.is_alive() because n.is_alive is always true.", "Is \"is_alive\" a function or an at...
[ 5, 5, 5, 5 ]
[ "", "", "", "" ]
[ "", "", "", "" ]
life.py
/life.py
deathlyfrantic/games-of-life
BSD-2-Clause
2024-11-18T18:05:58.611109+00:00
1,546,151,271,000
a40009afc2fe45b0a0a8f30471896d9849ffc57d
4
{ "blob_id": "a40009afc2fe45b0a0a8f30471896d9849ffc57d", "branch_name": "refs/heads/master", "committer_date": 1546151271000, "content_id": "a85ca994b5aa1f1663511c84f08cdee0e07ddd3f", "detected_licenses": [ "MIT" ], "directory_id": "46d721d8ccc4c70b440320f634b32969a937fd61", "extension": "py", "fi...
3.75
stackv2
#!/usr/bin/env python3 # Simple types boolean = True and False string = 'Hello World!' integer = 0 complex = 0j float = 0.0 none = None print('Simple:', string) # Sequences list = [1, 'a', 0.0] tuple = (1, 'a', 0.0) dictionary = { 'key1': 'value 1', 'key2': 'value 2' } immutable_set = set(['a', 'b']) for item i...
76
16.75
55
9
398
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_5af65d5b16d6cc72_5dea3b0d", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 48 ]
[ 48 ]
[ 31 ]
[ 46 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
app.py
/deployment/examples/app.py
MikeBild/introduction-python
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:03.858155+00:00
1,558,034,462,000
1a459a8ce2aa71dec2636753e5dea2d092c707ec
3
{ "blob_id": "1a459a8ce2aa71dec2636753e5dea2d092c707ec", "branch_name": "refs/heads/master", "committer_date": 1558034462000, "content_id": "bcaf1fbd5ca40d264c7a216829e4b6a33a88c52a", "detected_licenses": [ "MIT" ], "directory_id": "640523fb86fc00950c9658419a53500ddea0ca13", "extension": "py", "fi...
3.125
stackv2
import serial import time import serial.tools.list_ports class SerialDevice(object): def __init__(self, baudrate = None, port = None, maxtime = None): try: self.Serial = serial.Serial() if maxtime: self.maxtime = maxtime else: self.m...
72
29.28
96
19
474
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_74a23180494f6c1a_0f22a865", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
1
true
[ "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 61 ]
[ 61 ]
[ 12 ]
[ 31 ]
[ "" ]
[ "Is \"is_open\" a function or an attribute? If it is a function, you may have meant self.Serial.is_open() because self.Serial.is_open is always true." ]
[ 5 ]
[ "" ]
[ "" ]
main.py
/main.py
KarthikGangadhar/pyserial-uart-connect
MIT
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-18T17:59:49.860842+00:00
1,535,034,077,000
53006a30639cd54a6f4d642327ec04fecbbc5fd1
3
{ "blob_id": "53006a30639cd54a6f4d642327ec04fecbbc5fd1", "branch_name": "refs/heads/master", "committer_date": 1535034077000, "content_id": "d655212e93c128b9a42a32afd88c5878a9b43f09", "detected_licenses": [ "Apache-2.0" ], "directory_id": "49dd5d88387e67bea72d089f84eb97c4cb59c633", "extension": "py"...
3.265625
stackv2
import numpy as np from math import * def UpperHalfTrans(x,Theta): #joint angles LShoulderPitch = Theta[0] LShoulderRoll = Theta[1] RShoulderPitch = Theta[2] RShoulderRoll = Theta[3] LElbowYaw = Theta[4] LElbowRoll = Theta[5] RElbowYaw = Theta[6] RElbowRoll = Theta[7] #Shoulder...
142
41.43
84
14
2,230
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-assignment-keyed_8e7329d6aac05726_b4b1a3ef", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-assignment-keyed", "finding_type": "maintainability", "severity": "low", "confidence": "medium", "message": "key `4` in `x` is ass...
6
true
[ "", "", "", "", "", "" ]
[ "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed"...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ 55, 58, 130, 133, 136, 139 ]
[ 56, 59, 131, 134, 137, 140 ]
[ 5, 5, 5, 5, 5, 5 ]
[ 71, 71, 73, 75, 75, 75 ]
[ "", "", "", "", "", "" ]
[ "key `4` in `x` is assigned twice; the first assignment is useless", "key `5` in `x` is assigned twice; the first assignment is useless", "key `9` in `x` is assigned twice; the first assignment is useless", "key `10` in `x` is assigned twice; the first assignment is useless", "key `11` in `x` is assigned tw...
[ 3, 3, 3, 3, 3, 3 ]
[ "", "", "", "", "", "" ]
[ "", "", "", "", "", "" ]
UpperHalfTrans.py
/nao_virtual_ws/src/nao_virtual/nao_control/scripts/UpperHalfTrans.py
jackietom/nao_robot_control
Apache-2.0
2024-11-18T18:15:53.848738+00:00
1,616,489,281,000
4721328b9e6f14f182bcf00dddc2700737e00587
3
{ "blob_id": "4721328b9e6f14f182bcf00dddc2700737e00587", "branch_name": "refs/heads/master", "committer_date": 1616489281000, "content_id": "41b852486f3aca724ee937f8b66b888c04b44065", "detected_licenses": [ "Unlicense" ], "directory_id": "039f2c747a9524daa1e45501ada5fb19bd5dd28f", "extension": "py",...
2.96875
stackv2
# ABC172c def main(): import sys import bisect input = sys.stdin.readline sys.setrecursionlimit(10**6) # 再帰関数を使わない限りPypyで出すこと def dump(*args): sys.stderr.write(str(args)) n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().spl...
35
21.43
68
18
248
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_dbb6b4d1cbd7bfa1_9b949575", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `dump` is defin...
1
true
[ "" ]
[ "rules.python.lang.maintainability.useless-inner-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 11 ]
[ 12 ]
[ 5 ]
[ 36 ]
[ "" ]
[ "function `dump` is defined inside a function but never used" ]
[ 7.5 ]
[ "" ]
[ "" ]
ABC172c2.py
/ABC172/ABC172c2.py
yuto-moriizumi/AtCoder
Unlicense
2024-11-18T18:15:56.364800+00:00
1,486,548,584,000
1484da73b225118b83dd5846213e51779f64fbd2
2
{ "blob_id": "1484da73b225118b83dd5846213e51779f64fbd2", "branch_name": "refs/heads/master", "committer_date": 1486548584000, "content_id": "db324de942e39adc35a6b3028218cebf1519db81", "detected_licenses": [ "MIT" ], "directory_id": "e6ceeb5fb8cfa465debff074e6c70f5b4c5e7c41", "extension": "py", "fi...
2.40625
stackv2
from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.views.generic.base import View from django.shortcuts import render from .models import Project, Ticket, Log class LoginRequiredView(View): ''' This view can be visited only by authentica...
106
27.08
96
13
599
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_bf56c3af6c11ae6c_041fd335", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
3
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 41, 73, 87 ]
[ 41, 73, 87 ]
[ 16, 16, 12 ]
[ 46, 46, 35 ]
[ "", "", "" ]
[ "Is \"is_superuser\" a function or an attribute? If it is a function, you may have meant self.request.user.is_superuser() because self.request.user.is_superuser is always true.", "Is \"is_superuser\" a function or an attribute? If it is a function, you may have meant self.request.user.is_superuser() because self....
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
access_control_views.py
/doner/project/access_control_views.py
alexband/doner
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:15:56.925528+00:00
1,621,275,550,000
2e2013e4b5b9af668a43c1b126e4f997374ac018
3
{ "blob_id": "2e2013e4b5b9af668a43c1b126e4f997374ac018", "branch_name": "refs/heads/main", "committer_date": 1621275550000, "content_id": "3230c1dc2401cab693c54c2ecab469e831dd826a", "detected_licenses": [ "MIT" ], "directory_id": "84743978c7f918ec2b920ae9c415fc75d75275bb", "extension": "py", "file...
3
stackv2
"""app/flask_app.py""" import os from flask import Flask, render_template, request from twitcomp.models import DB, User from twitcomp.twitter import add_or_update_user from twitcomp.predict import predict_twitter import commands def create_app(): app = Flask(__name__) # __name__: current path module env...
79
32.65
120
18
571
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_ccac060617db6374_6ac7a4c0", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `reset` is defi...
4
true
[ "", "", "", "" ]
[ "rules.python.lang.maintainability.useless-inner-function", "rules.python.lang.maintainability.useless-inner-function", "rules.python.lang.maintainability.useless-inner-function", "rules.python.lang.maintainability.useless-inner-function" ]
[ "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 25, 31, 37, 57 ]
[ 29, 34, 54, 76 ]
[ 5, 5, 5, 5 ]
[ 68, 80, 88, 87 ]
[ "", "", "", "" ]
[ "function `reset` is defined inside a function but never used", "function `root` is defined inside a function but never used", "function `user` is defined inside a function but never used", "function `compare` is defined inside a function but never used" ]
[ 7.5, 7.5, 7.5, 7.5 ]
[ "", "", "", "" ]
[ "", "", "", "" ]
app.py
/twitcomp/app.py
qianjing2020/who-may-twit-this
MIT
2024-11-18T18:15:59.314305+00:00
1,481,276,075,000
2061441ba503979feb5dc9820086908e0f9a3ea4
3
{ "blob_id": "2061441ba503979feb5dc9820086908e0f9a3ea4", "branch_name": "refs/heads/master", "committer_date": 1481276075000, "content_id": "6d8f30f70ba84b349b181cca60624378faa147da", "detected_licenses": [ "MIT" ], "directory_id": "7ac1cafd05f99b48fde134d18eed27ff086d45a2", "extension": "py", "fi...
3.34375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Библиотека графического интерфейса Tk import tkinter, tkinter.messagebox # Генератор псевдослучайных чисел from random import randrange ##### КЛАСС CELL ##### class Cell(object): """Представляет ячейку игрового поля""" def __init__(self, field, x, y): ...
554
24.55
87
20
3,524
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_5912b0bbb0e8f57e_54b8f52d", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
24
true
[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainabili...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "...
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 124, 125, 155, 210, 215, 235, 235, 238, 240, 279, 368, 375, 382, 392, 476, 477, 503, 509, 512, 512, 520, 523, 524, 531 ]
[ 124, 125, 155, 210, 215, 235, 235, 238, 240, 279, 368, 375, 382, 392, 476, 477, 503, 509, 512, 512, 520, 523, 524, 531 ]
[ 33, 31, 33, 31, 12, 12, 47, 9, 12, 12, 12, 20, 13, 17, 16, 13, 16, 12, 9, 31, 12, 18, 20, 16 ]
[ 48, 45, 45, 43, 26, 29, 61, 23, 24, 24, 31, 48, 51, 45, 43, 27, 43, 26, 24, 46, 26, 30, 35, 31 ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "Is \"is_flagged\" a function or an attribute? If it is a function, you may have meant self.is_flagged() because self.is_flagged is always true.", "Is \"is_opened\" a function or an attribute? If it is a function, you may have meant self.is_opened() because self.is_opened is always true.", "Is \"is_mine\" a fun...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ]
cheesweeper.py
/cheesweeper.py
Forst/cheesweeper
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.363280+00:00
1,544,201,063,000
94823027296f9e34a30dbb5078c9543ff6a29c19
3
{ "blob_id": "94823027296f9e34a30dbb5078c9543ff6a29c19", "branch_name": "refs/heads/master", "committer_date": 1544201063000, "content_id": "f8f9df58ad64f75dd464d460ff1233e212bf730c", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "d975823168d6ffad2e370e284140d23be375636c", "extension": "p...
3.03125
stackv2
from pyspark import SparkConf, SparkContext def loadMovies(): movieNames = {} with open ("/ml-100k/u.item") as f: for line in f: fields = line.split('|') movieNames[int(fields[0])] = fields[1] return movieNames def parseInput(line): fields = line.split('\t') return...
42
31.07
116
14
371
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_f7a35a2e71699c1f_7ea639de", "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
[ "", "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 31, 34, 37 ]
[ 31, 34, 37 ]
[ 75, 72, 52 ]
[ 116, 99, 56 ]
[ "", "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
Spark - Movies dataset.py
/Spark - Movies dataset.py
shirish510/Ultimate_hands_on_Hadoop_Big_Data
BSD-2-Clause
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:09.475455+00:00
1,582,582,586,000
5d738ea16244c261aeb74fd7f9c64fc6a7106ce7
3
{ "blob_id": "5d738ea16244c261aeb74fd7f9c64fc6a7106ce7", "branch_name": "refs/heads/master", "committer_date": 1582582586000, "content_id": "d6f81394ae2f31f7c4ee80a70dc1cc001c257ed4", "detected_licenses": [ "MIT" ], "directory_id": "159696b427e9fd7120fb621e8393d32226c7e754", "extension": "py", "fi...
2.640625
stackv2
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # written by Hugo Berard (berard.hugo@gmail.com) while at Facebook. from __future__ import print_function import scipy.sparse.linalg as linalg...
66
33.15
98
15
601
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_e62c0eb22d2d3287_cf704fa9", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
1
true
[ "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 29 ]
[ 29 ]
[ 12 ]
[ 29 ]
[ "" ]
[ "Is \"is_cuda\" a function or an attribute? If it is a function, you may have meant self.grad.is_cuda() because self.grad.is_cuda is always true." ]
[ 5 ]
[ "" ]
[ "" ]
linalg.py
/lib/linalg.py
lilujunai/GAN-optimization-landscape
MIT
2024-11-18T18:16:11.668356+00:00
1,690,818,508,000
17afd67b525fe02aa155acb7ad8afc74d762c41d
3
{ "blob_id": "17afd67b525fe02aa155acb7ad8afc74d762c41d", "branch_name": "refs/heads/main", "committer_date": 1690818508000, "content_id": "7aafb8b6394ef61efc0e15af07ce7b3d6ab75f55", "detected_licenses": [ "MIT" ], "directory_id": "cd5928555eac608a407480904da529b8f98879d0", "extension": "py", "file...
2.71875
stackv2
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT # Example of publishing the value of an ADC to Adafruit IO # adafruit_circuitpython_adafruitio with an esp32spi_socket import time import board import busio from analogio import AnalogIn from digitalio import DigitalInOut imp...
78
32.35
99
11
696
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_5c77c4d1dc33da55_4e2dbdc4", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 40 ]
[ 40 ]
[ 11 ]
[ 27 ]
[ "" ]
[ "Is \"is_connected\" a function or an attribute? If it is a function, you may have meant esp.is_connected() because esp.is_connected is always true." ]
[ 5 ]
[ "" ]
[ "" ]
adafruit_io_analog_in.py
/examples/adafruit_io_http/adafruit_io_analog_in.py
adafruit/Adafruit_CircuitPython_AdafruitIO
MIT
2024-11-18T18:16:12.363897+00:00
1,693,493,095,000
3b8231d02e7d65ce4e3ce13a5a39b3b73e1b8c15
2
{ "blob_id": "3b8231d02e7d65ce4e3ce13a5a39b3b73e1b8c15", "branch_name": "refs/heads/master", "committer_date": 1693567290000, "content_id": "60359c427ea9469434630cd17e5e7a5c05d12577", "detected_licenses": [ "Apache-2.0" ], "directory_id": "cb6d0a660cfcb28ee9e8a1c0266925f8f541edfb", "extension": "py"...
2.46875
stackv2
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # uobjnew Summarize object allocations in high-level languages. # For Linux, uses BCC, eBPF. # # USAGE: uobjnew [-h] [-T TOP] [-v] {c,java,ruby,tcl} pid [interval] # # Copyright 2016 Sasha Goldshtein # Licensed under the Apache License, Version ...
212
28.15
92
15
1,790
python
[{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_769083393c62cdbe_e67bb33c", "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...
4
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 194, 197, 200 ]
[ 194, 197, 200 ]
[ 52, 52, 52 ]
[ 68, 68, 68 ]
[ "", "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
uobjnew.py
/tools/lib/uobjnew.py
iovisor/bcc
Apache-2.0
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-18T18:16:14.522090+00:00
1,581,658,101,000
abfde7127ad54fc2a3afdf8b71b7487fc7db9c44
3
{ "blob_id": "abfde7127ad54fc2a3afdf8b71b7487fc7db9c44", "branch_name": "refs/heads/master", "committer_date": 1581658101000, "content_id": "548abe47842f016ed16b8ebb24799d4eefc1f22e", "detected_licenses": [ "MIT" ], "directory_id": "904787fa15ef9bde82f8b6202458ba05e62acec7", "extension": "py", "fi...
3.015625
stackv2
""" Prints "Key n pressed" on key down. Prints duplicates when multiple key are pressed. The interrupt fires when any key is pressed or released. Without storing previous state, on the n+1th key down all keys are treated as just pressed. """ import mpr121 from machine import Pin, I2C i2c = I2C(3) # stm32 #i2c = I2C(...
26
23.92
74
14
232
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_b1c6a62d756d223d_8cfd38b5", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 26 ]
[ 26 ]
[ 17 ]
[ 27 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
irq-key-down.py
/examples/irq-key-down/irq-key-down.py
Jerry233333/micropython-mpr121
MIT
2024-11-18T19:31:06.300677+00:00
1,421,141,490,000
bba72cffe2f345638792421a4e169ee578cebdb1
3
{ "blob_id": "bba72cffe2f345638792421a4e169ee578cebdb1", "branch_name": "refs/heads/master", "committer_date": 1421141490000, "content_id": "29919e8261473ea6c8067eb149b3fc95d296d2f4", "detected_licenses": [ "MIT" ], "directory_id": "9c606d5b2ff5a56f5a6c033eacbb4c6d0d0df4cd", "extension": "py", "fi...
2.71875
stackv2
import json from errors import LineFieldsError def get_dict(): f = open('json_dict','r') return json.load(f) op_table = get_dict() registers_table = {'A': 0, 'X': 1, 'L': 2, 'PC': 8, "SW": 9 } #indexed addressing index...
64
24.47
65
19
441
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_c469a1250c66cf51_4b3476aa", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
3
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 19 ]
[ 19 ]
[ 21 ]
[ 42 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
instructions.py
/sic_assembler/instructions.py
amritkrs/SIC-ASSEMBLER
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-18T20:08:54.792207+00:00
1,414,647,944,000
3cab25cf709f6de2f374eecfb1fbe6084aa21ab3
2
{ "blob_id": "3cab25cf709f6de2f374eecfb1fbe6084aa21ab3", "branch_name": "refs/heads/master", "committer_date": 1414647944000, "content_id": "4819031e47fce9fa8bb86860db2b90e0cf12f100", "detected_licenses": [ "BSD-2-Clause-Views" ], "directory_id": "2819ef883d4c4b4170acf8667b2f1e341ef4e7e3", "extensio...
2.328125
stackv2
from django.contrib.gis.geos import Point from django.contrib.gis.db.models import * from django.utils.timezone import utc from django.contrib.auth.models import User from django.db.models.signals import pre_delete, post_save from django.dispatch import receiver from django.core.cache import cache from django.core.mana...
316
29.46
86
15
2,254
python
[{"finding_id": "semgrep_rules.python.django.correctness.nontext-field-must-set-null-true_a098b63032bf092b_9805570b", "tool_name": "semgrep", "rule_id": "rules.python.django.correctness.nontext-field-must-set-null-true", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "null=True sh...
8
true
[ "", "", "", "", "", "", "", "" ]
[ "rules.python.django.correctness.nontext-field-must-set-null-true", "rules.python.django.correctness.nontext-field-must-set-null-true", "rules.python.django.correctness.nontext-field-must-set-null-true", "rules.python.django.correctness.nontext-field-must-set-null-true", "rules.python.django.correctness.non...
[ "correctness", "correctness", "correctness", "correctness", "correctness", "correctness", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 77, 83, 89, 95, 101, 184, 189, 196 ]
[ 82, 88, 94, 100, 107, 184, 192, 199 ]
[ 5, 5, 5, 5, 5, 5, 9, 9 ]
[ 6, 6, 6, 6, 6, 39, 43, 45 ]
[ "", "", "", "", "", "", "", "" ]
[ "null=True should be set if blank=True is set on non-text fields.", "null=True should be set if blank=True is set on non-text fields.", "null=True should be set if blank=True is set on non-text fields.", "null=True should be set if blank=True is set on non-text fields.", "null=True should be set if blank=Tr...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "", "", "", "", "", "", "", "" ]
[ "", "", "", "", "", "", "", "" ]
models.py
/ff/apps/futures/models.py
orzubalsky/fantastic-futures
BSD-2-Clause-Views
2024-11-18T18:59:36.133428+00:00
1,655,921,821,000
e91c40031f6fe918baa9d89da58d570be1e67f2a
3
{ "blob_id": "e91c40031f6fe918baa9d89da58d570be1e67f2a", "branch_name": "refs/heads/master", "committer_date": 1655921821000, "content_id": "58863fb7c49209b4caf12b7fda21d0317b1cd5e7", "detected_licenses": [ "MIT" ], "directory_id": "5fdfa2069b1aa05f61852b498328366d3dcfeb2a", "extension": "py", "fi...
3.296875
stackv2
#!/usr/bin/env python3 from collections import defaultdict raw_input = open("input.txt").read() risk_map = [[int(c) for c in line] for line in raw_input.splitlines()] current_cost = 0 # evaluating this level now visited = {(0, 0)} # store visited coords cost_map = [[0] * len(risk_map[0]) for _ in risk_map] x_max, y...
39
35.1
78
14
401
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3964ddc1c27c7d23_85348458", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
2
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 16 ]
[ 16 ]
[ 53 ]
[ 79 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
dojo.py
/2021_12_15/dojo.py
globocom/dojo
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:38.748182+00:00
1,617,286,566,000
ef41ce80ef8bb525718ed23c9656b8ddd82b7539
3
{ "blob_id": "ef41ce80ef8bb525718ed23c9656b8ddd82b7539", "branch_name": "refs/heads/main", "committer_date": 1617286566000, "content_id": "7cbce07935d480dfb6af21e0903fe09eed96d03a", "detected_licenses": [ "MIT" ], "directory_id": "a72efcd405595925fd8aeef9ef1cb0c61c57847b", "extension": "py", "file...
3.109375
stackv2
# Constant declarations YES = 1 NO = 0 def recEuclide(a,b): """returns the triple [d,x,y] where: d is the greatest divisor of a and b; x and y are integers such that xa + yb = d. """ assert a >= 0 and b >= 0 and a + b > 0 if b > a: answ = recEuclide(b,a) return [ answ[0], an...
36
23.33
54
11
329
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_b3352a249df73cf3_a62de476", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
4
true
[ "", "", "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.code-after-unconditional-return" ]
[ "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 13, 16, 24, 24 ]
[ 13, 16, 24, 35 ]
[ 9, 9, 5, 5 ]
[ 45, 25, 51, 18 ]
[ "", "", "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "code after return statement will not be executed" ]
[ 5, 5, 5, 5 ]
[ "", "", "", "" ]
[ "", "", "", "" ]
correct.py
/example_problems/tutorial/number_theory/the_prime_factorization/solutions/correct.py
DottaPaperella/TALight
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-18T18:59:41.446756+00:00
1,630,699,716,000
7822cb2205b7991c4830b0da21be48cfe54560ec
3
{ "blob_id": "7822cb2205b7991c4830b0da21be48cfe54560ec", "branch_name": "refs/heads/master", "committer_date": 1630699716000, "content_id": "2c80e0198594835f260a848b02c31b2196a4d73a", "detected_licenses": [ "MIT" ], "directory_id": "d57ed5d0c40c69fa8143ee10b7189e6082cf23bc", "extension": "py", "fi...
2.875
stackv2
#!/usr/bin/env python3 """Script to collect and summarize 5 minute power production data from an Enphase Solar PV system. The data collection portion of the script adds 5 minute power production records to the 'records.csv' file in this directory. The plotting portion of the script creates a number of data summary p...
343
34.49
102
19
3,456
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_addb5074a03a4b40_fe589bc4", "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
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 75 ]
[ 75 ]
[ 35 ]
[ 83 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
summarize.py
/summarize.py
alanmitchell/solar-summary
MIT
2024-11-18T19:11:47.341948+00:00
1,496,209,181,000
dcf51cd291c00075e938d418f2c01921ed6afbf2
3
{ "blob_id": "dcf51cd291c00075e938d418f2c01921ed6afbf2", "branch_name": "refs/heads/master", "committer_date": 1496209181000, "content_id": "b764a0afe56c30334cedf0b99372cb55ab844de8", "detected_licenses": [ "MIT" ], "directory_id": "14060038591587c62edcb365cfbc99fdf469363d", "extension": "py", "fi...
2.796875
stackv2
# Python Standard Library from collections import OrderedDict import itertools # 3rd Party Libraries import arrow, yaml # Local from stablogen.config import * from stablogen.util import make_url, find_files # Uses OrderedDict to keep order the data in the order below yaml.add_representer(OrderedDict, lambda self, da...
152
28.06
76
16
1,010
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_674f623c58e459f7_ef673789", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
3
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 14, 21, 24 ]
[ 14, 21, 24 ]
[ 5, 5, 5 ]
[ 66, 50, 45 ]
[ "", "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
Post.py
/stablogen/Post.py
iguessthislldo/stablogen
MIT
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:51.939312+00:00
1,575,748,829,000
74d4e5325e69a2dcf6b40f1a099c1e2f002df8d8
2
{ "blob_id": "74d4e5325e69a2dcf6b40f1a099c1e2f002df8d8", "branch_name": "refs/heads/master", "committer_date": 1575748829000, "content_id": "2503605834dc98c10a524e15a74e441e2ea2866b", "detected_licenses": [ "MIT" ], "directory_id": "acaa8ca9cb8e2b41e38af894c68e67154f48d27e", "extension": "py", "fi...
2.5
stackv2
import os from typing import Callable import click from funcy import compose def create_cli(f: Callable = None): if f is None: def inner(func: Callable): return create_cli(func) return inner wrappers = [ click.option("--dev/--prod", "-d/-p", "mode", default=True), ...
38
19.29
73
13
175
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_c9961021eef6db1a_02f23a6d", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.pass-body-fn", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "`pass` is the body of function cli. Consider rem...
1
true
[ "" ]
[ "rules.python.lang.best-practice.pass-body-fn" ]
[ "best-practice" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 32 ]
[ 34 ]
[ 1 ]
[ 9 ]
[ "" ]
[ "`pass` is the body of function cli. Consider removing this or raise NotImplementedError() if this is a TODO" ]
[ 5 ]
[ "" ]
[ "" ]
__main__.py
/freeze_poetry/__main__.py
mvwicky/freeze-poetry
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:11:53.140476+00:00
1,692,795,921,000
36f3c62c8d7a8ff4892cf43c952aecb5418e8f77
2
{ "blob_id": "36f3c62c8d7a8ff4892cf43c952aecb5418e8f77", "branch_name": "refs/heads/master", "committer_date": 1692795921000, "content_id": "40461013541a9328fad0af1f351f5805663d1bf6", "detected_licenses": [ "MIT" ], "directory_id": "f7863c02970118d251846b896ddca4a7dff1066f", "extension": "py", "fi...
2.40625
stackv2
from typing import Tuple, List, Dict, Union, Optional, Generator from hwt.doc_markers import internal from hwt.hdl.operatorUtils import replace_input_in_expr from hwt.hdl.sensitivityCtx import SensitivityCtx from hwt.hdl.statements.statement import HdlStatement, SignalReplaceSpecType from hwt.hdl.statements.utils.list...
207
33.22
100
17
1,723
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.code-after-unconditional-return_af9236246f7bf9d8_307d14bd", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.code-after-unconditional-return", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "code...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.code-after-unconditional-return", "rules.python.lang.maintainability.code-after-unconditional-return" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 134, 142 ]
[ 135, 143 ]
[ 9, 9 ]
[ 14, 14 ]
[ "", "" ]
[ "code after return statement will not be executed", "code after return statement will not be executed" ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
assignmentContainer.py
/hwt/hdl/statements/assignmentContainer.py
Nic30/hwt
MIT
2024-11-18T19:11:53.660871+00:00
1,690,911,929,000
b71c48763e8ec2e106216bc4404fcf9c33d33b4a
3
{ "blob_id": "b71c48763e8ec2e106216bc4404fcf9c33d33b4a", "branch_name": "refs/heads/master", "committer_date": 1690911929000, "content_id": "bbc0442bec43a49d60654258f755942082186e23", "detected_licenses": [ "MIT" ], "directory_id": "e70ccd8d27af13e1568e2d1d6f3d918df2b72e3f", "extension": "py", "fi...
2.953125
stackv2
from ipaddress import IPv4Address from qrl.core import config class IPMetadata(object): def __init__(self, ip_str: str, port: int): self._ip = ip_str try: self._port = int(port) except ValueError: raise ValueError('Invalid Peer Port {}'.format(port)) self...
80
25.55
90
19
480
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_cf417c2269581e68_05fabcb0", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 51, 73 ]
[ 51, 73 ]
[ 16, 20 ]
[ 41, 36 ]
[ "", "" ]
[ "Is \"is_global\" a function or an attribute? If it is a function, you may have meant self.ip_address.is_global() because self.ip_address.is_global is always true.", "Is \"is_global\" a function or an attribute? If it is a function, you may have meant answer.is_global() because answer.is_global is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
IPMetadata.py
/src/qrl/core/p2p/IPMetadata.py
theQRL/QRL
MIT
2024-11-18T19:11:53.881204+00:00
1,629,822,416,000
511420c8ecc515a49498ec0b75b8782ddc42c833
2
{ "blob_id": "511420c8ecc515a49498ec0b75b8782ddc42c833", "branch_name": "refs/heads/main", "committer_date": 1629822416000, "content_id": "924afab969048420cb895dba6bcc86550461ca94", "detected_licenses": [ "Apache-2.0" ], "directory_id": "905efe33b2460e3256414f8344362a4bdcd148fb", "extension": "py", ...
2.3125
stackv2
from pynput import keyboard import irsdk import logging import yaml import os import time from threading import Thread SCRIPTNAME = "trackbuilder" CONFIG_FILE = "ircorners.cfg" class State: ir_connected = False current_track_id = -1 current_track_name = "" current_corner = "" corner_list = [] ...
205
39.51
174
21
1,902
python
[{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_fee799e1c7457eb3_3d79000f", "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...
10
true
[ "", "", "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainabili...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 64, 64, 73, 73, 192 ]
[ 64, 64, 73, 73, 192 ]
[ 36, 58, 54, 76, 64 ]
[ 53, 73, 71, 91, 76 ]
[ "", "", "", "", "" ]
[ "Is \"is_initialized\" a function or an attribute? If it is a function, you may have meant ir.is_initialized() because ir.is_initialized is always true.", "Is \"is_connected\" a function or an attribute? If it is a function, you may have meant ir.is_connected() because ir.is_connected is always true.", "Is \"is...
[ 5, 5, 5, 5, 5 ]
[ "", "", "", "", "" ]
[ "", "", "", "", "" ]
trackbuilder.py
/src/trackbuilder.py
asphaltschneider/ircorners
Apache-2.0
2024-11-18T19:23:48.816594+00:00
1,568,207,521,000
41dda4feb4957cd9595b427daa0b4d39baa8950f
2
{ "blob_id": "41dda4feb4957cd9595b427daa0b4d39baa8950f", "branch_name": "refs/heads/master", "committer_date": 1568207521000, "content_id": "bc79cc97a93311803f65b40e78dc1f895bc9adce", "detected_licenses": [ "MIT" ], "directory_id": "be4b1bd7a44c8ca07f13fa8744f61b5a5ac92d4c", "extension": "py", "fi...
2.40625
stackv2
from flask import Flask, session, render_template, url_for, redirect, request, escape app=Flask(__name__) from flask_bootstrap import Bootstrap import sqlite3 as sql app.secret_key = 'any random string' def create_app(): app = Flask(__name__) Bootstrap(app) return app posts = [ { 'author': 'Jatin Nagpal', 'ti...
83
23.64
102
16
515
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.code-after-unconditional-return_14a2bd5173483d7d_0cfdad70", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.code-after-unconditional-return", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "code...
2
true
[ "" ]
[ "rules.python.lang.maintainability.code-after-unconditional-return" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 64 ]
[ 65 ]
[ 4 ]
[ 15 ]
[ "" ]
[ "code after return statement will not be executed" ]
[ 5 ]
[ "" ]
[ "" ]
hello.py
/app/hello.py
Jatin-Nagpal/FlaskApp
MIT
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.correctness.unchecked-subprocess-call", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args" ]
[ "correctness", "security", "security" ]
[ "MEDIUM", "LOW", "MEDIUM" ]
[ "MEDIUM", "HIGH", "HIGH" ]
[ 28, 28, 28 ]
[ 28, 28, 28 ]
[ 1, 1, 6 ]
[ 5, 21, 20 ]
[ "", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "This is not checking the return value of this subprocess call; if it fails no exception will be raised. Consider subprocess.check_call() instead", "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 t...
[ 5, 7.5, 7.5 ]
[ "", "LOW", "MEDIUM" ]
[ "", "HIGH", "MEDIUM" ]
edit-question.py
/libraryh3lp-sdk-python/examples/edit-question.py
GeorgetownMakerHubOrg/libraryh3lpListener
MIT
2024-11-18T19:23:59.589348+00:00
1,541,156,088,000
5f685832cf83f3d99b7a4bcb5f4fe7b1c7537d9c
3
{ "blob_id": "5f685832cf83f3d99b7a4bcb5f4fe7b1c7537d9c", "branch_name": "refs/heads/master", "committer_date": 1541156088000, "content_id": "3e702b0d3a0df8830cb8598264f2710473ef6f03", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "426101c060b52355c1991c95301f49ef6e4c22ca", "extension": "p...
2.8125
stackv2
from __future__ import division import torch from ignite.metrics.metric import Metric from ignite.exceptions import NotComputableError from ignite._utils import to_onehot class Recall(Metric): """ Calculates recall. - `update` must receive output of the form `(y_pred, y)`. If `average` is True, re...
54
31.43
103
14
401
python
[{"finding_id": "semgrep_rules.python.lang.correctness.useless-eqeq_a0b54346decf8e5e_7fdd2eac", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.useless-eqeq", "finding_type": "correctness", "severity": "low", "confidence": "medium", "message": "This expression is always True: `result == result` or `re...
1
true
[ "" ]
[ "rules.python.lang.correctness.useless-eqeq" ]
[ "correctness" ]
[ "MEDIUM" ]
[ "LOW" ]
[ 50 ]
[ 50 ]
[ 16 ]
[ 32 ]
[ "" ]
[ "This expression is always True: `result == result` or `result != result`. If testing for floating point NaN, use `math.isnan(result)`, or `cmath.isnan(result)` if the number is complex." ]
[ 3 ]
[ "" ]
[ "" ]
recall.py
/ignite/metrics/recall.py
amitibo/ignite
BSD-3-Clause
2024-11-18T19:24:03.048907+00:00
1,670,878,064,000
b3321d8171ae3847ee71f3e9849af23965f677d6
3
{ "blob_id": "b3321d8171ae3847ee71f3e9849af23965f677d6", "branch_name": "refs/heads/master", "committer_date": 1670878064000, "content_id": "6f2137b7761704d6256d283e43022a59cfc50dc6", "detected_licenses": [ "Apache-2.0" ], "directory_id": "79a735891c35f4a80ff0ed09af307f7d66cb7c2d", "extension": "py"...
2.859375
stackv2
# Copyright 2019-2021 Tóth, László Attila # Distributed under the terms of the Apache License, Version 2.0 import fcntl import os class FileLock: def __init__(self, filename: str): self._filename = filename self._fd = None def lock(self): while not self.is_locked: self.tr...
51
21.39
73
13
298
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_e99bb93c101950d6_db0e82ee", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 14, 18 ]
[ 14, 18 ]
[ 19, 12 ]
[ 33, 26 ]
[ "", "" ]
[ "Is \"is_locked\" a function or an attribute? If it is a function, you may have meant self.is_locked() because self.is_locked is always true.", "Is \"is_locked\" a function or an attribute? If it is a function, you may have meant self.is_locked() because self.is_locked is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
lock.py
/dewi_utils/lock.py
LA-Toth/dewi_utils
Apache-2.0
2024-11-18T19:24:03.203516+00:00
1,582,698,965,000
326d91babd2fea56a2c9760e3c0a8b9cf2e65345
3
{ "blob_id": "326d91babd2fea56a2c9760e3c0a8b9cf2e65345", "branch_name": "refs/heads/master", "committer_date": 1582698965000, "content_id": "2b9f1ab075fea317ff9361ba58e5bea4126a614f", "detected_licenses": [ "MIT" ], "directory_id": "3315182990348ea2ab16ceda30447665cf029cd9", "extension": "py", "fi...
2.75
stackv2
from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.ensemble import VotingClassifier from sklearn.linear_model import LogisticRegression from sklearn.ensemble import GradientBoostingClassifier from sklearn.ensemble import AdaBoostClassifier from sklearn.ensemble import RandomForestClassifier from sklea...
90
43.22
98
17
992
python
[{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.string-is-comparison_4fd675e8eb72eab4_750b1457", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.string-is-comparison", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Found st...
2
true
[ "", "" ]
[ "rules.python.lang.correctness.common-mistakes.string-is-comparison", "rules.python.lang.correctness.common-mistakes.string-is-comparison" ]
[ "correctness", "correctness" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 48, 52 ]
[ 48, 52 ]
[ 20, 20 ]
[ 46, 46 ]
[ "", "" ]
[ "Found string comparison using 'is' operator. The 'is' operator is for reference equality, not value equality, and therefore should not be used to compare strings. For more information, see https://github.com/satwikkansal/wtfpython#-how-not-to-use-is-operator\"", "Found string comparison using 'is' operator. The ...
[ 7.5, 7.5 ]
[ "", "" ]
[ "", "" ]
BatyaGGClassifier.py
/BatyaGGClassifier.py
berdakh/BCI-controlled-UR-manipulator
MIT
2024-11-18T19:24:05.775851+00:00
1,496,049,488,000
3190a7a76f2cf7662dccb9a5432d71037561a404
3
{ "blob_id": "3190a7a76f2cf7662dccb9a5432d71037561a404", "branch_name": "refs/heads/master", "committer_date": 1496049488000, "content_id": "f0b63de882293785de11b5dd77794da841ae1b7a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e8eadb4019e12319aae312172f2ecb634462d1a9", "extension": "py"...
2.703125
stackv2
#!/usr/bin/env # -*- coding:utf-8 -*- import time import math import pyproj import datetime from sympy import Symbol, sqrt, Eq, Abs from sympy.solvers import solve from sympy import linsolve from scipy.optimize import least_squares from ..utils.utils import SPEED_OF_LIGHT from ..model.point import point from ..model....
133
35.83
152
23
1,523
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_b34f2e9cde39d458_e746a292", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 55, 107 ]
[ 55, 107 ]
[ 9, 9 ]
[ 25, 25 ]
[ "", "" ]
[ "Is \"is_resolved\" a function or an attribute? If it is a function, you may have meant self.is_resolved() because self.is_resolved is always true.", "Is \"is_resolved\" a function or an attribute? If it is a function, you may have meant self.is_resolved() because self.is_resolved is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
lsm.py
/trilateration/compute/lsm.py
robinroyer/trilateration
Apache-2.0
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.maintainability.useless-if-body", "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-...
[ "maintainability", "security", "security", "security", "security" ]
[ "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "MEDIUM", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 35, 130, 130, 229, 229 ]
[ 39, 130, 130, 229, 229 ]
[ 2, 7, 7, 4, 4 ]
[ 64, 55, 55, 43, 43 ]
[ "", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Useless if statement; both blocks have the same body", "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 ...
[ 5, 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:32.930015+00:00
1,615,843,017,000
fba987047db9d2374f0dd3367a28eb7c4ed506ec
2
{ "blob_id": "fba987047db9d2374f0dd3367a28eb7c4ed506ec", "branch_name": "refs/heads/master", "committer_date": 1615843017000, "content_id": "937726f007402fe2a90ffc07e1c5bc4510c6c2a5", "detected_licenses": [ "MIT" ], "directory_id": "7a41e5f5b8ea8eb1defb44ed227298904b9d36d8", "extension": "py", "fi...
2.40625
stackv2
import numpy as np import os import random from collections import Counter, defaultdict, OrderedDict import random from lisa.core.genome_tools import Region class Gene: ''' A gene has a unique genomic region, an accepted name, and aliases that also correspond to that gene or genomic region ''' def __...
306
34.82
175
23
2,544
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_8b7d2ab5c8db6360_d13daa2a", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
4
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 115, 219 ]
[ 115, 219 ]
[ 9, 24 ]
[ 26, 45 ]
[ "", "" ]
[ "Is \"is_noncoding\" a function or an attribute? If it is a function, you may have meant self.is_noncoding() because self.is_noncoding is always true.", "Is \"is_noncoding\" a function or an attribute? If it is a function, you may have meant add_gene.is_noncoding() because add_gene.is_noncoding is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
gene_selection.py
/lisa/core/gene_selection.py
liangdp1984/lisa2
MIT
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:58:37.873244+00:00
1,692,974,582,000
0b2203da1ea073acb71c50c30ceecb1981ac6cd7
3
{ "blob_id": "0b2203da1ea073acb71c50c30ceecb1981ac6cd7", "branch_name": "refs/heads/main", "committer_date": 1692974582000, "content_id": "f5fdc1d95d7637aa1546a8bba783f9890941d3f1", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "fd47751e91f8bd43d6223033ce947ff720038f87", "extension": "py"...
3
stackv2
from __future__ import print_function import re import sqlparse from sqlparse.sql import IdentifierList, Identifier, Function from sqlparse.tokens import Keyword, DML, Punctuation cleanup_regex = { # This matches only alphanumerics and underscores. "alphanum_underscore": re.compile(r"(\w+)$"), # This match...
227
33.98
88
19
1,781
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_ec393ac93ddb3027_b888685e", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 68, 184 ]
[ 68, 184 ]
[ 12, 13 ]
[ 27, 25 ]
[ "", "" ]
[ "Is \"is_group\" a function or an attribute? If it is a function, you may have meant parsed.is_group() because parsed.is_group is always true.", "Is \"is_keyword\" a function or an attribute? If it is a function, you may have meant t.is_keyword() because t.is_keyword is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
parseutils.py
/litecli/packages/parseutils.py
dbcli/litecli
BSD-3-Clause
2024-11-18T19:58:38.383166+00:00
1,517,634,153,000
70bc2d296c8500299864e087974be309bfea8fd8
2
{ "blob_id": "70bc2d296c8500299864e087974be309bfea8fd8", "branch_name": "refs/heads/master", "committer_date": 1517634153000, "content_id": "80ba521ff7c43117fe1fe81015dc9b15fc7f4fcf", "detected_licenses": [ "MIT" ], "directory_id": "0fb856e275a760a7daf06b9ec7419306fbae3870", "extension": "py", "fi...
2.4375
stackv2
import tarfile import babi_parse import numpy as np import subprocess from keras.utils.data_utils import get_file from keras.layers.embeddings import Embedding from keras import layers from keras.layers import recurrent from keras.models import Model from keras.preprocessing.sequence import pad_sequences def vecto...
136
30.73
158
13
1,101
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_5f38fd5eae10fef6_5fb53564", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 80 ]
[ 80 ]
[ 23 ]
[ 67 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
babi_allAtOnce.py
/babi/babi_allAtOnce.py
cguptac/blog
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.correctness.unchecked-subprocess-call", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-tru...
[ "security", "security", "correctness", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM", "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "HIGH", "HIGH" ]
[ 58, 58, 182, 183, 183 ]
[ 58, 58, 182, 184, 183 ]
[ 20, 20, 24, 26, 65 ]
[ 89, 89, 28, 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, 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:22.578779+00:00
1,620,904,239,000
c83f52cfd8d8fd1da357d65f24ea664dc817e539
2
{ "blob_id": "c83f52cfd8d8fd1da357d65f24ea664dc817e539", "branch_name": "refs/heads/main", "committer_date": 1620904239000, "content_id": "03e7a1683ac55a502e9660d1760560e5c770ed0e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3d82f7a9011eb0ead04ac1474be39b357e7900ca", "extension": "py", ...
2.5
stackv2
import numpy as np from tensorflow.keras import preprocessing import cv2 import pandas as pd from postprocessing import * import os import Augmentor def load_datasets(filepath, sample_list, label_list, mark, a4c_or_a2c, m): """ we have illustrated the file structure of datasets and label in readme. filepa...
135
36.04
113
26
1,432
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-if-body_e8ba2df23f87b227_dff55239", "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...
1
true
[ "" ]
[ "rules.python.lang.maintainability.useless-if-body" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 21 ]
[ 24 ]
[ 5 ]
[ 17 ]
[ "" ]
[ "Useless if statement; both blocks have the same body" ]
[ 5 ]
[ "" ]
[ "" ]
load_data.py
/train/method/model/load_data.py
Littlehong-1997/echo-1
Apache-2.0
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.426013+00:00
1,690,444,701,000
879757d6da9fbbcf3dcd7f54a55077ba29b2b384
3
{ "blob_id": "879757d6da9fbbcf3dcd7f54a55077ba29b2b384", "branch_name": "refs/heads/master", "committer_date": 1690444701000, "content_id": "5b8d35c9d9ab645f96afa0c0d9134dbbdfa20727", "detected_licenses": [ "MIT" ], "directory_id": "58b519ac1ed300df8b1a03af351194363b9cff81", "extension": "py", "fi...
2.640625
stackv2
# random forest class for tuning class rf_model(): # Make sure parameters that need to be integers are integers for parameter_name in ['max_depth', 'n_estimators']: params[parameter_name] = int(params[parameter_name]) rf_results = RandomForestClassifier(**params,...
41
45.34
123
19
449
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_f7c6199c7d64b874_69f53b47", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 18, 31 ]
[ 18, 31 ]
[ 9, 9 ]
[ 107, 28 ]
[ "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
randomforest.py
/src/algos/randomforest.py
JordanRex/yaaml
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:33.637935+00:00
1,482,240,546,000
aaffb7b98fad11ecad65502d36d3733e9afed9e3
3
{ "blob_id": "aaffb7b98fad11ecad65502d36d3733e9afed9e3", "branch_name": "refs/heads/master", "committer_date": 1482240546000, "content_id": "64458f8b7c67de501dd03153504ee0ef7a2ab45c", "detected_licenses": [ "MIT" ], "directory_id": "26e33f6491218e2a1c677e917742e42bfcd0eaa6", "extension": "py", "fi...
2.890625
stackv2
import socket, select import os import hashlib import configparser RECV_BUFFER = 16 # Length of suffix def _trailing_zero_count(some_bytes): """Dumb trailing zero bit counting.""" bit_str = bin(int(some_bytes.hex(), 16)) return len(bit_str) - len(bit_str.rstrip('0')) #Function to broadcast chat messa...
175
34.95
99
23
1,346
python
[{"finding_id": "semgrep_rules.python.lang.correctness.list-modify-while-iterate_9468cd25e3355bd4_20eaa081", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.list-modify-while-iterate", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "It appears that `CONNECTION_LI...
2
true
[ "", "" ]
[ "rules.python.lang.correctness.list-modify-while-iterate", "rules.python.lang.maintainability.return-not-in-function" ]
[ "correctness", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "MEDIUM" ]
[ 19, 154 ]
[ 26, 154 ]
[ 5, 48 ]
[ 47, 67 ]
[ "", "" ]
[ "It appears that `CONNECTION_LIST` is a list that is being modified while in a for loop. This will likely cause a runtime error or an infinite loop.", "`return` only makes sense inside a function" ]
[ 7.5, 5 ]
[ "", "" ]
[ "", "" ]
Server.py
/pow_server/pow_server/Server.py
fanjiamin1/cryptocurrencies
MIT
2024-11-18T18:39:34.168258+00:00
1,515,297,971,000
c54da6219149d8fbf75e7e4cce370ed9ddcaff2f
3
{ "blob_id": "c54da6219149d8fbf75e7e4cce370ed9ddcaff2f", "branch_name": "refs/heads/master", "committer_date": 1515303420000, "content_id": "5c66bc6dea51cc4e1ccb0e6297fb69e22c8778d6", "detected_licenses": [ "MIT" ], "directory_id": "6c5524cd84bc5334b950ac2ef4acded55c9bfc00", "extension": "py", "fi...
2.890625
stackv2
"""データの読み込み&前処理。""" import pathlib import pandas as pd import pytoolkit as tk TRAIN_FILE = pathlib.Path('data/train.csv') TEST_FILE = pathlib.Path('data/test.csv') @tk.log.trace() def load_data(): """データの読み込み&前処理。""" df_train = pd.read_csv(TRAIN_FILE).sort_values('PassengerId') df_test = pd.read_csv(TE...
82
40.01
106
15
1,052
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-assignment-keyed_5419255702bdf8cf_be78d509", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-assignment-keyed", "finding_type": "maintainability", "severity": "low", "confidence": "medium", "message": "key `'Title'` in `df`...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "LOW", "LOW" ]
[ 37, 67 ]
[ 38, 68 ]
[ 5, 5 ]
[ 70, 78 ]
[ "", "" ]
[ "key `'Title'` in `df` is assigned twice; the first assignment is useless", "key `'Embarked'` in `df` is assigned twice; the first assignment is useless" ]
[ 3, 3 ]
[ "", "" ]
[ "", "" ]
data.py
/data.py
ak110/Kaggle-Titanic
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.maintainability.is-function-without-parentheses", "rules.python.lang.security.dangerous-globals-use", "rules.python.lang.security.dangerous-globals-use", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "security", "maintainability", "security", "security", "maintainability" ]
[ "LOW", "MEDIUM", "LOW", "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 95, 96, 108, 209, 211 ]
[ 95, 96, 108, 209, 211 ]
[ 13, 37, 25, 13, 12 ]
[ 33, 54, 45, 32, 28 ]
[ "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()'.", "Is \"is_abstract\" a function or an attribute? If it is a function, you may have meant clazz.is_abstract() because cla...
[ 5, 5, 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", "rules.python.lang.correctness.useless-eqeq" ]
[ "security", "correctness" ]
[ "LOW", "MEDIUM" ]
[ "MEDIUM", "LOW" ]
[ 39, 44 ]
[ 39, 44 ]
[ 11, 8 ]
[ 45, 23 ]
[ "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.", "This expression is always True: `pred == pred` ...
[ 5, 3 ]
[ "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:43.569772+00:00
1,603,105,251,000
e565602fef1abfa7329de406830a83712a821d22
3
{ "blob_id": "e565602fef1abfa7329de406830a83712a821d22", "branch_name": "refs/heads/master", "committer_date": 1603105251000, "content_id": "866789f48c77df240edf0051c4cf85058b44b74c", "detected_licenses": [ "MIT" ], "directory_id": "59dcaddb7dd3c19d6111d36a09ee9d6951df792d", "extension": "py", "fi...
2.609375
stackv2
import uuid from datetime import datetime from simple_events.models.db import db class Event(db.Model): """ User Model for storing user related details """ __tablename__ = "event" id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String(255), nullable=False) dat...
47
36.09
73
11
402
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_3b2604bfc80fbf51_4529a858", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
1
true
[ "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 45 ]
[ 45 ]
[ 9 ]
[ 25 ]
[ "" ]
[ "Is \"is_redeemed\" a function or an attribute? If it is a function, you may have meant self.is_redeemed() because self.is_redeemed is always true." ]
[ 5 ]
[ "" ]
[ "" ]
event.py
/server/simple_events/models/event.py
ZoiksScoob/SimpleEvents
MIT
2024-11-18T18:39:44.077978+00:00
1,631,607,013,000
f73a6e4087baf566b4bee498d35e8f5035e937de
3
{ "blob_id": "f73a6e4087baf566b4bee498d35e8f5035e937de", "branch_name": "refs/heads/master", "committer_date": 1631607013000, "content_id": "5febae6dec33873cd747901e836be24756d4f512", "detected_licenses": [ "MIT" ], "directory_id": "bc0e2cb45bb952f3809c420c674ae9e07bad37f4", "extension": "py", "fi...
3.453125
stackv2
# https://stackoverflow.com/questions/47295473/how-to-plot-using-matplotlib-python-colahs-deformed-grid import numpy as np import matplotlib.pyplot as plt from matplotlib.collections import LineCollection def plot_grid(x, y, ax=None, **kwargs): ax = ax or plt.gca() segs1 = np.stack((x, y), axis=2) segs2 ...
28
27.68
103
13
260
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_4322c7aff22941f5_ebf32242", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 17 ]
[ 17 ]
[ 18 ]
[ 57 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
gravity1_horizontal.py
/gravity/bak/gravity1_horizontal.py
baijianhua/pymath
MIT
2024-11-18T18:39:44.695912+00:00
1,574,667,748,000
512992937ed14caa7ea7f741d05a9bed0ddff65c
3
{ "blob_id": "512992937ed14caa7ea7f741d05a9bed0ddff65c", "branch_name": "refs/heads/master", "committer_date": 1574667748000, "content_id": "01b5bda0fb81acd35e804746ed5a0f0e72f42a30", "detected_licenses": [ "MIT" ], "directory_id": "a96b9cc11e2ae220b7bd27fcc36e3bd472cfe5ed", "extension": "py", "fi...
2.84375
stackv2
from typing import List class Element: def __init__(self, name, metadata): self.name = name self.metadata = metadata class Field(Element): def __init__(self, name: str, metadata, type): super().__init__(name, metadata) self.type = type class Param: def __init__(self, type,...
30
28.17
88
11
212
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_01cb8afa2d480da4_9a64ca24", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
3
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 16, 17, 18 ]
[ 16, 17, 18 ]
[ 9, 9, 9 ]
[ 22, 20, 20 ]
[ "", "", "" ]
[ "Is \"is_const\" a function or an attribute? If it is a function, you may have meant self.is_const() because self.is_const is always true.", "Is \"is_ptr\" a function or an attribute? If it is a function, you may have meant self.is_ptr() because self.is_ptr is always true.", "Is \"is_ref\" a function or an attr...
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
ipc_data.py
/ipc_data.py
gabriel-araujjo/ipc
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:00.364715+00:00
1,676,040,773,000
e28596f39a512df66bd5968575b50e610745fcdc
2
{ "blob_id": "e28596f39a512df66bd5968575b50e610745fcdc", "branch_name": "refs/heads/main", "committer_date": 1676040773000, "content_id": "78093843890dbc1c03d4e9515235bf66a12cb810", "detected_licenses": [ "MIT" ], "directory_id": "2f3c413ff9678ddc4aff0fb182c402c4466723ea", "extension": "py", "file...
2.46875
stackv2
import os import numpy as np import matplotlib as mpl from scipy.signal import sawtooth from pymor.models.iosys import PHLTIModel, LTIModel from algorithm.methods import IODMDMethod, PHDMDMethod, OIMethod from model.msd import msd from model.poro import poro class Experiment: """ Class for experiments. ...
184
27.83
110
18
1,870
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_4a45dabf711c0b25_429c6fa1", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
21
true
[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "...
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 78, 79, 82, 90, 91, 94, 103, 104, 107, 116, 117, 121, 130, 131, 134, 144, 145, 149, 158, 159, 163 ]
[ 78, 79, 82, 90, 91, 94, 103, 104, 107, 116, 117, 121, 130, 131, 134, 144, 146, 149, 158, 160, 163 ]
[ 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22 ]
[ 26, 62, 63, 26, 62, 63, 26, 62, 63, 26, 62, 63, 26, 62, 63, 28, 78, 95, 26, 78, 95 ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes s...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ]
config.py
/src/config.py
Jonas-Nicodemus/phdmd
MIT
2024-11-18T18:40:01.638049+00:00
1,691,142,960,000
856a3eac6fc1a5f712bf7e5c577c2df0ff2f9db8
3
{ "blob_id": "856a3eac6fc1a5f712bf7e5c577c2df0ff2f9db8", "branch_name": "refs/heads/main", "committer_date": 1691142960000, "content_id": "3d572809f17c80a328d7d78a876e01d518e5b062", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "985e4e1d0a6687506257a773fca5f1f179e1043f", "extension": "py"...
2.84375
stackv2
from fractions import Fraction as frac import musiclang.library as L def realize_tags(note, last_note=None, next_note=None): """ Given the tags of a given note returns a new melody with the realized tags Parameters ---------- note last_note next_note Returns ------- """ im...
243
33.87
112
16
2,257
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_9ad4d069e9defddb_a7e1d51e", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 221, 221 ]
[ 221, 221 ]
[ 33, 58 ]
[ 50, 74 ]
[ "", "" ]
[ "Is \"is_note\" a function or an attribute? If it is a function, you may have meant next_note.is_note() because next_note.is_note is always true.", "Is \"is_note\" a function or an attribute? If it is a function, you may have meant new_note.is_note() because new_note.is_note is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
ornementation.py
/musiclang/write/ornementation.py
MusicLang/musiclang
BSD-2-Clause
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