added stringdate 2024-11-18 17:59:49 2024-11-19 03:44:43 | created int64 126B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.09 | source stringclasses 1
value | text stringlengths 257 22.3k | num_lines int64 16 648 | avg_line_length float64 15 61 | max_line_length int64 31 179 | ast_depth int64 8 40 | length int64 101 3.8k | lang stringclasses 1
value | sast_semgrep_findings stringlengths 1.56k 349k | sast_semgrep_findings_count int64 1 162 | sast_semgrep_success bool 1
class | sast_semgrep_error stringclasses 1
value | cwe_ids listlengths 1 162 | rule_ids listlengths 1 162 | subcategories listlengths 1 162 | confidences listlengths 1 162 | severities listlengths 1 162 | line_starts listlengths 1 162 | line_ends listlengths 1 162 | column_starts listlengths 1 162 | column_ends listlengths 1 162 | owasp_categories listlengths 1 162 | messages listlengths 1 162 | cvss_scores listlengths 1 162 | likelihoods listlengths 1 162 | impacts listlengths 1 162 | filename stringlengths 4 105 | path stringlengths 5 372 | repo_name stringlengths 5 115 | license stringclasses 385
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-19T02:28:18.238958+00:00 | 1,499,308,198,000 | dac1b51381216d672606691f655377c5964d1943 | 3 | {
"blob_id": "dac1b51381216d672606691f655377c5964d1943",
"branch_name": "refs/heads/master",
"committer_date": 1499308198000,
"content_id": "65baf64fe1e59d0ab114f1a59b21637a65b8fb75",
"detected_licenses": [
"MIT"
],
"directory_id": "3f42a7ec7b1bcc707c7d2ddcfcd1a3f8be5a77cb",
"extension": "py",
"fi... | 2.609375 | stackv2 | import asyncio
import json
import aiomysql
import discord
from discord.ext import commands
startup_extensions = ['ffxiv', 'scheduler']
bot = commands.Bot(command_prefix=">>", description="Smurf is an MMORPG Guild/Raid management focused Discord bot. See https://github.com/ccubed/Smurf")
settings = json.load(open('set... | 141 | 32.11 | 153 | 21 | 1,121 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9930286a0d6c6a61_409c6c0c", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 9 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-95",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.eval-detected",
"rules.python.... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"MEDIUM",
"HIGH"
] | [
32,
32,
37,
37,
85,
124,
124
] | [
32,
32,
37,
37,
85,
124,
124
] | [
23,
23,
27,
27,
18,
19,
19
] | [
141,
141,
113,
113,
49,
41,
41
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A03:2021 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5,
5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | smurf.py | /smurf.py | ccubed/Smurf | MIT | |
2024-11-19T02:28:20.756527+00:00 | 1,486,587,797,000 | 1fe62797e0d9a653eab5d4dc850abcb62ff4367c | 2 | {
"blob_id": "1fe62797e0d9a653eab5d4dc850abcb62ff4367c",
"branch_name": "refs/heads/master",
"committer_date": 1486587797000,
"content_id": "c0519c3365e920d92eb4fd39b8b7b31ef4719e5a",
"detected_licenses": [
"MIT"
],
"directory_id": "1a663b69c47ac56c38aed5704fc403df82b48491",
"extension": "py",
"fi... | 2.453125 | stackv2 | import pickle, sys, numpy as np, re
from IPython import embed
from teafacto.util import argprun, tokenize
def reluri_tokenize(reluri):
return tokenize(reluri.replace("/", " ").replace("_", " "))
def run(trainp="../fb_train.tsv",
testp="../fb_test.tsv",
validp="../fb_valid.tsv",
outp="dat... | 146 | 31.12 | 174 | 15 | 1,291 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d15bdb5e9f0fe6c1_4897a84d", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
142
] | [
142
] | [
5
] | [
38
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | datamat.gen.py | /data/simplequestions/clean/datamat.gen.py | lukovnikov/teafacto | MIT | |
2024-11-19T02:28:22.762580+00:00 | 1,692,614,967,000 | b5895d19b4683bdcb766a5570455a8cb8e2e2b32 | 3 | {
"blob_id": "b5895d19b4683bdcb766a5570455a8cb8e2e2b32",
"branch_name": "refs/heads/main",
"committer_date": 1692614967000,
"content_id": "dd3bbb3a3a1c3b0c55968bbb34e2a89d250db5a3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a6a22bae018dee863f1606fafaa05a4365555754",
"extension": "py",
... | 2.59375 | stackv2 | import argparse
import pickle
import matplotlib.pyplot as plt
import matplotlib
from cycler import cycler
from collections import namedtuple
from collections import defaultdict
from typing import Dict, Any, List
import os,sys
from scipy import stats
import numpy as np
import score
# KEYS ARE:
# - VICTIM: test_average... | 392 | 35.42 | 131 | 20 | 3,757 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1dc46c61066c5fac_db61d6d2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
21
] | [
21
] | [
16
] | [
30
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | plot.py | /src/plot.py | ssg-research/WAFFLE | Apache-2.0 | |
2024-11-19T02:28:27.797536+00:00 | 1,603,608,686,000 | 0b4d8f620c54fd85c86a7df70f15a8976897f550 | 3 | {
"blob_id": "0b4d8f620c54fd85c86a7df70f15a8976897f550",
"branch_name": "refs/heads/main",
"committer_date": 1603608686000,
"content_id": "fa9b7e72ee25ed27196e46cef59d0fa5ed9285f7",
"detected_licenses": [
"MIT"
],
"directory_id": "6848a145e2d4857195bea499acd995e5cc3d909a",
"extension": "py",
"file... | 2.9375 | stackv2 | import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from sklearn.ensemble import RandomForestClassifier
import pickle
data = pd.read_csv("final_data.csv")
y = data['class']
X = data.drop('class', axis=1)
X_train, X_test, y_train, y_test = train_test_split... | 21 | 29.9 | 95 | 10 | 161 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f1522069c1c7282e_90a3577d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
21
] | [
21
] | [
1
] | [
52
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | train.py | /training/train.py | qypeng12/CovidML | MIT | |
2024-11-19T02:28:28.861606+00:00 | 1,602,431,847,000 | d42f8c130278bf75da5669f0834030e6c2a4e363 | 2 | {
"blob_id": "d42f8c130278bf75da5669f0834030e6c2a4e363",
"branch_name": "refs/heads/master",
"committer_date": 1602431847000,
"content_id": "840d2c0489e4fee0ccc89fcab63545ca1b92beb5",
"detected_licenses": [
"MIT"
],
"directory_id": "6ef3c589d4aa5190ba2d14599aa62df80ca55ef7",
"extension": "py",
"fi... | 2.40625 | stackv2 | from xml.dom import minidom
from torchsketch.utils.general_utils.torchsketch import *
def count_strokes_4_svg(svg_url, verbose = True):
doc = minidom.parse(svg_url)
path_strings = [path.getAttribute('d') for path in doc.getElementsByTagName('path')]
doc.unlink()
assert type(path_strings) == list
if verbose == ... | 16 | 26.56 | 85 | 13 | 105 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_0f2d06804ec26757_f9fb7eb7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
1
] | [
1
] | [
1
] | [
28
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | count_strokes_4_svg.py | /torchsketch/utils/svg_specific_utils/count_strokes_4_svg.py | zhangshuaizxc/TCN | MIT | |
2024-11-19T02:28:30.995391+00:00 | 1,313,421,481,000 | 917179dc231f9766c8f3271d08f9e0b283a8bdf3 | 3 | {
"blob_id": "917179dc231f9766c8f3271d08f9e0b283a8bdf3",
"branch_name": "refs/heads/master",
"committer_date": 1313421481000,
"content_id": "bdf353f5da578c606f91606d54f2915ca8f94afd",
"detected_licenses": [
"MIT"
],
"directory_id": "bab9da45a0f69e1973c7b36bb35fa3e5ed9efc74",
"extension": "py",
"fi... | 2.546875 | stackv2 | # $Id: TestUtils.py 1047 2009-01-15 14:48:58Z graham $
#
# Support functions for running different test suites
#
# Test suites are selected using a command line argument:
#
# Test classes are:
# "unit" These are stand-alone tests that all complete within a few
# seceonds and do not depend ... | 242 | 40.83 | 135 | 14 | 2,366 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.no-strings-as-booleans_f796db8228958b5b_b15a0df5", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.no-strings-as-booleans", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Using strings as booleans in Python ... | 3 | true | [
"CWE-295"
] | [
"rules.python.lang.security.audit.httpsconnection-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
194
] | [
194
] | [
22
] | [
60
] | [
"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"
] | TestUtils.py | /src/AdminUI/MiscLib/TestUtils.py | bhavanaananda/DataStage | MIT | |
2024-11-19T02:28:43.886626+00:00 | 1,626,413,730,000 | de1aa1ae12274b83a3d6496fb20045a7e4c5f515 | 3 | {
"blob_id": "de1aa1ae12274b83a3d6496fb20045a7e4c5f515",
"branch_name": "refs/heads/main",
"committer_date": 1626413730000,
"content_id": "8d572b753a3e39babc8aa09b8c4c178a984c85c1",
"detected_licenses": [
"MIT"
],
"directory_id": "41c0d7f585fe2fcb2432aca82a3bab38b087a45f",
"extension": "py",
"file... | 2.875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 15 10:13:31 2021
@author: ilmaaliyaf
"""
import networkx as nx
from partition import partition
class Graph(nx.graph.Graph):
def __init__(self, graph_type='', parameter=[]):
if graph_type not in ['path', 'cycle', 'complete', 'complete_b... | 130 | 31.52 | 87 | 20 | 972 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.exceptions.raise-not-base-exception_a9a33a6852146c53_efe98183", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.exceptions.raise-not-base-exception", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "In Python3... | 2 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
30
] | [
30
] | [
26
] | [
73
] | [
"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"
] | graph_object.py | /graph_object.py | fiddien/graph-partition-dimension | MIT | |
2024-11-19T02:28:44.858814+00:00 | 1,610,317,062,000 | 927c4359be7e9c4f9f1dbed7c717527cfa09e850 | 3 | {
"blob_id": "927c4359be7e9c4f9f1dbed7c717527cfa09e850",
"branch_name": "refs/heads/master",
"committer_date": 1610317062000,
"content_id": "ed8889c16f79d4f6c7dde1beb1cf75fd9ede096f",
"detected_licenses": [
"MIT"
],
"directory_id": "650635c147fb7acb299eedf3eab5dbbfaec365a5",
"extension": "py",
"fi... | 2.71875 | stackv2 | """The 'uncommitted' command-line tool itself."""
import os
import re
import sys
from optparse import OptionParser
from subprocess import CalledProcessError, check_output
USAGE = '''usage: %prog [options] path [path...]
Checks the status of all git, Subversion, and Mercurial repositories
beneath the paths given ... | 266 | 37.03 | 108 | 15 | 2,450 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_11542994bd6ff99f_d1958b3c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 4 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
38,
59
] | [
38,
59
] | [
16,
17
] | [
52,
38
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | command.py | /uncommitted/command.py | brorfred/uncommitted | MIT | |
2024-11-19T02:28:45.458829+00:00 | 1,434,553,499,000 | 58b2b8fad8920d57d628508f4e6fb83736b16da9 | 3 | {
"blob_id": "58b2b8fad8920d57d628508f4e6fb83736b16da9",
"branch_name": "refs/heads/master",
"committer_date": 1434553499000,
"content_id": "34da31791c033843a4c4f1a69e4fb7becfc4b673",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ceabc9eb77069ad329e49cf66fd9f39ad3d89e0a",
"extension": "p... | 2.71875 | stackv2 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import redis
import json
import pickle
class PolygonHandler:
# Constructor
def __init__(self):
self.numberPoints = 100
self.X = [0] * self.numberPoints
self.Y = [0] * self.numberPoints
se... | 62 | 28.69 | 87 | 13 | 435 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5a0abd6ce96a6c9a_6416a187", "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"
] | [
51
] | [
51
] | [
15
] | [
40
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | scatter_plot_animation.py | /visualization/scatter_plot_animation.py | ihuston/ds-cfpylearning | BSD-3-Clause | |
2024-11-19T02:28:46.758084+00:00 | 1,611,666,120,000 | 3385a7edf71720b39f4b8d8e5d620d126b63fa70 | 3 | {
"blob_id": "3385a7edf71720b39f4b8d8e5d620d126b63fa70",
"branch_name": "refs/heads/master",
"committer_date": 1611666120000,
"content_id": "e4ab329b7c9dabd61991375e9e75d7c9ada139ac",
"detected_licenses": [
"MIT"
],
"directory_id": "6ee8c7762f1a290aa3b918c16f4032f85f9759f6",
"extension": "py",
"fi... | 2.875 | stackv2 | from .fe_approx1D import *
import sys
"""
This module extends and replaces functions in the module fe_approx1D.
Two major changes are implemented:
* an element is defined in terms of a reference cell,
a set of vertices, a set of degrees of freedom,
with a dof map and a geometric mapping onto the physical
sp... | 287 | 36.16 | 84 | 18 | 3,041 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_04d54c1b18e9ad42_b1a91d90", "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"
] | [
287
] | [
287
] | [
5
] | [
14
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | fe_approx1D_numint.py | /src/fe_approx1D_numint.py | vnikoofard/finite-element-intro | MIT | |
2024-11-19T02:28:50.990063+00:00 | 1,462,264,792,000 | 7280c990dffccf260684b713ca19f9634d0cb66a | 2 | {
"blob_id": "7280c990dffccf260684b713ca19f9634d0cb66a",
"branch_name": "refs/heads/master",
"committer_date": 1462264792000,
"content_id": "c703f5691b1b59289ca91ba59bbcc5eaa26454aa",
"detected_licenses": [
"MIT"
],
"directory_id": "76536ef87b9c6b027c472f281a9e7902ff11c657",
"extension": "py",
"fi... | 2.390625 | stackv2 | # coding: utf-8
"""
AutoML GPU Track
__author__ : Abhishek Thakur
"""
import cPickle
import numpy as np
import sys
sys.setrecursionlimit(100000)
from sklearn import preprocessing
from keras.layers.core import Dense, Dropout, Activation
from keras.utils import np_utils
from keras.models import Sequential
from keras.lay... | 86 | 29.45 | 79 | 12 | 693 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_b5c3a1e02a99335d_70e0f397", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
20,
21,
22,
23
] | [
20,
21,
22,
23
] | [
14,
13,
14,
10
] | [
62,
60,
62,
59
] | [
"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
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | evita.py | /evita.py | shashankg7/automl_gpu | MIT | |
2024-11-19T02:28:53.246612+00:00 | 1,614,159,593,000 | 386e3e90715972aec422d30eafe7db11fadeeeb3 | 2 | {
"blob_id": "386e3e90715972aec422d30eafe7db11fadeeeb3",
"branch_name": "refs/heads/master",
"committer_date": 1614159593000,
"content_id": "413f002ba43d7ed1ee1b2e43007836949a5e9878",
"detected_licenses": [
"Unlicense"
],
"directory_id": "5d1a3d4b7785119ba09c48e40f4327ddae8860f9",
"extension": "py",... | 2.484375 | stackv2 | import subprocess
import os
from .util import read_file, write_file
def cpp_to_assembly(cpp_code, source_file, gpp, tmp_builder):
'''
tranform the cpp code contained in the str in sourec_file to a String that contain the generated assembly code
'''
tmp_dir = tmp_builder.build_tempory_folder(("cpp_to_as... | 38 | 26.39 | 114 | 11 | 257 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_69ad8953c49f5b98_0213d0a3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
33
] | [
33
] | [
5
] | [
37
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | cpp.py | /asmpatch/cpp.py | marius851000/asmpatch | Unlicense | |
2024-11-19T02:36:47.486870+00:00 | 1,563,454,335,000 | c72070a65cf9724493238a5508e6406f1619b6b4 | 2 | {
"blob_id": "c72070a65cf9724493238a5508e6406f1619b6b4",
"branch_name": "refs/heads/master",
"committer_date": 1563454335000,
"content_id": "d72e47e6d1d8ace956e5bc1d80755d0a5c4a33e0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3702b0c07d32a51f7eb2448a925330a8c825557c",
"extension": "py"... | 2.375 | stackv2 | from __future__ import print_function
from .base import Problem
from keras.models import Sequential
from keras.layers import Dense, LSTM, SimpleRNN, Activation
from keras.optimizers import Adam, RMSprop
from keras.callbacks import LambdaCallback
from keras.utils.data_utils import get_file
from keras import backend as K... | 121 | 38.64 | 82 | 25 | 1,113 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_5b10417b196d9ddb_ea6f3e0e", "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"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
65
] | [
65
] | [
27
] | [
38
] | [
"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"
] | text.py | /pygrn/problems/text.py | nico1as/pyGRN | Apache-2.0 | |
2024-11-19T02:36:48.397183+00:00 | 1,481,218,147,000 | d0b2bab4aba54a43d8393cde101a48fe6bea82ab | 2 | {
"blob_id": "d0b2bab4aba54a43d8393cde101a48fe6bea82ab",
"branch_name": "refs/heads/master",
"committer_date": 1481218147000,
"content_id": "8263d9bfab27b79045f26e1a1396b694c94ba358",
"detected_licenses": [
"MIT"
],
"directory_id": "7ee3d58796a1615f235fed185554b3c1be9bb59d",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/python3
import json
import sys
import csv
import datetime
import os
from django.core.management.base import BaseCommand
from django.utils import timezone
from checker.models import Task
from checker.models import Flag
from cabinet.models import Team
from cabinet.models import User
from cabinet.models impor... | 91 | 26.56 | 87 | 18 | 580 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_6afdcadea98ecd3e_0f986e44", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
66
] | [
66
] | [
9
] | [
41
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'user' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | teams_fix.py | /checksystem/checksystem/checker/management/commands/teams_fix.py | mikhailtarrasov/qctf-starter-2016 | MIT | |
2024-11-19T02:36:49.678136+00:00 | 1,543,269,385,000 | f0feac7ee7481ead6f6a8df281e062e83c04431a | 2 | {
"blob_id": "f0feac7ee7481ead6f6a8df281e062e83c04431a",
"branch_name": "refs/heads/master",
"committer_date": 1543269385000,
"content_id": "723f7afa82a8ee61a3a01941ee3b124c0b81c1cd",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "99629eb39e069aae13397332ae5dd3dde4855aa1",
"exten... | 2.359375 | stackv2 | import subprocess
import argparse
def build(version):
cmd = ("docker build -t abehoffman/zeta-ui:{} .".format(version))
subprocess.call(cmd, shell=True)
def push(version):
cmd = ("docker push docker.io/abehoffman/zeta-ui:{}".format(version))
subprocess.call(cmd, shell=True)
def main():
parser = a... | 23 | 30.3 | 73 | 10 | 146 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8f19c63a7bc2da6d_c237e4ba", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 6 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"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"
] | [
6,
6,
10,
10
] | [
6,
6,
10,
10
] | [
5,
32,
5,
32
] | [
37,
36,
37,
36
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | build0.py | /dashboard/build0.py | abrahamrhoffman/zeta | Apache-2.0,MIT | |
2024-11-19T02:36:51.312798+00:00 | 1,618,740,467,000 | b79a73e98a65c2a994d92abc56bd8e9b66b16352 | 3 | {
"blob_id": "b79a73e98a65c2a994d92abc56bd8e9b66b16352",
"branch_name": "refs/heads/master",
"committer_date": 1618742747000,
"content_id": "3c77c9dbca6aa81a78f28233d76520fde0387511",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8644e2e2b377326fc02da50a678b7b5748d7cc3d",
"extension": "py"... | 2.75 | stackv2 | import time
from collections import defaultdict
import json
import pandas as pd
import numpy as np
from dwave.system.samplers import DWaveSampler
from dwave.system.composites import AutoEmbeddingComposite
from quantumglare.common.qubo import get_Q
from quantumglare.common import embedding, graph, utils
from quantumg... | 205 | 31.98 | 79 | 14 | 1,578 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_bd9c6cca5a1af228_31e61904", "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"
] | [
119
] | [
119
] | [
13
] | [
31
] | [
"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"
] | quantum_solver.py | /quantumglare/solvers/quantum_solver.py | quantumglare/quantum_cycle | Apache-2.0 | |
2024-11-19T02:36:52.537693+00:00 | 1,590,629,951,000 | d7603ee352c539ae28a0d90509b38137372bec5c | 2 | {
"blob_id": "d7603ee352c539ae28a0d90509b38137372bec5c",
"branch_name": "refs/heads/master",
"committer_date": 1590629951000,
"content_id": "59029f91b94b0a3878c080ca8055deeec702528b",
"detected_licenses": [],
"directory_id": "cea62a0506387181babec86cf386536ef11a4b28",
"extension": "py",
"filename": "ker... | 2.34375 | stackv2 | from keras import models
import pickle as pk
import jieba as jb
import keras
import os
import numpy as np
import datetime
from dataManage.models import QaAdmin, QuestionDemo
from sqlalchemy import create_engine
from dataSyncScript.config.db_config import mysql_db_config
from logger import alpha_logger
class Trigger(o... | 81 | 33.81 | 110 | 15 | 676 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6aca915d776907c2_dd274305", "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"
] | [
45
] | [
45
] | [
22
] | [
39
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | kerasClassify.py | /alpha/prediction/kerasClassify.py | MingJerry/Guide | ||
2024-11-19T02:36:53.454406+00:00 | 1,549,337,619,000 | c3a8f224cde10dcc8c14ab23f5d194b2be041e9e | 3 | {
"blob_id": "c3a8f224cde10dcc8c14ab23f5d194b2be041e9e",
"branch_name": "refs/heads/master",
"committer_date": 1549337619000,
"content_id": "2faf67bdf40abea5d0ec30d43e48f5da738289f1",
"detected_licenses": [
"MIT"
],
"directory_id": "652b785ddb4d011cb84fa4c986eaba7e8f1a6858",
"extension": "py",
"fi... | 2.59375 | stackv2 | import os
import sys
rankDefault ="rankingDefault.txt"
rankUint8 ="rankingUint8.txt"
#dataCSV ="VGG-16.csv"
def scanForFile(path):
files=os.listdir(path)
for i in range(0,len(files)):
try:
fileAndPath=path+"/"+files[i]
if(files[i]=="ranking.txt"):
if(fileAndPath.find("uint8")!=-1):
#os.system("r... | 26 | 27.88 | 66 | 20 | 240 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_df5ab02c1020f817_55c3ff27", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
16,
19
] | [
16,
19
] | [
6,
6
] | [
52,
53
] | [
"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"
] | scanAndReplace.py | /Phase5/scanAndReplace.py | DamianoP/AdaptiveMethods | MIT | |
2024-11-19T02:36:53.866638+00:00 | 1,613,389,186,000 | 54dff3c0544c5bee020794773aef9ae877d5d8d0 | 3 | {
"blob_id": "54dff3c0544c5bee020794773aef9ae877d5d8d0",
"branch_name": "refs/heads/master",
"committer_date": 1613389186000,
"content_id": "17b7b3a67711b71c23b9ee780ade6c90c6a3d381",
"detected_licenses": [
"MIT"
],
"directory_id": "eba7812f2cf167529158fc362413fdcf511b4a19",
"extension": "py",
"fi... | 2.765625 | stackv2 | """
@author: Nicolas Boulle
Generate the approximation experiment results of the paper
Run the following command
python3 main.py
"""
import subprocess
import os
cwd = os.path.dirname(os.path.realpath(__file__))
# Run the different experiments
print('### ReLU ###')
subprocess.call('python3 KdV_relu.py', shell=True... | 33 | 25.15 | 94 | 10 | 260 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_6ae9bf2db62e6598_f509db9a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 13 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subpro... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
17,
20,
23,
29,
29,
32,
33
] | [
17,
20,
23,
29,
29,
32,
33
] | [
1,
1,
1,
5,
81,
1,
1
] | [
60,
60,
60,
95,
85,
64,
67
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"HIGH",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"LOW",
"HIGH",
"HIGH"
] | main.py | /src/Approximation/main.py | udemirezen/RationalNets | MIT | |
2024-11-19T02:36:54.714982+00:00 | 1,383,861,990,000 | b71c1d719a24e7cb187e3b36dac7f80af31b3bad | 2 | {
"blob_id": "b71c1d719a24e7cb187e3b36dac7f80af31b3bad",
"branch_name": "refs/heads/master",
"committer_date": 1383861990000,
"content_id": "6e35707561dba99a8707a5ab2ee6835e0bd53497",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cfdfa3baf6841494a4dd671ee927ae88032561db",
"extension": "py"... | 2.34375 | stackv2 | import os
import jinja2
import webapp2
import logging
import json
from google.appengine.ext import blobstore
from google.appengine.ext.webapp import blobstore_handlers
from StringIO import StringIO
from PIL import Image
from contextlib import closing
from zipfile import ZipFile, ZIP_DEFLATED
JINJA_ENVIRONMENT = jinja... | 174 | 32.72 | 151 | 18 | 1,437 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_125091b37080f8f0_fa049548", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 2 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
14,
27
] | [
17,
27
] | [
21,
25
] | [
21,
57
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected direct use of jinja2. If n... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | screenshots.py | /screenshots.py | pombreda/Play-images-sanitizer | Apache-2.0 | |
2024-11-19T02:36:54.825261+00:00 | 1,525,300,917,000 | fb31cc3374eb707b45953a1f70362b28480f2b66 | 3 | {
"blob_id": "fb31cc3374eb707b45953a1f70362b28480f2b66",
"branch_name": "refs/heads/master",
"committer_date": 1525300917000,
"content_id": "4a2a9ba1831363a2d157bd7cd3f447c11e53107c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "947834c0e40fc2b58560c558f29cb2d56b5f7fe6",
"extension": "py"... | 2.703125 | stackv2 | """
Models for Product catalog
All of the models are stored in this module
Models
------
Catalog - A catalog used in the database
Product - save product value
Review - A review used in product store
"""
import os
import re
import json
import logging
import pickle
from cerberus import Validator
from redis import Redis... | 334 | 32.55 | 120 | 22 | 2,264 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_647ff9847b1cea14_b9c4e44b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
53,
61,
69,
86
] | [
53,
61,
69,
86
] | [
36,
24,
20,
24
] | [
69,
57,
52,
57
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | models.py | /app/models.py | DevOps-Squads-Spring-2018/products | Apache-2.0 | |
2024-11-19T02:36:55.275299+00:00 | 1,547,205,504,000 | 214d76f7cd547a7c418a97086fac50bb2877e778 | 2 | {
"blob_id": "214d76f7cd547a7c418a97086fac50bb2877e778",
"branch_name": "refs/heads/master",
"committer_date": 1547205504000,
"content_id": "428633b2c8a71ab91d31e2b64787d1664c49e13e",
"detected_licenses": [
"MIT"
],
"directory_id": "778b88a58b6930a67aaa64ba222bcf71ce5d5335",
"extension": "py",
"fi... | 2.34375 | stackv2 | import flask
import requests
from jinja2 import Template
from flask import request, send_from_directory
from flask_caching import Cache
import mirador_settings
from flask_cors import CORS
import sys
import logging
def cache_key():
return request.url
app = flask.Flask(__name__, static_folder="build")
CORS(app)
c... | 77 | 33.47 | 99 | 25 | 542 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_48a1b44ede5119cb_2b86cfeb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 7 | true | [
"CWE-918",
"CWE-918",
"CWE-79"
] | [
"rules.python.django.security.injection.ssrf.ssrf-injection-requests",
"rules.python.flask.security.injection.ssrf-requests",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security"
] | [
"MEDIUM",
"MEDIUM",
"LOW"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
40,
44,
61
] | [
60,
44,
61
] | [
13,
21,
31
] | [
41,
43,
81
] | [
"A10:2021 - Server-Side Request Forgery (SSRF)",
"A10:2021 - Server-Side Request Forgery (SSRF)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox... | [
7.5,
7.5,
5
] | [
"MEDIUM",
"MEDIUM",
"LOW"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | mirador.py | /mirador.py | digirati-co-uk/ida-mirador-proxy | MIT | |
2024-11-19T02:36:56.247279+00:00 | 1,595,277,588,000 | 1590025e2bbed290206bc2a34bcdd0e11a76d21a | 3 | {
"blob_id": "1590025e2bbed290206bc2a34bcdd0e11a76d21a",
"branch_name": "refs/heads/master",
"committer_date": 1595277588000,
"content_id": "88d4a9069b29313c5ca5f50e67ee03eaa9959df5",
"detected_licenses": [
"Python-2.0",
"BSD-3-Clause"
],
"directory_id": "be1731028e4461b51669e72c5a3b2df5c476c439",... | 2.890625 | stackv2 | """
- Description: frequency based augmentation techniques/manipulations for audio data.
"""
import os
import subprocess
import numpy as np
from .utils.filters import butter_filter
from .utils.io import read_file, write_file
def convolve(infile, ir_fname, level=0.5):
"""
Apply convolution to infile using the ... | 99 | 33.38 | 115 | 14 | 768 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7a33ab9c4a7df435_1a95877b", "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"
] | [
66
] | [
69
] | [
9
] | [
49
] | [
"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"
] | augf.py | /pydiogment/augf.py | cxzhp/pydiogment | Python-2.0,BSD-3-Clause | |
2024-11-19T02:36:58.492727+00:00 | 1,437,266,201,000 | c8cc54e347201203c8870fa3ca57f5f29841b357 | 3 | {
"blob_id": "c8cc54e347201203c8870fa3ca57f5f29841b357",
"branch_name": "refs/heads/master",
"committer_date": 1437266201000,
"content_id": "b3c8ac8354449cda11bac93e6fcc79428553e9fe",
"detected_licenses": [
"MIT"
],
"directory_id": "2a2b863716399dcdb51a5c63feabcc2372b73dcc",
"extension": "py",
"fi... | 2.96875 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "It’s working!!!"
@app.route("/hola/<string:elephants>/<int:a>/<int:b>")
def hello(elephants, a, b):
user = {
"first_name": elephants,
"last_name... | 26 | 20.88 | 74 | 10 | 158 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.directly-returned-format-string_42fc129aa3b46f9f_020d2f54", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.directly-returned-format-string", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected Fl... | 2 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.audit.directly-returned-format-string",
"rules.python.flask.security.injection.raw-html-format"
] | [
"security",
"security"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
20,
20
] | [
20,
20
] | [
5,
12
] | [
77,
77
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected Flask route directly returning a formatted string. This is subject to cross-site scripting if user input can reach the string. Consider using the template engine instead and rendering pages with 'render_template()'.",
"Detected user input flowing into a manually constructed HTML string. You may be accid... | [
5,
5
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | app.py | /apps/01_ketchup/app.py | octaflop/lucky_flask | MIT | |
2024-11-19T02:37:01.983505+00:00 | 1,502,946,554,000 | 9a7a87d9da7b06c4dcee96325927dd89e6b11fa5 | 3 | {
"blob_id": "9a7a87d9da7b06c4dcee96325927dd89e6b11fa5",
"branch_name": "refs/heads/master",
"committer_date": 1502946554000,
"content_id": "039a9f41e6c6085d6f30ba3991b27fa4c9b15347",
"detected_licenses": [
"MIT"
],
"directory_id": "541ec3a767efdbc03e06168eb3329aa24114eccf",
"extension": "py",
"fi... | 2.515625 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 16 14:59:34 2017
@author: cathy
"""
import pickle
from cStringIO import StringIO
from Bio import Phylo
import sys
#a class to construct the newick string of the complete binary transmission(genealoty) tree
epifile, write_to=sys.argv[1:3]
class Tree():
def __init__(... | 47 | 28.94 | 96 | 21 | 398 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7c7f140b4d298ed7_a9c46c9e", "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"
] | [
39
] | [
39
] | [
15
] | [
35
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | Tree.py | /Tree.py | cathyxinxyz/Tree-shape-clustering-episodic-risk-model | MIT | |
2024-11-19T02:37:06.460116+00:00 | 1,592,932,180,000 | b970aa10b9219cd4167f8109be772184f507a3c5 | 2 | {
"blob_id": "b970aa10b9219cd4167f8109be772184f507a3c5",
"branch_name": "refs/heads/master",
"committer_date": 1592932180000,
"content_id": "c4d92e2fddcae4a1743f890e3aa085527b6470ac",
"detected_licenses": [
"MIT"
],
"directory_id": "b49bedb0affed3a873f354f43edc65ace77e8c30",
"extension": "py",
"fi... | 2.5 | stackv2 | '''
resample the videos to make them have same frame num
you can use `frames_count.py` to get the median frame num as "target frame"
'''
import argparse
import glob
import os
import shutil
import subprocess
from tqdm import tqdm
import numpy as np
from cv2 import cv2 as cv
parser = argparse.ArgumentParser()
parser.a... | 58 | 32.17 | 77 | 17 | 468 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_576d3cdccdc04a9e_e0c2fd9f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
57,
57
] | [
58,
57
] | [
13,
29
] | [
47,
43
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"MEDIUM"
] | resample.py | /dataset/resample.py | Sciroccogti/CSL-video-caption | MIT | |
2024-11-19T02:37:07.308915+00:00 | 1,624,988,561,000 | e8073d6e0ea03f5d5668e06c5c023287d2e88472 | 2 | {
"blob_id": "e8073d6e0ea03f5d5668e06c5c023287d2e88472",
"branch_name": "refs/heads/master",
"committer_date": 1624988561000,
"content_id": "3ddb131daeea93666edf7470ab0ffbcf4484502c",
"detected_licenses": [
"MIT"
],
"directory_id": "95039a8ce0535120b01f5f48df3448e0151c0615",
"extension": "py",
"fi... | 2.359375 | stackv2 | from collections import OrderedDict
from odoo.models import LOG_ACCESS_COLUMNS, Model
def vals(model):
model.ensure_one()
return {field_name: getattr(model, field_name) for field_name in model._fields}
def prepare_value_for_table(record, field_name):
if field_name == '__xml_id__':
return recor... | 145 | 23.83 | 110 | 14 | 837 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.useless-if-body_ee6b60a02729203a_f6a814ff", "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... | 2 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
125
] | [
125
] | [
15
] | [
34
] | [
"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"
] | tables.py | /ipython_odoo/tables.py | voronind/ipython-odoo | MIT | |
2024-11-19T02:37:08.196481+00:00 | 1,535,202,740,000 | 6b24d8b44f3bf95013c703165976e268b9a1d729 | 3 | {
"blob_id": "6b24d8b44f3bf95013c703165976e268b9a1d729",
"branch_name": "refs/heads/master",
"committer_date": 1535202740000,
"content_id": "5441547feb63d2321d4dc014cd003ff5df8dc0bc",
"detected_licenses": [
"MIT"
],
"directory_id": "43e5f81302166107ab0c96e965934fefb1b60444",
"extension": "py",
"fi... | 2.59375 | stackv2 | # -*- coding: utf-8 -*-
import os
from os.path import commonprefix
from collections import defaultdict
from zipfile import ZipFile
from tempfile import TemporaryDirectory
import pickle
from typing import Mapping, Iterable, Tuple, List
import dawg
import numpy as np
class DictionaryBuilder:
def __init__(self, sou... | 157 | 43.17 | 118 | 20 | 1,624 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.return-in-init_93b2aa732d9be44c_b632170f", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.return-in-init", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "`return` should never appear inside a class __init__... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
142
] | [
144
] | [
17
] | [
70
] | [
"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"
] | dictionary_builder.py | /neuromorphy/dictionary/dictionary_builder.py | DanAnastasyev/neuromorphy | MIT | |
2024-11-19T02:37:08.392695+00:00 | 1,456,159,042,000 | dc0697f8234c6ee35ccf11d7678cadf8effdfbda | 3 | {
"blob_id": "dc0697f8234c6ee35ccf11d7678cadf8effdfbda",
"branch_name": "refs/heads/master",
"committer_date": 1456159042000,
"content_id": "2c921298a9227d2be28176ff1ad1eb78a728c7a8",
"detected_licenses": [
"BSD-3-Clause",
"Apache-2.0"
],
"directory_id": "e2f53a0ec6b691b1a0a081d962ab731ed6fdab9e",... | 2.65625 | stackv2 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides functionality to connect to external eclipse framework.
Activates and connect debugger at Eclipse IDE. It also checks if Eclipse exists
and prop... | 89 | 40.35 | 80 | 15 | 881 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_586f78ad77e4a469_3ca4c7c1", "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... | 8 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
29,
49,
69
] | [
29,
50,
69
] | [
7,
13,
9
] | [
74,
61,
76
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | eclipse_connector.py | /src/build/eclipse_connector.py | epowers/arc | BSD-3-Clause,Apache-2.0 | |
2024-11-19T02:37:10.938961+00:00 | 1,471,439,056,000 | 4a16b0843a326593eda73c94c6b04f1b3dea1a34 | 3 | {
"blob_id": "4a16b0843a326593eda73c94c6b04f1b3dea1a34",
"branch_name": "refs/heads/master",
"committer_date": 1471439056000,
"content_id": "3e9fcac8bd275ca1c5130020a21403c71e7b20e8",
"detected_licenses": [
"MIT"
],
"directory_id": "56b522c1ec81ca4a86a8bcaf064c29d436fdbf25",
"extension": "py",
"fi... | 3.203125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 18 17:30:32 2016
@author: Pedro Leal
"""
import math
import pickle
import matplotlib.pyplot as plt
frontier_A = pickle.load( open( "A_front.p", "rb" ) )
frontier_B = pickle.load( open( "B_front.p", "rb" ) )
frontier_C = pickle.load( open( "C_front.p", "rb" ) )
# unzipi... | 33 | 29.76 | 78 | 9 | 328 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ade74d0bc54705b5_de691fb9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 6 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"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"
] | [
12,
13,
14
] | [
12,
13,
14
] | [
14,
14,
14
] | [
54,
54,
54
] | [
"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"
] | plot_frontiers.py | /dynamic_model/results/flexinol_SMA/comparison/front_1run/plot_frontiers.py | Mecanon/morphing_wing | MIT | |
2024-11-19T02:37:12.793224+00:00 | 1,564,383,552,000 | abfab8612907c57ca4da58643b672c01e1f82a69 | 2 | {
"blob_id": "abfab8612907c57ca4da58643b672c01e1f82a69",
"branch_name": "refs/heads/master",
"committer_date": 1564383552000,
"content_id": "ed412a01981f2d2eb07f18fbd92d4f87c66a966e",
"detected_licenses": [
"MIT"
],
"directory_id": "74374e0096ab4548647867a0c8431f8652f96f2b",
"extension": "py",
"fi... | 2.40625 | stackv2 | import re,codecs,sys,pickle
filename = ""
if len(sys.argv)==2:
filename = sys.argv[1]
else:
print("Usage: python3 translate_giza_out_to_positionalpair.py giza_output_file")
sys.exit(0)
giza_output = codecs.open("../Resources/"+filename,mode="r",encoding="utf-8")
positionalpair_output = codecs.open('../Models/'+fi... | 57 | 23.07 | 105 | 15 | 391 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8b2b49d6a4425422_2676febf", "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"
] | [
56
] | [
56
] | [
1
] | [
37
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | tranlate_giza_out_to_positionalpair.py | /Scripts/tranlate_giza_out_to_positionalpair.py | kavitharaju/auto-aligner | MIT | |
2024-11-19T02:37:24.988648+00:00 | 1,312,834,693,000 | e1e68291350961cd48ebd0214dfcde0e7a24f8ad | 3 | {
"blob_id": "e1e68291350961cd48ebd0214dfcde0e7a24f8ad",
"branch_name": "refs/heads/master",
"committer_date": 1312834693000,
"content_id": "d30d01e930239b3be016589e36c75da0b7a59b3e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c17dcde7211c5742c91d598be36308fec016f42b",
"extension": "py"... | 2.515625 | stackv2 | import operator
from ordereddict import OrderedDict
from pycassa.cassandra.ttypes import NotFoundException
from agamemnon.graph_constants import ASCII
import logging
log = logging.getLogger()
class InMemoryDataStore(object):
def __init__(self):
self.tables = {}
self.transactions = {}
self.... | 168 | 37.18 | 113 | 27 | 1,229 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.dict-del-while-iterate_7b39a139a6182240_bb3c3f7d", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.dict-del-while-iterate", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "It appears that `results[key]` is ... | 3 | true | [
"",
"",
""
] | [
"rules.python.lang.correctness.dict-del-while-iterate",
"rules.python.lang.correctness.dict-del-while-iterate",
"rules.python.lang.correctness.dict-del-while-iterate"
] | [
"correctness",
"correctness",
"correctness"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
106,
133,
148
] | [
110,
137,
152
] | [
13,
17,
17
] | [
38,
43,
63
] | [
"",
"",
""
] | [
"It appears that `results[key]` is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration",
"It appears that `row_data[key]` is a dict with items being deleted while in a for loop. This is usually a bad idea ... | [
5,
5,
5
] | [
"",
"",
""
] | [
"",
"",
""
] | memory.py | /agamemnon/memory.py | sequoiar/agamemnon | Apache-2.0 | |
2024-11-19T02:37:25.945332+00:00 | 1,550,806,342,000 | 2e58fd462df0f0e7eb4edd27ddc171a142e276bc | 3 | {
"blob_id": "2e58fd462df0f0e7eb4edd27ddc171a142e276bc",
"branch_name": "refs/heads/master",
"committer_date": 1550806342000,
"content_id": "3232db82f19c4997bc1dbd8e60b2257036b10643",
"detected_licenses": [
"MIT"
],
"directory_id": "72049889daa2f0933f2e51ce78e9912cbefdbfb9",
"extension": "py",
"fi... | 2.75 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
単語のインデックス辞書の作成
文字列をインデックス列に変換
'''
import sys
sys.path.append('./')
import codecs
import collections
import torch
import pickle
import utils
import load
import config
import torch.nn as nn
import os
class Indexer():
def __init__(self):
self.word2index = ... | 168 | 37.38 | 99 | 16 | 1,577 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_79c951e5be42c1ed_671c03b5", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 9 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.pyth... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
47,
52,
62,
65,
89,
107,
110
] | [
47,
52,
62,
65,
89,
107,
110
] | [
17,
35,
17,
17,
17,
17,
17
] | [
56,
57,
60,
60,
56,
60,
60
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | index.py | /src/index.py | shuu-tatsu/qagan | MIT | |
2024-11-19T02:37:27.311985+00:00 | 1,490,990,495,000 | 871329459ac368cdf280cb910fe0a3f79fb9c418 | 2 | {
"blob_id": "871329459ac368cdf280cb910fe0a3f79fb9c418",
"branch_name": "refs/heads/master",
"committer_date": 1490990495000,
"content_id": "a67849e0a8451f444680b4bb1c7e8bc45fdc02ca",
"detected_licenses": [
"MIT"
],
"directory_id": "a3699050efcd0b991d714d68dd4d91555bcc2a4f",
"extension": "py",
"fi... | 2.46875 | stackv2 | import re
p_db = "^(\w+)([(].*[)])$"
cache = {} # signature ->
import sqlite3
def connect_sqlite(args):
return eval('sqlite3.connect'+args)
def connect(text):
text = text.strip()
if not text:
text = "sqlite(':memory:')"
if text in cache:
return cache[text]
name,args = re.findall(p_db,text)[0]
if name == '... | 21 | 17.38 | 37 | 10 | 109 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_5f9c837eca27660f_8d9f01bb", "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"
] | [
9
] | [
9
] | [
9
] | [
37
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | dbpool.py | /dbpool.py | mobarski/smash | MIT | |
2024-11-19T02:37:28.592550+00:00 | 1,479,304,049,000 | fee005408203f9319c5a8f6c3be694c6655c221c | 2 | {
"blob_id": "fee005408203f9319c5a8f6c3be694c6655c221c",
"branch_name": "refs/heads/master",
"committer_date": 1479304049000,
"content_id": "7f880e0075c7ea1fca3b577efaf17741b96f9076",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "97521303a5aaa441b4ce3332b40093b6b5bb14f9",
"extension": "p... | 2.46875 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
from logging.handlers import RotatingFileHandler
from eduid_common.api.exceptions import BadConfiguration
__author__ = 'lundberg'
def rotating(app, root_logger):
"""
:param app: Flask app
:param root_logger: Catch all logger ... | 68 | 30.46 | 103 | 15 | 505 | python | [{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_17f00f3df6b6eb52_74cb9745", "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"
] | [
63
] | [
63
] | [
24
] | [
47
] | [
"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"
] | logging.py | /src/eduid_common/api/logging.py | iPablo/eduid-common | BSD-3-Clause | |
2024-11-19T02:37:37.176444+00:00 | 1,571,432,445,000 | dfa1a8055ea336344c8faa1c3ebe2745a010c6e1 | 3 | {
"blob_id": "dfa1a8055ea336344c8faa1c3ebe2745a010c6e1",
"branch_name": "refs/heads/master",
"committer_date": 1571432445000,
"content_id": "f6ae1fb6f31c19ba280d698227bea29890aa4a2c",
"detected_licenses": [
"MIT"
],
"directory_id": "7ed386f9ffa1bd2156815ce22c198cc19982f0f1",
"extension": "py",
"fi... | 2.734375 | stackv2 | # given an input model, run batch prediction and pickle results
import os
import matplotlib.pyplot as plt
from keras.preprocessing.image import ImageDataGenerator
from keras.models import load_model
import numpy as np
import argparse
import pickle
parser = argparse.ArgumentParser()
parser.add_argument('-model',type=st... | 53 | 36.77 | 73 | 12 | 448 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_01998701cfd40dd2_ef54857e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
53
] | [
53
] | [
5
] | [
44
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | predict_and_pickle.py | /DeepFashionModel/classDetect/predict_and_pickle.py | RexBarker/DeepF | MIT | |
2024-11-19T02:37:39.376320+00:00 | 1,430,343,207,000 | 4772d426298f4a7e640fddb45c6fb737454f79ff | 3 | {
"blob_id": "4772d426298f4a7e640fddb45c6fb737454f79ff",
"branch_name": "refs/heads/master",
"committer_date": 1430343207000,
"content_id": "54a4aa9b0fd1856be0c743c93eb34160e3b82ff2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c4fc52c6512c95d68cda42ff8e9de84b4c76172b",
"extension": "py"... | 2.75 | stackv2 | import collections
import json
# import math
# import os
import psycopg2
# Table to query
schema_name = "westcon"
table_name = "sa3_2011_sydney_bts"
# Set the number of decimal places for the output GeoJSON coordinate to reduce response size and to speed up rendering
places = 3
grid_string = 0.001
# Try to connect ... | 64 | 27.27 | 118 | 12 | 524 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_613e176f344afe9a_4817955c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 2 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
30,
30
] | [
30,
30
] | [
5,
5
] | [
77,
77
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | export-bdys-to-geojson.py | /data/export-bdys-to-geojson.py | noma4i/westcon | Apache-2.0 | |
2024-11-19T02:37:46.437697+00:00 | 1,511,984,392,000 | ea5a9b07be31910ca6e868ae560cfa81a83be5fa | 3 | {
"blob_id": "ea5a9b07be31910ca6e868ae560cfa81a83be5fa",
"branch_name": "refs/heads/master",
"committer_date": 1511984392000,
"content_id": "5c864f71d2e284fcfaadb8926e187dae4807a8ed",
"detected_licenses": [
"MIT"
],
"directory_id": "c43e7484746ea444ae8ed6827a7c438150b212bb",
"extension": "py",
"fi... | 2.75 | stackv2 | import pymorphy2
import re
from nltk.corpus import stopwords
import math
import pickle
from pathlib import Path
letters = [chr(i) for i in range(ord('а'), ord('я') + 1)]
letters.extend([chr(i + 48) for i in range(10)])
letters.append('ё')
class BM25:
def __init__(self, path_to_ind, path_to_doc, k1=2.0, b=0.75):
... | 103 | 32.84 | 127 | 20 | 943 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_80ef9d1177ab597a_4887542e", "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"
] | [
73,
78
] | [
73,
78
] | [
22,
29
] | [
87,
48
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | BM25.py | /ranking/BM25.py | YorovSobir/informational_retrieval | MIT | |
2024-11-19T02:37:47.162354+00:00 | 1,541,943,182,000 | 33b00f3416db52daf7d8a9125b54a4b374a8e4ef | 3 | {
"blob_id": "33b00f3416db52daf7d8a9125b54a4b374a8e4ef",
"branch_name": "refs/heads/master",
"committer_date": 1541943182000,
"content_id": "f6156f3b10dc5b4061c5464fa935ed384ab00a30",
"detected_licenses": [
"MIT"
],
"directory_id": "d737f0feea7ab4371e19238493b8e69540918b7d",
"extension": "py",
"fi... | 2.609375 | stackv2 | import subprocess
import os
def movie_generator(start_timedelta_arr,input_file_name,output_file_name):
for start_timedelta in start_timedelta_arr:
cmd = "ffmpeg -ss {} -i {} -t {} part{}.mp4".format(start_timedelta[0], input_file_name, start_timedelta[1], start_timedelta[0])
subprocess.call(cmd, s... | 24 | 39.88 | 136 | 12 | 285 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f9d1a714166bcd8b_3cf46ba4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 6 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"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"
] | [
8,
8,
18,
18
] | [
8,
8,
18,
18
] | [
9,
36,
5,
32
] | [
41,
40,
37,
36
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | Movie_generator.py | /Movie_generator.py | siro-scn-bot/archive-minimizer | MIT | |
2024-11-19T02:37:49.376624+00:00 | 1,617,884,548,000 | 0638db6d81ea9ad8101a448e6ddeffb21ce4f5c9 | 3 | {
"blob_id": "0638db6d81ea9ad8101a448e6ddeffb21ce4f5c9",
"branch_name": "refs/heads/main",
"committer_date": 1617884548000,
"content_id": "71c95f4e0d9deb353c07bae34b2ee9504d0eee83",
"detected_licenses": [
"MIT"
],
"directory_id": "69974c928224752398ad6ff194364ff26c1ddd94",
"extension": "py",
"file... | 2.859375 | stackv2 | import os
import sys
import numpy as np
import pandas as pd
import pickle
#sys.path.append(os.path.dirname(os.path.abspath("__filename__")))
from python import traj
def Measurements_to_Pickle(InputPath):
mesureinput = InputPath + ".measurements"
data = load_measurements(mesureinput)
outputp... | 84 | 31.06 | 77 | 12 | 713 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e28f33a7e20e711f_73f068bd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
21
] | [
21
] | [
5
] | [
25
] | [
"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"
] | WhiskReadings.py | /PythonWhiskCustom/WhiskReadings.py | JostTim/pyMustache | MIT | |
2024-11-19T02:37:49.801562+00:00 | 1,601,026,981,000 | 724db34d39ec93f98b7ebf7556186dc5f350fc17 | 2 | {
"blob_id": "724db34d39ec93f98b7ebf7556186dc5f350fc17",
"branch_name": "refs/heads/master",
"committer_date": 1601026981000,
"content_id": "62d1c5804ca0b5642864f56774bdd9ed483ba355",
"detected_licenses": [
"MIT"
],
"directory_id": "ea1d6ed8bdf4e74d9b9ea833cb5b4ed7b9c3b59b",
"extension": "py",
"fi... | 2.5 | stackv2 | import requests
from requests.auth import HTTPBasicAuth
import sys
import json
import urllib3
urllib3.disable_warnings()
import time
# Global static parameters
DNAC = "sandboxdnac.cisco.com" # DNAC address
DNAC_USER = "devnetuser" # DNAC username
DNAC_PASSWORD = "Cisco123!" # DNAC passowrd
DNAC_PORT = 443 # DNAC RE... | 125 | 32.38 | 112 | 15 | 1,018 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.hardcoded-password-default-argument_48bdef4a0c3ed7c8_e532b406", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.hardcoded-password-default-argument", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Hardcode... | 10 | true | [
"CWE-798",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"rules.python.lang.security.audit.hardcoded-password-default-argument",
"rules.python.requests.security.disabled-cert-validation",
"rules.python.requests.security.disabled-cert-validation",
"rules.python.requests.security.disabled-cert-validation"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"HIGH",
"HIGH"
] | [
21,
26,
45,
70
] | [
33,
26,
45,
70
] | [
1,
14,
20,
16
] | [
6,
102,
68,
94
] | [
"A07:2021 - Identification and Authentication Failures",
"A03:2017 - Sensitive Data Exposure",
"A03:2017 - Sensitive Data Exposure",
"A03:2017 - Sensitive Data Exposure"
] | [
"Hardcoded password is used as a default argument to 'getAuthToken'. This could be dangerous if a real password is not supplied.",
"Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation.",
"Certificate verification has be... | [
5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"LOW",
"LOW",
"LOW"
] | async_command_runner.py | /async_command_runner.py | soukudom/Devnet | MIT | |
2024-11-19T02:37:51.374364+00:00 | 1,691,150,892,000 | 620c5520efc2a4908149b05583edf3c57846fdce | 3 | {
"blob_id": "620c5520efc2a4908149b05583edf3c57846fdce",
"branch_name": "refs/heads/master",
"committer_date": 1691150892000,
"content_id": "a476803fb95b51d75f8f4fa89903571cdb3498ed",
"detected_licenses": [
"MIT"
],
"directory_id": "f4b082b21535b880a05e796119afa6fb109941d1",
"extension": "py",
"fi... | 2.625 | stackv2 | import os
import logging
import argparse
import tempfile
import subprocess
from psutils.psio import read_prescale_table
# determine the size of the current terminal
term_rows, term_columns = os.popen('stty size', 'r').read().split()
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG, filename='... | 127 | 34.76 | 87 | 17 | 1,064 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3121a39fdaffe7f4_fa44f9fe", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
116,
122
] | [
117,
123
] | [
16,
16
] | [
36,
36
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functio... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | ps-diff.py | /pstools/ps-diff.py | cms-l1-dpg/L1MenuTools | MIT | |
2024-11-19T02:37:52.925403+00:00 | 1,538,037,941,000 | 46186246deccda402820261745310bbc9f545ea1 | 4 | {
"blob_id": "46186246deccda402820261745310bbc9f545ea1",
"branch_name": "refs/heads/master",
"committer_date": 1538037941000,
"content_id": "8b7deb4e7001bb57c0135f7b6243964b49468f38",
"detected_licenses": [
"MIT"
],
"directory_id": "225a8685fbebe31fd7fdbc11a14377ee4a8e04c2",
"extension": "py",
"fi... | 4.34375 | stackv2 | # Script: NameAndEmailAddress.py
# Description: This program keeps names and email addresses in a dictionary as key-value pairs.
# The program display a menu that lets the user look up a person’s email address,
# add a new name and email address, change an existing email address, and delete an... | 206 | 30.75 | 112 | 14 | 1,512 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c77f11c0cb9f28f8_f3d0926c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
34,
145
] | [
34,
145
] | [
23,
5
] | [
46,
39
] | [
"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"
] | NameAndEmailAddress.py | /Serializing/Names and Emails/NameAndEmailAddress.py | Williano/Solved-Practice-Questions | MIT | |
2024-11-19T02:49:16.396344+00:00 | 1,490,651,125,000 | ba09667020b6a4a46b55378fe86cb421e1c12934 | 3 | {
"blob_id": "ba09667020b6a4a46b55378fe86cb421e1c12934",
"branch_name": "refs/heads/master",
"committer_date": 1490651125000,
"content_id": "52f4d347aeda59601586734cbd3a0d6fb1dc1fda",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e5301c78dfcbd1c5a576da4fa56c499706fcbcb2",
"extension": "p... | 2.796875 | stackv2 | """ Create table with values for bias and RMSE of beta hat for Klein and Spady's,
Ichimura's and logistic model.
"""
import pickle
import json
import numpy as np
from bld.project_paths import project_paths_join as ppj
if __name__ == "__main__":
model = json.load(open(ppj("IN_MODEL_SPECS", "model_3.json"), enco... | 60 | 33.72 | 125 | 17 | 603 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ab76d09cf676d03c_537574ba", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
19,
22
] | [
19,
22
] | [
22,
22
] | [
42,
42
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | table_beta_hat.py | /project_paper/src/final/table_beta_hat.py | lxy5355/SIX | BSD-3-Clause | |
2024-11-19T02:49:20.324007+00:00 | 1,534,771,159,000 | 0d1ba6025411d5bed50ad21c1a5cc2da31d25ffd | 2 | {
"blob_id": "0d1ba6025411d5bed50ad21c1a5cc2da31d25ffd",
"branch_name": "refs/heads/master",
"committer_date": 1534771159000,
"content_id": "b8e09aaf2e7a5c04d7f74684e93f630f966ba6bf",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7ed03a66fc7813f31269a067048d62b12e7227ae",
"extension": "p... | 2.46875 | stackv2 |
import pickle as pkl
import numpy as np
import matplotlib.pyplot as pl
print('loading pickled ROM...')
with open('_output/ROM_object.pkl',mode='r') as input_file:
Rom0 = pkl.load(input_file)
print('= done.')
def random_mu():
mu = np.random.rand(2)
mu[0] = mu[0]*(9. - 3.) + 3.
mu[1] = mu[1]*(0.075 ... | 92 | 22.6 | 66 | 19 | 700 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_688f07fc1a942197_e690dc75", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
9
] | [
9
] | [
12
] | [
32
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | check_rom_error.py | /python/check_rom_error.py | dsrim/mr_burgers1d | BSD-3-Clause | |
2024-11-19T02:49:21.227311+00:00 | 1,552,256,381,000 | 5ebf64756e13a0dbaee5fcc46b6d5d885c43b020 | 3 | {
"blob_id": "5ebf64756e13a0dbaee5fcc46b6d5d885c43b020",
"branch_name": "refs/heads/master",
"committer_date": 1552256381000,
"content_id": "b4bf3f3456f49014e52687a7dd25563db157775a",
"detected_licenses": [
"MIT"
],
"directory_id": "931124e45e324efcb05358006ce3a6e87f585851",
"extension": "py",
"fi... | 2.734375 | stackv2 | # coding: utf-8
import uuid
import logging
import threading
import pickle
from queue import Queue
import zmq
from utils import ORDER, REQ_TASK, TASK_READY, PICKUP, work
# configure the log with DEBUG level
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-12s %(levelname)-8s %(me... | 118 | 25 | 85 | 17 | 678 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3e61c3f72bf51213_3f26d5b4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 6 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
34,
39,
44,
49,
54
] | [
34,
39,
44,
49,
54
] | [
17,
21,
21,
21,
21
] | [
32,
43,
39,
39,
40
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | drive_through.py | /drive_through.py | mariolpantunes/drive-through | MIT | |
2024-11-19T02:49:21.741043+00:00 | 1,543,636,805,000 | 920f65c07cfc265223708d4ea2e6bdb88e59650b | 2 | {
"blob_id": "920f65c07cfc265223708d4ea2e6bdb88e59650b",
"branch_name": "refs/heads/master",
"committer_date": 1543636805000,
"content_id": "5803436d6cef27bf74be3c8b89e4d095bfa14fd5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "399ba0cf96ee53779a58ae31867a42b277ace227",
"extension": "py"... | 2.453125 | stackv2 | '''
Written by Heng Fan
'''
import os
import glob
import json
import epdb
import numpy as np
import xml.etree.ElementTree as ET
validation_ratio = 0.
def generate_image_imdb(vid_root_path, vid_curated_path):
'''
# save image crops to the vid_curated_path
'''
anno_str = "Annotations/VID/train/"
d... | 160 | 37.77 | 160 | 20 | 1,716 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_74df767dedb87f35_2b5a0515", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 4 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
9,
74
] | [
9,
74
] | [
1,
34
] | [
35,
58
] | [
"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"
] | gen_imdb_VID.py | /ILSVRC15-curation/gen_imdb_VID.py | xiaodongdreams/siameseFC-pytorch-vot | Apache-2.0 | |
2024-11-19T02:49:27.373546+00:00 | 1,482,244,618,000 | 5058799ad40f506a9e33569182c8fe4b61e68755 | 2 | {
"blob_id": "5058799ad40f506a9e33569182c8fe4b61e68755",
"branch_name": "refs/heads/master",
"committer_date": 1482244618000,
"content_id": "85b645d534224f9513a835f8cb114502ee2b026d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "24d602c6ad86efa8f9ba8ce61be4b5dae4d2c49e",
"extension": "py"... | 2.390625 | stackv2 | import xml.etree.ElementTree as ET
from urllib import quote
from girder.plugins.minerva.rest.wms_styles import WmsStyle, wps_template
from girder.plugins.minerva.utility.cookie import getExtraHeaders
import requests
class BsveWmsStyle(object):
def __init__(self, type_name):
self._type_name = type_name
... | 93 | 35.75 | 174 | 20 | 754 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_345b7db0819c4d27_45a1e575", "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... | 6 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
1
] | [
1
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | bsve_wms_styles.py | /bsve/server/bsve_wms_styles.py | Ecoblockchain/minerva-docker | Apache-2.0 | |
2024-11-19T02:49:27.721172+00:00 | 1,581,712,687,000 | 41ee01b3f646765d944d79cc496988ecf01f822b | 2 | {
"blob_id": "41ee01b3f646765d944d79cc496988ecf01f822b",
"branch_name": "refs/heads/master",
"committer_date": 1581712687000,
"content_id": "01b06263fb5804cea8ed9621f5eb055a03800933",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ba9978ef66bd35bb42f66c18dc5bccbe8b69c608",
"extension": "py"... | 2.421875 | stackv2 | from typing import Dict, List
from pathlib import Path
import pickle
import numpy as np
import pandas as pd
from sklearn.model_selection import RandomizedSearchCV
from torch.utils.data import DataLoader
try:
import xgboost as xgb
except ImportError:
print("Importing the optional dependency xgboost failed, but ... | 206 | 41.07 | 102 | 17 | 1,823 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_140010fc51a642f4_3e99f1fd", "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"
] | [
58,
153
] | [
58,
153
] | [
22,
13
] | [
57,
39
] | [
"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"
] | xgboost.py | /mlstream/models/xgboost.py | gauchm/mlstream | Apache-2.0 | |
2024-11-19T03:00:04.015716+00:00 | 1,672,786,623,000 | a251e67514bba42d3acccf5a3011ba65c62f7e86 | 2 | {
"blob_id": "a251e67514bba42d3acccf5a3011ba65c62f7e86",
"branch_name": "refs/heads/master",
"committer_date": 1672786623000,
"content_id": "f845a9cf29a5f1cb99f5b45c638ee67648de187e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "22cd0fc8956ff1ea8593bc9460559a235c72a750",
"extension": "p... | 2.421875 | stackv2 | """
Copyright (c) 2018 Intel Corporation.
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,
distribu... | 105 | 43.36 | 140 | 10 | 1,312 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_496df8c4b6b50f51_591f810f", "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 ... | 3 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected",
"rules.python.lang.security.audit.exec-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
55,
67
] | [
55,
67
] | [
5,
5
] | [
113,
113
] | [
"A03:2021 - Injection",
"A03:2021 - Injection"
] | [
"Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.",
"Detected the use of exec(). exec() can be dangerous if used... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | Train_kmeans.py | /Kmeans/Train_kmeans.py | intel-iot-devkit/motor-defect-detector-cpp | BSD-3-Clause | |
2024-11-19T03:00:07.612083+00:00 | 1,555,494,834,000 | 4939b7dd3d950300a3b482a84bc017044f8b27a8 | 2 | {
"blob_id": "4939b7dd3d950300a3b482a84bc017044f8b27a8",
"branch_name": "refs/heads/master",
"committer_date": 1555494834000,
"content_id": "e779997656f76fa70b005421ac0cd539e3851e08",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f5d55826cff366e0a191bf2f4f48d331cf9a6341",
"extension": "p... | 2.3125 | stackv2 | #!/usr/bin/env python
# vim:fileencoding=utf-8
# Author: Shinya Suzuki
# Created: 2017-05-24
import argparse
import numpy as np
import os
import pandas as pd
import pickle
from eebiic.utils import get_logger
from pkg_resources import resource_filename
from tabulate import tabulate
def argument_parse(argv=None):
p... | 195 | 32.78 | 79 | 18 | 1,527 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_497f36c76af451bc_c1467cfa", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
107,
113
] | [
107,
113
] | [
17,
9
] | [
31,
28
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | estimate.py | /eebiic/estimate.py | metagen/EEBIIC | BSD-3-Clause | |
2024-11-19T03:00:08.734899+00:00 | 1,625,924,133,000 | 83d4b1260a40a85b85e8d19136f56c631cf13371 | 3 | {
"blob_id": "83d4b1260a40a85b85e8d19136f56c631cf13371",
"branch_name": "refs/heads/master",
"committer_date": 1625924133000,
"content_id": "08614db9ab0bf4c5481bbd67137a3292ccb0b89b",
"detected_licenses": [
"MIT"
],
"directory_id": "09e778025c17ede3743ba009955d666ea1a36b2f",
"extension": "py",
"fi... | 2.734375 | stackv2 | import importlib
import os
import re
import sys
from pycman.utils import print_logo
def get_version() -> str:
context = os.path.abspath(os.getcwd())
sys.path.append(context)
package = importlib.import_module('package')
return package.package['version']
def show_version():
print_logo()
print... | 59 | 24.47 | 79 | 13 | 404 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_ccc81ef25570a6de_50c8d406", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
58,
59
] | [
58,
59
] | [
5,
5
] | [
56,
39
] | [
"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"
] | version.py | /pycman/utils/version.py | Singein/Pycman | MIT | |
2024-11-19T03:00:15.539931+00:00 | 1,567,543,984,000 | ac45eb1bab1a44275be01f316dad72f5edfc94a3 | 3 | {
"blob_id": "ac45eb1bab1a44275be01f316dad72f5edfc94a3",
"branch_name": "refs/heads/master",
"committer_date": 1567543984000,
"content_id": "0eed80008014cd00987009ceead07c26f119b1af",
"detected_licenses": [
"MIT"
],
"directory_id": "c0e4897c3c0870ae44653068ede6b87187a4de7c",
"extension": "py",
"fi... | 2.65625 | stackv2 | """
VexFlow / TabDiv Build Script
Requires: SCons, Git, and Google Closure Compiler
Copyright Mohit Cheppudira 2010
"""
import os
from datetime import datetime
from SCons.Script import *
"""
Make the default zip action use the external zip command. Also
add -j (--junk-paths) to the command to store only the name of ... | 99 | 27.67 | 75 | 13 | 764 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_b71a9976e3579cbd_74e7a0b7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
48,
61
] | [
48,
61
] | [
3,
3
] | [
28,
28
] | [
"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"
] | vexflow_scons.py | /vexflow/site_scons/vexflow_scons.py | marycourtland/sightread | MIT | |
2024-11-19T03:00:17.620818+00:00 | 1,617,090,996,000 | fa56f153b9f00a74e349c96994cd6ddc5a6e2825 | 3 | {
"blob_id": "fa56f153b9f00a74e349c96994cd6ddc5a6e2825",
"branch_name": "refs/heads/master",
"committer_date": 1617090996000,
"content_id": "4039ef29d0124f4cf4461e56e537b9f0f77017bd",
"detected_licenses": [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
],
"directory_id": "297025e1e6e14c3172e2d0814bdb301... | 2.609375 | stackv2 | """
Train a RF black box model for the polarity dataset.
Also calculate fidelity of LIME explanations when using the RF used for the fidelity experiment
"""
import csv
import pickle
import re
import string
import numpy as np
import pandas as pd
import sklearn
from lime.lime_text import LimeTextExplainer
from sklearn... | 104 | 36.59 | 96 | 15 | 883 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_02d2ace1e6d4a04c_60bf7a57", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"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"
] | [
77,
93,
96
] | [
77,
93,
96
] | [
1,
1,
16
] | [
79,
38,
49
] | [
"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"
] | polarity_tweets_RF.py | /polarity_tweets_RF.py | orestislampridis/X-SPELLS | Apache-2.0,MIT,BSD-2-Clause | |
2024-11-19T03:00:25.831142+00:00 | 1,313,047,312,000 | 1aa5dea8f236d24399d183f76eb3c2c0f486ff37 | 2 | {
"blob_id": "1aa5dea8f236d24399d183f76eb3c2c0f486ff37",
"branch_name": "refs/heads/master",
"committer_date": 1313047312000,
"content_id": "97c445842346ce00f7db149ba7c3276da3f92447",
"detected_licenses": [
"MIT"
],
"directory_id": "6f95b8e5d713a435324a2cac9ea370d4a58db80c",
"extension": "py",
"fi... | 2.359375 | stackv2 | import urllib
import xml.etree.ElementTree as etree
from panorama.wrappers import Video
class Vimeo(Video):
def __init__(self, url, options=None):
self.url = url
self.id = self.get_video_id()
self.feed = self.get_feed()
def get_video_id(self):
"""
Returns the video I... | 97 | 38.06 | 80 | 19 | 823 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_0f60e15c8d1205c3_8a96eefa", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
2,
32
] | [
2,
32
] | [
1,
25
] | [
38,
57
] | [
"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"
] | Vimeo.py | /panorama/handlers/video/Vimeo.py | agonzalezro/Panorama-Python | MIT | |
2024-11-19T03:00:26.001429+00:00 | 1,597,799,178,000 | be8c09549e1c3673ed2a24dff52dffab82c5d462 | 2 | {
"blob_id": "be8c09549e1c3673ed2a24dff52dffab82c5d462",
"branch_name": "refs/heads/master",
"committer_date": 1597800697000,
"content_id": "64d7257e8825e5fdc16eba21efdff92b283db859",
"detected_licenses": [
"MIT"
],
"directory_id": "99211fa005fe79c7bd6e78e105d0149566b3dc21",
"extension": "py",
"fi... | 2.4375 | stackv2 | import logging
import os
import select
import subprocess
import sys
import time
from common import StoppableThread
logger = logging.getLogger(__name__)
class ShairportStatus:
IDLE = 1
PLAYING = 2
class Shairport(StoppableThread):
BROADCAST_INTERVAL = 0.05
IDLE_TIMEOUT = 5
def __init__(self, a... | 86 | 29.45 | 78 | 22 | 549 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_27ab0b25b177ebf7_60f68255", "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"
] | [
56
] | [
56
] | [
13
] | [
78
] | [
"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"
] | shairport.py | /src/shairport.py | 8633brown/aircast | MIT | |
2024-11-19T03:00:26.858277+00:00 | 1,606,786,699,000 | c4f31a7ce43365620788c5262a7dcfd51fc75d71 | 3 | {
"blob_id": "c4f31a7ce43365620788c5262a7dcfd51fc75d71",
"branch_name": "refs/heads/master",
"committer_date": 1606786699000,
"content_id": "3224c25cb373af0f8b327aa18fa0ef029a2602b2",
"detected_licenses": [
"MIT"
],
"directory_id": "9024e7bd14ae8742241735a4f84529bed1f121c0",
"extension": "py",
"fi... | 2.859375 | stackv2 | #!/usr/bin/env python
## Shared functions the template tools use
import sys
if sys.version_info[0] != 3 or sys.version_info[1] < 6:
print("This script requires Python version >=3.6")
sys.exit(1)
import argparse
import os
import pickle
import re
import subprocess
import stat
import traceback
## Semantic versioning... | 295 | 32.79 | 112 | 16 | 2,537 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_9b52058d092e5f96_b21edc37", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 6 | true | [
"CWE-78",
"CWE-78",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
83,
102,
167,
175
] | [
84,
102,
167,
175
] | [
14,
10,
16,
7
] | [
38,
72,
33,
55
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM"
] | Template.py | /tools/Template.py | WattsUp/CppProjectTemplate | MIT | |
2024-11-19T03:00:30.327297+00:00 | 1,615,500,633,000 | 095546090a680e509899325534c635adf4b5434b | 3 | {
"blob_id": "095546090a680e509899325534c635adf4b5434b",
"branch_name": "refs/heads/main",
"committer_date": 1615500633000,
"content_id": "40e9c518170f519e7badb260b631c8acc7d130db",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3307f89c42581a974e7a6463f051435af11d8d9b",
"extension": "py"... | 2.71875 | stackv2 | from grafana_reporter.panel import Panel
from collections import deque
from collections import OrderedDict
import jinja2
from multiprocessing import Pool
from functools import partial
import shutil
class Dashboard:
def __init__(self, uid, connector):
"""
Initializes a dashboard object, which foll... | 129 | 47.82 | 128 | 18 | 1,354 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_bbd3c5187060e42d_1a0a6e12", "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-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
69,
69,
72,
81
] | [
69,
69,
74,
81
] | [
24,
24,
23,
26
] | [
66,
66,
67,
66
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | dashboard.py | /grafana_reporter/dashboard.py | tw0flower/grafana_reporter | BSD-3-Clause | |
2024-11-19T03:11:23.064520+00:00 | 1,405,788,197,000 | 767566b1156fd50512d7cabcf1f36b7dde9eb92c | 2 | {
"blob_id": "767566b1156fd50512d7cabcf1f36b7dde9eb92c",
"branch_name": "refs/heads/master",
"committer_date": 1405788197000,
"content_id": "2c681da35cd0ab4689170a18bab00d74f2576e91",
"detected_licenses": [
"MIT"
],
"directory_id": "b441aa0629b82d9b7fc24a881f019f27b821bd89",
"extension": "py",
"fi... | 2.40625 | stackv2 | from bs4 import BeautifulSoup
import urllib
import pickle
from cStringIO import StringIO
import json
from sets import Set
import datetime
import time
from time import mktime
import code
from sys import stdout
import sys
import formatUS
import names
#finds API page from petition ... | 261 | 28.65 | 136 | 19 | 2,347 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_517ed7aa537def41_e6497973", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value... | 7 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
230,
254
] | [
230,
254
] | [
16,
3
] | [
37,
72
] | [
"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"
] | whitehouse.py | /whitehouse.py | 1wheel/whitehouse-petitions | MIT | |
2024-11-19T03:11:23.246942+00:00 | 1,521,159,340,000 | a1498ad3de6b97339352466a7f6f2a1103d55188 | 3 | {
"blob_id": "a1498ad3de6b97339352466a7f6f2a1103d55188",
"branch_name": "refs/heads/master",
"committer_date": 1521159340000,
"content_id": "d7e96e5e41b1009b65ded2ff6e49155e92e39b7f",
"detected_licenses": [
"MIT"
],
"directory_id": "2c66943f744b339006b6e692e7274567482a4d88",
"extension": "py",
"fi... | 2.609375 | stackv2 | import sys
import pgn
import cPickle
def main():
if(len(sys.argv) > 1):
dest = sys.argv[1]
else:
print("Usage: python tabulate.py <destination_path> [prop_id_path]")
return
infile = open('all_ids.txt', 'r')
picklefile = open('pgndict', 'r')
dict = cPickle.load(picklefile)
errorfile = open('invalid_ids.tx... | 87 | 29.71 | 86 | 20 | 839 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3cc1aaa2ed4a7bc6_a4586a3f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 7 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
14
] | [
14
] | [
9
] | [
33
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | generatemd.py | /markdown_gen/markdown_gen/generatemd.py | seckinbostanci/Scripts | MIT | |
2024-11-19T03:11:23.302358+00:00 | 1,594,907,669,000 | 9e1177f819f66b6178082470d415ace3cdbe74b8 | 2 | {
"blob_id": "9e1177f819f66b6178082470d415ace3cdbe74b8",
"branch_name": "refs/heads/master",
"committer_date": 1594907669000,
"content_id": "4091cf43fe26c5b0a2ac54ef7325ca5fa901c726",
"detected_licenses": [
"MIT"
],
"directory_id": "16a8e9ce75b4f95fffb526358b2117adc84a02f7",
"extension": "py",
"fi... | 2.375 | stackv2 | # Copyright (c) 2013-2015 Alexandre Beloin, <alexandre.beloin@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | 194 | 30.26 | 88 | 19 | 1,214 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_7167004deed8c309_c1b84eb0", "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... | 10 | true | [
"CWE-776"
] | [
"rules.python.lang.security.use-defused-xmlrpc"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
23
] | [
23
] | [
1
] | [
38
] | [
"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"
] | requests_transport.py | /rtorrent-rpc/lib/xmlrpc/requests_transport.py | buzz/rtorrent-rpc | MIT | |
2024-11-19T03:11:24.464359+00:00 | 1,555,627,134,000 | c3a271eafbc7818b023285d988e2784f628fd731 | 2 | {
"blob_id": "c3a271eafbc7818b023285d988e2784f628fd731",
"branch_name": "refs/heads/master",
"committer_date": 1555627134000,
"content_id": "659935a8d7ae6a16b8fba95377cb5923ef99d897",
"detected_licenses": [
"MIT"
],
"directory_id": "6d9c6cdef701abfc1f88394b9427e6398617b562",
"extension": "py",
"fi... | 2.375 | stackv2 | import numpy as np
import pandas as pd
from flask import Flask, abort, jsonify, request
from pandas.io.json import json_normalize
import pickle as pickle
import sklearn
import random
with open('pickle_model', 'rb') as f:
model = pickle.load(f)
app = Flask(__name__)
@app.route('/')
def default():
return 'Homepa... | 42 | 24.29 | 86 | 12 | 241 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cb0ad9aa585b60d0_bd00fc0e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
10
] | [
10
] | [
12
] | [
26
] | [
"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"
] | app.py | /app.py | donaldocelaj/Data_Science | MIT | |
2024-11-19T03:11:26.889469+00:00 | 1,463,688,553,000 | ff082a386e19e9154d5f5cd0059895f314e81e59 | 3 | {
"blob_id": "ff082a386e19e9154d5f5cd0059895f314e81e59",
"branch_name": "refs/heads/master",
"committer_date": 1463688553000,
"content_id": "be6913c4422190a9f11339b4f71b536781f93396",
"detected_licenses": [
"MIT"
],
"directory_id": "8886a4f92fdf8785cea65777aa0239b1757628d6",
"extension": "py",
"fi... | 2.859375 | stackv2 | #!/usr/bin/python2.7
import requests
import json
import StringIO
import subprocess
import os
import time
from datetime import datetime
from PIL import Image
# Motion detection settings:
# Threshold (how much a pixel has to change by to be marked as "changed")
# Sensitivity (how many changed pixels before capturing... | 130 | 28.04 | 128 | 17 | 1,105 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b604a846e0c806be_6df6503b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 10 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
34,
47
] | [
34,
47
] | [
21,
5
] | [
65,
120
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | final_git_stuff.py | /final_git_stuff.py | tapQA/tap_u_pirates | MIT | |
2024-11-19T03:11:27.137604+00:00 | 1,629,924,848,000 | 887bb38c0c5be13a87e4e7f746719b470f3d4455 | 3 | {
"blob_id": "887bb38c0c5be13a87e4e7f746719b470f3d4455",
"branch_name": "refs/heads/master",
"committer_date": 1629924848000,
"content_id": "2deff628969bab3e23fe3c17897ef1f545f87f5c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "19476da4337ab0c61696e7d947740ebdf4a65610",
"extension": "py"... | 2.75 | stackv2 | import json
import logging
import os
import pickle
import numpy as np
from app_config import MODELS_DIR
from exceptions import LanguageModelNotTrained
from .utils import parse_into_words, write_file
from .build_ngrams_dictionaries import build_dictionary
from .config import USE_TRIGRAMS, UNIGRAMS_DICT_NAME, BIGRAMS_D... | 354 | 38.41 | 116 | 18 | 3,017 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_79d79ebab6b26198_06f23119", "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"
] | [
37,
38,
39
] | [
37,
38,
39
] | [
47,
48,
44
] | [
115,
117,
102
] | [
"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"
] | language_model.py | /language_model/language_model.py | naderabdalghani/project-rev | Apache-2.0 | |
2024-11-19T03:11:27.958017+00:00 | 1,494,827,549,000 | ea8bd8a91c8f2dc04507e6cd9504eacf2a5490a7 | 3 | {
"blob_id": "ea8bd8a91c8f2dc04507e6cd9504eacf2a5490a7",
"branch_name": "refs/heads/master",
"committer_date": 1494827549000,
"content_id": "791d7567a4e666e0ff78a386fce3e564a5651537",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "81cd9df36394aad07277f3b90b3d85134dc9330b",
"extension": "py"... | 3.234375 | stackv2 | #coding=utf-8
import fileinput, re
field_pat=re.compile(r'\[(.+?)\]') #匹配中括号里的字段
scope={}
def replacement(match):
code=match.group(1)
try:
#如果字段可以求值,返回它
return str(eval(code, scope))
except SyntaxError:
# 否则执行相同作用域内的赋值语句
exec code in scope
return ''
# 将所有文本以一个字符串的形... | 24 | 18.46 | 45 | 11 | 149 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_0c4097762b806204_4e53e850", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 2 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.exec-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
11,
14
] | [
11,
14
] | [
20,
9
] | [
37,
18
] | [
"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 exec(). exec() can be dangerous if used... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | templates.py | /exercise/re/templates.py | wufengwhu/my_blog | Apache-2.0 | |
2024-11-19T03:11:28.024112+00:00 | 1,647,869,500,000 | a3bbea7c1d7ec9cad1faa38569a50560a2e3781a | 3 | {
"blob_id": "a3bbea7c1d7ec9cad1faa38569a50560a2e3781a",
"branch_name": "refs/heads/master",
"committer_date": 1647869500000,
"content_id": "751442b201a6e4625089cd271e8ea5b033f5e835",
"detected_licenses": [
"MIT"
],
"directory_id": "2d4dba6b001cc5e323de29468104db8437b8a5f5",
"extension": "py",
"fi... | 2.65625 | stackv2 | """
Example 1. Drawing a teapot from multiple viewpoints.
"""
import argparse
import glob
import os
import subprocess
import chainer
import numpy as np
import scipy.misc
import tqdm
import neural_renderer
def run():
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--filename_input', type=str, d... | 66 | 34.2 | 115 | 14 | 604 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8a7a3ab69ea9f479_5d69d4f0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
58,
58,
58
] | [
58,
58,
58
] | [
5,
21,
111
] | [
116,
103,
115
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"HIGH"
] | [
"HIGH",
"MEDIUM",
"LOW"
] | example1.py | /examples/example1.py | hiroharu-kato/neural_renderer | MIT | |
2024-11-19T03:11:31.566718+00:00 | 1,620,307,415,000 | 19cd1d500c82b7eeb65e0a6eeb67e4be9d15a27f | 2 | {
"blob_id": "19cd1d500c82b7eeb65e0a6eeb67e4be9d15a27f",
"branch_name": "refs/heads/master",
"committer_date": 1620307583000,
"content_id": "39fd31eb1aef4d49226324cbae4c02fdec11ad95",
"detected_licenses": [
"MIT"
],
"directory_id": "df277dede3fd0e36f0ea2b07f44629d12ad4308d",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Airpippi crawler commands
import os
import re
import json
import datetime
def getTemp():
try:
f = open('/opt/airpippi/temp.json', 'r')
tempData = json.load(f)
if "data" in tempData and "temp" in tempData["data"][0]:
return tempData["data"][0]["temp"]
except... | 100 | 20.58 | 113 | 15 | 715 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_1465dd06c685369a_c1395efa", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 5 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
48
] | [
48
] | [
4
] | [
113
] | [
"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"
] | airpippi_cmd.py | /airpippi/bin/airpippi_cmd.py | Akkiesoft/airpippi | MIT | |
2024-11-19T03:11:41.388762+00:00 | 1,692,190,234,000 | a6bfd3c26d47c4e877417869a8b40e8256e843e9 | 3 | {
"blob_id": "a6bfd3c26d47c4e877417869a8b40e8256e843e9",
"branch_name": "refs/heads/master",
"committer_date": 1692190234000,
"content_id": "83d7313ae6621c9bf3a59e22f96103f42240cf7f",
"detected_licenses": [
"MIT"
],
"directory_id": "c772843fdbb20770e122128ddcd301ae0a6ef6db",
"extension": "py",
"fi... | 2.84375 | stackv2 | """Collection of utility functions for the Combine maintenance scripts."""
from __future__ import annotations
import logging
import os
import subprocess
import sys
from typing import List
def check_env_vars(var_names: List[str]) -> tuple[str, ...]:
"""Look up a list of environment variables and validate them.""... | 76 | 31.82 | 95 | 13 | 510 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_4d0005d60a271393_69951f85", "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"
] | [
32
] | [
38
] | [
16
] | [
10
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | maint_utils.py | /maintenance/scripts/maint_utils.py | sillsdev/TheCombine | MIT | |
2024-11-19T03:11:44.167219+00:00 | 1,581,106,254,000 | 8bb15cc099d60c78bc9e5cefc22ca21cede145be | 3 | {
"blob_id": "8bb15cc099d60c78bc9e5cefc22ca21cede145be",
"branch_name": "refs/heads/master",
"committer_date": 1581106254000,
"content_id": "aa70bda70f15b270beb09565bd73bfdfc591f38a",
"detected_licenses": [
"MIT"
],
"directory_id": "1fea3ad1608fbe8d7a695176ce001c32992baab4",
"extension": "py",
"fi... | 2.9375 | stackv2 | import gensim
import numpy as np
import pandas as pd
import psycopg2
import re
import os
import warnings;
warnings.filterwarnings('ignore')
"""Review2Vec (R2V) is the second type of model we designed for Groa.
We trained Gensim's Doc2Vec word embedding model on documents containing all the
reviews a user has written ... | 215 | 39.9 | 92 | 17 | 1,886 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_c004d78201ab8ef0_f1c2b624", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `_remove_dupes`... | 5 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH"
] | [
151,
151,
198,
198
] | [
151,
151,
198,
198
] | [
13,
13,
13,
13
] | [
50,
50,
48,
48
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | r2v_inference.py | /Flask/r2v_inference.py | cmgospod/Groa | MIT | |
2024-11-19T03:11:47.123497+00:00 | 1,625,899,637,000 | 8d789a6d42352262554cc31df3bfdd5ecae32770 | 3 | {
"blob_id": "8d789a6d42352262554cc31df3bfdd5ecae32770",
"branch_name": "refs/heads/master",
"committer_date": 1625899637000,
"content_id": "8d1572c8c4ea9551d8555a941a980396a2a13a40",
"detected_licenses": [
"MIT"
],
"directory_id": "cbe264842df4eae3569b28ed4aae9489014ed23c",
"extension": "py",
"fi... | 2.734375 | stackv2 | import asyncio
import os
import urllib.request
import certifi
async def download_coroutine(url):
"""
A coroutine to download the specified url
"""
request = urllib.request.urlopen(url, cafile=certifi.where())
filename = os.path.basename(url)
with open(filename, 'wb') as file_handle:
wh... | 44 | 27.52 | 69 | 12 | 314 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_6610897ac3d08e1d_ca1d4674", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value... | 2 | true | [
"CWE-93"
] | [
"rules.python.django.security.injection.request-data-write"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
15
] | [
18
] | [
13
] | [
37
] | [
"A03:2021 - Injection"
] | [
"Found user-controlled request data passed into '.write(...)'. This could be dangerous if a malicious actor is able to control data into sensitive files. For example, a malicious actor could force rolling of critical log files, or cause a denial-of-service by using up available disk space. Instead, ensure that requ... | [
5
] | [
"MEDIUM"
] | [
"MEDIUM"
] | bad_coroutine_example.py | /python/asyncio/bad_coroutine_example.py | zeroam/TIL | MIT | |
2024-11-19T03:11:47.378426+00:00 | 1,620,127,049,000 | 64bcbc13437e202ac25ae30580f585e13cc0e0b6 | 2 | {
"blob_id": "64bcbc13437e202ac25ae30580f585e13cc0e0b6",
"branch_name": "refs/heads/main",
"committer_date": 1620127049000,
"content_id": "6a4cbc6c05f903de46cc23860b51689d7ed3a54c",
"detected_licenses": [
"MIT"
],
"directory_id": "7808571c477f164a78e5032d4d790caf0f8977d4",
"extension": "py",
"file... | 2.484375 | stackv2 | from flask import Flask
from flask import render_template
from flask import request
app = Flask("templates")
@app.route("/hello/", methods=['GET', 'POST'])
def hello():
if request.method == 'POST':
ziel_person = request.form['vorname']
rueckgabe_string = "<li> " + ziel_person + "</li>"
r... | 20 | 24.05 | 83 | 12 | 124 | python | [{"finding_id": "semgrep_rules.python.django.security.injection.raw-html-format_42f6df2747a0132e_87b1b4db", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.raw-html-format", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected user input flowing into ... | 3 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.django.security.injection.raw-html-format",
"rules.python.flask.security.injection.raw-html-format"
] | [
"security",
"security"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
12,
12
] | [
12,
12
] | [
28,
28
] | [
59,
59
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected user input flowing into a manually constructed HTML string. You may be accidentally bypassing secure methods of rendering HTML by manually constructing HTML and this could create a cross-site scripting vulnerability, which could let attackers steal sensitive user data. To be sure this is safe, check that ... | [
5,
5
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | main.py | /demo_snippets/05_Formulare/main.py | hackerman7000/pro2_demos | MIT | |
2024-11-19T03:11:47.562792+00:00 | 1,561,515,730,000 | 8cc847a95e3c44f6ff6ef7429ef6c2aea86d9511 | 2 | {
"blob_id": "8cc847a95e3c44f6ff6ef7429ef6c2aea86d9511",
"branch_name": "refs/heads/master",
"committer_date": 1561515730000,
"content_id": "8fe3f468aee3f4d21e08ce73511c1c2599f1e9d1",
"detected_licenses": [
"MIT"
],
"directory_id": "21f1b7dd6681ca2f72cfcd1d6e78d62f358d08f9",
"extension": "py",
"fi... | 2.453125 | stackv2 | # -*- coding:utf-8 -
from utils import *
@jit
def MatMul(mat_a, mat_b, mat_out):
shape_m = mat_a.shape[0]
shape_k = mat_a.shape[1]
shape_n = mat_b.shape[1]
mat_b_trans = np.transpose(mat_b)
for m_index in range(shape_m):
for n_index in range(shape_n):
for k_index in range(shape... | 123 | 38.54 | 114 | 17 | 1,516 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_b49d086cd974dc16_58555925", "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 ... | 7 | true | [
"CWE-95",
"CWE-95",
"CWE-95",
"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",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rul... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
44,
45,
53,
54,
68,
69,
70
] | [
44,
45,
53,
54,
68,
69,
70
] | [
30,
55,
30,
55,
53,
55,
55
] | [
61,
86,
61,
86,
78,
79,
79
] | [
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection",
"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,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | matmul.py | /matmul.py | 0400H/NumericalValidation | MIT | |
2024-11-19T03:11:50.682687+00:00 | 1,615,166,988,000 | e1e87f2fef90bb597d48bc2a218e14c8fef6a5c9 | 3 | {
"blob_id": "e1e87f2fef90bb597d48bc2a218e14c8fef6a5c9",
"branch_name": "refs/heads/master",
"committer_date": 1615166988000,
"content_id": "8bd0460a4b17959badee55ec8952d76113603236",
"detected_licenses": [
"MIT"
],
"directory_id": "f5758bd67d18f30e7e6eea7d0342f9ad04acaecf",
"extension": "py",
"fi... | 2.59375 | stackv2 | import pathlib
from typing import Dict
from jinja2 import Environment, FileSystemLoader, Template
class Jinja2Renderer:
themes_dir = pathlib.Path(__file__).parent / "themes"
def __init__(self, theme: str, encoding: str = "utf8", ext: str = "j2"):
self.env = Environment(
loader=FileSyste... | 28 | 32.04 | 76 | 21 | 215 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_7153231c9b49f2a8_748d7c8e", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 2 | true | [
"CWE-79",
"CWE-116"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
12,
12
] | [
17,
17
] | [
20,
20
] | [
10,
10
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | renderers.py | /shimaenaga/renderers.py | kk6/shimaenaga | MIT | |
2024-11-19T03:11:57.246796+00:00 | 1,618,446,384,000 | b44f00dd9ac4ca89daf3e23f7de35f3b5eeb752b | 2 | {
"blob_id": "b44f00dd9ac4ca89daf3e23f7de35f3b5eeb752b",
"branch_name": "refs/heads/main",
"committer_date": 1618446384000,
"content_id": "6644ed1ade8603e8606a361c520c8ea5a7d5a37c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "64272bc0bcb291754787999716c900528c9a2258",
"extension": "py",
... | 2.3125 | stackv2 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import time
import subprocess
import json
import re
import copy
import socket
DIR_LOG_BASE = "/var/log/xf-traffic-generator"
UNIQUE_KEY = "unique"
MAIN_EXEC_NAME = "./xf-generator-main"
DAEMON_EXEC_NAME = "./xf-generator-daemon"
DAEMON_PY_NAME = "../tools/xf-daemon... | 285 | 32.29 | 113 | 32 | 2,306 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.return-in-init_785aaccc33dc787e_c8a25629", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.return-in-init", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "`return` should never appear inside a class __init__... | 5 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
186,
186,
253
] | [
186,
186,
253
] | [
9,
37,
8
] | [
90,
41,
22
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW"
] | [
"HIGH",
"LOW",
"HIGH"
] | libtools.py | /tools/libtools.py | vanlink/xf-traffic-generator | Apache-2.0 | |
2024-11-19T03:11:57.815273+00:00 | 1,560,051,108,000 | 06d3be38814fd1bb43092e6123a0f43966f45584 | 3 | {
"blob_id": "06d3be38814fd1bb43092e6123a0f43966f45584",
"branch_name": "refs/heads/master",
"committer_date": 1560051108000,
"content_id": "aecfa489759243e02a4233ac24cd1639cdedbdc5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f21d4b75f98fc85b1e0e80cf0254bd777ce95e1a",
"extension": "py"... | 2.625 | stackv2 | #!/usr/bin/env python
# coding=utf-8
from logic import _logic_base
from common import db_helper, convert_helper
from config import db_config
class DepartmentLogic(_logic_base.LogicBase):
"""部门管理表逻辑类"""
def __init__(self):
# 表名称
self.__table_name = 'department'
# 初始化
_logic_ba... | 56 | 40.09 | 125 | 24 | 611 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_1a43d6788e0f9109_0ffed473", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 4 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH"
] | [
26,
26,
45,
45
] | [
26,
26,
45,
45
] | [
26,
26,
26,
26
] | [
41,
41,
41,
41
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | department_logic.py | /logic/department_logic.py | wuxh123/my_bottle | Apache-2.0 | |
2024-11-19T03:12:01.069341+00:00 | 1,449,280,003,000 | faa863b110e58cb2766d420d873d096a8b278730 | 3 | {
"blob_id": "faa863b110e58cb2766d420d873d096a8b278730",
"branch_name": "refs/heads/master",
"committer_date": 1449280003000,
"content_id": "b8e6bd505f872525dfee9ff047bc530964175fac",
"detected_licenses": [
"MIT"
],
"directory_id": "df7813d52dbb2d04325cdeb2ecc81dca4d2904cf",
"extension": "py",
"fi... | 2.8125 | stackv2 | #!/usr/bin/python3
import sys
import json
import os
import re
import time
import xml.etree.cElementTree as cET
from scrape_affiliation import scrape_affiliation
class DBLPEncoder(json.JSONEncoder):
def default(self, o):
return o.to_dict()
class Author():
def __init__(self, name, id):
self.nam... | 228 | 42.39 | 113 | 26 | 2,075 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_bdf56ee7be670776_2f88808c", "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... | 9 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
8
] | [
8
] | [
1
] | [
37
] | [
"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"
] | dblp_to_json.py | /processing/dblp_to_json.py | Twinklebear/dataviscourse-pr-collaboration-networks | MIT | |
2024-11-19T03:12:06.737035+00:00 | 1,530,250,274,000 | 0828e1ea4574cb45b6f20a31055f2801732000be | 3 | {
"blob_id": "0828e1ea4574cb45b6f20a31055f2801732000be",
"branch_name": "refs/heads/master",
"committer_date": 1530250274000,
"content_id": "abb49d6d5abd6de3227c90b7d7376aec4009aa7b",
"detected_licenses": [
"MIT"
],
"directory_id": "80a2ac84f62d32e2c71e85418477e1c6879c31be",
"extension": "py",
"fi... | 2.546875 | stackv2 | from flask import Flask, render_template, request, redirect, flash, Markup
from werkzeug.utils import secure_filename
import sys
import os
sys.path.insert(0, '..')
import utils
import main
from constants import Const
UPLOAD_FOLDER = Const.ROOT + "reviews/upload"
ALLOWED_EXTENSIONS = set(['txt'])
app = Flask(__name__... | 163 | 33.07 | 132 | 20 | 1,291 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.explicit-unescape-with-markup_2468888e132a13bb_7214f1a8", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.explicit-unescape-with-markup", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected e... | 3 | true | [
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup",
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup",
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
79,
101,
109
] | [
79,
101,
109
] | [
33,
39,
43
] | [
45,
63,
116
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected explicitly unescaped content using 'Markup()'. This permits the unescaped data to include unescaped HTML which could result in cross-site scripting. Ensure this data is not externally controlled, or consider rewriting to not use 'Markup()'.",
"Detected explicitly unescaped content using 'Markup()'. This... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | web.py | /web/web.py | martin72gar/final_project | MIT | |
2024-11-19T03:12:07.660457+00:00 | 1,642,088,495,000 | c4b20bf45599e30338ff8e1b225efb3daf85a340 | 2 | {
"blob_id": "c4b20bf45599e30338ff8e1b225efb3daf85a340",
"branch_name": "refs/heads/master",
"committer_date": 1642088495000,
"content_id": "d2ba67183e973f728c6aee0e55fbdc65638b5e2c",
"detected_licenses": [
"MIT"
],
"directory_id": "85da6cf98b3251b29f60a554748439afec418083",
"extension": "py",
"fi... | 2.453125 | stackv2 | #By Sam Kreter
#For use by Microsoft and other parties to demo
#Azure Container Service, Azure Container Instances
#and the experimental ACI-connector
import os
from azure.storage.blob import BlobServiceClient
import sqlite3
COPY_PICS_NUM = 1
class DbAzureBlob:
def __init__(self):
AZURE_STORAGE_CONN... | 97 | 33.99 | 115 | 18 | 691 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_1609871074368cb0_7de2e9bb", "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"
] | [
59,
94
] | [
60,
95
] | [
13,
17
] | [
47,
54
] | [
"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"
] | dbAzureBlob.py | /aci-worker/app/dbAzureBlob.py | Azure-Samples/virtual-kubelet-aci-burst | MIT | |
2024-11-19T03:12:09.107922+00:00 | 1,515,435,561,000 | b42a566b2b47769978f3a56e818118986ed1a2ed | 2 | {
"blob_id": "b42a566b2b47769978f3a56e818118986ed1a2ed",
"branch_name": "refs/heads/master",
"committer_date": 1515435561000,
"content_id": "bafa93deba508d3091853e4c6013ac17d3d48d2d",
"detected_licenses": [
"MIT"
],
"directory_id": "f3f95241cb84847f6d6e9fbc5ab1844e45065701",
"extension": "py",
"fi... | 2.40625 | stackv2 | import argparse
import os
import pathlib
import pickle
import shutil
import sys
import traceback
import unittest
from collections import defaultdict
import numpy as np
import tqdm
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "humanrl"))
import frame # isort:skip
from classifier_tf import BlockerLabell... | 130 | 39.17 | 99 | 21 | 1,144 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_804102979d2d73dd_c08deab1", "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"
] | [
88
] | [
88
] | [
17
] | [
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"
] | build_feature_files.py | /train/build_feature_files.py | Zhouqianqian/human-rl | MIT | |
2024-11-19T03:12:10.678322+00:00 | 1,586,962,089,000 | 2058f8c54626cd7f50b589b77c1b18442406b78b | 3 | {
"blob_id": "2058f8c54626cd7f50b589b77c1b18442406b78b",
"branch_name": "refs/heads/master",
"committer_date": 1586962089000,
"content_id": "980cd08d51b56078ef2ca07b4f3ea9ee4cf8cccf",
"detected_licenses": [
"MIT"
],
"directory_id": "ff91bbcb12c414acead7ea56717977b026091584",
"extension": "py",
"fi... | 3.25 | stackv2 | """
Functions necessary to read and store data for the Avian Nutrient Distributions Project
"""
import ANDclasses as c
import csv
import sys
import os
sys.path.append("/Users/Emily/Documents/ASU/Programming/avian-nutrient-distributions/")
this_folder = os.path.dirname(os.path.abspath(__file__))
def getInput():
... | 287 | 40.25 | 110 | 19 | 2,747 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_100058ea04c0818b_c4fc19ce", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 6 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
154,
155
] | [
154,
155
] | [
31,
31
] | [
60,
60
] | [
"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"
] | ANDfunctions_StoreData.py | /ANDfunctions_StoreData.py | TheEmilyAves/avian-nutrient-distributions | MIT | |
2024-11-19T03:12:13.120758+00:00 | 1,594,121,142,000 | 5a0612441b97b2b8cd04f6f00fad9889c1f67c0d | 2 | {
"blob_id": "5a0612441b97b2b8cd04f6f00fad9889c1f67c0d",
"branch_name": "refs/heads/master",
"committer_date": 1594121142000,
"content_id": "614d25a128e15aa91d19720aadda639f5a4e8b86",
"detected_licenses": [
"MIT"
],
"directory_id": "2b25f2fba621c584068c01121ad62fcf37aedfd3",
"extension": "py",
"fi... | 2.4375 | stackv2 | import os
from distutils.util import strtobool
from invoke.exceptions import ParseError
import yaml
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader
def get_path():
"""
Get the full path name
"""
file_path = os.path.dirname(os.path.realpath(__file__))
roo... | 98 | 25.31 | 111 | 18 | 575 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_eb39dd25cd36c5b3_076c4351", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pyyaml-load"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
57
] | [
57
] | [
25
] | [
57
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Detected a possible YAML deserialization vulnerability. `yaml.unsafe_load`, `yaml.Loader`, `yaml.CLoader`, and `yaml.UnsafeLoader` are all known to be unsafe methods of deserializing YAML. An attacker with control over the YAML input could create special YAML input that allows the attacker to run arbitrary Python ... | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | utils.py | /tesserarius/utils.py | rehive/tesserarius | MIT | |
2024-11-19T03:12:15.560793+00:00 | 1,591,936,906,000 | 153de98a8ecc8bec14b7cab984a80418477e6753 | 2 | {
"blob_id": "153de98a8ecc8bec14b7cab984a80418477e6753",
"branch_name": "refs/heads/master",
"committer_date": 1591936906000,
"content_id": "8f17333e1d6962126b1642ba0c68e875d3d70319",
"detected_licenses": [
"MIT"
],
"directory_id": "6963751ce3c354b6f2b7f915c5bfc5aed9e8d35f",
"extension": "py",
"fi... | 2.3125 | stackv2 | import click
import webbrowser
from halo import Halo
import requests
import os
import dotenv
import time
from box import Box
from rich import print
from rich.table import Table, Column
# from click_configfile import ConfigFileReader, Param, SectionSchema, matches_section
# class ConfigFileLayout(object):
# @matche... | 272 | 38.53 | 135 | 17 | 2,482 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_2338c3970bd5ee34_744745a6", "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... | 20 | true | [
"CWE-295",
"CWE-295"
] | [
"rules.python.requests.security.disabled-cert-validation",
"rules.python.requests.security.disabled-cert-validation"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
89,
116
] | [
89,
116
] | [
23,
26
] | [
85,
73
] | [
"A03:2017 - Sensitive Data Exposure",
"A03:2017 - Sensitive Data Exposure"
] | [
"Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation.",
"Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation."
] | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"LOW",
"LOW"
] | main.py | /cli/scripts/main.py | axioms-io/sample-python-cli | MIT | |
2024-11-19T03:12:16.410058+00:00 | 1,685,675,450,000 | 7b8675ed0fc3c5ebfc88ed900f8e02c7c900ef66 | 2 | {
"blob_id": "7b8675ed0fc3c5ebfc88ed900f8e02c7c900ef66",
"branch_name": "refs/heads/master",
"committer_date": 1685675450000,
"content_id": "a60227d82fa627b1eff01ef32dd986b1ccef0538",
"detected_licenses": [
"MIT"
],
"directory_id": "e42bb46d029249cfd9a6fa10e2f28f7c268deec6",
"extension": "py",
"fi... | 2.328125 | stackv2 | import os
import sys
import re
import pickle
from workflow import Workflow
from item import Item
import subprocess
adb_path = os.getenv('adb_path')
def main(wf):
operation = sys.argv[1]
if operation == 'add':
items = pickle.loads(sys.argv[2])
historyWifiDevices = []
history = wf.sto... | 49 | 30.2 | 155 | 23 | 314 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_80cbe5820528c1c0_7561cda2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 6 | true | [
"CWE-502",
"CWE-502",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args",
"rules.python.lang.security.audit.subprocess-... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"MEDIUM",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | [
16,
21,
35,
35,
37,
43
] | [
16,
21,
37,
35,
37,
43
] | [
17,
34,
26,
50,
47,
43
] | [
42,
55,
52,
56,
51,
75
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"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,
7.5,
7.5,
7.5,
5
] | [
"LOW",
"LOW",
"LOW",
"MEDIUM",
"HIGH",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"HIGH",
"MEDIUM",
"LOW",
"MEDIUM"
] | update_wifi_history.py | /update_wifi_history.py | zjn0505/adb-alfred | MIT | |
2024-11-19T03:12:17.683104+00:00 | 1,549,487,113,000 | 0bae9a9600ea73b583d2f97419a97a8feb03eb69 | 3 | {
"blob_id": "0bae9a9600ea73b583d2f97419a97a8feb03eb69",
"branch_name": "refs/heads/master",
"committer_date": 1549487113000,
"content_id": "3d477cbf65f45420865253a25da83eb99ae06491",
"detected_licenses": [
"MIT"
],
"directory_id": "15946d2ffd3e84138fc5b40e4637b07758eb19e7",
"extension": "py",
"fi... | 2.8125 | stackv2 | #!/usr/bin/env python3
__title__ = 'getver-format'
__version__ = '0.6.0'
__license__ = 'MIT'
__desc__ = (
'Formatter for copying latest versions of Rust crates to a Cargo manifest, using "getver" crate version fetcher')
__url__ = 'https://github.com/sao-git/getver-format'
import subprocess
from os import environ... | 311 | 36.59 | 165 | 16 | 2,721 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_2789d6d40aae7924_d446cfae", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
151,
270
] | [
153,
272
] | [
22,
19
] | [
49,
46
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functio... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | getver-format.py | /getver-format.py | sao-git/getver-format | MIT | |
2024-11-19T03:12:21.029693+00:00 | 1,633,965,435,000 | 16ea647c93d5ee9fbb91fea48a135f818c2c7df5 | 2 | {
"blob_id": "16ea647c93d5ee9fbb91fea48a135f818c2c7df5",
"branch_name": "refs/heads/main",
"committer_date": 1633965435000,
"content_id": "a17aa390f3078a0483ff2c7bf76272ce5b30d867",
"detected_licenses": [
"MIT"
],
"directory_id": "ffe944266157253d670086ec3a30559422a8a3cd",
"extension": "py",
"file... | 2.359375 | stackv2 | from oauth2client.service_account import ServiceAccountCredentials
from datetime import date
from model import model
import pandas as pd
import numpy as np
import datetime
import gspread
import logging
import pickle
import json
import os
class SlackMessageHelper:
def __init__(self):
self.loaded_model = pi... | 101 | 41.04 | 110 | 16 | 898 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a318cf6a55e1b78f_ac7e89ef", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"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"
] | [
16,
18,
19
] | [
16,
18,
19
] | [
29,
27,
33
] | [
73,
82,
88
] | [
"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"
] | slack_message_helper.py | /slack_message_helper.py | Bhasfe/babur | MIT | |
2024-11-19T03:12:21.510214+00:00 | 1,690,553,722,000 | 4841a4f2ecb84060036495a84daa055d4fb4c359 | 2 | {
"blob_id": "4841a4f2ecb84060036495a84daa055d4fb4c359",
"branch_name": "refs/heads/master",
"committer_date": 1690553722000,
"content_id": "0b73367b3d4514367a6ba5f6908a1bf0f3fc6b3f",
"detected_licenses": [
"MIT"
],
"directory_id": "86d1cfa854078e589959e0417356acbe0a1b16f6",
"extension": "py",
"fi... | 2.421875 | stackv2 | from inspect import signature
import pickle
import epidag as dag
from complexism.mcore import AbsModelBlueprint
from .ebm import GenericEquationBasedModel, EBMY0
from .odeebm import OrdinaryDifferentialEquationModel, OrdinaryDifferentialEquations, ODEY0
__author__ = 'TimeWz667'
__all__ = ['BlueprintODEEBM']
class B... | 227 | 31.37 | 107 | 17 | 1,777 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c220b27c5f62c20f_394364f6", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
106,
112,
117,
124,
129
] | [
106,
112,
117,
124,
129
] | [
25,
20,
30,
23,
39
] | [
40,
42,
45,
46,
54
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | blueprint.py | /complexism/equationbased/blueprint.py | CxModelling/PyComplexism | MIT | |
2024-11-19T03:12:28.550698+00:00 | 1,599,053,689,000 | 205f335b512daedf31cd3611caabb34ac8e8a3df | 3 | {
"blob_id": "205f335b512daedf31cd3611caabb34ac8e8a3df",
"branch_name": "refs/heads/master",
"committer_date": 1599053689000,
"content_id": "e7fb1fdd954e03f0d5b14404a6bb81c9c2773efb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5fe72bb13baf3649058ebe11aa86ad4fc56c69ed",
"extension": "py"... | 2.828125 | stackv2 | """ FLIRjpg2HDF5
reads raw thermal images from a FLIR-camera JPG image series
and stores them in a HDF5 file - using exiftool """
import glob
import os
import subprocess
import PIL.Image
import numpy as np
import io
import json
import h5py
INPUT_FILE_MASK = "IR_*.jpg"
EXIFTOOL = "exiftool.exe"
def main(output="the... | 83 | 25.98 | 103 | 15 | 631 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c736bff95cadb758_d44c75ef", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
56,
70
] | [
56,
70
] | [
14,
11
] | [
42,
64
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | snippet.py | /hard-gists/d68467b87bc50e04c41e/snippet.py | dockerizeme/dockerizeme | Apache-2.0 | |
2024-11-19T03:12:28.722484+00:00 | 1,609,267,067,000 | 106d4d26066848abb6fcb6e149f67513994da47e | 3 | {
"blob_id": "106d4d26066848abb6fcb6e149f67513994da47e",
"branch_name": "refs/heads/main",
"committer_date": 1609267067000,
"content_id": "47ad46c6a3ca2af262057a9a5d6600091800c6aa",
"detected_licenses": [
"MIT"
],
"directory_id": "c0c5826b4ca656c6531ee1e5c50520ef59bdfcc6",
"extension": "py",
"file... | 3 | stackv2 | import fileinput
import re
def getInsertion(line, matches):
level_idx = [0]
new_line = []
for m in matches:
if m.group() == '(':
level_idx.append(m.start())
elif m.group() == ')':
del level_idx[-1]
elif m.group() == '*':
new_line.append((level_idx... | 50 | 25.92 | 66 | 15 | 349 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_9183eae2389eb45e_20eaf91d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 2 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
47,
50
] | [
47,
50
] | [
12,
12
] | [
36,
46
] | [
"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"
] | day18.py | /day18.py | seblars/AdventOfCode2020 | MIT | |
2024-11-19T03:12:29.228830+00:00 | 1,548,225,617,000 | 85cc87d91f6465088b0c0b49d2a2bc5fdbe96415 | 3 | {
"blob_id": "85cc87d91f6465088b0c0b49d2a2bc5fdbe96415",
"branch_name": "refs/heads/master",
"committer_date": 1548225617000,
"content_id": "c32fcff36998db6e8c9a64e1cc00b9e57df3b06b",
"detected_licenses": [
"MIT"
],
"directory_id": "1b1d5fb96810eef5ef30dd5840bc3db9ec89febc",
"extension": "py",
"fi... | 2.546875 | stackv2 | import csv
import os
import pickle
import numpy as np
import torch
from torch.utils.data.dataset import Dataset
import training_config
from utils import dataset_utils
from utils.constants import CROP_CENTER, CROP_BOTTOM
class MRI_3D_PKL_Dataset(Dataset):
def __init__(self, dir_path, mode, transforms=None):
... | 133 | 34.95 | 119 | 17 | 1,127 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_7fa04a7029afdb85_46f01a5f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
55
] | [
55
] | [
19
] | [
52
] | [
"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"
] | mri_3d_pkl_dataset.py | /mri_dataset/mri_3d_pkl_dataset.py | hrshagrwl/tumor-classification | MIT | |
2024-11-19T03:12:30.016134+00:00 | 1,538,460,691,000 | 16598880340b260424a1d119def64308ded99847 | 3 | {
"blob_id": "16598880340b260424a1d119def64308ded99847",
"branch_name": "refs/heads/master",
"committer_date": 1538460691000,
"content_id": "f42167729ac43f7fe9888e29645981f20981baaa",
"detected_licenses": [
"MIT"
],
"directory_id": "bce1c61d79a67f97e9b3eaecea330be5a745e968",
"extension": "py",
"fi... | 2.75 | stackv2 | """
Recorder module
"""
import subprocess
import threading
import time
import ResourceProvider
RESOURCE_PROVIDER = ResourceProvider.ResourceProvider() #static
RASPIVIDCMD = ["raspivid"]
class Recorder(threading.Thread):
"""
Camera recorder using raspivid
"""
def __init__(self, filePath, preview, time... | 81 | 29.93 | 77 | 14 | 553 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_d3558e6b1d52f279_5d19fccf", "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"
] | [
53
] | [
53
] | [
20
] | [
56
] | [
"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"
] | Recorder.py | /Arthemis/Recorder.py | AlexandruRusu23/Rufus | MIT | |
2024-11-19T03:12:33.391786+00:00 | 1,526,643,147,000 | 2f50e61b4609749863f164fc059436500e398f10 | 3 | {
"blob_id": "2f50e61b4609749863f164fc059436500e398f10",
"branch_name": "refs/heads/master",
"committer_date": 1526643147000,
"content_id": "5154b951eb8b0fa57013d4eb487378c1aad0bf45",
"detected_licenses": [
"MIT"
],
"directory_id": "deb921ea6b0b0a45bb415095b7cf4fb2a4c5ccfb",
"extension": "py",
"fi... | 2.890625 | stackv2 | import xml.etree.ElementTree as ET
import unicodecsv as csv
#Open a csv file to write all words and pronunciations
with open('word_pronunciations.csv', 'wb') as csvfile:
csvwriter = csv.writer(csvfile, delimiter=';')
csvwriter.writerow(['word','pronunciation'])
#Iteratively go over the huge XML file
fo... | 31 | 50.81 | 93 | 17 | 397 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_538c4d04a8560742_7f63180b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
1
] | [
1
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | getPronunciationFromWikiDump.py | /code/Scraping/Crawling/getPronunciationFromWikiDump.py | Merterm/Etymon | MIT | |
2024-11-19T03:12:37.609192+00:00 | 1,599,539,833,000 | b0817000fef37147e761f87e86048a827ba3271d | 3 | {
"blob_id": "b0817000fef37147e761f87e86048a827ba3271d",
"branch_name": "refs/heads/master",
"committer_date": 1599539833000,
"content_id": "5831c6a09bec9f174f77f6ffa7e0cf9709daf634",
"detected_licenses": [
"MIT"
],
"directory_id": "17a8945d114c24811ba3d8e3cb4f12055d01f35d",
"extension": "py",
"fi... | 2.59375 | stackv2 | """Koninklijke Philips N.V., 2019 - 2020. All rights reserved."""
import argparse
import os
import subprocess
import sys
from core_extractor import LOG
def create_parser(args):
""" Function which add the command line arguments required for the command line input
of function definition extractor """
# C... | 89 | 38.72 | 118 | 15 | 611 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_12a9367bc0b7f7fb_625b51fd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
88,
88
] | [
88,
88
] | [
9,
36
] | [
41,
40
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | extractor_cmd.py | /functiondefextractor/extractor_cmd.py | philips-software/functiondefextractor | MIT | |
2024-11-19T03:12:47.651355+00:00 | 1,573,993,412,000 | 7c77d90e077d8521f7e236839ddb574497c5b644 | 3 | {
"blob_id": "7c77d90e077d8521f7e236839ddb574497c5b644",
"branch_name": "refs/heads/master",
"committer_date": 1573993412000,
"content_id": "41c24b5fb77728090abe08629cce62d8212b0ba6",
"detected_licenses": [
"MIT"
],
"directory_id": "f8baa3ca68894fc5c7f8c27cfd1ee751b144460e",
"extension": "py",
"fi... | 2.71875 | stackv2 | #!/usr/bin/env python
import argparse
import requests
import yaml
from xml.etree import ElementTree
ALBUM_LIST_URL = "https://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key={api_key}&user_id={user_id}"
PHOTO_LIST_URL = "https://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&a... | 102 | 37.67 | 149 | 13 | 874 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_4eedfd23001b15c8_014444c2", "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... | 6 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
7
] | [
7
] | [
1
] | [
34
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | flickr_to_50mm.py | /flickr_to_50mm/flickr_to_50mm.py | arahayrabedian/flickr_to_50mm | MIT | |
2024-11-19T03:12:47.960244+00:00 | 1,498,138,518,000 | b0916f06f75af489947d6dca9e8322b40f8e8524 | 3 | {
"blob_id": "b0916f06f75af489947d6dca9e8322b40f8e8524",
"branch_name": "refs/heads/master",
"committer_date": 1498138518000,
"content_id": "6d9f4e3ab4abbf15be13bbc0f7b6c5a1843c02ae",
"detected_licenses": [
"MIT"
],
"directory_id": "7e7bc3524c04dbc62f163b46e43bc1ac4c18a13d",
"extension": "py",
"fi... | 2.78125 | stackv2 | import os
import pickle
import xml.etree.ElementTree as ET
from itertools import chain, repeat
import h5py
import numpy as np
from tfglib.seq2seq_normalize import maxmin_scaling
# import svgwrite
# from IPython.display import SVG, display
def get_bounds(data, factor):
min_x = 0
max_x = 0
min_y = 0
m... | 387 | 34.43 | 141 | 21 | 3,550 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_1ccdd1c3c23de9b0_84131247", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 5 | true | [
"CWE-611",
"CWE-611",
"CWE-502"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
3,
228,
284
] | [
3,
228,
284
] | [
1,
20,
9
] | [
35,
38,
44
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)",
"A08:2017 - Insecure Deserialization"
] | [
"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,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | utils.py | /utils.py | Gisela-arnal/write-rnn-tensorflow | MIT | |
2024-11-19T03:25:18.229322+00:00 | 1,626,022,064,000 | 10e62cde6d22cc702fe5ee5b9d69628343988788 | 3 | {
"blob_id": "10e62cde6d22cc702fe5ee5b9d69628343988788",
"branch_name": "refs/heads/master",
"committer_date": 1626022064000,
"content_id": "4c2657e96aee81237c1f6b6a2c331096e874b427",
"detected_licenses": [
"MIT"
],
"directory_id": "fb497dc356ce43d15cba6fc5e1947399d4e2fc0f",
"extension": "py",
"fi... | 2.734375 | stackv2 | import os, shutil
class RateVideo(object):
def __init__(self):
self.path_input = "./temp_input"
self.path_output = "./temp_output"
def main(self):
# 访问指定文件夹(假设视频都放在这里面)
for root, dirs, files in os.walk(self.path_input):
# 遍历所有文件
for file in files:
... | 37 | 26.38 | 60 | 17 | 206 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_bed5b218d47c67a7_907183b1", "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"
] | [
32
] | [
32
] | [
21
] | [
40
] | [
"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"
] | rate_video.py | /matrix-python-project/archive_tools/rate_video.py | flyingmydog/hocassian-media-matrix | MIT | |
2024-11-19T03:25:18.610834+00:00 | 1,633,029,635,000 | a418509d1711e4b81d32cf23cb831ad78046cb53 | 4 | {
"blob_id": "a418509d1711e4b81d32cf23cb831ad78046cb53",
"branch_name": "refs/heads/main",
"committer_date": 1633029635000,
"content_id": "5166a0f8373d72c9d881d15b127f7f67eef2742e",
"detected_licenses": [
"Unlicense"
],
"directory_id": "ce63f3df4b909e7f6cfcdb2f8573295cad07171e",
"extension": "py",
... | 3.75 | stackv2 | import os
from flask import Flask, render_template, request
from werkzeug.exceptions import BadRequestKeyError
# Subrutinas
def bad_request(message):
return (
render_template('index.html.jinja2', error=True, message=message),
400
)
def wrong_value(key, value):
return bad_request(
... | 167 | 36.17 | 159 | 18 | 1,516 | python | [{"finding_id": "semgrep_rules.python.flask.security.unescaped-template-extension_598b53f3a6339aec_41af3b2a", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.unescaped-template-extension", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Flask does not automatically esc... | 3 | true | [
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.unescaped-template-extension",
"rules.python.flask.security.unescaped-template-extension",
"rules.python.flask.security.unescaped-template-extension"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
10,
118,
162
] | [
10,
122,
167
] | [
9,
16,
16
] | [
74,
10,
10
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Flask does not automatically escape Jinja templates unless they have .html, .htm, .xml, or .xhtml extensions. This could lead to XSS attacks. Use .html, .htm, .xml, or .xhtml for your template extensions. See https://flask.palletsprojects.com/en/1.1.x/templating/#jinja-setup for more information.",
"Flask does n... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | app.py | /app.py | fbosio/python-quiz | Unlicense | |
2024-11-19T03:25:20.042748+00:00 | 1,491,352,345,000 | d0108fa91723883636de6873c0b5847c1a0f4b93 | 3 | {
"blob_id": "d0108fa91723883636de6873c0b5847c1a0f4b93",
"branch_name": "refs/heads/master",
"committer_date": 1491352345000,
"content_id": "2d45ddf77516df422b1f5f910d5a724a7870edad",
"detected_licenses": [
"MIT"
],
"directory_id": "aa7513cc8a6bf1714ded89b747195a7592a47b63",
"extension": "py",
"fi... | 3.109375 | stackv2 | #!/usr/bin/env python
import os
import sys
import subprocess
#Very hacky. Don't judge.
# Runs 'cmd' and returns the output.
def get_shell_cmd_output(cmd):
try:
return subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as cmdexception:
raise... | 38 | 30.55 | 112 | 17 | 271 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_e24ae060d36ddd0b_71aa1a9e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
12
] | [
12
] | [
16
] | [
82
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | download_s3_data.py | /download_s3_data.py | saurabh279/nyc-taxi-data | MIT | |
2024-11-19T03:25:22.392558+00:00 | 1,620,049,892,000 | fcb9ba805223b15ce9aa279d7ad3b24265288614 | 3 | {
"blob_id": "fcb9ba805223b15ce9aa279d7ad3b24265288614",
"branch_name": "refs/heads/master",
"committer_date": 1620049892000,
"content_id": "1842bd5341596e454d7cfea74c1bca0e5bb5a27f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5c8efc7966712dfa5c54f3357476ac49c4a85521",
"extension": "py"... | 2.578125 | stackv2 | # -*- coding: utf-8 -*
"""Main part of the Mamman application
This module encapsulates the UI and the state-machine for application control
Example:
python main.py
Todo:
* Establish model class?
More info:
https://github.com/lts-as
https://lts.no
"""
from automat import MethodicalMachine
import logging,... | 216 | 28.22 | 107 | 19 | 1,323 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-spawn-process-audit_023bfdb79e1957d9_8a7c6800", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-spawn-process-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-spawn-process-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
33
] | [
33
] | [
5
] | [
48
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | __init__.py | /mamman/__init__.py | LTS-AS/Mamman | Apache-2.0 | |
2024-11-19T03:25:22.548281+00:00 | 1,632,675,674,000 | 4639c71ef6c6f99f2cdfe29a31bfb7eca3034a5e | 2 | {
"blob_id": "4639c71ef6c6f99f2cdfe29a31bfb7eca3034a5e",
"branch_name": "refs/heads/master",
"committer_date": 1632675674000,
"content_id": "0042f7801a47489ffb524f890dabe48610995716",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9d3c63f8fc94a812f15f7f00631fb5c6299afff8",
"extension": "py"... | 2.359375 | stackv2 | from .torch_vocab import TorchVocab
from collections import Counter
import pickle
import json
class Vocab(TorchVocab):
def __init__(self, counter, max_size=None, min_freq=1):
self.pad_index = 0
self.unk_index = 1
self.eos_index = 2
self.sos_index = 3
super().__init__(counte... | 24 | 28.83 | 118 | 14 | 198 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c0bd155d93411a4f_64a46441", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
24
] | [
24
] | [
20
] | [
34
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | vocab.py | /data/vocab/vocab.py | guyleaf/FLVCD | Apache-2.0 | |
2024-11-19T03:25:32.352381+00:00 | 1,455,836,845,000 | 455d221d6c353d5b25f09453bad1adba5d98863d | 3 | {
"blob_id": "455d221d6c353d5b25f09453bad1adba5d98863d",
"branch_name": "refs/heads/master",
"committer_date": 1455836845000,
"content_id": "621c09d3aef15dac8747eb7fa3c698c9d332c8e2",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "4a2d68227bfd850d73d4bf30f6c19868ca7e9fa9",
"extension": "p... | 2.796875 | stackv2 | import os
import subprocess
from contextlib import contextmanager
from shlex import split
from workspace import Workspace
# Wrapper and convenience methods for charming w/ docker in python
class Docker:
'''
Wrapper class to communicate with the Docker daemon on behalf of
a charmer. Provides stateless ope... | 49 | 31.67 | 77 | 13 | 336 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_6c12c52c9c69666b_7eda9b56", "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"
] | [
47
] | [
47
] | [
13
] | [
48
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | __init__.py | /mwc2016/trusty/sgw/lib/charms/docker/__init__.py | cloudguru-bb/pub-charms | BSD-2-Clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.