added
stringdate
2024-11-18 17:59:49
2024-11-19 03:44:43
created
int64
126B
2,086B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.41
source
stringclasses
1 value
text
stringlengths
259
26.9k
num_lines
int64
16
649
avg_line_length
float64
15
61
max_line_length
int64
31
179
ast_depth
int64
8
40
length
int64
101
3.8k
lang
stringclasses
1 value
sast_semgrep_findings
stringlengths
1.17k
878k
sast_semgrep_findings_count
int64
1
629
sast_semgrep_success
bool
1 class
sast_semgrep_error
stringclasses
1 value
cwe_ids
listlengths
1
561
rule_ids
listlengths
1
561
subcategories
listlengths
1
561
confidences
listlengths
1
561
severities
listlengths
1
561
line_starts
listlengths
1
561
line_ends
listlengths
1
561
column_starts
listlengths
1
561
column_ends
listlengths
1
561
owasp_categories
listlengths
1
561
messages
listlengths
1
561
cvss_scores
listlengths
1
561
likelihoods
listlengths
1
561
impacts
listlengths
1
561
filename
stringlengths
4
105
path
stringlengths
5
372
repo_name
stringlengths
5
115
license
stringclasses
452 values
2024-11-18T20:26:23.000736+00:00
1,568,879,526,000
d20575758650dd412acee0700e044cf3db7de1b4
3
{ "blob_id": "d20575758650dd412acee0700e044cf3db7de1b4", "branch_name": "refs/heads/master", "committer_date": 1568879526000, "content_id": "cec65db4b69e7f360af8316f9f7efe71967b8136", "detected_licenses": [ "MIT" ], "directory_id": "ae35395500c9bd12d2bc91bba8d42c2bcbae7096", "extension": "py", "fi...
2.75
stackv2
#coding UTF-8 #TkinterでGUI化 import os import tkinter.messagebox import tkinter.font as font from tkinter import filedialog as tkFileDialog import shelve import yodobashic_photo_maker as ypm #基本設定 app_name = "某家電量販店っぽく画像に文字入れするやつ" app_size = "400x280" #rootウィンドウの設定 root = tkinter.Tk() root.title(app_name) root.geome...
214
35.31
161
17
2,275
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_d50b5cac0376e022_b5ccd65f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-shelve", "rules.python.lang.security.deserialization.avoid-shelve" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 59, 176 ]
[ 59, 176 ]
[ 16, 25 ]
[ 41, 50 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `shelve`, whic...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
ypm_gui.py
/ypm_gui.py
ddg171/yodobahic_photo_maker
MIT
2024-11-18T20:26:28.132852+00:00
1,460,147,967,000
2f37b372baaf1969384ab6603f8c9160c6083180
3
{ "blob_id": "2f37b372baaf1969384ab6603f8c9160c6083180", "branch_name": "refs/heads/master", "committer_date": 1460147967000, "content_id": "54554dfedfa44267c73bad0050958828046fef70", "detected_licenses": [ "MIT" ], "directory_id": "693f36e682d23c45fe514e3e92232ab6a284b449", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python ''' The module find the list of magnifications for jeolcom class and force insert to database. Useful when new magnification is added or replaced by service engineers. ''' import sys from leginon import leginondata from pyscope import jeolcom ok_msg = 'Success' def msgExit(msg=''): if msg: ...
56
26.32
98
14
402
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_a6d6c107b9f898ab_bb2007ee", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 51 ]
[ 51 ]
[ 29 ]
[ 35 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
jeolcom_new_mags.py
/dbschema/jeolcom_new_mags.py
tectronics/myami-3.2-freeHand
MIT
2024-11-18T20:26:28.241707+00:00
1,520,983,342,000
7b350af18d32539cae52f5b571ff3487685537e5
3
{ "blob_id": "7b350af18d32539cae52f5b571ff3487685537e5", "branch_name": "refs/heads/master", "committer_date": 1520983342000, "content_id": "79ef62475648e74b36bca73e96c64c065541d2c1", "detected_licenses": [ "MIT" ], "directory_id": "8021df5b5ffa200e4806bc846e868ad4c0228ce6", "extension": "py", "fi...
2.671875
stackv2
import redis import csv import pickle import logging import os from pprint import pformat class DictCache(object): """ Persistent dict caching """ def delete(self, id, *args, **kwargs): raise NotImplementedError def get(self, id, *args, **kwargs): raise NotImplementedError de...
285
24.53
89
17
1,726
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_110a603b01c824e8_db48aebb", "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", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 129, 133 ]
[ 129, 133 ]
[ 26, 13 ]
[ 40, 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" ]
dcache.py
/DianaFuture/dcache.py
jmartens/DIANA
MIT
2024-11-18T20:26:28.576406+00:00
1,683,458,807,000
dbb5348480d4b7934b59ff3804e4817dfc44a724
2
{ "blob_id": "dbb5348480d4b7934b59ff3804e4817dfc44a724", "branch_name": "refs/heads/master", "committer_date": 1683458807000, "content_id": "315a18e6a18be96e64d17f4aa43354db3a035d90", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1522ea608f6c79c7f44389b3270bd931e132ca33", "extension": "py"...
2.34375
stackv2
import json from functools import wraps from flask import Flask, make_response, redirect, url_for, request, jsonify from flask.json import JSONEncoder from flask import Response # project configuration wrapper: yaml formatted file from misc.config import settings as conf from quiver import quiver from quiver import unp...
239
26.08
76
17
1,375
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.xss.make-response-with-unknown-content_dd59e09a58bf2283_5039dba5", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "...
1
true
[ "CWE-79" ]
[ "rules.python.flask.security.audit.xss.make-response-with-unknown-content" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 54 ]
[ 54 ]
[ 20 ]
[ 53 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` will not autoescape HTML. If you are rendering HTML, write your HTML in a template file and use `flask.render_template()` which will take care ...
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
bow.py
/bow.py
jasset75/apollo
Apache-2.0
2024-11-18T20:26:29.106765+00:00
1,612,622,879,000
c8fd0c5d4681144ac5ce173009a5b98ce86875af
3
{ "blob_id": "c8fd0c5d4681144ac5ce173009a5b98ce86875af", "branch_name": "refs/heads/main", "committer_date": 1612622879000, "content_id": "88a26c9c4a9d1617bbd216ca3d14a72401265628", "detected_licenses": [ "MIT" ], "directory_id": "539e26d5416b468f79baf4edb5426a050d961388", "extension": "py", "file...
2.703125
stackv2
import pandas as pd import numpy as np import math file = pd.read_csv('vocabulary.csv', sep=',') ids = file['Index'].values # previous label id v1 = file['Vertical1'].values # categories belong # count all categories category = [] for v in v1: if str(v) != 'nan' and not (v in category): category.append(...
52
27.06
88
12
401
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_6d6f571de5ee7100_3a508ec0", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 49 ]
[ 49 ]
[ 31 ]
[ 35 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
cate.py
/cate.py
innovator-zero/CS410_AI_Project2
MIT
2024-11-18T20:26:33.555860+00:00
1,606,711,137,000
e21989be0fda30b95836c52df553e30c0c59939d
3
{ "blob_id": "e21989be0fda30b95836c52df553e30c0c59939d", "branch_name": "refs/heads/master", "committer_date": 1606711137000, "content_id": "bb48435583877d2ba97c6e47223ec52e978617b7", "detected_licenses": [ "MIT" ], "directory_id": "09caf62b46d6b099ce7b727886157f5aa0263c1f", "extension": "py", "fi...
2.75
stackv2
# CIS 4930 ########### Contributors ########### # Nipuna Weerapperuma # Hannah Williams # David Jaworski # Carlos Morales-Diaz # Spencer Bass ########### PyQT5 imports ########### from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt class FloatingWidget(QtWidgets.QWidget): def __init__(self, chi...
169
48.46
125
20
1,832
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_be4635920c054848_9303eefb", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 44 ]
[ 44 ]
[ 9 ]
[ 24 ]
[ "" ]
[ "Is \"is_heading\" a function or an attribute? If it is a function, you may have meant self.is_heading() because self.is_heading is always true." ]
[ 5 ]
[ "" ]
[ "" ]
lotusFloating.py
/src/lotusFloating.py
nipunaw/Lotus
MIT
2024-11-18T20:26:33.783312+00:00
1,572,183,228,000
9c38dffb1ad39486fdf1ac2f4c69b06ff6ef1126
4
{ "blob_id": "9c38dffb1ad39486fdf1ac2f4c69b06ff6ef1126", "branch_name": "refs/heads/master", "committer_date": 1572183228000, "content_id": "c9e64bcf0eb05a1a9915fd9e5202f45fcaef2af3", "detected_licenses": [ "MIT" ], "directory_id": "15ab61bbdb404819f068c2fc5ff2dfaf137e4614", "extension": "py", "fi...
3.515625
stackv2
# Time: O(nlogn) # Space: O(n) class Solution(object): def wiggleSort(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ nums.sort() med = (len(nums) - 1) / 2 nums[::2], nums[1::2] = nums[med::-1], n...
67
35.72
87
19
653
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_db6bed3b7b44e33c_b99173f0", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `partitionAroun...
1
true
[ "" ]
[ "rules.python.lang.maintainability.useless-inner-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 36 ]
[ 45 ]
[ 9 ]
[ 33 ]
[ "" ]
[ "function `partitionAroundPivot` is defined inside a function but never used" ]
[ 7.5 ]
[ "" ]
[ "" ]
wiggle-sort-ii.py
/Python/wiggle-sort-ii.py
AliHashemi-ai/LeetCode-Solutions
MIT
2024-11-18T20:26:34.797835+00:00
1,626,007,233,000
b744de18eaf0c23980323ac1db49205ac81c03a8
3
{ "blob_id": "b744de18eaf0c23980323ac1db49205ac81c03a8", "branch_name": "refs/heads/main", "committer_date": 1626007233000, "content_id": "df0a04f047e65af3c01419d5855a934f662d352b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "33f89e3f76a5988cb4b9360a12d6202b46283414", "extension": "py"...
2.703125
stackv2
import random import os import requests from flask import Flask, render_template, abort, request from QuoteEngine import Ingestor from MemeEngine import MemeGenerator app = Flask(__name__) meme = MemeGenerator('./static') def setup(): """ Load all resources """ quote_files = ['./_data/DogQuotes/DogQuotesT...
76
23.45
75
12
445
python
[{"finding_id": "semgrep_rules.python.django.security.injection.ssrf.ssrf-injection-requests_0aaf7f67345935e2_5bcbc460", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.ssrf.ssrf-injection-requests", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from...
4
true
[ "CWE-918", "CWE-918" ]
[ "rules.python.django.security.injection.ssrf.ssrf-injection-requests", "rules.python.flask.security.injection.ssrf-requests" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 59, 60 ]
[ 60, 60 ]
[ 5, 16 ]
[ 52, 52 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)", "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox...
[ 7.5, 7.5 ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
app.py
/src/app.py
svd-007/Meme-Generator
BSD-3-Clause
2024-11-18T20:26:35.052167+00:00
1,631,939,320,000
9bb5660c0e94d247983f740806bb8f7704fe0537
2
{ "blob_id": "9bb5660c0e94d247983f740806bb8f7704fe0537", "branch_name": "refs/heads/master", "committer_date": 1631939320000, "content_id": "7a02d4707149d09beb692cd50091924ba6ad4f77", "detected_licenses": [ "MIT" ], "directory_id": "7a1e37329585c2a8b3b3aa6719ec1635ef9b4c9d", "extension": "py", "fi...
2.5
stackv2
''' Created on May 29, 2019 Ch07 @author: Burkhard A. Meier ''' import mysql.connector import Ch07_Code.GuiDBConfig as guiConf GUIDB = 'GuiDB' # unpack dictionary credentials conn = mysql.connector.connect(**guiConf.dbConfig) cursor = conn.cursor() try: cursor.execute("CREATE DATABASE {} \ ...
23
21.87
78
11
128
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_8854258e940c0e52_55f0556f", "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" ]
[ 18, 18 ]
[ 19, 19 ]
[ 5, 5 ]
[ 65, 65 ]
[ "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" ]
MySQL_create_DB.py
/open_source/Python-GUI-Programming-Cookbook-Third-Edition/Ch07_Code/MySQL_create_DB.py
liuwenye2010/prj_python
MIT
2024-11-18T20:26:35.939656+00:00
1,621,058,817,000
e4544d6ea4267cb54a6cada293ae73b82a884f66
3
{ "blob_id": "e4544d6ea4267cb54a6cada293ae73b82a884f66", "branch_name": "refs/heads/main", "committer_date": 1621058817000, "content_id": "d36aaef2265b3e4c8a0f66d6a5cddb1a98039746", "detected_licenses": [ "MIT" ], "directory_id": "3918f7782e2a6801e34dad8a6f4ea2207118389f", "extension": "py", "file...
2.96875
stackv2
import logging from utils import Utils class Logger: def __init__(self, filename, encoding="utf-8", level=logging.INFO, is_debug=False): self.is_debug = is_debug self.logging = logging self.logging.basicConfig( filename=filename, encoding=encoding, level=level) def info(se...
22
29.09
87
13
140
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_d204c56ddc749ee0_404f9e55", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 7, 21 ]
[ 7, 21 ]
[ 9, 12 ]
[ 22, 25 ]
[ "", "" ]
[ "Is \"is_debug\" a function or an attribute? If it is a function, you may have meant self.is_debug() because self.is_debug is always true.", "Is \"is_debug\" a function or an attribute? If it is a function, you may have meant self.is_debug() because self.is_debug is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
logger.py
/src/logger.py
shimech/snkrs-news-bot
MIT
2024-11-18T20:26:36.058497+00:00
1,600,159,840,000
503edb23aca57577605827702d4bbb106482d53f
3
{ "blob_id": "503edb23aca57577605827702d4bbb106482d53f", "branch_name": "refs/heads/master", "committer_date": 1600159840000, "content_id": "cbba2e93a7cf8e6829742f00807fe3e948af3137", "detected_licenses": [ "MIT" ], "directory_id": "4f52658d498fd854e7030d2b4b69d08cfde814b1", "extension": "py", "fi...
2.984375
stackv2
import threading import queue import subprocess from subprocess import * from subprocess import check_output as __check_output try: getattr(subprocess, 'TimeoutExpired') except AttributeError: # Timeout exception class TimeoutExpired(CalledProcessError): def __init__(self, cmd, timeout, output): ...
68
26.28
71
17
381
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_64689292c4af0dc0_0559d977", "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" ]
[ 27, 37 ]
[ 27, 37 ]
[ 20, 24 ]
[ 51, 57 ]
[ "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 subproc...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
__future_subprocess.py
/klausuromat/__future_subprocess.py
seecurity/klausuromat
MIT
2024-11-18T20:26:41.000691+00:00
1,391,537,973,000
1f21f09a65c20b0230ddeb497c6eed3fca898acd
3
{ "blob_id": "1f21f09a65c20b0230ddeb497c6eed3fca898acd", "branch_name": "refs/heads/master", "committer_date": 1391537973000, "content_id": "a5cc523c041f8938d3661a38f96740e76b24a69e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "d0678e09f453561cf6443409b2fa73e0797afff9", "extension": "p...
2.71875
stackv2
from .datalog2sql.datalog2sqlconverter import Datalog2SqlConverter from .sql_engine.query_evaluator import QueryEvaluator from .sql_engine.db_state_tracker import DBStateTracker from colorama import * from .interpreter.interpreter_parse import * from .interpreter.syntax_highlighter import SyntaxHighlight import sys imp...
196
30.64
112
18
1,516
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_546bdefc9b134c08_1be33709", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 115, 121 ]
[ 115, 121 ]
[ 9, 9 ]
[ 65, 74 ]
[ "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" ]
yadi.py
/yadi/yadi.py
saltzm/yadi
BSD-3-Clause
2024-11-18T20:26:44.270926+00:00
1,578,876,984,000
57741b81426fb958ac999e0bce8b3ff6bf7872c3
3
{ "blob_id": "57741b81426fb958ac999e0bce8b3ff6bf7872c3", "branch_name": "refs/heads/master", "committer_date": 1578876984000, "content_id": "72068364085dcfc3ecbead06503fe900dae6ac82", "detected_licenses": [ "MIT" ], "directory_id": "8f4316990a92478acb8210442ae450653ad700d4", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python3 from collections import defaultdict from types import SimpleNamespace from pywup.services.system import read_csv, Args from pywup.services.general import find_column #import matplotlib.colors as mcolors import matplotlib.pyplot as plt import numpy as np import colorcet import math import sys ...
313
23.98
88
21
1,956
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_15649fa7211dedfd_bcc1ddf9", "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 ...
6
true
[ "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" ]
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 39, 131, 140, 149, 168, 180 ]
[ 39, 131, 140, 149, 168, 180 ]
[ 20, 21, 28, 28, 30, 14 ]
[ 34, 34, 41, 41, 44, 32 ]
[ "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 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
bars.py
/pywup/cmdtools/bars.py
diegofps/pywup
MIT
2024-11-18T20:26:44.423667+00:00
1,622,421,401,000
aa95fc34ec5a434af9075d3a4f5cbbb903abbcc2
3
{ "blob_id": "aa95fc34ec5a434af9075d3a4f5cbbb903abbcc2", "branch_name": "refs/heads/main", "committer_date": 1622421401000, "content_id": "5b1939433a5859ae536fd795ca2fff9602e2b8be", "detected_licenses": [ "MIT" ], "directory_id": "df07014d2519dd085fbd78240e7a46aa9240be19", "extension": "py", "file...
2.703125
stackv2
"""Main functions for the use by end users. """ import pandas as pd from pathlib import Path from wbib import queries, render from wikidata2df import wikidata2df from jinja2 import Environment, PackageLoader env = Environment( loader=PackageLoader("wbib", "templates"), ) DEFAULT_QUERY_OPTIONS = { "map of in...
232
31.71
124
14
1,770
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_cadea1ef27b7dff1_9588f29c", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
5
true
[ "CWE-79", "CWE-116", "CWE-79", "" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.jinja2.security.audit.missing-autoescape-disabled", "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.lang.correctness.common-mistakes.string-is-comparison" ]
[ "security", "security", "security", "correctness" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "HIGH" ]
[ 11, 11, 170, 182 ]
[ 13, 13, 178, 182 ]
[ 7, 7, 25, 46 ]
[ 2, 2, 6, 61 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection", "A07:2017 - Cross-Site Scripting (XSS)", "" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected a Jinja2 environment witho...
[ 5, 5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "" ]
wbib.py
/wbib/wbib.py
lubianat/wbib
MIT
2024-11-18T20:26:44.481788+00:00
1,686,846,949,000
bcae5d8d0f884381ba8239abd251bc80fb630630
3
{ "blob_id": "bcae5d8d0f884381ba8239abd251bc80fb630630", "branch_name": "refs/heads/master", "committer_date": 1686846949000, "content_id": "3d473252ce797b72a69d712b1be92435333838d0", "detected_licenses": [], "directory_id": "4727fa4397a2f1da2827dfbebe24f0b79fa5c9c1", "extension": "py", "filename": "mak...
2.984375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- """Create a multi-channel signed distance field map. Use https://github.com/Chlumsky/msdfgen/ You need in this directory: * msdfgen executable * SourceCodePro-Regular.ttf Just run this script to (re)create the font map directly in phy/plot/static/ in npy.gz format. """...
88
31.17
98
15
741
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_e8c2b7a66f72a534_2e668107", "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" ]
[ 64 ]
[ 64 ]
[ 9 ]
[ 23 ]
[ "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" ]
makefont.py
/tools/makefont.py
cortex-lab/phy
2024-11-18T20:26:45.614586+00:00
1,667,194,029,000
c05d35f7defe25b29e47a68a1f286b29cea5c5e1
3
{ "blob_id": "c05d35f7defe25b29e47a68a1f286b29cea5c5e1", "branch_name": "refs/heads/master", "committer_date": 1667194029000, "content_id": "d182e32af02f7188c445ad909f16a4e6192bd0bd", "detected_licenses": [ "MIT" ], "directory_id": "8966830bd2b5a637f43bdfe0574bb389ced80cb9", "extension": "py", "fi...
2.8125
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 26 19:52:22 2021 Not finished script! @author: shlomi """ import click from loguru import logger from pathlib import Path upload_path = Path('/home/axis-gps') historic_path = Path('/home/axis-gps/historic/Axis-Gps/T02') @click.command() @click.op...
56
29.52
98
14
432
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_00ae1364a7e924c1_5c1078e1", "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.correctness.unchecked-subprocess-call", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "correctness", "security" ]
[ "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "MEDIUM", "HIGH" ]
[ 51, 51, 51 ]
[ 51, 51, 51 ]
[ 13, 24, 40 ]
[ 45, 28, 44 ]
[ "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()'.", "This is not checking the r...
[ 7.5, 5, 7.5 ]
[ "LOW", "", "HIGH" ]
[ "HIGH", "", "LOW" ]
move_older_T02_to_historic_script.py
/move_older_T02_to_historic_script.py
ZiskinZiv/PW_from_GPS
MIT
2024-11-18T20:26:45.737008+00:00
1,623,097,392,000
7d9130eeec9ddbc95dd18472911da824e88349ec
2
{ "blob_id": "7d9130eeec9ddbc95dd18472911da824e88349ec", "branch_name": "refs/heads/master", "committer_date": 1623097392000, "content_id": "ef6aa56238f2c1f5b26e7a323248dfd9de3dbaa6", "detected_licenses": [], "directory_id": "d1b19473d84c099c3d979927ede0d12e9d6f3ee5", "extension": "py", "filename": "vie...
2.359375
stackv2
from api.models import User from django.shortcuts import get_object_or_404 from rest_framework import authentication, generics, permissions, status from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.response import Response from rest_framework.settings import api_settings from django.contrib...
104
37.31
120
17
776
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_0fd09d51f8f88f1f_b56f8716", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'self.object' is b...
2
true
[ "CWE-521", "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password", "rules.python.django.security.audit.unvalidated-password" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 65, 99 ]
[ 65, 99 ]
[ 13, 13 ]
[ 51, 74 ]
[ "A07:2021 - Identification and Authentication Failures", "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'self.object' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information.", "The password on 'self.objec...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
views.py
/accounts/views.py
l4z0-space/Eureka
2024-11-18T20:26:46.048689+00:00
1,632,360,092,000
78382e2c6ec2306a444fc4bd2fdf4f16673f3015
2
{ "blob_id": "78382e2c6ec2306a444fc4bd2fdf4f16673f3015", "branch_name": "refs/heads/master", "committer_date": 1632360092000, "content_id": "7d45f15c96e85e279c0d2976c0c3ecbf3d9efa20", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "89380ff106e8a9a6b99363e052122ede93e31c74", "extension": "p...
2.359375
stackv2
from .base import EntityRef from .exchange_ref import ExchangeRef class MultipleReferences(Exception): pass class NoReference(Exception): pass class ProcessRef(EntityRef): """ Processes can lookup: """ _etype = 'process' _ref_field = 'referenceExchange' @property def _addl(sel...
276
36.78
138
18
2,278
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_6a296e5e9c2c3186_57b098ba", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 159, 161 ]
[ 159, 161 ]
[ 44, 63 ]
[ 58, 77 ]
[ "", "" ]
[ "Is \"is_reference\" a function or an attribute? If it is a function, you may have meant t.is_reference() because t.is_reference is always true.", "Is \"is_reference\" a function or an attribute? If it is a function, you may have meant x.is_reference() because x.is_reference is always true." ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
process_ref.py
/antelope/refs/process_ref.py
msm-sardar/antelope
BSD-3-Clause
2024-11-18T20:26:46.650286+00:00
1,425,104,119,000
8b8380d662d28ed9a33e491ad88edbdfb5422667
3
{ "blob_id": "8b8380d662d28ed9a33e491ad88edbdfb5422667", "branch_name": "refs/heads/master", "committer_date": 1425104119000, "content_id": "f8949dc7a43e210c862ab4449f01df26491099c6", "detected_licenses": [ "MIT" ], "directory_id": "a69d3bc718145b81dbe72baeaa824f01fc7dc70a", "extension": "py", "fi...
2.609375
stackv2
from django.db import models # Commenting out all the "primary keys" for now, because Django automatically # REMAINING TODO: # -Add __str__ methods for any models that are missing them class User(models.Model): MALE = 'm' FEMALE = 'f' GENDER_CHOICES = ((MALE, 'Male'), (FEMALE, 'Female')) #user_i...
177
30.59
78
12
1,263
python
[{"finding_id": "semgrep_rules.python.django.correctness.no-null-string-field_f3096dcb97cb35c6_cc6cdca3", "tool_name": "semgrep", "rule_id": "rules.python.django.correctness.no-null-string-field", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Avoid using null on string-based f...
4
true
[ "", "", "" ]
[ "rules.python.django.correctness.no-null-string-field", "rules.python.django.correctness.no-null-string-field", "rules.python.django.correctness.no-null-string-field" ]
[ "correctness", "correctness", "correctness" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 16, 21, 22 ]
[ 16, 21, 22 ]
[ 5, 5, 5 ]
[ 65, 69, 66 ]
[ "", "", "" ]
[ "Avoid using null on string-based fields such as CharField and TextField. If a string-based field has null=True, that means it has two possible values for \"no data\": NULL, and the empty string. In most cases, it's redundant to have two possible values for \"no data;\" the Django convention is to use the empty str...
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
models.py
/src/accounts/models.py
zavalnav/synergyspace
MIT
2024-11-18T20:26:49.778980+00:00
1,617,896,327,000
e85eae8a0440fcee30b460cc5ba6bb2ce8fd9004
2
{ "blob_id": "e85eae8a0440fcee30b460cc5ba6bb2ce8fd9004", "branch_name": "refs/heads/master", "committer_date": 1617896327000, "content_id": "f6a1d0375f15e079808f5af4f7bd1e6e26478e1b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "08817ef9b06c8d1aedd517268bb427e0a109758b", "extension": "p...
2.453125
stackv2
import argparse import os import time import numpy as np import tensorflow as tf from six.moves import cPickle from mnist_data import * from model import CPPNResnet """ cppn vae: compositional pattern-producing generative adversarial network LOADS of help was taken from: https://github.com/carpedm20/DCGAN-tensorf...
232
33.4
89
20
1,899
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_5ab08b2aa65b2974_ff2d363b", "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 ...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 80 ]
[ 80 ]
[ 9 ]
[ 30 ]
[ "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" ]
train.py
/train.py
andrewlook/cppn-resnet-gan-tensorflow
BSD-3-Clause
2024-11-18T20:26:50.609132+00:00
1,578,836,311,000
5a5d13b866253fb467d78c5bf0093bb7b0e5b9b5
2
{ "blob_id": "5a5d13b866253fb467d78c5bf0093bb7b0e5b9b5", "branch_name": "refs/heads/master", "committer_date": 1578836311000, "content_id": "57249e5549d00cbca5eca61968971311cc6ff84d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9e800912fb82c70db48b5a2ab87a21e80caab2d1", "extension": "py"...
2.34375
stackv2
# 先找到明显正例和明显负例集合,再使用训练好的FRCN模型计算正例中心和负例中心 import os import json import pickle import torch import numpy as np from tqdm import tqdm from detectron2.engine import DefaultPredictor from detectron2.structures import BoxMode from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.config import get_cfg...
163
35.88
107
20
1,670
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0c1f6ff9ea69e125_672956bb", "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" ]
[ 30, 71, 140 ]
[ 30, 71, 140 ]
[ 13, 5, 5 ]
[ 47, 46, 92 ]
[ "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" ]
get_center.py
/caltech_detection/get_center.py
PKULiuHui/PedestrianDetectron2
Apache-2.0
2024-11-18T20:26:51.962289+00:00
1,693,339,200,000
133931037738b972fea8a90b09b3be13d6122a4e
2
{ "blob_id": "133931037738b972fea8a90b09b3be13d6122a4e", "branch_name": "refs/heads/master", "committer_date": 1693339200000, "content_id": "e8a7271e2a58439a9c1171f53befcc34a999c7c6", "detected_licenses": [ "Unlicense" ], "directory_id": "0fa00ecf2dd671515dc001d4b14049ec6a0c1f1c", "extension": "py",...
2.453125
stackv2
""" Use Jinja and data from Home Assistant to generate your README.md file For more details about this component, please refer to https://github.com/custom-components/readme """ from __future__ import annotations import asyncio import json import os from shutil import copyfile from typing import Any, Dict, List impo...
251
28.04
91
20
1,537
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_425c69c4b6bc98a9_75c40c73", "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-79", "" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "security", "maintainability" ]
[ "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 168, 238 ]
[ 168, 238 ]
[ 22, 36 ]
[ 48, 59 ]
[ "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.", "Is \"is_built_in\" a function or an...
[ 5, 5 ]
[ "LOW", "" ]
[ "MEDIUM", "" ]
__init__.py
/custom_components/readme/__init__.py
bacco007/HomeAssistantConfig
Unlicense
2024-11-18T20:26:52.434124+00:00
1,635,748,352,000
1a1e2eb3452a5fa46c8114c7a6bf4784efad9696
3
{ "blob_id": "1a1e2eb3452a5fa46c8114c7a6bf4784efad9696", "branch_name": "refs/heads/master", "committer_date": 1635748352000, "content_id": "8fca6fa1d86bfca01ee4c6331fd071973d29706b", "detected_licenses": [ "MIT" ], "directory_id": "b71b5bec2a36dbac113c35ba1d80b31dd070804e", "extension": "py", "fi...
2.53125
stackv2
""" Command for managing files on Put.IO. """ import click import json import os import shutil import yaml from putio_automator import date_handler, echo, logger from putio_automator.cli import cli from putio_automator.db import with_db @cli.group() def files(): pass @files.command() @click.pass_context @click...
76
36.49
155
20
614
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_8b3853ec24335241_03ba63b4", "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 files. Consider r...
1
true
[ "" ]
[ "rules.python.lang.best-practice.pass-body-fn" ]
[ "best-practice" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 15 ]
[ 17 ]
[ 1 ]
[ 9 ]
[ "" ]
[ "`pass` is the body of function files. Consider removing this or raise NotImplementedError() if this is a TODO" ]
[ 5 ]
[ "" ]
[ "" ]
files.py
/putio_automator/commands/files.py
bogartusmaximus/putio-automator
MIT
2024-11-18T20:26:53.452690+00:00
1,640,946,367,000
098195cd1568ff46e82682f914c01fb9d991232c
3
{ "blob_id": "098195cd1568ff46e82682f914c01fb9d991232c", "branch_name": "refs/heads/master", "committer_date": 1640946367000, "content_id": "d78e6a41fa8dc0134d5bf2c9e059c6bf21a0104a", "detected_licenses": [ "MIT" ], "directory_id": "4bb54c6aa702fe4a2f49d4d79d2ab1116784e644", "extension": "py", "fi...
2.921875
stackv2
import os import yaml import random import numpy as np import tensorflow as tf from pathlib import Path from typing import List, Tuple, Dict, Union, Sequence, Callable, Any __all__ = ['label2array', 'seed_everything', 'read_config', 'arrays2labels', 'sparse_tuple_from'] ...
82
28.01
110
17
570
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_98e6a27a3df3ed0d_dd24decf", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
2
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 17 ]
[ 17 ]
[ 72 ]
[ 106 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
utils.py
/model/utils.py
sgenza/tf_crnn
MIT
2024-11-18T20:26:53.556773+00:00
1,598,377,201,000
15cc8a34ef80c3af2906b04bc2cf5c11aebba0cd
2
{ "blob_id": "15cc8a34ef80c3af2906b04bc2cf5c11aebba0cd", "branch_name": "refs/heads/master", "committer_date": 1598377201000, "content_id": "9fda682785b6dd22f1ec99f9539828cca9cb0354", "detected_licenses": [ "MIT" ], "directory_id": "1ddb3af252da9fad3ef5e58d9cd27bdcb0365bdb", "extension": "py", "fi...
2.4375
stackv2
from flask import Flask from flask import request from artsci2019.displaybackend.backend import Backend import pickle def create_app(stack_size, thread_count, stable_points, directory): """Returns a flask app provinding two api endpoints. The server communicates with the RemoteBackend in client.py.""" app...
31
31.65
73
13
216
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_a83acc0afbd9d31d_e12edc9f", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `update` is def...
7
true
[ "", "CWE-502", "CWE-502", "CWE-502", "", "CWE-502", "CWE-502" ]
[ "rules.python.lang.maintainability.useless-inner-function", "rules.python.django.security.audit.avoid-insecure-deserialization", "rules.python.flask.security.insecure-deserialization", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.maintainability.useless-inner-function", "r...
[ "maintainability", "security", "security", "security", "maintainability", "security", "security" ]
[ "MEDIUM", "MEDIUM", "LOW", "LOW", "MEDIUM", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "MEDIUM", "HIGH", "HIGH", "MEDIUM" ]
[ 13, 22, 22, 22, 26, 28, 28 ]
[ 24, 22, 22, 22, 29, 28, 28 ]
[ 5, 29, 29, 29, 5, 13, 13 ]
[ 28, 56, 56, 56, 17, 49, 49 ]
[ "", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "function `update` is defined inside a function but never used", "Avoid using insecure deserialization library, backed by `pickle`, `_pickle`, `cpickle`, `dill`, `shelve`, or `yaml`, which are known to lead to remote code execution vulnerabilities.", "Detected the use of an insecure deserialization library in a...
[ 7.5, 7.5, 7.5, 5, 7.5, 7.5, 5 ]
[ "", "MEDIUM", "LOW", "LOW", "", "LOW", "LOW" ]
[ "", "MEDIUM", "MEDIUM", "MEDIUM", "", "MEDIUM", "MEDIUM" ]
server.py
/artsci2019/displaybackend/rpc/server.py
fhennig/face-of-the-crowd
MIT
2024-11-18T20:26:54.071886+00:00
1,386,855,355,000
69b90f47dfbf9205e60e26c105b91d21f40fc6ab
2
{ "blob_id": "69b90f47dfbf9205e60e26c105b91d21f40fc6ab", "branch_name": "refs/heads/master", "committer_date": 1386855355000, "content_id": "a63a0b99905ee3554372fe65b694095e5a602a44", "detected_licenses": [ "MIT" ], "directory_id": "2734dfdb47f00628c3f815cfe553a2861fd179b7", "extension": "py", "fi...
2.328125
stackv2
#!/usr/bin/env python import web, redis, shelve, hashlib, json,urllib2 from Pubnub import Pubnub import time pubnub = Pubnub( "pub-56806acb-9c46-4008-b8cb-899561b7a762", ## PUBLISH_KEY "sub-26001c28-a260-11e1-9b23-0916190a0759", ## SUBSCRIBE_KEY "sec-MGNhZWJmZmQtOTZlZS00ZjM3LWE4ZTYtY2Q3OTM0MT...
94
32.02
108
17
973
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_44abd125daa0bde2_8fc28626", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use...
5
true
[ "CWE-502", "CWE-502", "" ]
[ "rules.python.lang.security.deserialization.avoid-shelve", "rules.python.lang.security.deserialization.avoid-shelve", "rules.python.lang.maintainability.return-not-in-function" ]
[ "security", "security", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 44, 76, 93 ]
[ 44, 76, 93 ]
[ 10, 10, 48 ]
[ 29, 29, 76 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "" ]
[ "Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `shelve`, whic...
[ 5, 5, 5 ]
[ "LOW", "LOW", "" ]
[ "MEDIUM", "MEDIUM", "" ]
cloudboard.py
/cloudboard.py
hgeg/cloudboard
MIT
2024-11-18T20:26:54.721904+00:00
1,527,956,918,000
117ca17ace1f5d1aad0ca8dc268292ea5afcfbe7
3
{ "blob_id": "117ca17ace1f5d1aad0ca8dc268292ea5afcfbe7", "branch_name": "refs/heads/master", "committer_date": 1527956918000, "content_id": "f52a67697cb400d20e1166b4bc3231e7c93214a9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1c8dbd9ae60061defbe7f56fd638ae34941a3127", "extension": "py"...
2.8125
stackv2
#!/usr/bin/python from player import Player import cPickle from ui import UI from economy import Economy from training import TrainingSession from soldiers import * from buildings import Barracks import os class SinglePlayerGame: gameStates = ['strategy', 'foraging', 'scoreScreen'] allowedBuildings = """Barracks...
163
25.51
161
16
1,136
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_633cde5db7013aae_62b22797", "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-95", "CWE-95" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 52, 57, 97, 110 ]
[ 52, 57, 97, 110 ]
[ 5, 12, 17, 13 ]
[ 49, 50, 39, 47 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "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", "HIGH", "HIGH" ]
singlePlayerGame.py
/singlePlayerGame.py
ggianna/Foragers
Apache-2.0
2024-11-18T20:26:58.573622+00:00
1,633,546,141,000
d03d058c719bbfa7ba9e6687f9037f6e8981fa85
2
{ "blob_id": "d03d058c719bbfa7ba9e6687f9037f6e8981fa85", "branch_name": "refs/heads/main", "committer_date": 1633546141000, "content_id": "c8c5c3d9181fbbf1392c99949260ea4a25985b95", "detected_licenses": [ "MIT" ], "directory_id": "920939ddcf9ae6751be15c00cd28f91a528b9d66", "extension": "py", "file...
2.359375
stackv2
import atexit import logging import os import shutil import subprocess import time from typing import List, Callable, Optional from alpyne.client.http_client import HttpClient from alpyne.client.model_run import ModelRun from alpyne.client.utils import resolve_model_jar, \ get_wildcard_paths, shorten_by_relativene...
191
39.07
128
20
1,601
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c8ed87a5f0de8c74_e060ba22", "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" ]
[ 92 ]
[ 95 ]
[ 20 ]
[ 60 ]
[ "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" ]
alpyne_client.py
/alpyne/client/alpyne_client.py
jfleonUOC/Alpyne
MIT
2024-11-18T20:27:02.831722+00:00
1,625,152,573,000
796fdadd900a7445dc62a9a4d69811a91c155efd
3
{ "blob_id": "796fdadd900a7445dc62a9a4d69811a91c155efd", "branch_name": "refs/heads/main", "committer_date": 1625152573000, "content_id": "91d919d75c5ae539db62e6333fbf1d6609794a48", "detected_licenses": [ "Unlicense" ], "directory_id": "15829d87695e6c83bb691d74a7faeff41a125335", "extension": "py", ...
2.75
stackv2
from flask import Flask, render_template, request from pandas.core.frame import DataFrame from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import PassiveAggressiveClassifier import pickle import pandas as pd from sklearn.model_selection import train_test_split appl = Flask(__name__...
41
34.85
112
13
314
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b43a634215e438ba_a85f2af1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 11 ]
[ 11 ]
[ 15 ]
[ 50 ]
[ "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" ]
FakeNewsDetection.py
/FakeNewsDetection.py
Beagleman87/Fake_News_Detection
Unlicense
2024-11-18T20:27:05.109266+00:00
1,619,979,366,000
feb32737c0d606e0aef971e62ccca71d2b3381f3
2
{ "blob_id": "feb32737c0d606e0aef971e62ccca71d2b3381f3", "branch_name": "refs/heads/master", "committer_date": 1619979366000, "content_id": "4909b8b537146b8d8d245223eafb0170cdde39eb", "detected_licenses": [ "MIT" ], "directory_id": "bfd2f13ca38e0630b6dda30b9c34c6ed023419f6", "extension": "py", "fi...
2.328125
stackv2
import docker import os import json import shutil import datetime from container_builder.src.exceptions import BuildException class Build: test_flag = True push_flag = False build_dir = "/tmp/container-builder" def __init__(self, logger, user_env_var, pass_env_var, **kwargs): self.client = do...
138
38.33
104
21
1,179
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_de53416724f36ba5_466c2ff9", "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-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 115 ]
[ 115 ]
[ 28 ]
[ 87 ]
[ "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" ]
build.py
/container_builder/src/build.py
bandit145/container-builder
MIT
2024-11-18T20:27:07.273224+00:00
1,667,212,295,000
0e32d80054dcf20eb0330e72c6b2ac876519d89e
3
{ "blob_id": "0e32d80054dcf20eb0330e72c6b2ac876519d89e", "branch_name": "refs/heads/master", "committer_date": 1667212295000, "content_id": "2cfd564dd802eb5ef19c5f78439f8761e7925b49", "detected_licenses": [ "MIT" ], "directory_id": "94ee73ea6b09c3e34a03be96d7a632ac8cc08114", "extension": "py", "fi...
3.390625
stackv2
# your code goes here# Uses python3 import sys from collections import namedtuple Segment = namedtuple('Segment', 'start end') def optimal_points(segments): points = [] index=0 segments.sort(key=lambda x:x[1]) covered= [0]*len(segments) for i in range(len(segments)): if covered[i]==0: p...
37
22.54
83
16
251
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_372a54a33b60ca5c_bf5f0939", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 33 ]
[ 33 ]
[ 35 ]
[ 54 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
3_covering_segments.py
/Week3/3_covering_segments.py
fluffybird2323/Algorithmic-Toolbox
MIT
2024-11-18T20:38:54.826765+00:00
1,449,679,799,000
e180a9550ae83e6851fe97a8fdba89c38f382e8d
3
{ "blob_id": "e180a9550ae83e6851fe97a8fdba89c38f382e8d", "branch_name": "refs/heads/master", "committer_date": 1449679799000, "content_id": "fe5dc5000c5b02b167015076a462a44ecc9cf610", "detected_licenses": [ "MIT" ], "directory_id": "d762f380f71c22f50c59af0fb817e25839568f43", "extension": "py", "fi...
2.78125
stackv2
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import copy from schema import And from schema import Use from schema import Schema from schema import Optional from schema import SchemaError from isbn_...
145
27.41
80
16
1,162
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_75edd5a4d6b48afb_2c596198", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
3
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 45, 82, 90 ]
[ 45, 82, 90 ]
[ 9, 19, 19 ]
[ 22, 57, 39 ]
[ "", "", "" ]
[ "Is \"is_valid_isbn\" a function or an attribute? If it is a function, you may have meant is_valid_isbn.is_valid_isbn() because is_valid_isbn.is_valid_isbn is always true.", "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
epublication.py
/src/edeposit/amqp/models/epublication.py
edeposit/edeposit.amqp.models
MIT
2024-11-18T20:52:02.564743+00:00
1,676,139,610,000
9febc36378f79e1d83b34ba0592e48be4ce5d213
2
{ "blob_id": "9febc36378f79e1d83b34ba0592e48be4ce5d213", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "237b43af321620937f133be2f3e8919647d39a29", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/python import requests import json import re import sys import time import os import subprocess username = 'jkominek' testing = True testing = False def dumplastseen(): with open("lastseen.json", "w") as f: json.dump(lastseen, f) def parselink(link): parts = re.split("\s*,\s*", link) ...
77
23.79
77
15
509
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_94b2f16f0e238b43_5b99602e", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
12
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 68, 72 ]
[ 68, 72 ]
[ 9, 9 ]
[ 35, 35 ]
[ "A01:2017 - Injection", "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()'.", "Detected subprocess ...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
snippet.py
/all-gists/fda9212a29e48678fb61/snippet.py
gistable/gistable
MIT
2024-11-18T20:52:02.844076+00:00
1,560,282,039,000
fd4454ff908cd063019059a6043e842778ec7b5f
3
{ "blob_id": "fd4454ff908cd063019059a6043e842778ec7b5f", "branch_name": "refs/heads/master", "committer_date": 1560282039000, "content_id": "3bd91b515071e5fd64e411bebfadf049f2f722f1", "detected_licenses": [ "MIT" ], "directory_id": "356327b6fbade3b02bb859a595db7c134b1e8d5c", "extension": "py", "fi...
2.765625
stackv2
#!/bin/python3 import getopt import sys KEY = 66 def f(t, i): return pow((t * i * 2), 12) % 22 def run_block(block): L = block[0:4] R = block[4:8] LOut = [0,0,0,0] ROut = [0,0,0,0] for i in range(4): LOut[i] = f(R[i], i+1) return LOut, L def rounds(blocks): out = [] for b...
75
19.33
58
16
459
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_7b3edec21978126a_1a60d63d", "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 decrypt. Consider...
2
true
[ "" ]
[ "rules.python.lang.best-practice.pass-body-fn" ]
[ "best-practice" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 30 ]
[ 31 ]
[ 1 ]
[ 9 ]
[ "" ]
[ "`pass` is the body of function decrypt. Consider removing this or raise NotImplementedError() if this is a TODO" ]
[ 5 ]
[ "" ]
[ "" ]
main.py
/c7402/a4/src/main.py
DimitryRakhlei/BTECH
MIT
2024-11-18T20:52:05.320279+00:00
1,601,070,509,000
590923a0cf64d0ae8e9adb067c6b7795d9f7aaa5
2
{ "blob_id": "590923a0cf64d0ae8e9adb067c6b7795d9f7aaa5", "branch_name": "refs/heads/master", "committer_date": 1601070509000, "content_id": "79b24ff2031705095a0831b088c9bff83f438cc9", "detected_licenses": [ "MIT" ], "directory_id": "24c59216e5315a1ad1626caaad6ff8617517e41b", "extension": "py", "fi...
2.46875
stackv2
import keras import os, json, sys, pickle import tensorflow as tf from quart import Quart, jsonify, request, make_response from keras.preprocessing.sequence import pad_sequences from sklearn.externals import joblib sys.path.insert(0, '../code/') from text_cleaning import TextClean # https://github.com/tensorflow/tens...
63
30.48
133
15
476
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0b6c9e203571d5d7_86e81deb", "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" ]
[ 20 ]
[ 20 ]
[ 17 ]
[ 36 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
pos_rev_service.py
/pos_rev_service/pos_rev_service.py
samroon2/app_rating_predictions
MIT
2024-11-18T20:52:05.864172+00:00
1,513,215,824,000
eba352dc89af9d2c91cd2d842863d25662aa0294
2
{ "blob_id": "eba352dc89af9d2c91cd2d842863d25662aa0294", "branch_name": "refs/heads/master", "committer_date": 1513215824000, "content_id": "dce03351685489545a79f4c88f26ea671f2c068f", "detected_licenses": [ "MIT" ], "directory_id": "7558f206fbc7a334adb1689944e24b3c2454d71e", "extension": "py", "fi...
2.4375
stackv2
import discord import json import requests import os import datetime import time from discord.ext import commands from base import rpc from base.bot import is_owner start_time = time.time() class Admin: def __init__(self, bot): self.bot = bot @commands.command(pass_context=True) @commands.check(i...
75
30.79
138
18
515
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_734a7f90386544a0_0a5447d2", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
1
true
[ "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 18 ]
[ 18 ]
[ 21 ]
[ 29 ]
[ "" ]
[ "Is \"is_owner\" a function or an attribute? If it is a function, you may have meant is_owner.is_owner() because is_owner.is_owner is always true." ]
[ 5 ]
[ "" ]
[ "" ]
admin.py
/gears/admin.py
Seif-Abaza/EmberBot-Discord
MIT
2024-11-18T20:52:06.494598+00:00
1,513,575,915,000
7fa293118346e532f7fe050eb8ed0c5de4296fbb
3
{ "blob_id": "7fa293118346e532f7fe050eb8ed0c5de4296fbb", "branch_name": "refs/heads/master", "committer_date": 1513575915000, "content_id": "9fce7b21b6edb5913e8401ccca3d7c2ff3f3be2d", "detected_licenses": [ "MIT" ], "directory_id": "747ffe00fd06d35d57d339c3737cb0f0aab4119d", "extension": "py", "fi...
2.828125
stackv2
#!/usr/bin/env python3 import numpy as np import physx import simulation import argparse import time def main(): parser = argparse.ArgumentParser() parser.add_argument("trajectory_csv", type=str, help="Trajectory file as a csv of 7 angles per line") args = parser.parse_args() # grab the trajectory wit...
30
24.93
72
17
193
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d6bf83bb5c988ca3_dde0f2b4", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 16 ]
[ 16 ]
[ 29 ]
[ 36 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
trajectory.py
/ArmRL-master/python/trajectory.py
rbcommits/RobotLearning
MIT
2024-11-18T20:52:09.688005+00:00
1,454,516,861,000
de9576747068b7e6e610de7acdb3a0b7cd6a8e7c
2
{ "blob_id": "de9576747068b7e6e610de7acdb3a0b7cd6a8e7c", "branch_name": "refs/heads/master", "committer_date": 1454516861000, "content_id": "7675213bf63909f5814c6e3e65e72103f1c4e2f2", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "91688fc7c6152a026835c1c252bbbbebc01d950c", "extension": "p...
2.359375
stackv2
import pickle import numpy as np import sys from pysb import Parameter, Observable, Rule from pysb.integrate import Solver import pysb.core from indra.pysb_assembler import * def get_base_state(mon): sdict = {} for s in mon.sites: if s in mon.site_states: sdict[s]=mon.site_states[s][0] ...
85
35.04
71
14
890
python
[{"finding_id": "semgrep_rules.python.lang.correctness.list-modify-while-iterate_6d6a9921cef6ac90_5940fdc6", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.list-modify-while-iterate", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "It appears that `model.initial...
2
true
[ "", "CWE-502" ]
[ "rules.python.lang.correctness.list-modify-while-iterate", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "correctness", "security" ]
[ "MEDIUM", "LOW" ]
[ "HIGH", "MEDIUM" ]
[ 24, 85 ]
[ 26, 85 ]
[ 5, 5 ]
[ 69, 26 ]
[ "", "A08:2017 - Insecure Deserialization" ]
[ "It appears that `model.initial_conditions` is a list that is being modified while in a for loop. This will likely cause a runtime error or an infinite loop.", "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrar...
[ 7.5, 5 ]
[ "", "LOW" ]
[ "", "MEDIUM" ]
RAS_build_model.py
/models/ras_demo/RAS_build_model.py
gberriz/indra
BSD-2-Clause
2024-11-18T20:52:10.532825+00:00
1,687,130,022,000
4ae17257dc17c1356087a6c5aec859195641ed9e
3
{ "blob_id": "4ae17257dc17c1356087a6c5aec859195641ed9e", "branch_name": "refs/heads/master", "committer_date": 1687130022000, "content_id": "f8b1851f09c479e7b4b39c9f96f45379d028dc91", "detected_licenses": [ "MIT" ], "directory_id": "344456e94b06352452aed3166eb834739faaf480", "extension": "py", "fi...
3.140625
stackv2
import random from typing import List from ..utils import GameConfig from .entity import Entity class Pipe(Entity): def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.vel_x = -5 def draw(self) -> None: self.x += self.vel_x super().draw() cla...
104
27.49
74
14
730
python
[{"finding_id": "semgrep_rules.python.lang.correctness.list-modify-while-iterate_795aad9fb4a491cd_0418b75e", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.list-modify-while-iterate", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "It appears that `self.upper` i...
2
true
[ "", "" ]
[ "rules.python.lang.correctness.list-modify-while-iterate", "rules.python.lang.correctness.list-modify-while-iterate" ]
[ "correctness", "correctness" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 59, 63 ]
[ 61, 65 ]
[ 9, 9 ]
[ 40, 40 ]
[ "", "" ]
[ "It appears that `self.upper` is a list that is being modified while in a for loop. This will likely cause a runtime error or an infinite loop.", "It appears that `self.lower` is a list that is being modified while in a for loop. This will likely cause a runtime error or an infinite loop." ]
[ 7.5, 7.5 ]
[ "", "" ]
[ "", "" ]
pipe.py
/src/entities/pipe.py
sourabhv/FlapPyBird
MIT
2024-11-18T20:52:12.599578+00:00
1,616,328,799,000
4d23fb0ca9d6b6713a947351497cee0badebd984
2
{ "blob_id": "4d23fb0ca9d6b6713a947351497cee0badebd984", "branch_name": "refs/heads/master", "committer_date": 1616328799000, "content_id": "ad82c093a20aaffc3863bef205b665e62cb5483f", "detected_licenses": [ "MIT" ], "directory_id": "52e441d026d3aeb2e48c72351b5e21b6c50880fe", "extension": "py", "fi...
2.390625
stackv2
import csv import pdb import pickle as pkl import sys from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt import numpy as np def plot(filename, pdf_loc="training.pdf", csv_loc="training_progress.csv"): filename = "models/2016-01-15_14-36-05" if filename is None else filename ...
71
34.3
83
16
722
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_b668805733044e8f_bdfdaf52", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.python-debugger-found", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Importing the python debugger;...
4
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 25 ]
[ 25 ]
[ 14 ]
[ 76 ]
[ "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_learning.py
/option_critic/plot_learning.py
elsa-lab/option_critic
MIT
2024-11-18T20:52:14.259418+00:00
1,407,356,242,000
3a339701e1f5fa940336a0e097c8db51bf345cb1
3
{ "blob_id": "3a339701e1f5fa940336a0e097c8db51bf345cb1", "branch_name": "refs/heads/master", "committer_date": 1407356242000, "content_id": "010930262d3b1fd50d442a18972f0ca8c150325d", "detected_licenses": [ "MIT" ], "directory_id": "158d3ac39cbbe3cfeac66ce7c677e2d75b91c280", "extension": "py", "fi...
3.40625
stackv2
# -*- coding: utf-8 -*- """ ============================================ Spreadsheet directive for reStructuredText ============================================ Register a simplespreadsheet directive to do calculations in a table. Install ======= :: pip install rst_simplespreadsheet # or easy_install rst_s...
333
28.1
93
22
2,310
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_519a9febff008bfc_bda74f46", "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" ]
[ 147 ]
[ 147 ]
[ 16 ]
[ 63 ]
[ "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" ]
rst_simplespreadsheet.py
/rst_simplespreadsheet.py
davidlesieur/simplespreadsheet
MIT
2024-11-18T20:52:15.033241+00:00
1,433,111,729,000
7454654b12a972f3703af183d1aaf1897c8bfa33
3
{ "blob_id": "7454654b12a972f3703af183d1aaf1897c8bfa33", "branch_name": "refs/heads/master", "committer_date": 1433111729000, "content_id": "c38b7de6bf84de51563adde0bd2bc3b66e1ade24", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1e7bf895fd78037a0b2fec920309351aea4b255e", "extension": "py"...
2.953125
stackv2
#!/usr/bin/python import os from subprocess import call def writeLine(f, text, addLine = False, tabs = 0): text = text + "\n" if addLine: text = text + "\n" for i in range(0, tabs): text = "\t" + text f.write(text) def newLine(f): f.write("\n") def buildPath(path, fresh = False): print path if fresh: ...
37
17.43
50
13
183
python
[{"finding_id": "semgrep_rules.python.lang.correctness.unchecked-subprocess-call_42678ca2976c395a_ad13e1fa", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.unchecked-subprocess-call", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "This is not checking the ret...
1
true
[ "" ]
[ "rules.python.lang.correctness.unchecked-subprocess-call" ]
[ "correctness" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 24 ]
[ 24 ]
[ 4 ]
[ 8 ]
[ "" ]
[ "This is not checking the return value of this subprocess call; if it fails no exception will be raised. Consider subprocess.check_call() instead" ]
[ 5 ]
[ "" ]
[ "" ]
fileutils.py
/scripts/fileutils/fileutils.py
mallarke/JSKit
Apache-2.0
2024-11-18T20:52:18.724373+00:00
1,460,372,740,000
e4b4280f14867e0a1a15bf8846e8cb85fc8a6f4c
2
{ "blob_id": "e4b4280f14867e0a1a15bf8846e8cb85fc8a6f4c", "branch_name": "refs/heads/master", "committer_date": 1460372740000, "content_id": "f30190e9571c122fc5a0552c573b7785477a6032", "detected_licenses": [ "MIT" ], "directory_id": "38bf48a1acc262f9fb2d021088640eedfa137240", "extension": "py", "fi...
2.375
stackv2
# import os # import sys import sublime import sublime_plugin class HaroopadCommand(sublime_plugin.WindowCommand): def run(self): filename = self.window.active_view().file_name() if filename is None: return s = sublime.load_settings("Haroopad Markdown.sublime-settings") ...
25
28.76
123
15
153
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_62b185a600bdc330_579a067c", "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" ]
[ 20 ]
[ 20 ]
[ 17 ]
[ 50 ]
[ "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" ]
haroopad.py
/haroopad.py
liuhewei/haroopad-markdown-sublime
MIT
2024-11-18T20:52:23.547642+00:00
1,510,286,322,000
b35475268ee4a02419822f0ac23ee196069c43a7
3
{ "blob_id": "b35475268ee4a02419822f0ac23ee196069c43a7", "branch_name": "refs/heads/master", "committer_date": 1510286322000, "content_id": "a844b015a60f0199e6e0977a7e7e1192bef87dc0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fc980cfb1305f6aa1604dbb0d3479fbb7063d94a", "extension": "py"...
2.9375
stackv2
import numpy as np from sifra.modelling.structural import Base, Element from sifra.modelling.structures import XYPairs from sifra.modelling.structural import Element as _Element import scipy.stats as stats from sifra.modelling.iodict import IODict class ResponseModel(Base): def __call__(self, *args, **kwargs): ...
127
33.84
100
16
1,075
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_2b5f4780b5014b36_1f951960", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
12
true
[ "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 19, 35, 38, 54, 57, 89, 92, 97, 112, 114, 116, 121 ]
[ 19, 35, 38, 54, 57, 89, 92, 97, 112, 114, 116, 121 ]
[ 21, 45, 45, 53, 55, 45, 45, 20, 45, 45, 53, 20 ]
[ 58, 58, 58, 67, 68, 60, 60, 72, 59, 59, 67, 74 ]
[ "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes s...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "", "", "", "", "", "", "", "", "", "", "", "" ]
responsemodels.py
/sifra/modelling/responsemodels.py
zeehio/sifra
Apache-2.0
2024-11-18T20:52:24.152013+00:00
1,401,641,550,000
38bd03ddbc08a2a3657b4b0a6e99fb7722ae4f46
3
{ "blob_id": "38bd03ddbc08a2a3657b4b0a6e99fb7722ae4f46", "branch_name": "refs/heads/master", "committer_date": 1401641765000, "content_id": "f20b7abe1ff4f3db0efd4192d46749ddcd8b41ff", "detected_licenses": [ "MIT" ], "directory_id": "3c9df204c8b38c4269f16128e2cd35bc80c382b0", "extension": "py", "fi...
2.625
stackv2
#!/usr/bin/env python2 import subprocess import threading import readline import atexit import sys import os from multiprocessing import Pipe class PhpProcessor(): COMMAND = 'php -a' MAGIC = os.urandom(8).encode('hex') def __init__(self): self.process = subprocess.Popen(self.COMMAND.split(' '), stdin=subpro...
92
26.46
83
22
565
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_0817a6eb24b719d4_1015036e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 15 ]
[ 16 ]
[ 20 ]
[ 66 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
phpshell.py
/phpshell.py
Kasalehlia/phpshell
MIT
2024-11-18T20:52:24.631283+00:00
1,649,694,887,000
56d480ae0b9b7afb76121e64001ba0ac394e9947
3
{ "blob_id": "56d480ae0b9b7afb76121e64001ba0ac394e9947", "branch_name": "refs/heads/master", "committer_date": 1649694887000, "content_id": "907f4caa379a189647acf1e6df70b72416016bcf", "detected_licenses": [ "MIT" ], "directory_id": "4af4a17c2c094f30e837e362ca0635c33ef8ee13", "extension": "py", "fi...
2.78125
stackv2
from math import inf, isinf N = int(input()) RES_MOD = 10 ** 9 + 7 for case_id in range(1, N + 1): nb_materials = int(input()) formulas = { material: list(map(lambda i: int(i) - 1, input().split())) for material in range(nb_materials) } available_materials = list(map(int, input().spl...
30
30.03
78
16
220
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_cd3f47432e7f61ea_56328e74", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 11 ]
[ 11 ]
[ 38 ]
[ 48 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
4.py
/2019/2/4.py
AmauryLiet/CodeJam
MIT
2024-11-18T20:52:25.147441+00:00
1,536,547,724,000
4c03b510850132a2685df05a2638ec2653cb0c81
4
{ "blob_id": "4c03b510850132a2685df05a2638ec2653cb0c81", "branch_name": "refs/heads/master", "committer_date": 1536547724000, "content_id": "a9835a9419aa86b2a33ee065e5f9e4561f7d0efb", "detected_licenses": [ "MIT" ], "directory_id": "67e2e0e56ec729de9f2499ee21c4fe175b88b674", "extension": "py", "fi...
3.671875
stackv2
#线性回归曲线 from graphics import * def handleKey(key,win): pass def handleMouse(pt,win): if 2.0<pt.getX()<3.0 and 0.0<pt.getY()<0.5: print(pt.getX(),pt.getY()) return False else: pt.draw(win) return True def drawline(x,y,m,win): print(x,y,m) line=Line(Point(0.0,y-m*x)...
57
22.26
63
18
420
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_03928e8a0abf8e21_30b6aae9", "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 handleKey. Consid...
1
true
[ "" ]
[ "rules.python.lang.best-practice.pass-body-fn" ]
[ "best-practice" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 5 ]
[ 6 ]
[ 1 ]
[ 9 ]
[ "" ]
[ "`pass` is the body of function handleKey. Consider removing this or raise NotImplementedError() if this is a TODO" ]
[ 5 ]
[ "" ]
[ "" ]
linear_regression.py
/python_program/linear_regression.py
LiuKaiqiang94/PyStudyExample
MIT
2024-11-18T20:52:28.735383+00:00
1,393,392,186,000
a97de1deeacaac11fff5a53d65c7e668097345f7
3
{ "blob_id": "a97de1deeacaac11fff5a53d65c7e668097345f7", "branch_name": "refs/heads/master", "committer_date": 1393392309000, "content_id": "a24063db9c31521f3a1ea1350792369317e0db7f", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "b09d2af60e25d647efc76a70bbd02ed96b50545d", "extension": "p...
2.9375
stackv2
from itertools import chain from fabric.api import env, local, task, runs_once from fabric.colors import green,blue,cyan,yellow,magenta,red import subprocess import sys import time # -------------- Logging helpers ------------------ def _log_(level,msg,colorFunc = lambda x: x): "Logs message, prefixed with curren...
88
39.47
162
24
826
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_748283b982f9d6c5_db562122", "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" ]
[ 35 ]
[ 35 ]
[ 9 ]
[ 77 ]
[ "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" ]
__init__.py
/__init__.py
Multifarious/fabulous
BSD-2-Clause
2024-11-18T20:52:30.366414+00:00
1,631,081,393,000
6fc2a7fd7534f61a945f964e4c83ead9af572fc2
3
{ "blob_id": "6fc2a7fd7534f61a945f964e4c83ead9af572fc2", "branch_name": "refs/heads/main", "committer_date": 1631081393000, "content_id": "9b63f41e2fe6a77a7d6cad7fb3f036433f7df552", "detected_licenses": [ "MIT" ], "directory_id": "fa27a457e0633af374d5c07a05bb7b6ee85d4187", "extension": "py", "file...
2.6875
stackv2
import pickle import sys import numpy as np import math import tensorflow.compat.v1 as tf print(tf.__version__) # from tensorflow.models.RNNModel import RNNModel # from tf.nn.rnn_cell import BasicLSTMCell, LSTMCell, GRUCell, RNNCell, BasicRNNCell, DropoutWrapper, MultiRNNCell tf.disable_v2_behavior() def load_pkl(path...
86
34.21
114
23
769
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1821eccc875c5733_a91a1284", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 13 ]
[ 13 ]
[ 15 ]
[ 29 ]
[ "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" ]
RNN.py
/baselines/RNN.py
k0y0c/COVID-19_TLSTM
MIT
2024-11-18T20:52:30.407242+00:00
1,574,079,089,000
bb774caa9f7d85963797230c3f0ab326b45378d1
3
{ "blob_id": "bb774caa9f7d85963797230c3f0ab326b45378d1", "branch_name": "refs/heads/master", "committer_date": 1574079089000, "content_id": "ac950922d95ebf1b3b791f4da00a962572dee616", "detected_licenses": [ "MIT" ], "directory_id": "428fba5e1bb4be489fd8f159baf56ce435c24ef2", "extension": "py", "fi...
2.640625
stackv2
from abc import ABC, abstractmethod from collections import namedtuple from numpy import array, int as np_int from nptyping import Array __all__ = [ 'Color', 'Size', 'Vec2', 'Runnable', 'Legends', 'Colors', 'Events', 'Numbers', 'Positions', 'Screen', 'Sizes', ] Color = namedtuple("Color", ["red", "...
186
28.87
79
12
1,655
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_4013e1b095c57473_086d68f1", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 17, 18 ]
[ 17, 18 ]
[ 26, 28 ]
[ 67, 75 ]
[ "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
constants.py
/brawlhalla_score_scraper/constants.py
sentrip/brawlhalla-score-scraper
MIT
2024-11-18T20:52:30.777317+00:00
1,642,954,764,000
42fbc65cf87ad477506c9a25a33964d13dfe5a0b
3
{ "blob_id": "42fbc65cf87ad477506c9a25a33964d13dfe5a0b", "branch_name": "refs/heads/master", "committer_date": 1642955980000, "content_id": "64afc05f82ebfe45830d8b65887be3dd542d80d1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7b1793f277fbaef6a7d51608d336e2d3fc546fec", "extension": "py"...
2.65625
stackv2
#! /usr/bin/python """Tiny init tool. """ from __future__ import print_function import argparse import errno import fcntl import logging import os import os.path import signal import sys import psutil cli = argparse.ArgumentParser() cli.add_argument('--debug', action='store_const', dest='loglevel'...
134
29.58
75
19
938
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-spawn-process-audit_9a569bb4eb3d41f0_10bcd32e", "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 ...
3
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit", "rules.python.lang.security.audit.dangerous-spawn-process-tainted-env-args", "rules.python.lang.security.dangerous-spawn-process" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 116, 116, 116 ]
[ 116, 116, 116 ]
[ 15, 39, 39 ]
[ 61, 51, 51 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here.", "Found user controlled content when spawning a process. This is dangerous because it allows a malicious a...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "MEDIUM" ]
init.py
/init.py
RKrahl/tiny-init
Apache-2.0
2024-11-18T20:52:37.057648+00:00
1,610,128,108,000
073bcb4524b05caa588bcbf52a7804fdcff0b00c
3
{ "blob_id": "073bcb4524b05caa588bcbf52a7804fdcff0b00c", "branch_name": "refs/heads/master", "committer_date": 1610128108000, "content_id": "00fa5f052fc6f59a31e2fe38028f527a890e9efb", "detected_licenses": [ "MIT" ], "directory_id": "11bca8021e3478eb31b621c078a14bb7ac28c4d1", "extension": "py", "fi...
2.75
stackv2
'create a bigram phone-loop model' import argparse import pickle import sys import torch import beer def build_categorical_2g(size, unigram): mean = torch.ones(size, size) / size return beer.CategoricalSet.create(mean, prior_strength=1) def build_hsb(size, unigram): return beer.SBCategoricalSet.creat...
55
28.84
77
13
373
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b628f69a0fcdf8a8_b1696cf7", "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" ]
[ 38, 49 ]
[ 38, 49 ]
[ 17, 9 ]
[ 31, 31 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
mkphoneloopbigram.py
/beer/cli/subcommands/hmm/mkphoneloopbigram.py
bolajiy/beer
MIT
2024-11-18T20:52:38.853103+00:00
1,667,235,087,000
4fd3257d482c2e1938e00a99309acb283f7445ed
3
{ "blob_id": "4fd3257d482c2e1938e00a99309acb283f7445ed", "branch_name": "refs/heads/master", "committer_date": 1667235087000, "content_id": "800caf191938f218d9c1c484f63813902a24d186", "detected_licenses": [ "MIT" ], "directory_id": "3541af9b92b936514b4c918ce8ec3c2af7a04a51", "extension": "py", "fi...
2.796875
stackv2
#!/usr/bin/env python3 ''' This script performs database dumps of all postgres databases in seperate zipped files. Prereqesites: linux :) python 3.4 psql pg_dump Usage: postgres.py [-h] [--dir DIR] [--date | --datetime] [--keep KEEP] [--debug] [--dry] This script performs da...
85
35.41
97
19
703
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_a4597d82795ab32b_37ee0284", "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.correctness.unchecked-subprocess-call", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "correctness", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "HIGH", "MEDIUM", "HIGH", "HIGH" ]
[ 79, 79, 79, 79 ]
[ 79, 79, 79, 79 ]
[ 13, 24, 29, 40 ]
[ 45, 28, 32, 44 ]
[ "A01:2017 - Injection", "", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "This is not checking the r...
[ 7.5, 5, 7.5, 7.5 ]
[ "LOW", "", "MEDIUM", "HIGH" ]
[ "HIGH", "", "MEDIUM", "LOW" ]
postgres.py
/postgres.py
jochenklar/dump
MIT
2024-11-18T20:52:39.220153+00:00
1,574,804,954,000
bef91368af1912f6aab8a18f2111f2d71b79f7b4
2
{ "blob_id": "bef91368af1912f6aab8a18f2111f2d71b79f7b4", "branch_name": "refs/heads/master", "committer_date": 1574804954000, "content_id": "18e7078d77ac654724cf2d9d3f81d6467f4b074a", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "b7218c8e9c5538defaa9ef48825e36955296ca5e", "extension": "p...
2.359375
stackv2
from django.http import HttpResponse from django.shortcuts import render, redirect from django.http import JsonResponse from django.contrib.auth.models import User # STEP 1: Import the user from foundation.models import Instrument,TimeSeriesDatum,Sensor from rest_framework import status, response, views from res...
207
22.84
90
14
966
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defusedcsv_0ce403d4ef462b7e_f9343559", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defusedcsv", "finding_type": "security", "severity": "low", "confidence": "low", "message": "Detected the generation of a CSV file using the built-in `csv` mo...
2
true
[ "CWE-1236" ]
[ "rules.python.django.security.injection.csv-writer-injection" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 162 ]
[ 162 ]
[ 9 ]
[ 87 ]
[ "A01:2017 - Injection" ]
[ "Detected user input into a generated CSV file using the built-in `csv` module. If user data is used to generate the data in this file, it is possible that an attacker could inject a formula when the CSV is imported into a spreadsheet application that runs an attacker script, which could steal data from the importi...
[ 7.5 ]
[ "MEDIUM" ]
[ "MEDIUM" ]
views.py
/indoorair_back/api/views.py
zhengjiejiang/indoorair-back
BSD-3-Clause
2024-11-18T20:52:39.992338+00:00
1,676,139,610,000
d4980c18e82c9029a5102783480cb30dc518398d
3
{ "blob_id": "d4980c18e82c9029a5102783480cb30dc518398d", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "d9d4b930485112f3c7a222a1f212fff81e001131", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
3.21875
stackv2
from itertools import groupby from operator import itemgetter def first(length): return itemgetter(slice(None, length)) def remove_indent(group, n): return (line[n:] for line in group) def combine(lines, sep): return sep.join(lines) + sep def indented_sections(text): """ >>> example = 'One:\n abc\n def\nTw...
23
30.39
64
14
184
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_3c6099f36290294a_023120c3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ...
1
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.exec-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 23 ]
[ 23 ]
[ 7 ]
[ 20 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
snippet.py
/all-gists/890758/snippet.py
gistable/gistable
MIT
2024-11-18T20:52:42.655287+00:00
1,588,962,863,000
1ee7af88989a62dedce8598d595668af24233628
3
{ "blob_id": "1ee7af88989a62dedce8598d595668af24233628", "branch_name": "refs/heads/master", "committer_date": 1588962863000, "content_id": "8a5bd80a65a7a4d308dfc3772b16bdadd7929e77", "detected_licenses": [ "MIT" ], "directory_id": "0382d79cf384bd616b2074c0ec3edf6dc548b97b", "extension": "py", "fi...
3.0625
stackv2
## Model for Autonomous Driving ## BASIC MODEL - for full model see model_nvidia.py # Import Library import csv import cv2 import os import numpy as np from sklearn.utils import shuffle from keras.models import Sequential from keras.layers import Flatten, Dense, Lambda, Cropping2D from sklearn.model_selection impor...
80
31.79
121
17
577
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_64a813bec831d19d_32c089ce", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
2
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 65 ]
[ 65 ]
[ 28 ]
[ 43 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
model.py
/model.py
mikec-w/Udacity-CarND-Behavioural-Cloning
MIT
2024-11-18T20:52:42.716773+00:00
1,424,040,236,000
4e2079bb51d7b41e9c65be4fef272607eca6b086
2
{ "blob_id": "4e2079bb51d7b41e9c65be4fef272607eca6b086", "branch_name": "refs/heads/master", "committer_date": 1424040236000, "content_id": "050718423757f4f16b03a51002e72f97bea77e21", "detected_licenses": [ "Apache-2.0" ], "directory_id": "59d50bc751b5755b0a3d8fae25d7224ebb106e81", "extension": "py"...
2.375
stackv2
#!/usr/bin/env python from __future__ import print_function from twython import Twython import json import argparse import io import sys, os import os.path from datetime import datetime, timedelta from email.utils import parsedate_tz bio_text = """The One From Sun Race. Tweets collected works of H.P.Lovecraft. Run b...
132
31.46
110
19
1,083
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3b537af215ef0560_50fb060d", "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-os-exec-audit", "rules.python.lang.security.audit.dangerous-os-exec-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 119, 119 ]
[ 119, 119 ]
[ 9, 9 ]
[ 36, 36 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here.", "Found user controlled content when spawning a process. This is dangerous because it allows a malicious a...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
booktweeter.py
/booktweeter.py
timokoola/textsplitter
Apache-2.0
2024-11-18T20:52:43.341633+00:00
1,528,860,003,000
8e42a2102ab7071e2a2afda8b2c25b7f3b8f234a
3
{ "blob_id": "8e42a2102ab7071e2a2afda8b2c25b7f3b8f234a", "branch_name": "refs/heads/master", "committer_date": 1528860003000, "content_id": "d3caa761f4ea803a6b0df46e0acd29b1c36e24bf", "detected_licenses": [ "MIT", "Python-2.0" ], "directory_id": "b16f1a9b49ac047a189dd2af744a988427d852b9", "exten...
2.84375
stackv2
import pendulum from azion import exceptions def instance_from_data(model, data): if not data: return None return model(data) def many_of(model, data): if not data: return [] return [instance_from_data(model, resource) for resource in data] def decode_json(response, ex...
242
24.93
75
12
1,325
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_48399b3ce46008d0_36c352c6", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
1
true
[ "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 188 ]
[ 188 ]
[ 9 ]
[ 23 ]
[ "" ]
[ "Is \"is_active\" a function or an attribute? If it is a function, you may have meant self.is_active() because self.is_active is always true." ]
[ 5 ]
[ "" ]
[ "" ]
models.py
/azion/models.py
mauricioabreu/azion-python
MIT,Python-2.0
2024-11-18T20:52:44.022350+00:00
1,530,785,134,000
b16c97a7620ae57596256b56d044945d1936cc8d
2
{ "blob_id": "b16c97a7620ae57596256b56d044945d1936cc8d", "branch_name": "refs/heads/master", "committer_date": 1530785134000, "content_id": "9b1f92813da423e0f95115225c336c1cd8fc3e2b", "detected_licenses": [ "MIT" ], "directory_id": "7dfe07408cebae22ce8fe25fada575c015237fce", "extension": "py", "fi...
2.421875
stackv2
import uuid from mongoengine import Document, EmbeddedDocument from mongoengine import fields from mongoengine.queryset.visitor import Q from .mixin import MetadataMixin from .errors import ResourcePublishedException __all__ = [ 'DatasetMetadata', 'get_dataset', 'update_dataset', 'delete_dataset', ...
235
26.7
93
14
1,403
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_f419e677a76ef571_eb922032", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
3
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.correctness.common-mistakes.string-is-comparison" ]
[ "maintainability", "maintainability", "correctness" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "HIGH" ]
[ 53, 58, 100 ]
[ 53, 58, 100 ]
[ 63, 70, 20 ]
[ 80, 83, 34 ]
[ "", "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function", "Found string comparison using 'is' operator. The 'is' operator is for reference equality, not value equality, and therefore should not be used to compare strings. For more information, see https://github.com/satwikkan...
[ 5, 5, 7.5 ]
[ "", "", "" ]
[ "", "", "" ]
dataset.py
/metadata/dataset.py
ihoromi4/neuroseed-mvp
MIT
2024-11-18T20:52:44.583063+00:00
1,430,996,787,000
271e1b5933b7fc451e84fd6d24faaa2a76a31710
4
{ "blob_id": "271e1b5933b7fc451e84fd6d24faaa2a76a31710", "branch_name": "refs/heads/master", "committer_date": 1430996787000, "content_id": "44fbb853059abb143bb146957aa7f6442411eda8", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "7754f081f5c479033f1a5fc79ffff12bf9e81ba4", "extension": "p...
3.5
stackv2
# define allowed data types # for each type, define a function to check that user entry has the right format # and if so, convert to the value with the appropriate type import re import datetime def _date(s,elts): vals = [ int(x) for x in elts ] y = vals[date_fmt["y"]] m = vals[date_fmt["m"]] ...
46
23.15
80
13
293
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_1f0d888e705bb95c_0a45787a", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 36, 37 ]
[ 36, 37 ]
[ 26, 26 ]
[ 27, 27 ]
[ "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
check_type.py
/Karrigell-3.1.1/common/admin/InstantSite/SQLite/check_type.py
chengpin1991/python_learn
BSD-3-Clause
2024-11-18T20:52:45.730932+00:00
1,628,625,213,000
1ee6a1e98db60933c1d0ef3f6352ad9aa9528213
3
{ "blob_id": "1ee6a1e98db60933c1d0ef3f6352ad9aa9528213", "branch_name": "refs/heads/main", "committer_date": 1628625213000, "content_id": "c098bacb0ec7aa47352bca43b4074a0c46142f46", "detected_licenses": [ "MIT" ], "directory_id": "3b29d6f3049f9e7d664aa8c5375e1466f33b1168", "extension": "py", "file...
2.78125
stackv2
import pathlib import re import json import timeit import functools from net_parser.utils import get_logger, first_candidate_or_none class BaseConfigLine(object): PATTERN_TYPE = type(re.compile(pattern="")) _parent_indent_regex = re.compile(pattern=r"[^! ]", flags=re.MULTILINE) _interface_regex = re.comp...
376
34.65
128
21
2,862
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_61651a3e3d018860_07e1fa0d", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
5
true
[ "", "", "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainabili...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 71, 87, 312, 314, 316 ]
[ 71, 87, 312, 314, 316 ]
[ 16, 16, 12, 12, 12 ]
[ 29, 29, 26, 25, 29 ]
[ "", "", "", "", "" ]
[ "Is \"is_child\" a function or an attribute? If it is a function, you may have meant self.is_child() because self.is_child is always true.", "Is \"is_child\" a function or an attribute? If it is a function, you may have meant self.is_child() because self.is_child is always true.", "Is \"is_parent\" a function o...
[ 5, 5, 5, 5, 5 ]
[ "", "", "", "", "" ]
[ "", "", "", "", "" ]
BaseConfigLine.py
/net_parser/config/BaseConfigLine.py
ahudcova/net_parser
MIT
2024-11-18T20:52:47.109301+00:00
1,687,512,383,000
c381d86bcfdd773b2846c4a65182aeba03e6d127
3
{ "blob_id": "c381d86bcfdd773b2846c4a65182aeba03e6d127", "branch_name": "refs/heads/master", "committer_date": 1687512383000, "content_id": "a6306179fb3cb9b4bfc21175b05f6ba9b04ec88a", "detected_licenses": [ "MIT" ], "directory_id": "4451004745b7594c53f2cc82fec6660bbd51a039", "extension": "py", "fi...
2.859375
stackv2
import requests import pandas as pd import sys import subprocess import tempfile import webbrowser import os import platform from io import BytesIO from functools import reduce from .cache import UnpywallCache class Unpywall: """ Base class that contains useful functions for retrieving information from t...
510
29.03
79
19
3,038
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_fb7ddb695be62ea5_e6c65756", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ...
14
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 466 ]
[ 466 ]
[ 21 ]
[ 43 ]
[ "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
/unpywall/__init__.py
unpywall/unpywall
MIT
2024-11-18T20:52:47.276947+00:00
1,667,194,939,000
95af39829223ebfe0785f079c1c78765fa862a2c
2
{ "blob_id": "95af39829223ebfe0785f079c1c78765fa862a2c", "branch_name": "refs/heads/master", "committer_date": 1667194939000, "content_id": "662a63940673ac1a25b0ff785c31de93c6e24182", "detected_licenses": [ "MIT" ], "directory_id": "8410bb5a2e8849bb3a554b95ddc713d88f3440c4", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/env python import boto3 import time import sys import random import os #setup logging for main() APP_NAMESPACE='User Experince' APP_NAME='application1' APP_VERSION='0.1' METRIC_NAME='Error Rates' METRIC_REGION='eu-west-2' def getMetricValue(): return random.randint(1, 999) def getCWMetric(appName,app...
72
24.25
97
13
449
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_04c0a5d0335a204c_ab7cdda4", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 50 ]
[ 50 ]
[ 5 ]
[ 18 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
cloudwatch-metrics.example.py
/aws-dev/cloudwatch-metrics.example.py
PacktPublishing/-AWS-Certified-Developer---Associate-Certification
MIT
2024-11-18T20:52:47.557793+00:00
1,559,592,143,000
566519e95262c27ac79a8eef1f7c9ce372550f7b
2
{ "blob_id": "566519e95262c27ac79a8eef1f7c9ce372550f7b", "branch_name": "refs/heads/master", "committer_date": 1559592143000, "content_id": "584d32b46ed3277a58ae5c20a6421b8870f1f585", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "00ce227f326d6fff6d98b34c3907267627b9a40b", "extension": "p...
2.328125
stackv2
try: from osgeo import gdal, osr, ogr except: import gdal, osr, ogr from gdalconst import * import shlex import subprocess import os import numpy #The following functions will download daymet mosaic or tile datasets for the years range passed #The mosaic files are each for the entire CONUS for each year #be a...
215
39.66
124
29
2,427
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_eb1268f9be62f37f_aa0803dd", "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" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 203 ]
[ 203 ]
[ 16 ]
[ 55 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
climatevarsFunctions.py
/usu_data_service/servicefunctions/climatevarsFunctions.py
tsga/Hydro-DS
BSD-3-Clause
2024-11-18T20:52:51.653899+00:00
1,631,028,260,000
a2889bbb9d68d45cbdd419e822a88a1791c57ee5
3
{ "blob_id": "a2889bbb9d68d45cbdd419e822a88a1791c57ee5", "branch_name": "refs/heads/master", "committer_date": 1631028260000, "content_id": "9267a30e01134496655ce126200a4a26cb363a73", "detected_licenses": [ "Apache-2.0" ], "directory_id": "04cfe6740712cfe3968a94aac2d1c1df003a945e", "extension": "py"...
2.703125
stackv2
import os import base64 import typing import logging from urllib import request from .utils import Singleton root = os.path.dirname(os.path.abspath(__file__)) if not os.path.exists(root): os.makedirs(root) gfwlist_path = os.path.join(root, "gfwlist.txt") whitelist_path = os.path.join(root, "whitelist.txt") cac...
135
27.79
93
17
929
python
[{"finding_id": "semgrep_rules.python.django.security.injection.ssrf.ssrf-injection-urllib_b9544641f5834b1f_5b1ba9fb", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.ssrf.ssrf-injection-urllib", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from req...
5
true
[ "CWE-918", "CWE-918" ]
[ "rules.python.django.security.injection.ssrf.ssrf-injection-urllib", "rules.python.django.security.injection.ssrf.ssrf-injection-urllib" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 32, 44 ]
[ 33, 45 ]
[ 9, 9 ]
[ 36, 36 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)", "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF), which could result in attackers gaining access to private organization data. To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the us...
[ 7.5, 7.5 ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
rule.py
/websocks/rule.py
webclinic017/websocks
Apache-2.0
2024-11-18T20:52:52.650835+00:00
1,683,581,593,000
de18c8198f0cc5198264b5159735c7722ca1f311
2
{ "blob_id": "de18c8198f0cc5198264b5159735c7722ca1f311", "branch_name": "refs/heads/master", "committer_date": 1683581593000, "content_id": "406a5fecdb4d202e1e8850645baafa25c0467f94", "detected_licenses": [ "MIT" ], "directory_id": "cca0778ccc49e4b7faef114874fa3620e2779c21", "extension": "py", "fi...
2.46875
stackv2
######################################################################### # _________ ___. ______________________ ___ # \_ ___ \___.__.\_ |__ ___________ / _____/\______ \ \/ / # / \ \< | | | __ \_/ __ \_ __ \/ \ ___ | _/\ / # \ \___\___ | | \_\...
85
40.2
101
15
906
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_9ca235dc0d15879f_0263d8d1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
4
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 17 ]
[ 17 ]
[ 1 ]
[ 40 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
export.py
/examples/xml-export/export.py
CyberGRX/api-connector-bulk
MIT
2024-11-18T20:52:53.052831+00:00
1,520,674,690,000
8cb5257eb5a28a02273024b600bd606bc6e5b326
3
{ "blob_id": "8cb5257eb5a28a02273024b600bd606bc6e5b326", "branch_name": "refs/heads/master", "committer_date": 1520674690000, "content_id": "4b1565b4cad8f073ee65aa89770b4543e3a28ec0", "detected_licenses": [ "MIT" ], "directory_id": "f8b3e746b60b8eeab951be533b451741783d5038", "extension": "py", "fi...
2.734375
stackv2
""" Script that controls Tensorboard to monitor logs. Run this script as >>> python3 tensorboard_monitor.py --log=gpu_logs to visualise GPU utilization. In particular, this script kills and restarts Tensorboard at 2am every day. """ import subprocess, sys import time def manage_board(logdir): def time_since_2a...
39
29.67
85
14
290
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_7225d4629b013b6d_b4c53d3b", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi...
2
true
[ "" ]
[ "rules.python.lang.correctness.unchecked-subprocess-call" ]
[ "correctness" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 30 ]
[ 30 ]
[ 24 ]
[ 28 ]
[ "" ]
[ "This is not checking the return value of this subprocess call; if it fails no exception will be raised. Consider subprocess.check_call() instead" ]
[ 5 ]
[ "" ]
[ "" ]
tensorboard_monitor.py
/gpu_monitor/tensorboard_monitor.py
PANXIONG-CN/docker
MIT
2024-11-18T20:52:56.977455+00:00
1,429,023,878,000
afddb6750d997e7eb5a933006f4d43f2918abade
2
{ "blob_id": "afddb6750d997e7eb5a933006f4d43f2918abade", "branch_name": "refs/heads/master", "committer_date": 1429023878000, "content_id": "8a3b598a5c52eb161f5ae98d006e49cbdf7f0493", "detected_licenses": [ "MIT" ], "directory_id": "7245e1124fb6b3a96cc1691f54b275bf39a90a4a", "extension": "py", "fi...
2.40625
stackv2
#!/usr/bin/env python """ Based on Matt Weber es2graphite https://github.com/mattweber/es2graphite """ import re import sys import json import time import pickle import struct import socket import thread import urllib2 import argparse from pprint import pprint from datetime import datetime NODES = {} CLUSTER_NAME = ...
202
41.73
160
23
2,041
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_d9b4ebe65cd94912_dc31a655", "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" ]
[ 134 ]
[ 134 ]
[ 19 ]
[ 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" ]
es2graphite.py
/elasticsearch/files/es2graphite.py
ministryofjustice/elasticsearch-formula
MIT
2024-11-18T19:02:29.469464+00:00
1,690,220,844,000
4fafcfaab6b08fe1ec97507233d38fcc73e27336
2
{ "blob_id": "4fafcfaab6b08fe1ec97507233d38fcc73e27336", "branch_name": "refs/heads/main", "committer_date": 1690220844000, "content_id": "465d971a158353a68e6fcd26f536388a163300c7", "detected_licenses": [ "MIT" ], "directory_id": "de0fb6700e6de80c5a9f6bf2aa797c679fc5f059", "extension": "py", "file...
2.328125
stackv2
import functools import os.path import subprocess import sys from pyperf._utils import shell_quote, popen_communicate from pyperf._worker import WorkerTask def bench_command(command, task, loops): path = os.path.dirname(__file__) script = os.path.join(path, '_process_time.py') run_script = [sys.executabl...
55
31.25
70
14
390
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b92840686f79740f_b6d32371", "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" ]
[ 16 ]
[ 19 ]
[ 12 ]
[ 53 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
_command.py
/pyperf/_command.py
psf/pyperf
MIT
2024-11-18T19:02:31.593633+00:00
1,417,517,473,000
54793a434a700d1a3416d3ffdca90387c3fe5253
3
{ "blob_id": "54793a434a700d1a3416d3ffdca90387c3fe5253", "branch_name": "refs/heads/master", "committer_date": 1417517473000, "content_id": "169538e187731fde45250437b3ca01c9b29f5e90", "detected_licenses": [ "MIT" ], "directory_id": "baae94bc843ef2d93a95d8c63b10f7033f3c974f", "extension": "py", "fi...
2.5625
stackv2
#!/usr/bin/env python # encoding: utf-8 import os import sys dir_list = [] root_dir = '/home/jimmy/dataset/ClassFile/' for dir_name in os.listdir(root_dir): dir_list.append(os.path.join(root_dir, dir_name)) def convert(): for dir_path in dir_list: for file_name in os.listdir(dir_path): fi...
27
29.04
76
15
199
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_94fa493c2e1a3f3c_4811843d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 18 ]
[ 18 ]
[ 13 ]
[ 31 ]
[ "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" ]
generate_file.py
/sougou_expr/generate_file.py
Jacobi2017/cppjieba
MIT
2024-11-18T19:02:35.473708+00:00
1,611,225,025,000
9bdf8488549bed9b4dbdb9bccaee1bc6e4394274
3
{ "blob_id": "9bdf8488549bed9b4dbdb9bccaee1bc6e4394274", "branch_name": "refs/heads/main", "committer_date": 1611225025000, "content_id": "97e5649160ec843010c87d9cba4f73e0fde9166d", "detected_licenses": [ "MIT" ], "directory_id": "d14d70b680f493cb036ca3a5b12c62c7683101d5", "extension": "py", "file...
2.59375
stackv2
import scipy.sparse as sp import pandas as pd from feature_matrix import FeatureMatrix import random class GATInputGenerator: def __init__(self): self.gat = "cora" self.FM = FeatureMatrix(base_path = "../dataset/") self.label_zip = None def getAdj(self, dataset="BuzzFeed"): if ...
80
32.31
100
16
676
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-if-body_abacc59a16dd38f1_f5ba314e", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-if-body", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Useless if statement; both blocks ha...
1
true
[ "" ]
[ "rules.python.lang.maintainability.useless-if-body" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 32 ]
[ 35 ]
[ 9 ]
[ 27 ]
[ "" ]
[ "Useless if statement; both blocks have the same body" ]
[ 5 ]
[ "" ]
[ "" ]
gat_adj_features.py
/Fake-News-Detection/gat_adj_features.py
nabaruns/DLNLP
MIT
2024-11-18T19:02:35.689400+00:00
1,481,541,910,000
4fa9339ce17aef89c2f739d4909aafb2c830ab75
3
{ "blob_id": "4fa9339ce17aef89c2f739d4909aafb2c830ab75", "branch_name": "refs/heads/master", "committer_date": 1481541910000, "content_id": "0588a3014d9aa6685d0fc9d37d17afa4a5cbc7c5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "04d3efa98d41afe86ea05eec74884bd1bc9c3c9e", "extension": "py"...
2.90625
stackv2
# -*- coding: utf-8 -*- import os import sqlite3 # 读取关键字列表 keyWordsArray = [] try: for line in open('searchKeyWords.txt'): keyWordsArray.append(line) print('读取文件成功') except IOError: print("fail to open file") # 删除原来的db dbName = 'keyWordsHistory.db' if os.path.exists(dbName): os.remove(dbName)...
44
18.57
55
12
241
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d9ac22ec8dddb5e3_7b37aa96", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "HIGH" ]
[ 32, 32 ]
[ 35, 35 ]
[ 9, 9 ]
[ 10, 10 ]
[ "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" ]
initKeyWordsHistoryDB.py
/initKeyWordsHistoryDB.py
iamdaiyuan/1688
Apache-2.0
2024-11-18T19:02:45.273660+00:00
1,630,692,699,000
8669613b848cc02100cac23b92861fe17faba4b9
2
{ "blob_id": "8669613b848cc02100cac23b92861fe17faba4b9", "branch_name": "refs/heads/main", "committer_date": 1630692776000, "content_id": "9d95a6efaab109c59685dbb87e284a4514396f73", "detected_licenses": [ "MIT" ], "directory_id": "d3689a5dca7d93e06dfccdfeca912c8e07b17819", "extension": "py", "file...
2.484375
stackv2
from flask import Flask, render_template from flask_bootstrap import Bootstrap from flask_nav import Nav from flask_nav.elements import Navbar # https://fontawesome.com/icons from flask_fontawesome import FontAwesome def init_app(): '''Criando aplicação Flask''' app = Flask(__name__, instance_relative_config=...
47
27.6
62
12
303
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_ba067f24f39d379e_5ed80447", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `page_not_found...
1
true
[ "" ]
[ "rules.python.lang.maintainability.useless-inner-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 43 ]
[ 45 ]
[ 5 ]
[ 48 ]
[ "" ]
[ "function `page_not_found` is defined inside a function but never used" ]
[ 7.5 ]
[ "" ]
[ "" ]
__init__.py
/agenda_contatos/__init__.py
RyanMachadoo/agenda-web-flask
MIT
2024-11-18T19:02:47.554142+00:00
1,592,743,381,000
e772b6ba5e39abb9468b4e3d5f18ff732b74a526
2
{ "blob_id": "e772b6ba5e39abb9468b4e3d5f18ff732b74a526", "branch_name": "refs/heads/master", "committer_date": 1592743381000, "content_id": "cec5581cc975075faf88bb1f404cebcafc2d5337", "detected_licenses": [ "MIT" ], "directory_id": "34067d3428a0c2cde9a2c629948d070ec38bcfac", "extension": "py", "fi...
2.34375
stackv2
from flask import Flask,render_template,request,redirect,url_for from flask_login import LoginManager,login_user,logout_user,login_required,current_user from flask_socketio import SocketIO,join_room,leave_room from database import get_user,save_user,is_room_member,is_room_admin from database import save_room,get_room,u...
167
36.29
109
18
1,293
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_e2573bbabeac650b_f8f88b4b", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
4
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 33, 39, 55 ]
[ 33, 39, 55 ]
[ 8, 8, 8 ]
[ 37, 37, 37 ]
[ "", "", "" ]
[ "Is \"is_authenticated\" a function or an attribute? If it is a function, you may have meant current_user.is_authenticated() because current_user.is_authenticated is always true.", "Is \"is_authenticated\" a function or an attribute? If it is a function, you may have meant current_user.is_authenticated() because ...
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
chat_app.py
/chat_app.py
Girl-Hackers/chatroom
MIT
2024-11-18T19:02:49.098384+00:00
1,678,372,383,000
8e54e537e903632c8b84d75cfdbbe63caed2e815
3
{ "blob_id": "8e54e537e903632c8b84d75cfdbbe63caed2e815", "branch_name": "refs/heads/master", "committer_date": 1678372383000, "content_id": "de6fae673183ee69a3edc9c158c1560637736cc4", "detected_licenses": [ "MIT" ], "directory_id": "38bd99c72ca2521489ce1eb02b7604095b02b585", "extension": "py", "fi...
3.09375
stackv2
#!/usr/bin/env python """ CREATED AT: 2022/4/17 Des: https://leetcode.com/problems/increasing-order-search-tree/ GITHUB: https://github.com/Jiezhi/myleetcode Difficulty: Easy Tag: See: https://leetcode.com/problems/increasing-order-search-tree/solution/ https://leetcode.com/problems/increasing-order-search-tree/di...
60
22.32
119
13
359
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_75e71fbff74f05ac_d28b9f48", "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 test. Consider re...
1
true
[ "" ]
[ "rules.python.lang.best-practice.pass-body-fn" ]
[ "best-practice" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 55 ]
[ 56 ]
[ 1 ]
[ 9 ]
[ "" ]
[ "`pass` is the body of function test. Consider removing this or raise NotImplementedError() if this is a TODO" ]
[ 5 ]
[ "" ]
[ "" ]
897-IncreasingOrderSearchTree.py
/src/897-IncreasingOrderSearchTree.py
Jiezhi/myleetcode
MIT
2024-11-18T19:02:50.520442+00:00
1,677,115,999,000
6ad40409f54ca4575502a4a9193ba40d6ed4848a
3
{ "blob_id": "6ad40409f54ca4575502a4a9193ba40d6ed4848a", "branch_name": "refs/heads/master", "committer_date": 1677115999000, "content_id": "6aa30158343d3737bab9a156fc6649b2a1af5402", "detected_licenses": [ "MIT" ], "directory_id": "7034e934af2e85b8b996af040da67fea6a64bfa9", "extension": "py", "fi...
2.5625
stackv2
from django.http import HttpResponse from django.conf.urls import patterns, include, url import re class Trappist(object): STATUS_INT = re.compile('^\d+') def __init__(self, app): self.app = app def mounted_at(self, prefix): regex, pattern = self.__regex_and_pattern_from(prefix) ...
54
30.94
74
15
367
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_f5c38abc7847e132_02c897ba", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ...
1
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 35 ]
[ 35 ]
[ 20 ]
[ 53 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
trappist.py
/trappist.py
Fluxx/trappist
MIT
2024-11-18T19:02:53.649952+00:00
1,475,724,377,000
11bb264dd2647b283fbb094d7e409e99d549c663
3
{ "blob_id": "11bb264dd2647b283fbb094d7e409e99d549c663", "branch_name": "refs/heads/master", "committer_date": 1475724377000, "content_id": "9c2e38bd3b10eaba8ac7a1a55965c4922aba7e89", "detected_licenses": [ "MIT" ], "directory_id": "aba6a7834e16814767085ae3a8a0d306f7593f12", "extension": "py", "fi...
2.625
stackv2
import os import subprocess import docker class Executor(object): def execute(self, codefile, test_io, **kwargs): # pipe the input and output into the code files # to be run inside a docker container proc = subprocess.Popen(['python', codefile], stdin=subpr...
74
34.64
99
17
518
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c8d3f57175f70004_42df35cf", "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" ]
[ 11 ]
[ 14 ]
[ 16 ]
[ 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" ]
executor.py
/compilation_builder/executor.py
nma/coding-pytest-extension
MIT
2024-11-18T19:02:53.756629+00:00
1,645,914,002,000
ca2eab63b71548162e0cd5ee9bc9e630f366ea3e
2
{ "blob_id": "ca2eab63b71548162e0cd5ee9bc9e630f366ea3e", "branch_name": "refs/heads/master", "committer_date": 1645914002000, "content_id": "760d7ee2d41a5f86c160425f7d04807c3bc27370", "detected_licenses": [ "MIT" ], "directory_id": "ebef08dead816b75e0d5e5da683516ffd67bc59c", "extension": "py", "fi...
2.328125
stackv2
from flask import Flask, request, jsonify, abort import json app = Flask("aberbrowser") with open("zones.json", "r") as z: zones = json.load(z) @app.route("/") def all(): return jsonify(zones) @app.route("/<entity>/properties") def properties(entity): if entity not in zones: abort(404) re...
71
24.23
78
18
402
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_eec6628518d33dff_4e31e119", "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-704" ]
[ "rules.python.flask.security.injection.nan-injection" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 30 ]
[ 30 ]
[ 15 ]
[ 48 ]
[ "" ]
[ "Found user input going directly into typecast for bool(), float(), or complex(). This allows an attacker to inject Python's not-a-number (NaN) into the typecast. This results in undefind behavior, particularly when doing comparisons. Either cast to a different type, or add a guard checking for all capitalizations ...
[ 7.5 ]
[ "MEDIUM" ]
[ "MEDIUM" ]
app.py
/aberbrowser/app/app.py
jasonmay/twitch-jarsonmud
MIT
2024-11-18T19:02:54.337647+00:00
1,579,239,126,000
13a031ca5558b341c2a7fdc09e3c082a6231e984
4
{ "blob_id": "13a031ca5558b341c2a7fdc09e3c082a6231e984", "branch_name": "refs/heads/master", "committer_date": 1579239126000, "content_id": "2a15acf999926e3f136eae08178d1efdd99497f0", "detected_licenses": [ "MIT" ], "directory_id": "767e49a5ccbd9f658d2512bfc982a7ec910f65d4", "extension": "py", "fi...
3.671875
stackv2
import unittest class Stack: def __init__(self): self.values = [] self.is_empty = True self.size = 0 def push(self, value): self.values.append(value) self.size += 1 self.is_empty = False def pop(self): if not self.is_empty: self.size -=...
108
26.15
65
16
685
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_83326363bcf5f5fc_b5d0d78a", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
6
true
[ "", "", "", "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainabili...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 7, 13, 16, 19, 37, 43 ]
[ 7, 13, 16, 19, 37, 43 ]
[ 9, 9, 16, 17, 23, 23 ]
[ 22, 22, 29, 30, 46, 46 ]
[ "", "", "", "", "", "" ]
[ "Is \"is_empty\" a function or an attribute? If it is a function, you may have meant self.is_empty() because self.is_empty is always true.", "Is \"is_empty\" a function or an attribute? If it is a function, you may have meant self.is_empty() because self.is_empty is always true.", "Is \"is_empty\" a function or...
[ 5, 5, 5, 5, 5, 5 ]
[ "", "", "", "", "", "" ]
[ "", "", "", "", "", "" ]
3-6.py
/ctci/ch3/3-6.py
michaelmunje/algorithms
MIT
2024-11-18T19:02:56.139477+00:00
1,613,773,466,000
de1f5fab6c95d3df226fc7b18aa7ad9cb20bb6e0
2
{ "blob_id": "de1f5fab6c95d3df226fc7b18aa7ad9cb20bb6e0", "branch_name": "refs/heads/main", "committer_date": 1613773466000, "content_id": "2d652db5720cc16bc140dcc468fca23eb583ef4f", "detected_licenses": [ "CC0-1.0" ], "directory_id": "349700a19d8eb020bdcab9929cfdf1085c9165a8", "extension": "py", "...
2.375
stackv2
from django.db import models from django.conf import settings from pathlib import Path, os from django.utils.translation import gettext_lazy as _ # Create your models here. class Categoria(models.Model): cat_id = models.AutoField(primary_key=True) cat_nombre = models.CharField(max_length=255) cat_itbms =...
32
36.91
105
12
293
python
[{"finding_id": "semgrep_rules.python.django.correctness.no-null-string-field_7a2c7e1bfa69e3d1_46b37953", "tool_name": "semgrep", "rule_id": "rules.python.django.correctness.no-null-string-field", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Avoid using null on string-based f...
1
true
[ "" ]
[ "rules.python.django.correctness.no-null-string-field" ]
[ "correctness" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 27 ]
[ 27 ]
[ 5 ]
[ 50 ]
[ "" ]
[ "Avoid using null on string-based fields such as CharField and TextField. If a string-based field has null=True, that means it has two possible values for \"no data\": NULL, and the empty string. In most cases, it's redundant to have two possible values for \"no data;\" the Django convention is to use the empty str...
[ 5 ]
[ "" ]
[ "" ]
models.py
/FUNDASTORE/APPS/PRODUCTOS/models.py
rm-claudio22/VENV00-FUNDASTORE
CC0-1.0
2024-11-18T19:02:57.010434+00:00
1,514,191,907,000
8b21a729f14a0cf3696a254b348f5897287a8332
3
{ "blob_id": "8b21a729f14a0cf3696a254b348f5897287a8332", "branch_name": "refs/heads/master", "committer_date": 1514191907000, "content_id": "47093182ab2ea8cc08cbe2901c57e9392e351b00", "detected_licenses": [ "MIT" ], "directory_id": "ac85a0ebc0a14bcffa076de6a6225a118f6f70fb", "extension": "py", "fi...
3.078125
stackv2
import random import time import queue from multiprocessing.managers import BaseManager # 发送任务的队列: task_queue = queue.Queue() # 接收结果的队列: result_queue = queue.Queue() # 从 BaseManager 继承的 QueueManager class QueueManager(BaseManager): pass # 把两个 Queue 都注册到网络上, callable 参数关联了 Queue 对象: QueueManager.register('get_t...
39
22.62
72
9
290
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_b7aee6f51e862f7c_1559284d", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 18, 19 ]
[ 18, 19 ]
[ 58, 60 ]
[ 68, 72 ]
[ "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
task_master.py
/线程进程/task_master.py
KECB/learn
MIT
2024-11-18T19:02:58.783255+00:00
1,474,386,881,000
ec83fffaeee832e48f334237d14f4136c50c2794
2
{ "blob_id": "ec83fffaeee832e48f334237d14f4136c50c2794", "branch_name": "refs/heads/master", "committer_date": 1474386881000, "content_id": "ba934b7198204ac59d606adc7782c9430d068f59", "detected_licenses": [ "MIT" ], "directory_id": "22649b823f75bec5080fc28c7f40986df5c20f2c", "extension": "py", "fi...
2.40625
stackv2
# -*- coding: utf-8 -*- import sqlite3 def get_db(db_path): db = None if db is None: db = sqlite3.connect(db_path) db.row_factory = sqlite3.Row try: init_db(db) except Exception as e: pass return db def make_dicts(cursor, row): return dict((curs...
44
32.05
92
12
324
python
[{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.identical-is-comparison_ac7701d2a61c7190_483ba188", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.identical-is-comparison", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Fo...
3
true
[ "", "CWE-89", "CWE-89" ]
[ "rules.python.lang.correctness.common-mistakes.identical-is-comparison", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "correctness", "security", "security" ]
[ "MEDIUM", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "HIGH" ]
[ 7, 21, 21 ]
[ 7, 21, 21 ]
[ 8, 5, 5 ]
[ 18, 93, 93 ]
[ "", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found identical comparison using is. Ensure this is what you intended.", "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 s...
[ 7.5, 5, 7.5 ]
[ "", "LOW", "LOW" ]
[ "", "HIGH", "HIGH" ]
db_handler.py
/Service_Components/db_handler.py
enzosav/mydata-sdk
MIT
2024-11-18T19:03:02.647432+00:00
1,611,189,016,000
a002975377087c1fd3a76972558bdf94c48c2faf
3
{ "blob_id": "a002975377087c1fd3a76972558bdf94c48c2faf", "branch_name": "refs/heads/master", "committer_date": 1611189016000, "content_id": "c86818c3081c180f0f38c08a6a761bec9e135ad9", "detected_licenses": [ "MIT" ], "directory_id": "82731793a0941869878e250135e9c10453bd267a", "extension": "py", "fi...
3.28125
stackv2
import os, glob, sys import numpy as np import pandas as pd import scipy.stats import string import re def load_data(path): """Load training and testing datasets based on their path Parameters ---------- path : relative path to location of data, should be always the same (string) Returns ...
485
29.14
162
22
3,736
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-assignment-keyed_b90218129405e8ab_c029109b", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-assignment-keyed", "finding_type": "maintainability", "severity": "low", "confidence": "medium", "message": "key `key` in `df` is ...
6
true
[ "", "", "", "", "" ]
[ "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed", "rules.python.lang.maintainability.useless-assignment-keyed"...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ 62, 127, 128, 397, 398 ]
[ 63, 128, 129, 398, 399 ]
[ 5, 9, 9, 5, 5 ]
[ 34, 56, 56, 71, 54 ]
[ "", "", "", "", "" ]
[ "key `key` in `df` is assigned twice; the first assignment is useless", "key `'Title'` in `df` is assigned twice; the first assignment is useless", "key `'Title'` in `df` is assigned twice; the first assignment is useless", "key `'Type_Ticket'` in `df` is assigned twice; the first assignment is useless", "k...
[ 3, 3, 3, 3, 3 ]
[ "", "", "", "", "" ]
[ "", "", "", "", "" ]
utils_hulle.py
/src/utils/utils_hulle.py
davidpb90/titanic_forros
MIT
2024-11-18T19:03:02.887059+00:00
1,553,151,435,000
1e59dc2f7d2431eedb8afead59145d75206cae1f
3
{ "blob_id": "1e59dc2f7d2431eedb8afead59145d75206cae1f", "branch_name": "refs/heads/master", "committer_date": 1553151435000, "content_id": "1e6c857fb8c7e7afd5254d9c3b6c2aaedd38a0fb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1cd75a213c79bc92d734edb5b07cef50240e41ab", "extension": "py"...
2.5625
stackv2
import logging import sys import json import base64 import signal # import threading from http import HTTPStatus """ Implement the logic to connect to kafka and consume messages. kafkaWrapper is a wrapper around kafka-python KafkaConsumer. kafkaWrapper relies on it in order to consume messages from kafka....
125
32.67
97
16
841
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_cfc8ac89e1454a10_645231e6", "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" ]
[ 125 ]
[ 125 ]
[ 16 ]
[ 49 ]
[ "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" ]
wrapper.py
/kafkaWrapper/wrapper.py
teguh87/kafkaWrapper
Apache-2.0
2024-11-18T19:03:04.259722+00:00
1,646,116,329,000
05b98b1e02be46c12510bf1379bd99c179924f95
2
{ "blob_id": "05b98b1e02be46c12510bf1379bd99c179924f95", "branch_name": "refs/heads/master", "committer_date": 1646116329000, "content_id": "73a4230fd4d4277a91538e9e2251769fadbfd6d0", "detected_licenses": [ "MIT" ], "directory_id": "6aa6fbb3f3d971d3a0217b94c9a8e26a417f6758", "extension": "py", "fi...
2.390625
stackv2
import os import time from typing import List from constant import const from utils.decorator import singleton from utils.random_tools import Random from core.element.CharImg import CharImg from core.element.TextImg import create, gen_batch_char_obj, TYPE_ORIENTATION_HORIZONTAL, TYPE_ORIENTATION_VERTICAL, \ TYPE_AL...
251
38.75
118
17
2,111
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_8aea033d0af17dd7_b62646b0", "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" ]
[ 74, 142 ]
[ 74, 142 ]
[ 34, 20 ]
[ 57, 75 ]
[ "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" ]
TextImgProvider.py
/service/provider/TextImgProvider.py
BboyHanat/TextGenerator
MIT
2024-11-18T19:03:05.105199+00:00
1,620,159,439,000
d921015fb012f3f73aaeef3d21dcbdd57ad59c2e
3
{ "blob_id": "d921015fb012f3f73aaeef3d21dcbdd57ad59c2e", "branch_name": "refs/heads/master", "committer_date": 1620159439000, "content_id": "66a2487965068810b8e9b5774360434882b84dac", "detected_licenses": [ "MIT" ], "directory_id": "197a642ac1125565e0174a0258c374a4b2ad7eea", "extension": "py", "fi...
2.671875
stackv2
from app import logger from goals import * from models import * from helpers import * class GetInputGoal(BaseGoal): """Goal for getting user input""" def __init__(self, context, obj, attr, message): super().__init__(context) self.obj = obj self.input = attr self.value = None ...
132
35.77
149
19
989
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_ea4fbd1b1a0dd47a_d351106c", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
3
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 21, 49, 82 ]
[ 21, 49, 82 ]
[ 45, 49, 51 ]
[ 61, 65, 67 ]
[ "", "", "" ]
[ "Is \"is_complete\" a function or an attribute? If it is a function, you may have meant self.is_complete() because self.is_complete is always true.", "Is \"is_complete\" a function or an attribute? If it is a function, you may have meant self.is_complete() because self.is_complete is always true.", "Is \"is_com...
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
input.py
/backend/server/goals/input.py
roadlabs/convo
MIT
2024-11-18T19:14:26.508601+00:00
1,531,116,833,000
1820e80a52acadb9fd4d08496ac22e8e1d1f62f9
3
{ "blob_id": "1820e80a52acadb9fd4d08496ac22e8e1d1f62f9", "branch_name": "refs/heads/master", "committer_date": 1531116833000, "content_id": "e9289eb3cc38295b012a7a304572eada1a036f4b", "detected_licenses": [ "MIT" ], "directory_id": "636eabdb15c380de1b506ed741eb4981fdfceb09", "extension": "py", "fi...
3.25
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from subprocess import call from argparse import ArgumentParser from re import sub class voice: def __init__(self): """ :param text : файл(путь/имя), начальная страница, финальная страница :type text : text ...
162
28.39
153
14
1,167
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ce08a5fa43cfec48_a8d4e252", "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...
22
true
[ "", "", "", "", "", "", "", "", "", "CWE-78", "CWE-78", "", "CWE-78", "", "CWE-78", "CWE-78", "" ]
[ "rules.python.lang.correctness.unchecked-subprocess-call", "rules.python.lang.correctness.unchecked-subprocess-call", "rules.python.lang.correctness.unchecked-subprocess-call", "rules.python.lang.correctness.unchecked-subprocess-call", "rules.python.lang.correctness.unchecked-subprocess-call", "rules.pyth...
[ "correctness", "correctness", "correctness", "correctness", "correctness", "correctness", "correctness", "correctness", "correctness", "security", "security", "correctness", "security", "correctness", "security", "security", "correctness" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "LOW", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "LOW", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "HIGH", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "HIGH", "MEDIUM" ]
[ 86, 87, 90, 91, 95, 96, 99, 100, 127, 127, 127, 134, 134, 157, 157, 157, 158 ]
[ 86, 87, 90, 91, 95, 96, 99, 100, 127, 127, 127, 134, 134, 157, 157, 157, 158 ]
[ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 35, 13, 41, 23, 23, 95, 9 ]
[ 17, 17, 17, 17, 17, 17, 17, 17, 17, 40, 39, 17, 45, 27, 100, 99, 13 ]
[ "", "", "", "", "", "", "", "", "", "A01:2017 - Injection", "A01:2017 - Injection", "", "A01:2017 - Injection", "", "A01:2017 - Injection", "A01:2017 - Injection", "" ]
[ "This is not checking the return value of this subprocess call; if it fails no exception will be raised. Consider subprocess.check_call() instead", "This is not checking the return value of this subprocess call; if it fails no exception will be raised. Consider subprocess.check_call() instead", "This is not che...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 7.5, 7.5, 5, 7.5, 5, 7.5, 7.5, 5 ]
[ "", "", "", "", "", "", "", "", "", "LOW", "HIGH", "", "HIGH", "", "LOW", "HIGH", "" ]
[ "", "", "", "", "", "", "", "", "", "HIGH", "LOW", "", "LOW", "", "HIGH", "LOW", "" ]
voice.py
/voice.py
dzino/Voice-PDF-Linux-
MIT
2024-11-18T19:14:28.437957+00:00
1,577,501,475,000
51a366a95de75d150b7356c811e8fe7438335276
3
{ "blob_id": "51a366a95de75d150b7356c811e8fe7438335276", "branch_name": "refs/heads/master", "committer_date": 1577501475000, "content_id": "72f14222c7f92fdf84d4f4c141204cf1c1c12763", "detected_licenses": [ "MIT" ], "directory_id": "ea939b4f85a70220026c99523860b1aaefa81e0c", "extension": "py", "fi...
2.75
stackv2
# -*- coding: utf-8 -*- import os import re def get_pid_and_kill(): all_pid_info = os.popen('ps -ef | grep wsgi:app') pid_list = all_pid_info.readlines() pids = [] for each in pid_list: if 'wsgi' in each and 'grep' not in each: wsgi_pid_info = each.strip() wsgi_pid = re...
22
24.73
56
15
158
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_680a6655839503b7_4ad6d22e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 18 ]
[ 18 ]
[ 9 ]
[ 31 ]
[ "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" ]
shutdown_app.py
/shutdown_app.py
GuoTengda1993/flask-demo
MIT
2024-11-18T19:14:29.235451+00:00
1,492,659,784,000
f93277d5533ace5069d28b7ba97faed27a315626
3
{ "blob_id": "f93277d5533ace5069d28b7ba97faed27a315626", "branch_name": "refs/heads/master", "committer_date": 1492659784000, "content_id": "eb83efdc57fe7013b2079af729e4c85487a0eb78", "detected_licenses": [ "MIT" ], "directory_id": "2af1f57d5ca9bf6766c74645002dbeb9dd983db1", "extension": "py", "fi...
2.96875
stackv2
# -*- coding: utf8 -*- from __future__ import unicode_literals import math import random import utils class Base(object): """ Common functions for all policies Functions defined here should be overridded by children Do not use directly - use one of the children instead. """ def __init__(sel...
80
30.71
77
18
597
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_504e9e1c55e5ea31_4027bcc7", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
3
true
[ "", "", "" ]
[ "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function", "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 53, 54, 55 ]
[ 53, 54, 55 ]
[ 26, 31, 36 ]
[ 38, 58, 78 ]
[ "", "", "" ]
[ "`return` only makes sense inside a function", "`return` only makes sense inside a function", "`return` only makes sense inside a function" ]
[ 5, 5, 5 ]
[ "", "", "" ]
[ "", "", "" ]
policies.py
/src/algorithms/policies.py
Hiestaa/RLViz
MIT
2024-11-18T19:14:32.892415+00:00
1,579,701,021,000
c842910e0984028364c0f143b6a5b30f0a844185
3
{ "blob_id": "c842910e0984028364c0f143b6a5b30f0a844185", "branch_name": "refs/heads/master", "committer_date": 1579701021000, "content_id": "e6ba5c5f9ef9dfa628037ed33d1bcd2a4ab7641d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e233ccb06bfefe91d56b90d1fea35c6aea7e3a65", "extension": "py"...
2.609375
stackv2
""" Simple code to brute-force determine the performance of the best static configurations. """ from functools import partial from dac.envs import SigmoidMultiActMultiValAction as SigMV, LubyTime import json as j from collections import defaultdict import os import argparse import numpy as np env_choice = { # Lub...
145
40.09
120
17
1,390
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_4bfe57d5b70938c9_4868cb20", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 84 ]
[ 84 ]
[ 32 ]
[ 38 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
best_stationary.py
/dac/train/best_stationary.py
xy9485/DAC
Apache-2.0
2024-11-18T19:14:33.904748+00:00
1,539,308,810,000
c3bec92820023a873bc4f8f32a1574e2522a14ef
4
{ "blob_id": "c3bec92820023a873bc4f8f32a1574e2522a14ef", "branch_name": "refs/heads/master", "committer_date": 1539308810000, "content_id": "4f5fc6c20760fadc59cde9816f7d105d04a7c6f7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "76ebb0e2dc620547294de4517bd89220dfa18a00", "extension": "py"...
4.03125
stackv2
''' #1.摄氏温度转换为华式温度 c=float(input("Enter a degree in Celsius:")) f=(9/5)*c+32 print('{} Celsius is {} Fathrenheit'.format(c,f)) ''' ''' #2.园柱体的体积 r,h=eval(input("Enter the radius and length of a cylinder:")) area=r*r*3.1415 volume=area*h print("The area is %.4f,the volume %.1f"%(area,volume)) ''' ''' #3.英尺数转换为米数 a=ev...
59
17.59
75
9
432
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_e1ca4068f4915270_66e0e352", "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" ]
[ 54 ]
[ 54 ]
[ 3 ]
[ 52 ]
[ "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" ]
作业1.py
/作业1.py
LiuYanYun123/test
Apache-2.0
2024-11-18T19:14:36.607559+00:00
1,598,831,835,000
02f4c8e4a3a6228b37bc8caa15b215a0f161a888
2
{ "blob_id": "02f4c8e4a3a6228b37bc8caa15b215a0f161a888", "branch_name": "refs/heads/master", "committer_date": 1598831835000, "content_id": "78cb55b0321db10f67da733e68a75190867b9335", "detected_licenses": [ "MIT" ], "directory_id": "c0c315343ce7c8aa3e958c7608c94187e7df36b0", "extension": "py", "fi...
2.5
stackv2
from os import getenv from flask import Flask, request, render_template from dotenv import load_dotenv from .model import db load_dotenv def create_app(): '''Create and configure an instance of the Flask application''' app = Flask(__name__) app.config['DEBUG'] = True app.config["SQLALCHEMY_DATABASE_U...
23
26.13
109
9
146
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.avoid_hardcoded_config_DEBUG_7a565b462c13ad91_05e896eb", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.avoid_hardcoded_config_DEBUG", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Hardcoded variable `...
2
true
[ "" ]
[ "rules.python.lang.maintainability.useless-inner-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 17 ]
[ 19 ]
[ 5 ]
[ 46 ]
[ "" ]
[ "function `root` is defined inside a function but never used" ]
[ 7.5 ]
[ "" ]
[ "" ]
flaskapp.py
/medcab/flaskapp.py
LambdaTheda/Data-Science
MIT
2024-11-18T19:14:37.384053+00:00
1,565,848,469,000
1c0b562cbee556da3fd07c945babe0021143391a
3
{ "blob_id": "1c0b562cbee556da3fd07c945babe0021143391a", "branch_name": "refs/heads/master", "committer_date": 1565848469000, "content_id": "18cee33973f290b7ff1f04f96466de0c4b2c97ee", "detected_licenses": [ "Apache-2.0" ], "directory_id": "dbba6562b4d0e930de95460926dc5bca33879cf2", "extension": "py"...
3.28125
stackv2
from metaprogramming.descriptor1 import Descriptor from metaprogramming.descriptor3 import * class PositiveHundred(Positive, HundredWon): pass # 시리즈 클래스를 조금 수정해 봅시다. class SeriesProduct: title = ReadOnly("title") cost_per_page = PositiveHundred("cost_per_page") is_waitfree = Boolean("is_waitfree") ...
36
18.17
52
10
206
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_72cb858a4d73ebc9_1427305f", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
1
true
[ "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 24 ]
[ 24 ]
[ 1 ]
[ 15 ]
[ "" ]
[ "Is \"is_waitfree\" a function or an attribute? If it is a function, you may have meant sp.is_waitfree() because sp.is_waitfree is always true." ]
[ 5 ]
[ "" ]
[ "" ]
descriptor4.py
/metaprogramming/descriptor4.py
wapj/pyconkr2019tutorial
Apache-2.0
2024-11-18T19:14:39.528065+00:00
1,631,279,892,000
99c3648a91f18f70c629d80a77113c11e97c7ffa
3
{ "blob_id": "99c3648a91f18f70c629d80a77113c11e97c7ffa", "branch_name": "refs/heads/main", "committer_date": 1631279892000, "content_id": "d829fbd37d124253a6456fb9d8f0be0a55df2198", "detected_licenses": [ "MIT" ], "directory_id": "25d6a52ba4162c6a67df7715a09d05406bd036fe", "extension": "py", "file...
3.328125
stackv2
# coding=UTF-8 """ MF XSD Extractor Extracts documented restrictions from XSD files created by Polish Ministry of Finance. Currently (Jul 2021) valid link to the mentioned XSD files: https://www.podatki.gov.pl/e-deklaracje/dokumentacja-it/struktury-dokumentow-xml/ Use case: If you need e.g. list of tax offices with ...
259
34.95
112
18
1,866
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_2ca41a44baf4c249_60694948", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
2
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 49, 73 ]
[ 49, 73 ]
[ 1, 16 ]
[ 35, 35 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The native Python `xml` library is vulnerable to XML Exter...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
xsd_extractor.py
/jpk_v7m/external_tools/mf_xsd_extractor/xsd_extractor.py
Semiranis/jpk_v7m
MIT
2024-11-18T19:14:40.437627+00:00
1,478,003,476,000
eed5e359cad76c19169310d00a34c07e98179d7c
3
{ "blob_id": "eed5e359cad76c19169310d00a34c07e98179d7c", "branch_name": "refs/heads/master", "committer_date": 1478003476000, "content_id": "118a45708b5051674569c57a39aa21a7265ba43b", "detected_licenses": [ "MIT" ], "directory_id": "bb9dbab39dcc423bec6a42654d1f3d58eee7c26e", "extension": "py", "fi...
3.25
stackv2
# UID.py """Dicom Unique identifiers""" # Copyright (c) 2008 Darcy Mason # This file is part of pydicom, released under a modified MIT license. # See the file license.txt included with this distribution, also # available at http://pydicom.googlecode.com import os import uuid import datetime from math import fabs...
192
34.35
120
16
1,864
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_8c71237bc14e68d0_de287275", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
14
true
[ "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainability.is-function-without-parentheses", "rules.python.lang.maintainabili...
[ "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 67, 70, 73, 74, 76, 77, 78, 83, 85, 86, 88, 89, 93 ]
[ 67, 70, 73, 74, 76, 77, 78, 83, 85, 86, 88, 89, 93 ]
[ 13, 35, 9, 12, 13, 13, 13, 17, 17, 17, 17, 17, 17 ]
[ 28, 50, 32, 35, 32, 34, 29, 36, 36, 38, 33, 36, 36 ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "Is \"is_retired\" a function or an attribute? If it is a function, you may have meant self.is_retired() because self.is_retired is always true.", "Is \"is_retired\" a function or an attribute? If it is a function, you may have meant self.is_retired() because self.is_retired is always true.", "Is \"is_transfer_...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "" ]
[ "", "", "", "", "", "", "", "", "", "", "", "", "" ]
UID.py
/pydicom-0.9.9/dicom/UID.py
FNNDSC/dmd2b_web
MIT
2024-11-18T19:14:41.362096+00:00
1,332,751,840,000
d4bd5cc67bb3199b9f67ea5727fbd18e9faea73b
2
{ "blob_id": "d4bd5cc67bb3199b9f67ea5727fbd18e9faea73b", "branch_name": "refs/heads/master", "committer_date": 1332751840000, "content_id": "65586b237e22de7e3529d790711f53f6abf4f1e8", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f242dae1ccd2e901e3ba4ef9fdcf9a9666d69d26", "extension": "py"...
2.484375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009 Facebook. # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 Google, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
73
29.12
87
12
540
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_1166d0cc4017efab_01d4662c", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se...
1
true
[ "" ]
[ "rules.python.lang.maintainability.return-not-in-function" ]
[ "maintainability" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 38 ]
[ 38 ]
[ 26 ]
[ 56 ]
[ "" ]
[ "`return` only makes sense inside a function" ]
[ 5 ]
[ "" ]
[ "" ]
json.py
/mom/codec/json.py
confessin/mom
Apache-2.0
2024-11-18T19:14:43.015892+00:00
1,679,251,903,000
c5cd0ac0af38ac5b954b43ec81a7dccbd2a04bdd
2
{ "blob_id": "c5cd0ac0af38ac5b954b43ec81a7dccbd2a04bdd", "branch_name": "refs/heads/master", "committer_date": 1679251903000, "content_id": "541caf6f079ed79c99e31993c98abd0eb90757cd", "detected_licenses": [ "Apache-2.0" ], "directory_id": "995cb3a14ea2fee05b3afd06413f0eb65d065296", "extension": "py"...
2.390625
stackv2
#!/usr/bin/env python import os import sys from multiprocessing import cpu_count from getpass import getpass # check python version if sys.version_info[0] != 3: print("") print("========================================================================") print("|BioQueue requires Python 3.x ...
305
36.26
112
21
2,407
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_a3ea2cbed9cfa3c0_3f47ed55", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
15
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-c...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 70, 92, 284, 285, 293, 301 ]
[ 70, 92, 284, 285, 293, 301 ]
[ 8, 8, 5, 5, 5, 5 ]
[ 30, 44, 71, 56, 78, 64 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
install.py
/install.py
liyao001/BioQueue
Apache-2.0
2024-11-18T19:14:44.746390+00:00
1,423,571,230,000
3035dc247a42fee46c4df1bb61067ea20871e7b4
2
{ "blob_id": "3035dc247a42fee46c4df1bb61067ea20871e7b4", "branch_name": "refs/heads/master", "committer_date": 1423571230000, "content_id": "db1cdb670f73ce3d5ca874afdc9c6097bbbab360", "detected_licenses": [ "MIT" ], "directory_id": "c3a50274e2eb1263271d38d1b5fa08e8c10ca06e", "extension": "py", "fi...
2.453125
stackv2
#!/usr/bin/env python # # Plot sentence bleu for APE experiments # from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt import pandas import subprocess import moses import tune_test def get_sentence_bleu(ref_file, hyp_file): sbleu_bin = moses.bin_dir + "/sentence-bleu" sbleu_scor...
96
30.43
103
20
900
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b75bf56af5b79854_b774226c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
6
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 18 ]
[ 18 ]
[ 10 ]
[ 95 ]
[ "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" ]
sbleu.py
/code/sbleu.py
accept-project/automatic-post-editing
MIT
2024-11-18T19:14:45.078458+00:00
1,527,361,353,000
a2d8554eaec72c63f257b06d4fa2f8a4e1448204
4
{ "blob_id": "a2d8554eaec72c63f257b06d4fa2f8a4e1448204", "branch_name": "refs/heads/master", "committer_date": 1527361353000, "content_id": "f9eb95ac6bf2a85027181c240535e6f984640c8f", "detected_licenses": [ "MIT" ], "directory_id": "94f180b4b0b0a699d6948fd5e1216d16d6735edc", "extension": "py", "fi...
3.734375
stackv2
# 785. Is Graph Bipartite? # ttungl@gmail.com # Given a graph, return true if and only if it is bipartite. # Recall that a graph is bipartite if we can split it's set of nodes # into two independent subsets A and B such that every edge in the # graph has one node in A and another node in B. # The graph is given in...
86
27.14
78
17
666
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.code-after-unconditional-return_fb90f69202c456e1_653c8a7e", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.code-after-unconditional-return", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "code...
2
true
[ "", "" ]
[ "rules.python.lang.maintainability.code-after-unconditional-return", "rules.python.lang.maintainability.code-after-unconditional-return" ]
[ "maintainability", "maintainability" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 53, 63 ]
[ 61, 74 ]
[ 9, 9 ]
[ 67, 24 ]
[ "", "" ]
[ "code after return statement will not be executed", "code after return statement will not be executed" ]
[ 5, 5 ]
[ "", "" ]
[ "", "" ]
Is Graph Bipartite? 785.py
/source-code/Is Graph Bipartite? 785.py
ttungl/Coding-Interview-Challenge
MIT
2024-11-18T19:14:45.189682+00:00
1,561,639,946,000
6fd6c58fb6890b60b1f32a3faa87a7c82ed91d4d
3
{ "blob_id": "6fd6c58fb6890b60b1f32a3faa87a7c82ed91d4d", "branch_name": "refs/heads/master", "committer_date": 1561639946000, "content_id": "276b1be3f536291753d55bb68785f5c0e97b09f4", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9f4de388674d2d5251bf234706539a2dd1b01fde", "extension": "py"...
2.765625
stackv2
#!/usr/bin/python3.6 ''' Detects non-landmark images. ''' import os import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt from PIL import Image from cv2 import resize from tqdm import tqdm # Placeholders for predictions p0, p1, p2 = [], [], [] # Places365 Model topn = 5 all_images ...
128
27.78
135
14
1,023
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_524392561a0f1b96_7c2b7301", "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" ]
[ 59, 63 ]
[ 59, 63 ]
[ 9, 16 ]
[ 33, 30 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
non_landmark_detector.py
/non_landmark_detector.py
artyompal/google_landmark_2019
Apache-2.0