added
stringdate
2024-11-18 17:59:49
2024-11-19 03:44:43
created
int64
126B
1,694B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.09
source
stringclasses
1 value
text
stringlengths
257
22.3k
num_lines
int64
16
648
avg_line_length
float64
15
61
max_line_length
int64
31
179
ast_depth
int64
8
40
length
int64
101
3.8k
lang
stringclasses
1 value
sast_semgrep_findings
stringlengths
1.56k
349k
sast_semgrep_findings_count
int64
1
162
sast_semgrep_success
bool
1 class
sast_semgrep_error
stringclasses
1 value
cwe_ids
listlengths
1
162
rule_ids
listlengths
1
162
subcategories
listlengths
1
162
confidences
listlengths
1
162
severities
listlengths
1
162
line_starts
listlengths
1
162
line_ends
listlengths
1
162
column_starts
listlengths
1
162
column_ends
listlengths
1
162
owasp_categories
listlengths
1
162
messages
listlengths
1
162
cvss_scores
listlengths
1
162
likelihoods
listlengths
1
162
impacts
listlengths
1
162
filename
stringlengths
4
105
path
stringlengths
5
372
repo_name
stringlengths
5
115
license
stringclasses
385 values
2024-11-19T01:55:00.908849+00:00
1,654,701,094,000
a24836ac334db3e7b5b302515bd9e949c5a08cb0
3
{ "blob_id": "a24836ac334db3e7b5b302515bd9e949c5a08cb0", "branch_name": "refs/heads/master", "committer_date": 1654701094000, "content_id": "39a920564b5beb94766c7286ec106fecbb4b0fb9", "detected_licenses": [ "MIT" ], "directory_id": "fd00c22c5abbf2f213ef0840a33b68fab7ad3ad0", "extension": "py", "fi...
3.25
stackv2
import random from place import PlaceInfo from datetime import datetime, timedelta class Encounter: locErr = 0.00005 @staticmethod def modify(latOrLon): return latOrLon + (random.random() * Encounter.locErr) - Encounter.locErr / 2 @staticmethod def getTableIndices(): return {"pid...
223
38.87
112
18
1,973
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_973c26327177eb1e_366cfac9", "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" ]
[ 47, 47 ]
[ 47, 47 ]
[ 13, 13 ]
[ 29, 29 ]
[ "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" ]
encounter.py
/contact-tracing-demo/src/prox/encounter.py
diffix/coronaVirus
MIT
2024-11-19T02:00:44.425344+00:00
1,579,512,167,000
63f08ff607b7b3a20c05f89885640e0fa0202e1f
3
{ "blob_id": "63f08ff607b7b3a20c05f89885640e0fa0202e1f", "branch_name": "refs/heads/master", "committer_date": 1579512167000, "content_id": "6b41ccb5a8e679405123b7f10bd34e9eb06281c5", "detected_licenses": [ "MIT" ], "directory_id": "239a65f4a998c90a8f6952f2858b32eba6759976", "extension": "py", "fi...
2.796875
stackv2
# USAGE # python recognize.py --images ../testing_lp_dataset --char-classifier output/adv_char.cpickle \ # --digit-classifier output/adv_digit.cpickle # import the necessary packages from __future__ import print_function from imagesearch.license_plate import LicensePlateDetector from imagesearch.descriptors import Blo...
87
32.39
96
16
800
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8b774c8e7d2ecc7d_5eb02dc4", "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" ]
[ 27, 28 ]
[ 27, 28 ]
[ 13, 14 ]
[ 69, 71 ]
[ "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" ]
recognize.py
/recognize.py
Robopreneur/alpr-basic-model
MIT
2024-11-19T02:00:47.224970+00:00
1,526,378,378,000
1a69312716a563d70a2100a062ab3df6c97d5ace
3
{ "blob_id": "1a69312716a563d70a2100a062ab3df6c97d5ace", "branch_name": "refs/heads/master", "committer_date": 1526378378000, "content_id": "b35123ff97502e926e73b86576ab3202038ab6ac", "detected_licenses": [ "MIT" ], "directory_id": "3f72a6d8303d7ea05a1d09988bb8315c4c3e2acb", "extension": "py", "fi...
2.65625
stackv2
import os from flask import Flask, request from slackclient import SlackClient client_id = os.environ["SLACK_CLIENT_ID"] client_secret = os.environ["SLACK_CLIENT_SECRET"] oauth_scope = os.environ["SLACK_BOT_SCOPE"] app = Flask(__name__) @app.route("/begin_auth", methods=["GET"]) def pre_install(): return ''' ...
50
27.3
91
11
345
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.directly-returned-format-string_ccbd7127d1daf174_b0c38255", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.directly-returned-format-string", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected Fl...
3
true
[ "CWE-79", "CWE-79", "CWE-79" ]
[ "rules.python.flask.security.audit.directly-returned-format-string", "rules.python.django.security.injection.raw-html-format", "rules.python.flask.security.injection.raw-html-format" ]
[ "security", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 50, 50, 50 ]
[ 50, 50, 50 ]
[ 5, 12, 12 ]
[ 77, 77, 77 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected Flask route directly returning a formatted string. This is subject to cross-site scripting if user input can reach the string. Consider using the template engine instead and rendering pages with 'render_template()'.", "Detected user input flowing into a manually constructed HTML string. You may be accid...
[ 5, 5, 5 ]
[ "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
oauth.py
/slack/oauth.py
serra/impact-spheres-drive-monitor
MIT
2024-11-19T02:00:57.017387+00:00
1,688,492,158,000
6f6907df401198be27090e5107b385b5f07d5670
3
{ "blob_id": "6f6907df401198be27090e5107b385b5f07d5670", "branch_name": "refs/heads/master", "committer_date": 1688492158000, "content_id": "8ca6298eedca2ce4f62306d03fe86a194c25e5b8", "detected_licenses": [ "MIT" ], "directory_id": "be219409da32ddf657c375e90f80df42ae39d511", "extension": "py", "fi...
2.625
stackv2
from mutagen import id3, mp3, aiff, flac, mp4 from urllib.request import urlopen from PIL import Image import io import os import subprocess import json # Exceptions class FileFormatError(Exception): """ ファイルフォーマットのエラー """ pass class URLOpenError(Exception): """ URLを開けなかった場合に発生するエラー """ pass class ...
449
26.69
87
17
3,483
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-range_59928e2632b0175f_cb9f6dbb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.pass-body-range", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "`pass` is the body of for artwork in artwo...
12
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 421, 421 ]
[ 421, 421 ]
[ 13, 44 ]
[ 49, 48 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
audiofile.py
/audiofile.py
Massu0921/FreeDLHelper
MIT
2024-11-19T02:00:57.714345+00:00
1,676,139,610,000
334ce55d86cd02a9c7863f5b083abd3acf5b72ee
3
{ "blob_id": "334ce55d86cd02a9c7863f5b083abd3acf5b72ee", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "253284b047db2f100cdc0f93f9bf745ef14e8e66", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
2.78125
stackv2
#! /usr/bin/python import os import sys import urllib2 import re import sqlite3 def get_mac_table_file(filename="oui.txt"): request = urllib2.urlopen("http://standards.ieee.org/develop/regauth/oui/oui.txt") with open(filename, "w") as f: for line in request: f.write(line) def parse_mac_table_file(filename="oui...
52
25.67
103
18
397
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ef82456de78aee7b_88e5abd7", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 38 ]
[ 38 ]
[ 4 ]
[ 22 ]
[ "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
snippet.py
/dockerized-gists/8194159/snippet.py
gistable/gistable
MIT
2024-11-19T02:00:59.229127+00:00
1,615,490,498,000
83e1c19d9a50006970c9119b98af710be25ac207
3
{ "blob_id": "83e1c19d9a50006970c9119b98af710be25ac207", "branch_name": "refs/heads/main", "committer_date": 1615490498000, "content_id": "6de08da4a71e1a7848415b6568f18236dcba4842", "detected_licenses": [ "MIT" ], "directory_id": "e057718b2e7e2c994edb9d54d337eb069505ba08", "extension": "py", "file...
2.703125
stackv2
import pandas as pd import argparse import pymysql import numpy as np import utils.db_access as db_acc from utils.db_query import encode_if_necessary, get_dbs import constants pymysql.converters.encoders[np.int64] = pymysql.converters.escape_int pymysql.converters.conversions = pymysql.converters.encoders.copy() pymy...
136
36.34
143
16
1,120
python
[{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_4e14ce2b671a03c5_c49af8fd", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.use-sys-exit", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected use of `exit`. Use `sys.exit` over the python...
2
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 79 ]
[ 79 ]
[ 17 ]
[ 48 ]
[ "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
db_script.py
/db_script.py
bigdatasciencegroup/abstract-wikipedia-data-science
MIT
2024-11-19T00:04:17.933752+00:00
1,563,350,350,000
287f035cd3e9c935623c44aecf2fab9f6340afd0
3
{ "blob_id": "287f035cd3e9c935623c44aecf2fab9f6340afd0", "branch_name": "refs/heads/master", "committer_date": 1563350350000, "content_id": "11d888c19dcd8dcf29030db7595039f14ee2c7db", "detected_licenses": [ "MIT" ], "directory_id": "bdb6e39a33bacf36ef727d7bc196958c2232faea", "extension": "py", "fi...
2.96875
stackv2
import argparse import codecs from collections import defaultdict import logging import os import shutil import subprocess import yaml __author__ = 'avijitv@uw.edu' def split_text(data_file_path, config, handle_oov=True): """ Reads source text and splits into train / test / val sets. Reads a given source fi...
215
45.53
121
22
2,090
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7a148cf2ed48334f_ffa051f1", "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" ]
[ 149 ]
[ 153 ]
[ 16 ]
[ 78 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
dataset_preparation.py
/dataset_preparation.py
zhengzheng-yay/language_modelling
MIT
2024-11-19T00:04:23.200605+00:00
1,649,006,587,000
edd25aff2bcaf54a86bc36e36d5ac2cae37f7052
2
{ "blob_id": "edd25aff2bcaf54a86bc36e36d5ac2cae37f7052", "branch_name": "refs/heads/master", "committer_date": 1649006587000, "content_id": "aa4ae7de4e3d68aae757c6128c1b9b46b20d0080", "detected_licenses": [ "MIT" ], "directory_id": "3bfb9791e15f30a058a51067e30fc66d5985f0a3", "extension": "py", "fi...
2.375
stackv2
import sublime import subprocess from ...anf_util import * # The Code to find git path is copied verbatim from kemayo's Git plugin. # https://github.com/kemayo/sublime-text-git def _test_paths_for_executable(paths, test_file): for directory in paths: file_path = os.path.join(directory, test_file) ...
67
30.75
80
18
497
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7748dbf6b546350f_67cab067", "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" ]
[ 67 ]
[ 67 ]
[ 16 ]
[ 71 ]
[ "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" ]
git_command_base.py
/Backup/20140126112523/AdvancedNewFile/advanced_new_file/commands/git/git_command_base.py
doncisco/sublime-text-2-settings
MIT
2024-11-19T00:04:31.753633+00:00
1,661,216,955,000
485c12550be84fecf1d0480de2e04ec352127504
3
{ "blob_id": "485c12550be84fecf1d0480de2e04ec352127504", "branch_name": "refs/heads/master", "committer_date": 1661216955000, "content_id": "d80e2853b8c7fe9a60349219c371c3a872e66632", "detected_licenses": [ "MIT" ], "directory_id": "27a274812de60e8451cf1e29ddaa17e3a763d0ee", "extension": "py", "fi...
2.5625
stackv2
#!/usr/bin/env python3 import getpass import subprocess import os, re, socket from os.path import join """ Setup Charlesreid1.com Sudo Tasks #krash This sets up the directory structure for various charlesreid1 domains and their static content. Each domain has a folder under `/www`: /www/ example.blue ...
100
27.27
113
13
686
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_9c93424ca5a8739d_fc74f53a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
6
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 76, 82, 94 ]
[ 76, 82, 94 ]
[ 13, 9, 13 ]
[ 38, 34, 56 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functi...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
sudo_setup_www.py
/tasks/deployment/sudo_setup_www.py
charlesreid1/debian-dotfiles
MIT
2024-11-19T00:04:32.448718+00:00
1,610,446,223,000
f634a6e79113e0834a13e562915674a10649ee5a
2
{ "blob_id": "f634a6e79113e0834a13e562915674a10649ee5a", "branch_name": "refs/heads/main", "committer_date": 1610446223000, "content_id": "0652ce5d052b8fa2bca5d70334291d8f001fbefb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "451cfb628b9aef14943b71771035fde2960f0e39", "extension": "py", ...
2.375
stackv2
from warcio.archiveiterator import ArchiveIterator from warcio.warcwriter import WARCWriter from warcio.exceptions import ArchiveLoadFailed import os import string import random import click import argparse import datetime from bsddb3 import db import time exit_value = 0 def random_id_generator(size=10, chars=string....
188
43.15
145
31
1,715
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_46fb15815ba621e2_7de85510", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
3
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 103, 131, 157 ]
[ 103, 131, 157 ]
[ 21, 25, 21 ]
[ 83, 131, 98 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
Generate_New_WARCs.py
/Generate_New_WARCs.py
arquivo/Generate-new-WARCs
Apache-2.0
2024-11-19T00:04:32.979129+00:00
1,518,212,144,000
4e94846fc28952dc87398f5b8b6366c78619683c
3
{ "blob_id": "4e94846fc28952dc87398f5b8b6366c78619683c", "branch_name": "refs/heads/master", "committer_date": 1518212144000, "content_id": "fd3600aa5004c01a97a1fa0984d6589bbebf0693", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7a239875dc9147377c68403e33ce234448b3b443", "extension": "py"...
3
stackv2
import os import subprocess import logging logger = logging.getLogger(__name__) def execute_wait (cmd, walltime): ''' ***DEPRECATED*** Synchronously execute a commandline string on the shell. Args: - cmd (string) : Commandline string to execute - walltime (int) : walltime in seconds, t...
82
26.89
118
13
554
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_cfa738a825ba9e26_247c721b", "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", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 28, 28, 60, 60 ]
[ 28, 28, 60, 60 ]
[ 16, 92, 16, 92 ]
[ 119, 96, 119, 96 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW" ]
exec_utils.py
/libsubmit/exec_utils.py
benhg/libsubmit
Apache-2.0
2024-11-19T00:27:15.124486+00:00
1,615,517,929,000
711f066d4e2c5a515071c974270a770d5a09aa94
3
{ "blob_id": "711f066d4e2c5a515071c974270a770d5a09aa94", "branch_name": "refs/heads/main", "committer_date": 1615517929000, "content_id": "25b1aea3e901646f421ec0f6de7c60d2edeead2d", "detected_licenses": [ "MIT" ], "directory_id": "a447588029b00c7e59e23afc221054a9066339dd", "extension": "py", "file...
3.265625
stackv2
import primes import psycopg2 from config import cur,conn def get_last_searched(): cur.execute("Select last_searched from results where schema = 'primes'") rows = cur.fetchone() return int(rows[0]) def insert_prime(n): cur.execute("INSERT INTO primes (prime_number) VALUES ({})".format(n)) conn.co...
36
24.86
90
14
249
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_4f5c31d477e929d8_b1fb4310", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
4
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 11, 11, 15, 15 ]
[ 11, 11, 15, 15 ]
[ 5, 5, 5, 5 ]
[ 75, 75, 91, 91 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
run_primes.py
/primes/run_primes.py
garyhlusko/math
MIT
2024-11-19T00:27:23.569434+00:00
1,631,289,397,000
73672cd8d52efccb5961b4342cec9cf2a3f765b6
2
{ "blob_id": "73672cd8d52efccb5961b4342cec9cf2a3f765b6", "branch_name": "refs/heads/main", "committer_date": 1631289397000, "content_id": "c98f00598e8ea0ca7e98ef2c69c4f0b64f6740ea", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f7cfa370cf3b2a663058d7b5f3169ab8e0bc56cf", "extension": "py", ...
2.40625
stackv2
import tqdm import en_core_web_sm import pandas as pd import numpy as np from pickle import load from tensorflow.keras.preprocessing.text import Tokenizer from tensorflow.keras.preprocessing.sequence import pad_sequences import json class preprocessor: tag_preprocessor = None paragraphs = [] questions = [...
115
46.36
172
21
1,224
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cbb93f20d44100fa_15574cd3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
5
true
[ "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 26, 27, 28 ]
[ 26, 27, 28 ]
[ 31, 25, 25 ]
[ 65, 59, 59 ]
[ "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" ]
preprocessor.py
/preprocessor.py
alavista/SQuAD
Apache-2.0
2024-11-19T00:27:26.704644+00:00
1,402,075,278,000
4af6ef883d496558e9c2c0a1ef7e02cb91f596d9
3
{ "blob_id": "4af6ef883d496558e9c2c0a1ef7e02cb91f596d9", "branch_name": "refs/heads/master", "committer_date": 1402075278000, "content_id": "7d4a50ddaac88192046544882fefc7c4d615a6f8", "detected_licenses": [ "MIT" ], "directory_id": "162a40349d7ce4147b44b2cb807d8f8d1d607826", "extension": "py", "fi...
3.015625
stackv2
# python imports import os # rasmus imports from rasmus import util # compbio imports from . import fasta # NCBI BLASTALL 2.2.10 -m 8 tab-delimited output # Fields: # 0. Query id, # 1. Subject id, # 2. % identity, # 3. alignment length, # 4. mismatches, # 5. gap openings, # 6. q. start, # 7. q. end, # 8. s. start, ...
485
24.6
79
24
3,096
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_88c5184c59b65e92_0abbe370", "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...
7
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "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.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-que...
[ "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 216, 270, 301, 435, 435, 479, 479 ]
[ 217, 271, 302, 437, 437, 485, 485 ]
[ 16, 20, 12, 9, 9, 9, 9 ]
[ 66, 68, 54, 24, 24, 40, 40 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
blast.py
/compbio/blast.py
mdrasmus/compbio
MIT
2024-11-19T00:27:27.383983+00:00
1,624,352,803,000
218311e95d429ae574828b45526a995c4a04542b
2
{ "blob_id": "218311e95d429ae574828b45526a995c4a04542b", "branch_name": "refs/heads/master", "committer_date": 1624352803000, "content_id": "901f6f1534e3f1fc06446a499dc171e3e61f4cf4", "detected_licenses": [ "MIT" ], "directory_id": "6604582636223c3918f2947e50f4ee95598d74ab", "extension": "py", "fi...
2.375
stackv2
from tri.delaunay.inout import output_triangles, output_vertices, output_edges from tri.delaunay.tds import Edge from tri.delaunay.iter import TriangleIterator, FiniteEdgeIterator import logging from grassfire.vectorops import mul, dist, add, unit, norm # --------------------------------------------------------------...
327
40.72
159
23
3,573
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_e8eb23c0c5a1f716_1dddb98b", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
42
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 171 ]
[ 171 ]
[ 5 ]
[ 42 ]
[ "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" ]
inout.py
/src/grassfire/inout.py
bmmeijers/grassfire
MIT
2024-11-19T00:40:14.999539+00:00
1,286,536,982,000
f39fb62b0d5a7057ac2e41cff2bc004ed07ada60
3
{ "blob_id": "f39fb62b0d5a7057ac2e41cff2bc004ed07ada60", "branch_name": "refs/heads/master", "committer_date": 1286536982000, "content_id": "b91aca32ab055fff7f95a56cf58229f8ff41863f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "57272fde28d426824b1aa83a5ebbb37fef1044f1", "extension": "py"...
2.59375
stackv2
from django.db import models from django.contrib.auth.models import User, Group from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class UnknownPermission(Exception): """ An attempt was made to query for a permission that was not registered for that model...
243
31.83
106
15
1,749
python
[{"finding_id": "semgrep_rules.python.django.security.audit.avoid-query-set-extra_74e15a6ba5427c6b_c7116f9b", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-query-set-extra", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "QuerySet.extra' does not provide...
1
true
[ "CWE-89" ]
[ "rules.python.django.security.audit.avoid-query-set-extra" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 20 ]
[ 20 ]
[ 18 ]
[ 80 ]
[ "A01:2017 - Injection" ]
[ "QuerySet.extra' does not provide safeguards against SQL injection and requires very careful use. SQL injection can lead to critical data being stolen by attackers. Instead of using '.extra', use the Django ORM and parameterized queries such as `People.objects.get(name='Bob')`." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
models.py
/objectpermissions/models.py
callowayproject/django-objectpermissions
Apache-2.0
2024-11-19T00:40:21.634471+00:00
1,588,845,608,000
c83d314c2aee2cf97bd9e71a90ca021960616de6
3
{ "blob_id": "c83d314c2aee2cf97bd9e71a90ca021960616de6", "branch_name": "refs/heads/master", "committer_date": 1588845608000, "content_id": "62c7d04c732d9a083abb582d2b517c6e24d484b2", "detected_licenses": [ "MIT" ], "directory_id": "7e583b67f1a3e73d7ed10a63372bcba70c3d4432", "extension": "py", "fi...
2.71875
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Combine two databases into one. Combine two SQLite3 simulation databases after simulation have been run differnt places. Usage: python combine_dbs.py 'sim_database_1.db' 'sim_database_2.db' 'new_name.db' """ # Copyright (C) 2018-2019 Håkon Austlid Taskén <hakon.t...
109
34.82
79
13
918
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_779e0ea95f4dd91c_d04e1bc1", "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...
6
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.p...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 68, 68, 81, 81, 94, 94 ]
[ 69, 69, 82, 82, 95, 95 ]
[ 5, 5, 9, 9, 9, 9 ]
[ 70, 70, 44, 44, 44, 44 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
combine_dbs.py
/sim_db/src_command_line_tool/commands/combine_dbs.py
task123/sim_db
MIT
2024-11-19T00:40:24.984873+00:00
1,561,046,934,000
106cac60acf038fc6bce92a2d36d2229df6ad5ec
3
{ "blob_id": "106cac60acf038fc6bce92a2d36d2229df6ad5ec", "branch_name": "refs/heads/master", "committer_date": 1561046934000, "content_id": "f55fce2255b3bdadab59ac8b9054b8fd171a162b", "detected_licenses": [ "MIT" ], "directory_id": "eab9b8d30ad7f6216c5d6dc956ef84181f775b37", "extension": "py", "fi...
2.59375
stackv2
from tkinter import Tk, Text, Menu, filedialog, Label, Button, END, W, E, FALSE, font from tkinter.scrolledtext import ScrolledText from Interpreter.interpreter import Interpreter import subprocess import sys class Editor(): def __init__(self, root): self.root = root self.file_path = None ...
159
32.31
134
16
1,199
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_3b5fef79b9eeb3fe_0ac93395", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 77, 78 ]
[ 78, 78 ]
[ 13, 36 ]
[ 66, 40 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
editor.py
/src/editor.py
HorizonFTT/Simple-Interpreter
MIT
2024-11-19T00:40:25.029743+00:00
1,386,782,001,000
530f9d87c0db54c7e5aef1bababa59d2f98ae3e9
3
{ "blob_id": "530f9d87c0db54c7e5aef1bababa59d2f98ae3e9", "branch_name": "refs/heads/master", "committer_date": 1386782001000, "content_id": "d4332d1525a962d0568c52decfe9586ff4859200", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b00d9c82103042fe30c4faecd8e36ae6f7d81d8f", "extension": "py"...
2.8125
stackv2
import subprocess import re import os import time import threading class fflock_encoder(threading.Thread): def __init__(self, inpath, outpath, preoptions, codecSettings, encoder, overwrite, extraArgs=" "): """ @rtype : none @param inpath: @param outpath: @param codecSetti...
215
27.07
112
25
1,329
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7dff464b9ba50120_b3e4fdd4", "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" ]
[ 44 ]
[ 44 ]
[ 16 ]
[ 79 ]
[ "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" ]
fflock_encoder.py
/modules/fflock_encoder.py
ericgriffin/fflock
Apache-2.0
2024-11-19T00:40:26.524612+00:00
1,693,322,890,000
179ad712883771eeb8bde5af3e04b6bde5a6b520
2
{ "blob_id": "179ad712883771eeb8bde5af3e04b6bde5a6b520", "branch_name": "refs/heads/master", "committer_date": 1693322890000, "content_id": "87586af4a065cf8aa4fda5e3240bf2e6ef8878fd", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3d7616adfbb2abe385e03189eeff18508941904f", "extension": "py"...
2.328125
stackv2
# TG-UserBot - A modular Telegram UserBot script for Python. # Copyright (C) 2019 Kandarp <https://github.com/kandnub> # # TG-UserBot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Li...
140
35.81
79
29
1,135
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_18e1c69e275bde8c_1a84767f", "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" ]
[ 124 ]
[ 124 ]
[ 5 ]
[ 25 ]
[ "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" ]
meval.py
/userbot/utils/meval.py
jangistar/gban
Apache-2.0
2024-11-19T00:40:28.694468+00:00
1,552,914,187,000
617aa72bc8a85b6d3e02da1ddef56991f6446b39
3
{ "blob_id": "617aa72bc8a85b6d3e02da1ddef56991f6446b39", "branch_name": "refs/heads/master", "committer_date": 1552914187000, "content_id": "9160a518df26f159643d359025aebc10ce7fbb10", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f622eeaf2e2b3fb0a37b17939610aba659b61266", "extension": "py"...
2.859375
stackv2
# This is the file that implements a flask server to do inferences. It's the file that you will modify to # implement the scoring for your own algorithm. from __future__ import print_function import os import json import pickle import StringIO import sys import signal import traceback import flask import pandas as p...
98
32.87
105
16
734
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d7d275948440b32b_cffc462d", "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" ]
[ 33 ]
[ 33 ]
[ 30 ]
[ 46 ]
[ "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" ]
predictor.py
/models/mean_predictor/container/predictor.py
AlexandreRozier/BigDataAnalytics
Apache-2.0
2024-11-19T01:06:08.833529+00:00
1,604,042,708,000
fac74c37a25f0433abe900b0e2acd846ac9a0d79
2
{ "blob_id": "fac74c37a25f0433abe900b0e2acd846ac9a0d79", "branch_name": "refs/heads/main", "committer_date": 1604042708000, "content_id": "b53f52640e11deb61dfc7e42f3b8e2c67477a1e8", "detected_licenses": [ "MIT" ], "directory_id": "0d07ead2c12ded26e870705f611342167dbf946f", "extension": "py", "file...
2.359375
stackv2
import os import string import json import cv2 from datetime import datetime from flask import Flask, request, make_response, jsonify import urllib from urllib.request import urlretrieve from process import ApiExample import ssl ssl._create_default_https_context = ssl._create_unverified_context # Initialize our Fla...
86
32.66
100
19
662
python
[{"finding_id": "semgrep_rules.python.lang.security.unverified-ssl-context_3a9e2e7ffe55d05f_8dc5b35a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.unverified-ssl-context", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Unverified SSL context detected. This will pe...
3
true
[ "CWE-295" ]
[ "rules.python.lang.security.unverified-ssl-context" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 13 ]
[ 13 ]
[ 1 ]
[ 67 ]
[ "A03:2017 - Sensitive Data Exposure" ]
[ "Unverified SSL context detected. This will permit insecure connections without verifying SSL certificates. Use 'ssl.create_default_context' instead." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
api_server.py
/api_server.py
wpf535236337/SFApiExample
MIT
2024-11-19T01:06:09.282287+00:00
1,616,434,617,000
884a10edd3df3b0dbcb03a4d23605c4999e0f459
3
{ "blob_id": "884a10edd3df3b0dbcb03a4d23605c4999e0f459", "branch_name": "refs/heads/master", "committer_date": 1616448164000, "content_id": "8fd89d3006b06ad9866a418b35b2a9bade79a205", "detected_licenses": [ "MIT" ], "directory_id": "475cb11a908a9173d0e262a5429d84e763f52d0f", "extension": "py", "fi...
2.828125
stackv2
"""Utility function for the languages themselves.""" # Core Library modules import csv import glob import os import pickle from collections import Counter from typing import Any, Dict, List, NewType, Optional, cast # Third party modules import click import numpy as np # First party modules import lidtk.utils from li...
357
28.37
89
16
2,639
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_2c34d6ba01900f89_9692f296", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
3
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 209 ]
[ 209 ]
[ 29 ]
[ 48 ]
[ "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" ]
language_utils.py
/lidtk/data/language_utils.py
MartinThoma/lidtk
MIT
2024-11-19T01:06:12.582598+00:00
1,610,596,474,000
d100333e810fb5c9c99456c485af8c8e3e3ba37e
3
{ "blob_id": "d100333e810fb5c9c99456c485af8c8e3e3ba37e", "branch_name": "refs/heads/master", "committer_date": 1610596474000, "content_id": "7a412e8cc154fcff16fd1b1afd605090afb8a541", "detected_licenses": [ "MIT" ], "directory_id": "fd5f4723cd349426642909ad833d130c4bafd3f8", "extension": "py", "fi...
2.859375
stackv2
import random import os from func.question import question from func.file import readJsonFile from func.error import saveError def getExam(path, clear): # 模拟考试(40道单选,10道多选) questionList = readJsonFile(path[0]) examList = [] while len(examList) < 40: flag = random.randint(0, len(questionList) -...
27
30
61
13
236
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_f1fa01edab36b4fe_0cc08cc4", "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" ]
[ 26 ]
[ 26 ]
[ 5 ]
[ 21 ]
[ "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" ]
exam.py
/func/exam.py
amtoaer/Question-test
MIT
2024-11-19T01:06:12.820278+00:00
1,672,636,872,000
2b717d91296cf0d0f81375ab3c9e4b482f5a52f9
2
{ "blob_id": "2b717d91296cf0d0f81375ab3c9e4b482f5a52f9", "branch_name": "refs/heads/master", "committer_date": 1672636872000, "content_id": "fbb4a880bec6af8593cda07c8b54228f38faa3c7", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "26d04f451b65fd1f431ba28265a2527ad114cdc5", "extension": "p...
2.453125
stackv2
import xml.sax from xml.sax.saxutils import XMLFilterBase, XMLGenerator # All hail the monkey patch! # # https://sourceforge.net/tracker/?func=detail&atid=106473&aid=814935&group_id=6473 def resolveEntity(self, publicId, systemId): return self._ent_handler.resolveEntity(publicId, systemId) XMLFilterBase.resolveEn...
142
27.81
83
20
992
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_41b27fa4569d6e83_d084876c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
6
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 1, 2 ]
[ 1, 2 ]
[ 1, 1 ]
[ 15, 57 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The Python documentation recommends using `defusedxml` ins...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
insertSchema.py
/static/projects/atom/insertSchema.py
jcgregorio/blog
BSD-2-Clause
2024-11-19T01:06:14.267118+00:00
1,471,129,990,000
9d4a68ea540a1ea9bb74d774d89360f9134ace26
2
{ "blob_id": "9d4a68ea540a1ea9bb74d774d89360f9134ace26", "branch_name": "refs/heads/master", "committer_date": 1471129990000, "content_id": "2f3058ae8f0f39c5fcfd279aed06400e7d951649", "detected_licenses": [ "MIT" ], "directory_id": "1b53325f6976bd2697f1d9678054b8a1e5dd059c", "extension": "py", "fi...
2.390625
stackv2
import xmltodict # https://github.com/martinblech/xmltodict from cognitiveatlas.api import get_concept from Bio import Entrez from glob import glob import pickle import numpy import pandas import urllib2 import json import time import os import sys base = sys.argv[1] pubmed_folder = "%s/pubmed" %base if not os.path.ex...
183
40.26
111
22
1,884
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_069c24a6b8da4c6c_d9fa3783", "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...
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" ]
[ 160, 183 ]
[ 160, 183 ]
[ 9, 1 ]
[ 51, 73 ]
[ "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" ]
6.pubmed_cogat.py
/preprocess/6.pubmed_cogat.py
vsoch/semantic-image-comparison
MIT
2024-11-19T01:06:15.173496+00:00
1,535,478,906,000
030f3a43235d29f4b2c1d5cb51a319f347cf7560
3
{ "blob_id": "030f3a43235d29f4b2c1d5cb51a319f347cf7560", "branch_name": "refs/heads/master", "committer_date": 1535478906000, "content_id": "f6e1cc0d7567c3544347bd12b46497d52516ebf0", "detected_licenses": [ "MIT" ], "directory_id": "7da5a826f33454967a2ee9b2ecdbd7e406d3ebe3", "extension": "py", "fi...
2.796875
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import generateLaunch, logger, os, sys cf_logger = logger.get_logger(__name__) # debug(), info(), warning(), error(), exception(), critical() LAUNCH_FOLDER = "../launch" LAUNCH_FILE = "crazy_game.launch" LAUNCH_PATH = "{}/{}".format(LAUNCH_FOLDER, LAUNCH_FILE) INVENTORY_FI...
47
39.19
102
16
513
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_db83edaeb844b57e_174cdba7", "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-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 40 ]
[ 40 ]
[ 3 ]
[ 63 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
main.py
/crazyflie_demo/scripts/main.py
xqgex/CrazyFlie_ros
MIT
2024-11-19T01:06:18.680693+00:00
1,614,897,514,000
7bc80a0ddca8910580c98c0db4a6e6ed40a4da2d
3
{ "blob_id": "7bc80a0ddca8910580c98c0db4a6e6ed40a4da2d", "branch_name": "refs/heads/master", "committer_date": 1614897514000, "content_id": "a5f849d8763463c2b66ce9422b90cae7d5d2c61e", "detected_licenses": [ "MIT" ], "directory_id": "87be7baae897ecd356739577af4a1c7c5628b7f8", "extension": "py", "fi...
3.296875
stackv2
'''Adds a new project to the repository''' def get_repository_root(): '''Get repository root based on this file's path Return: repository root (pathlib.Path) ''' from pathlib import Path return ( Path(__file__) # ?/add_new_project.py .resolve() # root/src/yadsl/ad...
340
30.08
97
18
2,527
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2f8b0e8740783b99_b4a333da", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
6
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 179, 266 ]
[ 179, 266 ]
[ 19, 24 ]
[ 41, 39 ]
[ "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" ]
add_new_project.py
/src/yadsl/add_new_project.py
guidanoli/yadsl
MIT
2024-11-19T01:17:10.086632+00:00
1,286,976,128,000
e48687b8d3ffb779d6c109812ff56c7e4d3cd2df
3
{ "blob_id": "e48687b8d3ffb779d6c109812ff56c7e4d3cd2df", "branch_name": "refs/heads/master", "committer_date": 1286976128000, "content_id": "474d814d334016cba18daf9a7604997936e2e6cd", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "fb9d5e8f7cd7e8d92c766052439509c85dc07c98", "extension": "p...
2.5625
stackv2
# rxmain.py #print "rxmain.................................." import gc import time import sys from threading import Thread # python imports import rxactor import rxworld import rxeventmanager import rxevent import rxworldinfo # Global variables globals()["MainScriptThread"] = None globals()["MyWorld"] = None globa...
201
30.45
108
17
1,436
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_3b5d863a86039f4b_fd742762", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi...
2
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.exec-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 163 ]
[ 163 ]
[ 9 ]
[ 26 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
rxmain.py
/ModularRex/ScriptEngines/PythonScript/RXCore/rxmain.py
mattire/ModreX
BSD-3-Clause
2024-11-19T01:17:13.385090+00:00
1,501,989,502,000
1d1c6eeba106faf88141f0c53ecfb9ab9c3dc659
3
{ "blob_id": "1d1c6eeba106faf88141f0c53ecfb9ab9c3dc659", "branch_name": "refs/heads/master", "committer_date": 1501989502000, "content_id": "c9364e70cb681e87955690dd766bf89ba137f46e", "detected_licenses": [ "MIT" ], "directory_id": "e1432fa4f1f8d0ab929b3bdd904d07d029221366", "extension": "py", "fi...
2.546875
stackv2
from pyspark.mllib.recommendation import * from pyspark.sql import SQLContext from pyspark.sql.types import * import pandas as pd def eval(model, al, train, valid, rank): from pyspark.mllib.recommendation import * from pyspark.sql import SQLContext from pyspark.sql.types import * import pandas as pd ...
103
40.78
142
19
1,213
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_2d9d2cc7c00e7555_d6896044", "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" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 42 ]
[ 42 ]
[ 17 ]
[ 67 ]
[ "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" ]
dumbo1.py
/3.Model/dumbo1.py
djfan/accelerando
MIT
2024-11-19T01:17:26.683947+00:00
1,528,812,229,000
636ad4e1b502fe6e28a63a42f960900453b59fc1
2
{ "blob_id": "636ad4e1b502fe6e28a63a42f960900453b59fc1", "branch_name": "refs/heads/master", "committer_date": 1528812229000, "content_id": "80ba3f664e8f90ea6099b84794265722e6d9ebb3", "detected_licenses": [ "MIT" ], "directory_id": "6c38aaa4d52dbb50ed48e787aa527bd048144cc2", "extension": "py", "fi...
2.390625
stackv2
from threading import Thread from flask import current_app, render_template from flask_mail import Message import time from . import mail def send_async_email(app, msg): with app.app_context(): try: mail.send(msg) # 有些网站把连接很短的请求当作恶意访问 except Exception as e: app....
27
30.78
101
15
205
python
[{"finding_id": "semgrep_rules.python.flask.security.unescaped-template-extension_898a2083881381df_1108a3da", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.unescaped-template-extension", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Flask does not automatically esc...
1
true
[ "CWE-79" ]
[ "rules.python.flask.security.unescaped-template-extension" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 23 ]
[ 23 ]
[ 16 ]
[ 60 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Flask does not automatically escape Jinja templates unless they have .html, .htm, .xml, or .xhtml extensions. This could lead to XSS attacks. Use .html, .htm, .xml, or .xhtml for your template extensions. See https://flask.palletsprojects.com/en/1.1.x/templating/#jinja-setup for more information." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
email.py
/app/email.py
yearnxyz/yearn_site
MIT
2024-11-19T01:17:28.636045+00:00
1,574,356,402,000
3ab5f5485bf8a630fe3d1dcbdf18f581142dfc5f
3
{ "blob_id": "3ab5f5485bf8a630fe3d1dcbdf18f581142dfc5f", "branch_name": "refs/heads/master", "committer_date": 1574356402000, "content_id": "36b065be3baf561f70c6b423d1b46cfe30e1f7f1", "detected_licenses": [ "MIT" ], "directory_id": "109dcbf7c156a72b3b9e4ba0a2929232ad0227b0", "extension": "py", "fi...
2.828125
stackv2
## função para pegar os limites de um determinado grupo def exec(cursor,line,grupo): select = "" select = select + " SELECT r0 " select = select + " FROM principal " select = select + " where r0 between " + str(line) + " and " + str(line + 100) + " and r1 = \"" + grupo + "\" order by r0 " tem...
16
27.94
128
14
135
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_a6ab03933496dd7b_a3a777fb", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
1
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 9 ]
[ 9 ]
[ 12 ]
[ 34 ]
[ "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
takeLimit.py
/sped_correcao/_old/takeLimit.py
teocrono/scripts
MIT
2024-11-19T01:17:32.775713+00:00
1,651,462,641,000
2cfb534de72b023b4589d454ebd88d8c364a6d02
2
{ "blob_id": "2cfb534de72b023b4589d454ebd88d8c364a6d02", "branch_name": "refs/heads/master", "committer_date": 1651462641000, "content_id": "f08c77598e504c17813987e3b4bae7811e1be977", "detected_licenses": [ "MIT" ], "directory_id": "bd98f59aaaaf6e2856b5ee0a2f7e13f150c77308", "extension": "py", "fi...
2.328125
stackv2
#!/usr/bin/env python # coding=utf-8 import os import re import sys import subprocess reload(sys) sys.setdefaultencoding('utf8') CAMMAND_PULL_TARGET_BRANCE = "git pull" #rebase拉代码 CAMMAND_CHECKOUT_DOT = "git checkout ." #丢弃所有修改 def main(): updatejob() def updatejob(): print "开始检查升级" #记录当前路径 currentPath = ...
57
17.56
61
12
317
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.code-after-unconditional-return_2833d9f3ea98bf25_b27e93e8", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.code-after-unconditional-return", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "code...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 46 ]
[ 46 ]
[ 10 ]
[ 54 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
update.py
/update.py
spWang/push
MIT
2024-11-19T01:17:58.349176+00:00
1,316,950,717,000
85e49ee919114f3eff7150e879d411ca75416483
3
{ "blob_id": "85e49ee919114f3eff7150e879d411ca75416483", "branch_name": "refs/heads/master", "committer_date": 1316950770000, "content_id": "2ad5256f4b16019ecc134f71217a8266256f73da", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "f13b3dcf755d803cb092605d0dc0acfd3a1961a8", "extension": "p...
2.765625
stackv2
import os from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cacheops.simple import file_cache class Command(BaseCommand): help = 'Clean filebased cache' def handle(self, **options): self.ver...
22
36.5
90
12
184
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_57e6d6995aa927eb_6a906e60", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 22 ]
[ 22 ]
[ 9 ]
[ 80 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
cleanfilecache.py
/cacheops/management/commands/cleanfilecache.py
MechanisM/django-cacheops
BSD-3-Clause
2024-11-19T01:17:58.950856+00:00
1,406,252,754,000
37d9a34e80c629f08a1d7a590347f47d21ec8e21
3
{ "blob_id": "37d9a34e80c629f08a1d7a590347f47d21ec8e21", "branch_name": "refs/heads/master", "committer_date": 1406252754000, "content_id": "cf7e34e9ec3c44be002765cdabee163fb6b74680", "detected_licenses": [ "MIT" ], "directory_id": "d6ed622849249032c3b6ae22de625e4a49925786", "extension": "py", "fi...
3.140625
stackv2
#!/usr/bin/env python """osm-notes.py : Uses the OpenStreetMap Notes API to Search for Notes that came from Craigslist and writes data to a CSV file""" __author__ = "dalek2point3" __copyright__ = "MIT" import urllib2 from xml.dom import minidom def get_data(url, fname): with open(fname, "wb") as f: ...
64
25.17
129
15
439
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_2090db4a4a9f4cdb_47b69937", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 9 ]
[ 9 ]
[ 1 ]
[ 28 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
osm-notes.py
/python/osm-notes/osm-notes.py
dalek2point3/jmpscripts
MIT
2024-11-19T01:18:08.641729+00:00
1,424,054,758,000
39ab1945d1cecf8b8c8a31456315471ba67d7095
3
{ "blob_id": "39ab1945d1cecf8b8c8a31456315471ba67d7095", "branch_name": "refs/heads/master", "committer_date": 1424054758000, "content_id": "6ec970d3acbe5bab4439a62b5729b68b399d3f47", "detected_licenses": [ "MIT" ], "directory_id": "a5e9c6df0b10ec5b3d0242d4564460f9dbd55646", "extension": "py", "fi...
2.90625
stackv2
""" Simulation task =============== This module contains the class definition for simulation tasks. """ import collections import itertools import os import os.path import subprocess import math import numpy as np import yaml import pystache from .dumpres import dump_res_to_file from .utils import ensure_list_of_...
471
34.14
79
23
3,231
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_433923cddceb3a6a_e9881a45", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
6
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 272, 272 ]
[ 272, 272 ]
[ 23, 58 ]
[ 63, 62 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
simultask.py
/GCMCbyGULP/simultask.py
WRao96/GCMCbyGULP
MIT
2024-11-19T01:15:16.766775+00:00
1,635,911,783,000
b4e0f12ff8dce8b453b9a38ed0c9a395ffe97308
2
{ "blob_id": "b4e0f12ff8dce8b453b9a38ed0c9a395ffe97308", "branch_name": "refs/heads/master", "committer_date": 1635911783000, "content_id": "3af062ec6664a36bfe5f9a9431bd940e5aa92ffb", "detected_licenses": [ "MIT" ], "directory_id": "ce19e17bf5e50f26a29d497c1b8c742be359539a", "extension": "py", "fi...
2.5
stackv2
import os import time import socket import requests import base64 import yaml from datetime import datetime, timedelta from flask import Flask, request, g, render_template, jsonify, Response app = Flask(__name__) app.config.from_object(__name__) # load config from this file , flaskr.py config = None with open(os.ge...
95
26.21
84
17
583
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_71858e96cac47353_62fb6097", "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-918" ]
[ "rules.python.flask.security.injection.tainted-url-host" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 90 ]
[ 90 ]
[ 30 ]
[ 76 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "User data flows into the host portion of this manually-constructed URL. This could allow an attacker to send data to their own server, potentially exposing sensitive data such as cookies or authorization information sent with this request. They could also probe internal servers or other resources that the server r...
[ 5 ]
[ "MEDIUM" ]
[ "MEDIUM" ]
chaac_server.py
/sw/chaac_server/src/chaac_server.py
alvarop/chaac
MIT
2024-11-19T01:15:16.833519+00:00
1,557,119,336,000
742798e38b4da83f43d801f02cea7fdd0e2984f7
3
{ "blob_id": "742798e38b4da83f43d801f02cea7fdd0e2984f7", "branch_name": "refs/heads/master", "committer_date": 1557119336000, "content_id": "5f3ee27ff384ad9914236d562f46b8963e201d8e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "2591bb239e0ace4aa93039bc581aa36b0feb9fc1", "extension": "p...
2.515625
stackv2
# File utils # ydawei@umich.edu import os import pickle def exec_print(cmd): print(cmd) os.system(cmd) def list_all_files_w_ext(folder, ext, recursive=False, cache=False): FILENAME_CACHE_DIR = 'cache_filename/' FILENAME_CACHE = FILENAME_CACHE_DIR + folder.replace('/', '_') if recursive: FILENAME_CACHE += '-...
54
21.69
69
18
313
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_39f97e21c16bdcc0_4f59653d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
3
true
[ "CWE-78", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
[ 10, 23, 42 ]
[ 10, 23, 42 ]
[ 2, 12, 4 ]
[ 16, 26, 35 ]
[ "A01:2017 - Injection", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "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.", "Avoid using `pickle...
[ 7.5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
file_utils.py
/src/common/file_utils.py
zhaohengz/surface_normals
BSD-3-Clause
2024-11-19T01:15:20.917770+00:00
1,595,598,964,000
75cf05053b4b32d9943be9e9a186c38abf95cdec
2
{ "blob_id": "75cf05053b4b32d9943be9e9a186c38abf95cdec", "branch_name": "refs/heads/master", "committer_date": 1595598964000, "content_id": "8b07266e6306ca1da687e3f6ff3450826ce7f53e", "detected_licenses": [ "MIT" ], "directory_id": "a7982e3dc57ef71cba655e6e53f6a4a4d6e2bcc1", "extension": "py", "fi...
2.390625
stackv2
from django.db import models from django.contrib.auth.models import (BaseUserManager, AbstractBaseUser, PermissionsMixin) from django.core.validators import RegexValidator class QuoraUserManager(BaseUserManager): def create_user(self, username, email, date_of_birth, first_name, last_name, password=None, descripti...
119
29.81
119
14
725
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_8d5b9fae0e58b0b9_d6d2b364", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'user' is being se...
3
true
[ "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 19 ]
[ 19 ]
[ 9 ]
[ 36 ]
[ "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'user' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
models.py
/accounts/models.py
abhishek593/Quora-Clone
MIT
2024-11-19T01:15:21.147116+00:00
1,565,122,218,000
bc106b3782e773140172b16e20925aca60edd59f
2
{ "blob_id": "bc106b3782e773140172b16e20925aca60edd59f", "branch_name": "refs/heads/master", "committer_date": 1565122218000, "content_id": "a744a809309839ed8ee6181bb9269e669ae806b0", "detected_licenses": [ "MIT" ], "directory_id": "0f4dedf0c6813fe2bab75a4bfe83601e4c518d37", "extension": "py", "fi...
2.359375
stackv2
# p2p partner class: from . import Partner # multithreading: import threading from queue import Queue # streaming: import socket import pickle import pyaudio # misc: import random import time import numba as nb _DEBUG_0 = True def _dlog(m): if _DEBUG_0: print(m) #TODO: rewrite these #NOTE: make sure there is ...
332
22.3
127
20
2,076
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_9d4202ab241b823c_008d88ed", "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" ]
[ 268, 278 ]
[ 268, 278 ]
[ 14, 21 ]
[ 45, 50 ]
[ "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" ]
AudioStreamer.py
/venv/_code/AudioStreamer.py
theloni-monk/p2p_videostream
MIT
2024-11-19T00:09:04.941446+00:00
1,553,657,829,000
97446aa1dcc930894755c1f19b15e5dbcba0894e
3
{ "blob_id": "97446aa1dcc930894755c1f19b15e5dbcba0894e", "branch_name": "refs/heads/master", "committer_date": 1553657829000, "content_id": "9c32622a9fbe56e11fc2a549f7887e3dac5c0df3", "detected_licenses": [ "MIT" ], "directory_id": "81904f73171e4ed45a35c962c201a8d32513f23f", "extension": "py", "fi...
3.359375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- """Модуль содержит реализацию класса Pool """ import http.client import json import socket class Pool(): """Отправляет запросы к пулу """ def __init__(self, pool, port, timeout): """Аргументы: pool: адрес пула port: порт пула t...
192
25.67
62
17
1,123
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.httpsconnection-detected_7be81aa93f7c4647_bc99ac06", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.httpsconnection-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The HTTPSConnection API has ch...
1
true
[ "CWE-295" ]
[ "rules.python.lang.security.audit.httpsconnection-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 166 ]
[ 169 ]
[ 26 ]
[ 14 ]
[ "A03:2017 - Sensitive Data Exposure" ]
[ "The HTTPSConnection API has changed frequently with minor releases of Python. Ensure you are using the API for your version of Python securely. For example, Python 3 versions prior to 3.4.3 will not verify SSL certificates by default. See https://docs.python.org/3/library/http.client.html#http.client.HTTPSConnecti...
[ 5 ]
[ "LOW" ]
[ "LOW" ]
pool.py
/pypools/pypools/pool.py
crowmurk/miners
MIT
2024-11-19T00:43:40.793622+00:00
1,583,916,141,000
7ee5885098896a94e4da8d83c5e2b8daf2448b22
3
{ "blob_id": "7ee5885098896a94e4da8d83c5e2b8daf2448b22", "branch_name": "refs/heads/master", "committer_date": 1583916141000, "content_id": "144b415a17727ba437528c908600760b500715e5", "detected_licenses": [ "MIT" ], "directory_id": "f31273ef45f6768e3373c7570a2d9aa8c63ef8ab", "extension": "py", "fi...
2.515625
stackv2
import pickle import argparse import torch import constant from sklearn.decomposition import PCA from data_utils import * def load_processed_data(dataset_path, data_size): with open(dataset_path, 'rb') as f: dataset = pickle.load(f) # load dataset if data_size != -1: eye_datas...
90
33.8
95
18
745
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e1aeab3306a15df9_42bc664e", "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" ]
[ 12 ]
[ 12 ]
[ 19 ]
[ 33 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
run_preprocessing.py
/run_preprocessing.py
WoongDemianPark/Co-Eye_Motion_Generation
MIT
2024-11-19T00:43:40.933514+00:00
1,571,125,209,000
498a276eef275990a4badc6e30d024e4287b66a2
3
{ "blob_id": "498a276eef275990a4badc6e30d024e4287b66a2", "branch_name": "refs/heads/master", "committer_date": 1571125209000, "content_id": "d444d30abaf2e2053ed1bd5e22ea511befac2293", "detected_licenses": [ "Apache-2.0" ], "directory_id": "320890fc2ed9be943112948901a11f3f5b949dce", "extension": "py"...
2.765625
stackv2
import sys from xml.etree.ElementTree import iterparse from xml.sax.saxutils import XMLGenerator try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest PATH_TAG = "{http://www.w3.org/2000/svg}path" RECT_TAG = "{http://www.w3.org/2000/svg}rect" SVG_TAG = "{...
126
30.8
90
17
896
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_81a57c05875f2916_5f63037b", "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" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 2, 3 ]
[ 2, 3 ]
[ 1, 1 ]
[ 44, 42 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The Python documentation recommends using `defusedxml` ins...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
combine.py
/svgserver/combine.py
jansule/svgserver
Apache-2.0
2024-11-19T00:43:43.351561+00:00
1,629,889,534,000
fbd536738e061713989347094a25258a781e980b
3
{ "blob_id": "fbd536738e061713989347094a25258a781e980b", "branch_name": "refs/heads/main", "committer_date": 1629889534000, "content_id": "4b8053c1c04d889380f60306060cd1ce20c77377", "detected_licenses": [ "MIT" ], "directory_id": "7c953a43876da83e5bbe7d142b3db4661b748e48", "extension": "py", "file...
3.375
stackv2
"""Risk stratification CDF model""" import logging from typing import Optional, Dict, Tuple import numpy as np import pickle from ltss.utils import read_data_descriptors # Constants to initialise logging LOG = logging.getLogger('ltss.utils') class RiskCDFModel: """ Model designed to take, or infer, a lengt...
302
37.34
119
18
2,626
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_2ec20d7691241ac3_59947771", "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" ]
[ 42 ]
[ 42 ]
[ 25 ]
[ 44 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
risk_model.py
/ltss/risk_model.py
ksabr/skunkworks-long-stayer-risk-stratification
MIT
2024-11-19T00:43:44.892702+00:00
1,548,668,863,000
1d473e1ecf8a7a2884c44fbe63e9c22f3c77b81d
2
{ "blob_id": "1d473e1ecf8a7a2884c44fbe63e9c22f3c77b81d", "branch_name": "refs/heads/master", "committer_date": 1548668863000, "content_id": "0624f3750fc5b4e166f7c573fa4f8470d8f9d6a8", "detected_licenses": [ "MIT" ], "directory_id": "f7c60a17669b683163040c15dc8ebdfe1fe3be1c", "extension": "py", "fi...
2.421875
stackv2
# -*- coding: utf-8 -*- #!/usr/bin/python3 import os, sys import json from Common.Straw import Straw from Common.Util import Util import shutil import subprocess import math class ToWarehouse(Straw): ''' 创建仓库,并上传本地文件至远程仓库 文件大于单个文件数量时 分割文件 显示时长 s ffprobe -i VEYCaSRIBFn.mp4 -show_format -v quiet...
186
37.12
155
20
1,867
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b31fa317d6954943_62dbc79a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
5
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-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-syste...
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 82, 90, 102, 149, 155 ]
[ 82, 90, 102, 149, 155 ]
[ 28, 13, 9, 9, 9 ]
[ 127, 122, 69, 113, 148 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found dynamic cont...
[ 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
ToWarehouse.py
/Service/Background/ToWarehouse.py
EEEEEEEEEEEEEEEEEEEIEEEEEEEEEEEEEEEEEE/pi_robot
MIT
2024-11-19T00:43:45.075929+00:00
1,620,095,236,000
47ed307ca9f0b170fcc749099dbdb31f01689833
3
{ "blob_id": "47ed307ca9f0b170fcc749099dbdb31f01689833", "branch_name": "refs/heads/main", "committer_date": 1620095236000, "content_id": "6776a9e1a90e18fdc5722cb3e8e4959c79771638", "detected_licenses": [ "MIT" ], "directory_id": "fa447dadd52b5ad72e0811966224bb8e28dc08cb", "extension": "py", "file...
2.515625
stackv2
from django.db import models from django.contrib.auth.models import BaseUserManager, \ AbstractBaseUser, PermissionsMixin from django.conf import settings class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): """Creates and saves a new user""" if no...
66
30.94
76
13
440
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_8739559f33009e31_b1a0defd", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'user' is being se...
3
true
[ "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 15 ]
[ 15 ]
[ 9 ]
[ 36 ]
[ "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'user' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
models.py
/core/models.py
Armestrong/resale_api
MIT
2024-11-19T00:43:49.407377+00:00
1,592,069,854,000
1ca4ff9304a2aad9109b2d7479c5ce4b2c91c176
3
{ "blob_id": "1ca4ff9304a2aad9109b2d7479c5ce4b2c91c176", "branch_name": "refs/heads/master", "committer_date": 1592069854000, "content_id": "35f4976262eb801b4dda71385d8c59522b04f293", "detected_licenses": [ "MIT" ], "directory_id": "8ca96aa67995c01d9f2df0255434433e2b9326da", "extension": "py", "fi...
2.59375
stackv2
import psycopg2.extras import config import collections import json import os import pytz from datetime import datetime, timedelta # NOTE: We use one single connection per process, but every function in this module # creates its own dedicated cursor. This means that these functions should be thread # safe; psycopg2 ha...
94
39.78
106
18
984
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_427519e77cf7d949_ec482537", "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...
7
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.lang.security.audit.sqli.psycopg-sqli", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.sqli.psycopg-sqli", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.pytho...
[ "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 56, 56, 56, 70, 70, 82, 82 ]
[ 57, 57, 57, 70, 70, 88, 88 ]
[ 5, 5, 5, 5, 5, 3, 3 ]
[ 32, 32, 32, 80, 80, 38, 38 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Detected string concatenation with a non-literal variable in a psycopg2 Python SQL statement. This could lead to SQL injection if the variable is user-controlled and not properly sanitized. In order to prevent SQL injection, use paramet...
[ 5, 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
database.py
/database.py
Rosuav/RabbitsWatch
MIT
2024-11-19T00:43:49.587005+00:00
1,570,779,233,000
0f0521c9dcb00f6faa9919fb30bb5b6d65d4816b
2
{ "blob_id": "0f0521c9dcb00f6faa9919fb30bb5b6d65d4816b", "branch_name": "refs/heads/master", "committer_date": 1570779233000, "content_id": "af538f6f9a6581a7dee660486f52c0d2c00a3fdb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d6a36feede1ce4dc37acd9010282fdf4af4733b2", "extension": "py"...
2.40625
stackv2
import os import re import sys import glob import tqdm import imageio import functools import argparse import numpy as np import tensorflow as tf from PIL import Image, ImageEnhance, ImageFilter sys.path.extend(["./lmnet", "/dlk/python/dlk"]) import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser...
175
36.5
79
17
1,728
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.code-after-unconditional-return_d7ad21387d8f1812_1e3bb44e", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.code-after-unconditional-return", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "code...
2
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 175 ]
[ 175 ]
[ 5 ]
[ 41 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
builder.py
/script/dataset_debug/builder.py
ki-lm/blueoil
Apache-2.0
2024-11-19T00:43:51.175262+00:00
1,680,376,553,000
fdb642b6da60e8d81b4cf0cb09d5046e3fbf254d
2
{ "blob_id": "fdb642b6da60e8d81b4cf0cb09d5046e3fbf254d", "branch_name": "refs/heads/master", "committer_date": 1680376553000, "content_id": "acf5577438fcb64bb2b93a0560cb7f28a1bf87df", "detected_licenses": [ "MIT" ], "directory_id": "fde8b1b36d42015316b12c04aac5c965e339982d", "extension": "py", "fi...
2.46875
stackv2
import glob import itertools import os import shutil import subprocess import click from ..core.constants import LANGUAGES, VARIETIES from .merge_alignments import merge UPLUG_ALIGN = 'uplug align/hun -src {src} -trg {trg} -s {sl} -t {tl}' def check_variety(language): result = language if language in VARI...
59
30.25
94
18
481
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_bf97bc9fe5c91444_826890e7", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 47, 47 ]
[ 47, 47 ]
[ 17, 90 ]
[ 95, 94 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
align.py
/preprocess_corpora/alignment/align.py
time-in-translation/preprocess-corpora
MIT
2024-11-19T00:43:51.529453+00:00
1,607,274,564,000
0494315f4948ce96df62cf6ab9ae8bb1ed82d746
2
{ "blob_id": "0494315f4948ce96df62cf6ab9ae8bb1ed82d746", "branch_name": "refs/heads/main", "committer_date": 1607274564000, "content_id": "7c47144956d055cda9baf32843dfef184e138ead", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8f01e4ca547e941a41f73e5e161e33ce22b0e5b1", "extension": "py", ...
2.4375
stackv2
from pathlib import Path import os from .logger import get_logger from .filtering import create_filter from .filetypes import CommentedCsvReader from .config_model import AppConfig, InventorySpec def load(app_cfg: AppConfig, limits=None, excludes=None): inventory_file = Path(app_cfg.defaults.inventory) if ...
53
29
78
13
366
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_af607851609d9082_49eb5ead", "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" ]
[ 49 ]
[ 49 ]
[ 10 ]
[ 27 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
inventory.py
/netcfgbu/inventory.py
minitriga/netcfgbu
Apache-2.0
2024-11-19T00:43:52.883473+00:00
1,441,547,533,000
d4cfe8c35d675996913070534c2af2807d546e8f
2
{ "blob_id": "d4cfe8c35d675996913070534c2af2807d546e8f", "branch_name": "refs/heads/master", "committer_date": 1441547533000, "content_id": "ccbf478a44b46982e92474f0f81999c14cecec5e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9c17e202ab4af14e755efe6b8b53778754b19f79", "extension": "py"...
2.390625
stackv2
from wsgi_basic import exception from wsgi_basic.db.mysql import DB from wsgi_basic.policy import Driver class Policy(Driver): def enforce(self, credentials, action, target): target_roles_str = "" owner_is_ok = False with DB() as db: db.execute("SELECT action, role, owner FRO...
26
34.08
78
17
204
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_71e5f45a7a08b773_5e13705e", "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" ]
[ 13, 13 ]
[ 14, 14 ]
[ 13, 13 ]
[ 62, 62 ]
[ "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" ]
sql.py
/wsgi_basic/policy/backends/sql.py
QthCN/wsgi-basic
Apache-2.0
2024-11-19T00:43:53.908843+00:00
1,557,343,824,000
1c2897e4614517c83dbde9e772fab3b0d40c5a02
2
{ "blob_id": "1c2897e4614517c83dbde9e772fab3b0d40c5a02", "branch_name": "refs/heads/master", "committer_date": 1557343824000, "content_id": "b2484bb71ad83c3465843b5af038e724877ac1e9", "detected_licenses": [ "MIT" ], "directory_id": "28ebadd9c355824ef141dce137ebab8e65f8d307", "extension": "py", "fi...
2.34375
stackv2
####################################################################### # This file is part of Pyblosxom. # # Copyright (c) 2003-2006 Ted Leung, Ryan Barrett # # Pyblosxom is distributed under the MIT license. See the file # LICENSE for distribution details. ############################################################...
211
27.34
82
21
1,544
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_1847bbfd6dcb82db_2371dae7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr...
2
true
[ "CWE-776" ]
[ "rules.python.lang.security.use-defused-xmlrpc" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 59 ]
[ 59 ]
[ 1 ]
[ 28 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
xmlrpc_pingback.py
/Pyblosxom/plugins/xmlrpc_pingback.py
daemonfreaks/pyblosxom
MIT
2024-11-19T00:43:56.151231+00:00
1,617,431,104,000
6d20e497940944dd457e1ac7df1b7e28cc3a934c
3
{ "blob_id": "6d20e497940944dd457e1ac7df1b7e28cc3a934c", "branch_name": "refs/heads/master", "committer_date": 1617431104000, "content_id": "378c694ad1043f937ed5d42c2853c871cc9c6ff8", "detected_licenses": [ "MIT" ], "directory_id": "84486ccf9521419143d026377605b11be58b5516", "extension": "py", "fi...
2.765625
stackv2
import os import pickle import sqlite3 import time from pyquery import PyQuery def get_brand(code): url = "https://kabutan.jp/stock/?code={}".format(code) q = PyQuery(url) if len(q.find("div.company_block")) == 0: return None try: name = q.find("div.company_block > h3").text() ...
55
27.02
79
15
400
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_f5d49792552d4565_4ada2249", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 54 ]
[ 54 ]
[ 28 ]
[ 42 ]
[ "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" ]
get_brands.py
/src/data_collect/get_brands.py
TMdiesel/stock-trading-strategy
MIT
2024-11-19T00:43:58.180025+00:00
1,598,872,461,000
8e30e042724f182ab04429c42e281e98cffc3c7d
3
{ "blob_id": "8e30e042724f182ab04429c42e281e98cffc3c7d", "branch_name": "refs/heads/master", "committer_date": 1598872461000, "content_id": "56eedf143e7d0c63aa003394de3e88b6e7704ce6", "detected_licenses": [ "MIT" ], "directory_id": "fa776a9bf7f9ddc71db7712ccc810a88e4be3a73", "extension": "py", "fi...
2.96875
stackv2
# -*- coding:ISO-8859-1 -*- import subprocess import re ''' This file contains the implementations of the functions that are responsable to change the node version. ''' # 0.11.16 -> 2015-01-14 # 1.8.2 -> 2015-05-04 # 2.5.0 -> 2015-08-04 # 3.3.1 -> 2015-09-08 # 4.2.2 -> 2015-10-29 # 5.11.1 -> 2016-04-26 # 6....
126
29.55
178
13
1,323
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_9c5c677b3aec7366_fdafca13", "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" ]
[ 45, 53 ]
[ 45, 53 ]
[ 8, 5 ]
[ 77, 74 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'getstatusoutput' 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 subpro...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
NodeManager.py
/NodeManager.py
DanielVenturini/BCDetect
MIT
2024-11-19T00:43:59.297963+00:00
1,413,992,608,000
88862375b9789d3a56f88f35080dafd533026375
2
{ "blob_id": "88862375b9789d3a56f88f35080dafd533026375", "branch_name": "refs/heads/master", "committer_date": 1413992608000, "content_id": "4330bc1456cea41afbfbeb171b26653781e2594b", "detected_licenses": [ "BSD-3-Clause", "Apache-2.0" ], "directory_id": "a27c13c55680e95a0cfe375dd02daae9d8e64d04",...
2.375
stackv2
#!/usr/bin/python # # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Usage: # # 1) Dump defined symbols # $ ./src/build/symbol_tool --dump-defined foo.so > defined.list # # 2) Dump undefined symbols # $ ...
89
30.65
78
15
704
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ea36f72f47a6e532_114f25ff", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
8
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 57, 57, 63, 63, 67, 67, 72, 72 ]
[ 57, 57, 63, 63, 67, 67, 73, 72 ]
[ 12, 34, 12, 34, 12, 34, 14, 38 ]
[ 54, 41, 54, 41, 54, 41, 63, 45 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function '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, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM" ]
symbol_tool.py
/src/build/symbol_tool.py
NaiveTorch/ARC
BSD-3-Clause,Apache-2.0
2024-11-19T01:32:01.566268+00:00
1,546,375,056,000
2634d68e9b8fa207c5988a8ac4d6d4df032d72ad
3
{ "blob_id": "2634d68e9b8fa207c5988a8ac4d6d4df032d72ad", "branch_name": "refs/heads/master", "committer_date": 1546375056000, "content_id": "e89d18eca7fd0ce34e5312947d90770ee8f2c4e9", "detected_licenses": [ "MIT" ], "directory_id": "0ea9f52310ac90ea199d887d9343e8a84bf3466d", "extension": "py", "fi...
2.515625
stackv2
import os #import code import datetime import sqlalchemy as sa from sqlalchemy.orm import sessionmaker from sqlalchemy.sql.expression import func from create_db import Base, File # keeps track of which round of revisits you're on from settings import REVISIT_ROUND engine = sa.create_engine('sqlite:///revisit.db') Bas...
34
35.12
110
12
301
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_47f1e020730e16cd_063f7a28", "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-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 32 ]
[ 32 ]
[ 1 ]
[ 41 ]
[ "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" ]
revisit.py
/revisit.py
martin-martin/ygg
MIT
2024-11-19T01:32:02.229049+00:00
1,570,532,705,000
2dbfdaddad9c26e7b1823aa4690ac6c9b273b1a4
2
{ "blob_id": "2dbfdaddad9c26e7b1823aa4690ac6c9b273b1a4", "branch_name": "refs/heads/master", "committer_date": 1570532705000, "content_id": "4bce5f65b4967fd4ed12f0bf9b8121f51fd86755", "detected_licenses": [ "MIT" ], "directory_id": "0d6ea2e6fa2de5a08383483cf18b0d59ccd8afe8", "extension": "py", "fi...
2.5
stackv2
#!/usr/bin/env python # encoding: utf-8 ''' @PROJECT: GetData @author: andy @contact: andylina@163.com @file: tflite_parse.py @time: 19-9-30 下午2:36 ''' import tensorflow as tf import numpy as np import cv2 import _pickle as cPickle import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_D...
155
30.06
97
16
1,220
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_364f99d30c8787cc_9ac75afc", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 84, 84 ]
[ 84, 84 ]
[ 13, 13 ]
[ 52, 52 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead t...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
tflite_parse.py
/tflite_parse.py
andyqian2015/pb2lite
MIT
2024-11-19T01:32:13.894665+00:00
1,488,361,262,000
c6557bb070ce4ddde62ba73e0e871e61ac7ab7d8
2
{ "blob_id": "c6557bb070ce4ddde62ba73e0e871e61ac7ab7d8", "branch_name": "refs/heads/master", "committer_date": 1488361262000, "content_id": "ad7883f91aefddb991c0b1cc42e6618219e5ea55", "detected_licenses": [ "MIT" ], "directory_id": "97140b87837252cf8aed0369f56878d0c9284c44", "extension": "py", "fi...
2.46875
stackv2
from mrjob.job import MRJob from mrjob.protocol import PickleProtocol, PickleValueProtocol import numpy as np import lxmls.readers.pos_corpus as pcc from lxmls.sequences.hmm import HMM import pickle from emstep import load_sequence, predict_sequence, load_parameters # A single iteration of the distributed EM algorith...
77
35.19
108
19
630
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fdfcd2e5e4dcdd45_98567587", "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" ]
[ 74 ]
[ 74 ]
[ 23 ]
[ 61 ]
[ "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" ]
emstep_split.py
/lxmls/big_data_em/emstep_split.py
sophiesongge/lxmls-toolkit
MIT
2024-11-19T01:32:19.816369+00:00
1,494,941,459,000
5606958d54a20da725a18907b1d5ac4fae611d82
3
{ "blob_id": "5606958d54a20da725a18907b1d5ac4fae611d82", "branch_name": "refs/heads/master", "committer_date": 1494941459000, "content_id": "7745a228f853f6f539221996afb729b7be015cb2", "detected_licenses": [ "MIT" ], "directory_id": "ea287ab6c0944a3fe4069d56936002fa855e90fa", "extension": "py", "fi...
2.546875
stackv2
#-*- coding:utf-8 -*- from flask import Flask,render_template,request import MySQLdb,sys import base64 reload(sys) sys.setdefaultencoding("utf-8") MYSQL_HOST = '127.0.0.1' MYSQL_USER = 'root' MYSQL_PASS = 'root' MYSQL_DB = 'bot' app = Flask(__name__) @app.route('/view') def view(): conn = MySQLdb.connect(MYSQL_...
43
27.35
89
11
339
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_98ec98185194d930_9ac73d2d", "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...
5
true
[ "CWE-89", "CWE-89", "CWE-915", "CWE-704" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.django.security.injection.tainted-sql-string", "rules.python.flask.security.injection.tainted-sql-string" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "MEDIUM" ]
[ "MEDIUM", "HIGH", "HIGH", "HIGH" ]
[ 34, 34, 34, 34 ]
[ 34, 34, 34, 34 ]
[ 5, 5, 20, 20 ]
[ 90, 90, 89, 89 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A08:2021 - Software and Data Integrity Failures", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "LOW", "MEDIUM" ]
server.py
/server/server.py
Conanjun/Simple-Golang-Worm
MIT
2024-11-19T01:32:21.390729+00:00
1,594,236,780,000
ae28acce18bbcc98a7760188cb4fa91676056064
3
{ "blob_id": "ae28acce18bbcc98a7760188cb4fa91676056064", "branch_name": "refs/heads/master", "committer_date": 1594236780000, "content_id": "3da19ac20dfe5ec3df74658038512045b99ceb5d", "detected_licenses": [ "MIT" ], "directory_id": "a881e705cf9e42d61910be8a63a797d1471fbf3d", "extension": "py", "fi...
2.984375
stackv2
from datetime import datetime import pickle def linha(): print('====== OK ======') agora=datetime.now() print(f'O vavlor agora : {agora}. do tipo {type(agora)}') es=1 #Entrada ao servico 1; Saida servico 2; Entrada Pausa 3. Saida da Pausa 4. bemerkung='xxxxxxxxx' regkart=[agora,es,bemerkung] linha() print(regka...
34
18.85
79
9
220
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e9f3fae7dba0a84e_bd76b54d", "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" ]
[ 23, 29 ]
[ 23, 29 ]
[ 5, 7 ]
[ 34, 28 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
simulacao.py
/simulacao.py
anelsonsl/cartao-de-ponto
MIT
2024-11-19T01:32:32.197371+00:00
1,634,213,483,000
8647e2b58e4623780fdb9f4113c422b0413052c6
2
{ "blob_id": "8647e2b58e4623780fdb9f4113c422b0413052c6", "branch_name": "refs/heads/master", "committer_date": 1634213483000, "content_id": "6d56b652e937fb7bdb77c3ca5fa1441908b072a0", "detected_licenses": [ "MIT" ], "directory_id": "026ba839421a7c3eaaa71b8a68f395a094c561f3", "extension": "py", "fi...
2.3125
stackv2
#!/usr/bin/python3 import sys import os import argparse import calendar import time import shutil import subprocess from src.shapeTranspiler import transpile from src.graphEncoder import encode # Basic setup. ap = argparse.ArgumentParser(prog='ProGS', description='Run validation on pro...
205
25.26
125
15
1,269
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_f688b138e8e512c5_b2817890", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
4
true
[ "CWE-78", "CWE-96" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.dangerous-globals-use" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "MEDIUM" ]
[ 133, 194 ]
[ 134, 194 ]
[ 5, 5 ]
[ 73, 39 ]
[ "A01:2017 - Injection", "A03:2021 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found non static data as an...
[ 7.5, 5 ]
[ "LOW", "LOW" ]
[ "HIGH", "MEDIUM" ]
progs.py
/progs.py
softlang/progs
MIT
2024-11-19T01:32:41.033768+00:00
1,623,818,205,000
f30d9bd8eae7228c20d51df16b638760cf551163
2
{ "blob_id": "f30d9bd8eae7228c20d51df16b638760cf551163", "branch_name": "refs/heads/main", "committer_date": 1623818205000, "content_id": "5199c16a45db63962aaa2b9b6cd0d9252044296c", "detected_licenses": [ "MIT" ], "directory_id": "7984ca81eadbdddaa88c5fe928bd9341391b7af6", "extension": "py", "file...
2.359375
stackv2
from .events import * """ 作用:界面以及功能的展示和补充 """ class MainFrameFinalGUI(MainFrameFuncs): def __init__(self, parent=None): super().__init__(parent=parent) self._init_platform() # 初始化平台类型( + 使用限制) self._auto_loading_history() # 自动加载历史数据 def _init_platform(self): """初始化并检查""" ...
97
36.51
115
26
879
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_fb9b39b7348a0c74_978dbace", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 86, 86 ]
[ 86, 86 ]
[ 42, 111 ]
[ 116, 115 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
mainFrame.py
/JDjango/frames/mainFrame/mainFrame.py
JIYANG-PLUS/JDjango
MIT
2024-11-19T01:43:33.134225+00:00
1,674,429,471,000
370174d371415dccbe0e0fedfcf3b73ede0cb036
3
{ "blob_id": "370174d371415dccbe0e0fedfcf3b73ede0cb036", "branch_name": "refs/heads/main", "committer_date": 1674429471000, "content_id": "ee774d191849643ec5ec94a736de60d345ef8c32", "detected_licenses": [ "MIT" ], "directory_id": "159d4ae61f4ca91d94e29e769697ff46d11ae4a4", "extension": "py", "file...
3.046875
stackv2
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root # for license information. from __future__ import absolute_import, division, print_function, unicode_literals """Improved JSON serialization. """ import json import operator JsonDecoder = j...
273
32.99
88
19
2,065
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_ed4156757167cd82_efeab4d8", "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" ]
[ 72 ]
[ 74 ]
[ 23 ]
[ 14 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
json.py
/venv/lib/python3.9/site-packages/debugpy/common/json.py
davidycliao/bisCrawler
MIT
2024-11-19T01:43:44.334163+00:00
1,470,817,909,000
a5ba7c3bbd1f4bade6f82bfbc8f20d85d3097848
2
{ "blob_id": "a5ba7c3bbd1f4bade6f82bfbc8f20d85d3097848", "branch_name": "refs/heads/master", "committer_date": 1470817909000, "content_id": "dce2ab8de21c9b147fd738c760a63f43017e3e33", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7caf1199ee7de6776667c6d74a48114178c35645", "extension": "py"...
2.3125
stackv2
#!/usr/bin/python #This is the program for clean all objects in data pool # Frank Li 2014/12/12 # frank.likuohao@gmail.com import os #rados -p .rgw.buckets ls - > allbuckets #os.system("rados -p .rgw.buckets ls - > allbuckets") os.system("rados -p da...
25
28.04
60
9
227
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_2c6c8ab9449f979e_44a9bdd5", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 20 ]
[ 20 ]
[ 2 ]
[ 42 ]
[ "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" ]
clean_data_objs.py
/clean_data_objs.py
FrankLikuohao/inwin_ceph_toolset
Apache-2.0
2024-11-19T01:43:44.576528+00:00
1,626,104,373,000
5aaf79c2b7a64fc47e59b7d9e60fec6f7094b288
3
{ "blob_id": "5aaf79c2b7a64fc47e59b7d9e60fec6f7094b288", "branch_name": "refs/heads/main", "committer_date": 1626104373000, "content_id": "1f1b98621c95587dbfbdca576725cf3983c6bde7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4a2e73ad2406f31453f6dbe2e402e712bdf35efe", "extension": "py", ...
2.6875
stackv2
import sqlite3 import bcrypt from prettytable import from_db_cursor def conn_decorate(func): def wrapper(*args, **kwargs): if check_args(args) is True: conn = sqlite3.connect('yarin.db') c = conn.cursor() result = func(c, *args, **kwargs) conn.commit() ...
145
37.7
114
16
1,244
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_0584a183b930b091_e875ad99", "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...
14
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.p...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 31, 31, 39, 39, 83, 83, 89, 89, 92, 92, 107, 107, 122, 122 ]
[ 31, 31, 39, 39, 83, 83, 89, 89, 92, 92, 107, 107, 122, 122 ]
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ 86, 86, 69, 69, 76, 76, 78, 78, 87, 87, 106, 106, 76, 76 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01...
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
Employee_Management.py
/queue-management/Employee_Management.py
yarinl3/Queue-Management-System
Apache-2.0
2024-11-19T01:43:45.932805+00:00
1,610,223,339,000
6477cc49b7e79ad9f5f5b5a0244c68c2a6626bf0
3
{ "blob_id": "6477cc49b7e79ad9f5f5b5a0244c68c2a6626bf0", "branch_name": "refs/heads/master", "committer_date": 1610223339000, "content_id": "9bafe7139c9d4506391334e3644c4a58b0a3b890", "detected_licenses": [ "MIT" ], "directory_id": "8bebc4b5f5632f4cb559c3876ecf91813b31d590", "extension": "py", "fi...
2.65625
stackv2
import glob import numpy as np import nltk from operator import itemgetter from sklearn import metrics from sklearn.feature_extraction.text import TfidfTransformer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.model_selection import train_test_split from xgboost import XGBClassifier import pi...
150
29.05
90
16
1,063
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1ba55e1e7d735239_998928da", "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" ]
[ 136, 147 ]
[ 136, 147 ]
[ 5, 5 ]
[ 30, 37 ]
[ "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" ]
train_clf.py
/ml/writing/train_clf.py
rigelglen/Limelight-API
MIT
2024-11-19T01:43:46.167529+00:00
1,664,964,641,000
20b1bf33ed180d8256298a9e906bb36a4ec7c9fc
3
{ "blob_id": "20b1bf33ed180d8256298a9e906bb36a4ec7c9fc", "branch_name": "refs/heads/master", "committer_date": 1664964641000, "content_id": "9619f8015c1a913d85e4a94828d807b992a479a6", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5e9207eae2754a6eb8fda8bfb54c3d9f85009a6a", "extension": "py"...
3.125
stackv2
""" Base classes for probabilistic programs. """ import pickle class DiscPP(object): """ Parent class for discriminative probabilistic programs """ def __init__(self): """ Constructor """ self.sample_list = [] if not hasattr(self,'data'): raise NotImplementedError('Implement var data in a child...
51
37.8
76
14
429
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1339d0ce0a3b4719_37e0ad12", "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" ]
[ 48 ]
[ 48 ]
[ 5 ]
[ 38 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
pp_core.py
/nasbench301/surrogate_models/bananas/bananas_src/bo/pp/pp_core.py
automl/nasbench301
Apache-2.0
2024-11-19T01:43:47.872496+00:00
1,554,447,065,000
12386b7821286cb5ca7b05dc783e5a9975542ccf
3
{ "blob_id": "12386b7821286cb5ca7b05dc783e5a9975542ccf", "branch_name": "refs/heads/master", "committer_date": 1554447133000, "content_id": "a0fd1ef8256fd2af3f527187a73af9ffed7e490f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b02d3b33199deb884f24b65a4d9c040c8ea5d1a7", "extension": "py"...
2.515625
stackv2
import sys try: VM_count = sys.argv[1] except IndexError: print("VM_count was not specified") exit() #Impiorts from Jinja2 from jinja2 import Environment, FileSystemLoader #Load Jinja2 template env = Environment(loader = FileSystemLoader('./'), trim_blocks=True, lstrip_blocks=True) template = env.get_te...
19
22.42
88
12
112
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_b88d548a2b41eb85_b18f5e53", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
4
true
[ "CWE-79", "CWE-116", "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.jinja2.security.audit.missing-autoescape-disabled", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 13, 13, 17 ]
[ 13, 13, 19 ]
[ 7, 7, 14 ]
[ 89, 89, 6 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected a Jinja2 environment witho...
[ 5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
script.py
/script.py
chawlanikhil24/Openshift-metalkube-virtual-infra
Apache-2.0
2024-11-19T01:43:48.367253+00:00
1,504,601,601,000
53636eb607998148b0c947d8f25efd4368b9ed7a
3
{ "blob_id": "53636eb607998148b0c947d8f25efd4368b9ed7a", "branch_name": "refs/heads/master", "committer_date": 1504601601000, "content_id": "9c3bc74b7b72f8e559cf009ea60e756f5ed65e72", "detected_licenses": [ "MIT" ], "directory_id": "0af9224c19f1f0a4a0b7b947ca0948b7b9f2d123", "extension": "py", "fi...
2.53125
stackv2
# -*- coding:utf8 -*- from flask import Flask, request, render_template, jsonify import redis import json import pickle app = Flask(__name__) import codecs all_data = {} redis_client = redis.StrictRedis(host='127.0.0.1',port=6377,db=1) def load_file(): with codecs.open("d:\\data\\topic_vid_2dvector_100_101_102.tx...
70
25.57
96
17
501
python
[{"finding_id": "semgrep_rules.python.flask.security.insecure-deserialization_9a9979b7a4ed5d09_8cf3e5f0", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.insecure-deserialization", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected the use of an insecure deserializ...
4
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.flask.security.insecure-deserialization", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "MEDIUM" ]
[ 46, 46 ]
[ 46, 46 ]
[ 20, 20 ]
[ 57, 57 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Detected the use of an insecure deserialization library in a Flask route. These libraries are prone to code execution vulnerabilities. Ensure user data does not enter this function. To fix this, try to avoid serializing whole objects. Consider instead using a serializer such as JSON.", "Avoid using `pickle`, whi...
[ 7.5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
app.py
/app.py
atesop/cluster_graph_web_demo
MIT
2024-11-19T01:43:51.370086+00:00
1,618,929,583,000
d31ccfbe8f265445ecba57fbacd5c8bbdff66827
2
{ "blob_id": "d31ccfbe8f265445ecba57fbacd5c8bbdff66827", "branch_name": "refs/heads/main", "committer_date": 1618929583000, "content_id": "81ed40e16aa694f5644bb6e923c91d48ed5ca6e2", "detected_licenses": [ "MIT" ], "directory_id": "9d2df9b1bfd4e5bd6892d00b1ac7cde1899a969c", "extension": "py", "file...
2.4375
stackv2
from torch.nn.modules.loss import _Loss from package_core.losses import VariationLoss, L1Loss, PerceptualLoss from package_core.image_proc import * # L2 loss def MSE(para): return nn.MSELoss() # L1 loss def L1(para): return nn.L1Loss() def MaskedL1(para): return L1Loss() # Variance loss def Variatio...
199
30.31
97
21
1,682
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_470186494c00f7b4_2fd3a56f", "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" ]
[ 135 ]
[ 135 ]
[ 23 ]
[ 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" ]
loss.py
/train/loss.py
BeBuBu/RSCD
MIT
2024-11-19T01:43:51.914969+00:00
1,587,301,438,000
0c87a43aac571994bd46ff46a37914523cf3943f
3
{ "blob_id": "0c87a43aac571994bd46ff46a37914523cf3943f", "branch_name": "refs/heads/master", "committer_date": 1587301438000, "content_id": "e1a5293b276edb71893cde5bbe1b5b1a8f8fd65a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "09b509e0dd6b1c0edc0b8f42091a95bc02407344", "extension": "py"...
2.53125
stackv2
import dash import dash_core_components as dcc import dash_bootstrap_components as dbc import dash_html_components as html import pickle from extract_data import get_data def generate_layout(): """Generates the defualt layout for the dashboard TODO(@andreasfo@gmail.com) Fix to a much more readable forma...
261
32.92
140
34
1,856
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_28da347bc156ce57_212783cf", "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" ]
[ 249 ]
[ 249 ]
[ 17 ]
[ 31 ]
[ "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" ]
layout.py
/dash/layout.py
martinedung/covid19
Apache-2.0
2024-11-19T01:43:57.800419+00:00
1,579,389,760,000
daf86cf98058345c0208fc274a72d8f047955184
2
{ "blob_id": "daf86cf98058345c0208fc274a72d8f047955184", "branch_name": "refs/heads/master", "committer_date": 1579389760000, "content_id": "3e7090fde27f3737cbf088c35a3e580887748e21", "detected_licenses": [ "MIT" ], "directory_id": "f0728f5c5dd512e5114cb9fec8389d1e26d7ce54", "extension": "py", "fi...
2.453125
stackv2
import numpy as np import pandas as pd import gc import time from lightgbm import LGBMClassifier from sklearn.metrics import roc_auc_score, roc_curve from sklearn.model_selection import KFold, StratifiedKFold import matplotlib.pyplot as plt import seaborn as sns import warnings warnings.simplefilter(action='ignore', ca...
231
33
101
15
2,099
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7d41c57f357ae0da_e31ad8d6", "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" ]
[ 72, 183 ]
[ 72, 183 ]
[ 5, 17 ]
[ 44, 73 ]
[ "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" ]
baseline_ensemble.py
/Santander Customer Transaction Prediction/src/models/baseline_ensemble.py
anshulrai/Kaggle-Challenges
MIT
2024-11-19T01:43:59.582295+00:00
1,477,027,003,000
4d2b91af94623318f3b280f89362a9622839eeeb
3
{ "blob_id": "4d2b91af94623318f3b280f89362a9622839eeeb", "branch_name": "refs/heads/master", "committer_date": 1477027003000, "content_id": "64df96b9aaf5f7d908f00ad83a995d1fe9d3411a", "detected_licenses": [ "MIT" ], "directory_id": "d1e80b6aaca73991b3944acfb90b38e79465b87a", "extension": "py", "fi...
2.765625
stackv2
"""Train tickets query via comand-line. Usage: tickets [-gdtkz] <from> <to> <date> Options: -h,--help 显示帮助菜单 -g 高铁 -d 动车 -t 特快 -k 快速 -z 直达 Example: tickets beijing shanghai 2016-08-25 """ from docopt import docopt import requests from stations import...
35
25
150
10
271
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_74ea978b1d9a4a94_b996e5f2", "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 ...
3
true
[ "CWE-295" ]
[ "rules.python.requests.security.disabled-cert-validation" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 29 ]
[ 29 ]
[ 9 ]
[ 39 ]
[ "A03:2017 - Sensitive Data Exposure" ]
[ "Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation." ]
[ 7.5 ]
[ "LOW" ]
[ "LOW" ]
tickets.py
/tickets.py
hust201010701/python_12306
MIT
2024-11-19T01:44:03.432008+00:00
1,435,092,985,000
e0475afbb6a12150995751d2fc27ee3c3813b21e
3
{ "blob_id": "e0475afbb6a12150995751d2fc27ee3c3813b21e", "branch_name": "refs/heads/master", "committer_date": 1435092985000, "content_id": "9380cb71fad4d7f514183360abb3bd6aec405e96", "detected_licenses": [ "MIT" ], "directory_id": "b328b756faa03d175e2db8ff72ebf556212849b0", "extension": "py", "fi...
2.59375
stackv2
#!/usr/bin/env python # Convert JXL XML to CSV # Copyright (C): 2015 by Vaclav Petras # License: GNU GPL >2 import sys import xml.etree.ElementTree as ElementTree if len(sys.argv) not in (2, 3): sys.exit( "Usage:\n" " {prg} file.jxl\n" " {prg} file.jxl file.csv\n" " pyt...
45
25.42
71
12
371
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_ad6c2bdfd5c95ef6_8dd65d16", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
4
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 10, 19 ]
[ 10, 19 ]
[ 1, 5 ]
[ 44, 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" ]
jxl2csv.py
/jxl2csv.py
asmithpetersen/jxl2csv
MIT
2024-11-19T01:44:06.616266+00:00
1,534,267,453,000
ab2476f61c29443a074f4e51a9e0c5e84be187ce
3
{ "blob_id": "ab2476f61c29443a074f4e51a9e0c5e84be187ce", "branch_name": "refs/heads/master", "committer_date": 1534267453000, "content_id": "c1ba0004705fb6e347c1a49a83f9e0b2aabd8d87", "detected_licenses": [ "MIT" ], "directory_id": "1d8d77e2eaff30218d4c04cc50e051540bed9624", "extension": "py", "fi...
2.953125
stackv2
#!/usr/bin/env python # # Self-Driving Car # # ## CNN Based Traffic Sign Recognition Classifier # ########################DISABLE TENSORFLOW WARNING############### import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' ################################################################# #########################DATABASE#...
406
31.53
140
17
3,510
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_937ec06e08901f87_7551ec70", "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" ]
[ 37, 39 ]
[ 37, 39 ]
[ 13, 13 ]
[ 27, 27 ]
[ "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" ]
train.py
/train.py
anoop600/Traffic-Sign-Analysis-CNN
MIT
2024-11-19T01:44:10.403470+00:00
1,574,086,417,000
2c4fad9e3f63bf5ada8f1e3b08db041fcd779a42
2
{ "blob_id": "2c4fad9e3f63bf5ada8f1e3b08db041fcd779a42", "branch_name": "refs/heads/master", "committer_date": 1574086417000, "content_id": "720a5d612610fcaad43d82cf68f075622fdbb573", "detected_licenses": [ "MIT" ], "directory_id": "577fcc7b404fd7a09607a548b83bdb8eb760dae6", "extension": "py", "fi...
2.453125
stackv2
import pathlib import click import subprocess @click.group(invoke_without_command=True) @click.argument("path", type=click.Path(exists=False, file_okay=False, allow_dash=False)) @click.pass_context def main(ctx, path): path = pathlib.Path(path) ctx.ensure_object(dict) ctx.obj['path'] = path subprocess...
33
36.79
107
18
295
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_28dda92a45a4e998_8de01b00", "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" ]
[ 25, 31 ]
[ 25, 31 ]
[ 13, 13 ]
[ 108, 104 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functio...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
cli.py
/myvenv/cli.py
Ricyteach/myvenv
MIT
2024-11-19T01:44:10.913862+00:00
1,430,333,330,000
a6065d9e6ee8811a1c7f6d63556b95a109baf514
2
{ "blob_id": "a6065d9e6ee8811a1c7f6d63556b95a109baf514", "branch_name": "refs/heads/master", "committer_date": 1430333330000, "content_id": "b216b10725a5fb00594a2d07eff553aa0e440c39", "detected_licenses": [ "MIT" ], "directory_id": "4ec2263708ed9ccf6eb1cd9b4421a1a0bb4588ed", "extension": "py", "fi...
2.359375
stackv2
# -*- coding:utf-8 -*- import sys import uuid from os import path from flask import Blueprint, render_template, request from core.query import Query from core.settings import BASE_DIR, TEMP_DIR bp = Blueprint('default', __name__) @bp.route('/', methods=['GET'], strict_slashes=False) def index(): """Returns th...
45
26.22
71
12
297
python
[{"finding_id": "semgrep_rules.python.django.security.injection.request-data-write_e193103216c428ad_ef400286", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.request-data-write", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Found user-controlled reque...
2
true
[ "CWE-93" ]
[ "rules.python.django.security.injection.request-data-write" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 28 ]
[ 34 ]
[ 5 ]
[ 30 ]
[ "A03:2021 - Injection" ]
[ "Found user-controlled request data passed into '.write(...)'. This could be dangerous if a malicious actor is able to control data into sensitive files. For example, a malicious actor could force rolling of critical log files, or cause a denial-of-service by using up available disk space. Instead, ensure that requ...
[ 5 ]
[ "MEDIUM" ]
[ "MEDIUM" ]
default.py
/web/apps/website/views/default.py
Predator01/berrynet
MIT
2024-11-19T01:44:11.273639+00:00
1,636,857,044,000
ed551087768c0cf8ea425af5bdefe62333efdcdc
3
{ "blob_id": "ed551087768c0cf8ea425af5bdefe62333efdcdc", "branch_name": "refs/heads/master", "committer_date": 1636857044000, "content_id": "6d8c93c702f35b2f530f587ef296126552087f27", "detected_licenses": [ "MIT" ], "directory_id": "98e7b466093046e93a34e93c4f5524c948b85b49", "extension": "py", "fi...
2.609375
stackv2
""" File watch commercial remover """ import os import subprocess import logging import shutil import sys import time from threading import Thread from queue import Queue WORK_ROOT = "/config/" _LOGGER = logging.getLogger(__name__) logging.basicConfig(filename=WORK_ROOT+'watcher.log', filemode='a', level=logging.DEBU...
159
34.82
172
20
1,220
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_51d8e5740c747f81_aa9916ca", "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" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 67 ]
[ 67 ]
[ 22 ]
[ 82 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
file_watch.py
/file_watch.py
ThreeCO/comskip
MIT
2024-11-19T01:44:11.941398+00:00
1,490,904,838,000
2638c01a5b9edd288f44360fb5b705293bb087ef
2
{ "blob_id": "2638c01a5b9edd288f44360fb5b705293bb087ef", "branch_name": "refs/heads/master", "committer_date": 1490904838000, "content_id": "d995aa255217468165d6aad80e82d2688288c3df", "detected_licenses": [ "MIT" ], "directory_id": "70905cce5f92ff7273ec424d62b338d8f36f3dc0", "extension": "py", "fi...
2.5
stackv2
from config import app_config from log import log_db from database.models import DBServer, DBTournament, DBUser, DBModule if 'heroku' in app_config: import psycopg2 from urllib.parse import urlparse else: import sqlite3 def to_list(x): return x if isinstance(x, list) else [x] class DBAccess(): d...
191
40.75
142
17
1,857
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_45add1517fac4b18_fc9b85d9", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
8
true
[ "CWE-89", "CWE-915", "CWE-915", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.django.security.injection.tainted-sql-string", "rules.python.django.security.injection.tainted-sql-string", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "MEDIUM", "HIGH", "HIGH" ]
[ 36, 48, 63, 76, 85, 89, 89, 100 ]
[ 36, 48, 63, 76, 85, 89, 89, 100 ]
[ 17, 23, 23, 9, 17, 17, 17, 13 ]
[ 49, 92, 116, 43, 57, 41, 41, 63 ]
[ "A01:2017 - Injection", "A08:2021 - Software and Data Integrity Failures", "A08:2021 - Software and Data Integrity Failures", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "MEDIUM", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "LOW", "LOW", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
core.py
/src/database/core.py
fp12/pyChallongeDiscordBot
MIT
2024-11-19T02:19:52.719783+00:00
1,620,969,767,000
179235d5d5a74ee1f058f377637bd4412e3dde06
3
{ "blob_id": "179235d5d5a74ee1f058f377637bd4412e3dde06", "branch_name": "refs/heads/main", "committer_date": 1620969767000, "content_id": "7d37f7886f2626aef76e84f1048b9bfebcf12b08", "detected_licenses": [ "MIT" ], "directory_id": "3f4441d938bc4989ed6f95109b8424c2aa51e350", "extension": "py", "file...
3.203125
stackv2
""" **Example 0: Global and User Text Editor** This server demonstrates the access control of two endpoints: ``/text/global.txt`` ``/text/user/<username>.txt`` All registered users can read and write to the ``/text/global.txt``, however only a user can read and write to their own ``/text/us...
165
30.58
116
17
1,176
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.avoid_hardcoded_config_SECRET_KEY_e32f951878eab87a_3f102466", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.avoid_hardcoded_config_SECRET_KEY", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Hardcoded va...
6
true
[ "CWE-93", "CWE-22", "CWE-93" ]
[ "rules.python.django.security.injection.request-data-write", "rules.python.flask.security.injection.path-traversal-open", "rules.python.django.security.injection.request-data-write" ]
[ "security", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "HIGH", "MEDIUM" ]
[ 104, 126, 128 ]
[ 104, 126, 128 ]
[ 17, 18, 17 ]
[ 41, 66, 41 ]
[ "A03:2021 - Injection", "A05:2017 - Broken Access Control", "A03:2021 - Injection" ]
[ "Found user-controlled request data passed into '.write(...)'. This could be dangerous if a malicious actor is able to control data into sensitive files. For example, a malicious actor could force rolling of critical log files, or cause a denial-of-service by using up available disk space. Instead, ensure that requ...
[ 5, 7.5, 5 ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "HIGH", "MEDIUM" ]
server.py
/examples/basic/server.py
mcqueen256/Flask-RESTful-Auth
MIT
2024-11-19T02:19:54.733814+00:00
1,560,001,316,000
3fa66181ba8f62771e043d4aef920544d8e32dfe
3
{ "blob_id": "3fa66181ba8f62771e043d4aef920544d8e32dfe", "branch_name": "refs/heads/master", "committer_date": 1560001316000, "content_id": "ed1bf301d331efa36ab484ec622f49e30b7613cb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f22c2fa12c154765d15f835cd33372e4539817bd", "extension": "py"...
3.171875
stackv2
############################################ # MODULE: Chess Game Controller class # # AUTHOR: Fedorov Dmitrii # # LAST UPDATE: 03/03/2019 # ############################################ import copy import sys from enum import Enum from ChessAI.GameController.game_board import Gam...
151
30.14
103
15
1,007
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4ff6efc2753fb148_2f582074", "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" ]
[ 36 ]
[ 36 ]
[ 16 ]
[ 45 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
game_controller.py
/ChessAI/GameController/game_controller.py
PavelLebed20/chess_classic
Apache-2.0
2024-11-19T02:19:56.277521+00:00
1,353,668,265,000
c809a8ffbf21d32b9f0a99ea399f3fd1c9c38729
3
{ "blob_id": "c809a8ffbf21d32b9f0a99ea399f3fd1c9c38729", "branch_name": "refs/heads/master", "committer_date": 1353668265000, "content_id": "bc4283be0cddf688c603fd19d8dfbade307a8acc", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "4a05be4bf7056962c8ed80bc6415034eaae69521", "extension": "p...
2.625
stackv2
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Static Rendering ================ libsr ----- This is the part of sr that distinguishes directories into projects """ import os import sys import codecs import shelve from ConfigParser import SafeConfigParser from email import message_from_string from md5 import md5 ...
248
30.5
79
24
1,539
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_957d2ced6355527d_96f633a0", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
3
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-shelve" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 57 ]
[ 60 ]
[ 24 ]
[ 10 ]
[ "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." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
libsr.py
/sr/libsr.py
fheinle/SR
BSD-2-Clause
2024-11-19T02:20:03.686518+00:00
1,578,569,922,000
df9172d84dd2f1b71cd34a59142c228b5544021e
2
{ "blob_id": "df9172d84dd2f1b71cd34a59142c228b5544021e", "branch_name": "refs/heads/master", "committer_date": 1578569922000, "content_id": "2ba6c59d3850a27499736f9919bd9147a056dfbf", "detected_licenses": [ "MIT" ], "directory_id": "49753ee7b1ca542d6492e1dd53f87ad9695da657", "extension": "py", "fi...
2.5
stackv2
#!/usr/bin/env python3 #!coding: UTF-8 import sys import subprocess from enum import IntEnum, auto class ContainerStatus(IntEnum): RUNNING = auto() EXITED = auto() NOT_EXIST = auto() def GetContainerStatus(name): cmd = 'docker ps -a -f "name=' + name + '" --format "{{.Status}}"' res = subpro...
85
27.74
70
12
701
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b828034822001279_62c80cf2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
8
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 16, 16, 48, 48, 53, 53, 58, 58 ]
[ 16, 16, 48, 48, 53, 53, 58, 58 ]
[ 11, 46, 11, 38, 11, 38, 11, 38 ]
[ 51, 50, 43, 42, 43, 42, 43, 42 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess'...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW" ]
launch_docker_ros.py
/launch_docker_ros.py
eryeden/dotfiles
MIT
2024-11-19T02:20:05.078867+00:00
1,689,075,932,000
744acf6fa91305f533418325ca17b5ed837bebd1
3
{ "blob_id": "744acf6fa91305f533418325ca17b5ed837bebd1", "branch_name": "refs/heads/main", "committer_date": 1689075932000, "content_id": "4c1fb43c5aa341b6d919f838e31633fb0cced851", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5d0898f814da763521e7b142e0736ecdad7a87d3", "extension": "py", ...
2.75
stackv2
"""Generate needed CSV file for HUC8 stations""" from __future__ import print_function import subprocess from pandas.io.sql import read_sql from pyiem.util import get_dbconn def write_index(df): """Write some needed index files""" tfp = open('huc8_temperature.txt', 'w') tfp.write("ID,NAME,LAT,LONG,ELEVAT...
46
29.8
72
17
443
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_7b80132c9a69c560_08c786ab", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
4
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 39, 39 ]
[ 39, 39 ]
[ 16, 44 ]
[ 73, 48 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
create_stationfile_huc8.py
/regcm4/swat/create_stationfile_huc8.py
akrherz/facets
Apache-2.0
2024-11-19T02:20:10.918584+00:00
1,513,561,723,000
098a01abcf4ec402bea5025963c9f82d6acdde71
3
{ "blob_id": "098a01abcf4ec402bea5025963c9f82d6acdde71", "branch_name": "refs/heads/master", "committer_date": 1513561723000, "content_id": "9364956dcd1decce154fe6af7080ad26675549ec", "detected_licenses": [ "MIT" ], "directory_id": "1a375cf927f2ffd33ef9087637d04ce6c83de566", "extension": "py", "fi...
2.609375
stackv2
# coding: utf-8 from __future__ import unicode_literals import pickle import logging import math import threading from collections import deque import numpy as np from keras.utils import Sequence from common.utils import get_dir_list, get_file_name logger = logging.getLogger(__name__) class SimSequence(Sequence): ...
142
38.46
94
19
1,300
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2979f92e1dacff2f_0b973349", "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" ]
[ 44 ]
[ 44 ]
[ 23 ]
[ 37 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
sim_dataset.py
/micro_market/common/sim_dataset.py
lgh0504/snake
MIT
2024-11-19T00:59:36.236323+00:00
1,656,335,559,000
0a9565a57170620fd869a0c7b5d2f2d976905973
2
{ "blob_id": "0a9565a57170620fd869a0c7b5d2f2d976905973", "branch_name": "refs/heads/main", "committer_date": 1656335559000, "content_id": "72b51240ec07a8daa87c8dd7830d591e3617908f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ca0cac0203af193db440ab6d8e4e28287db22ca5", "extension": "py", ...
2.421875
stackv2
import io import logging import jsonpickle import numpy as np import torch from flask import Flask, request from tqdm import tqdm from model.model import ResMLP from utils import enable_dropout, forward_mc, read_json logging.basicConfig( level=logging.DEBUG, format="%(asctime)s.%(msecs)03d %(levelname)s %(mo...
88
26.62
90
15
601
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-jsonpickle_07ecc7e069f79aa9_cd9984f5", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-jsonpickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `jsonpickle`, ...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-jsonpickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 48 ]
[ 48 ]
[ 12 ]
[ 35 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `jsonpickle`, 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 using `json` module." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
app.py
/app.py
tae898/age-gender
Apache-2.0
2024-11-19T00:59:37.454227+00:00
1,628,789,427,000
9fc1a28426c66fef5ca004bc199d431eb71110fa
2
{ "blob_id": "9fc1a28426c66fef5ca004bc199d431eb71110fa", "branch_name": "refs/heads/main", "committer_date": 1628789427000, "content_id": "b528ea43fc9e606b465edabb342e7bc33464c241", "detected_licenses": [ "MIT" ], "directory_id": "22280d3f21d7c76500de2352b30241eed68c9589", "extension": "py", "file...
2.34375
stackv2
# SPDX-License-Identifier: MIT import plistlib, subprocess, sys from dataclasses import dataclass @dataclass class Partition: name: str offset: int size: int free: bool type: str desc: str = None label: str = None info: object = None container: object = None os: object = None c...
150
35.12
102
19
1,249
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_0c20fd0a11454c8d_732ff28a", "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" ]
[ 26, 29 ]
[ 26, 30 ]
[ 9, 18 ]
[ 97, 68 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functio...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
diskutil.py
/src/diskutil.py
TophEvich/asahi-installer
MIT
2024-11-19T00:59:39.555266+00:00
1,584,307,511,000
70d2fb67a0311cd95926259a170e8f7708a45e48
3
{ "blob_id": "70d2fb67a0311cd95926259a170e8f7708a45e48", "branch_name": "refs/heads/master", "committer_date": 1584307511000, "content_id": "01796216440d997ec2739a52a9224bb8fab77b88", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4c4e91da2923e19b979d65242ff498ca451eb370", "extension": "py"...
2.609375
stackv2
""" Client wrapper for pymemcache memcache library https://pypi.python.org/pypi/pymemcache """ from __future__ import absolute_import from vishnu.backend.client import Base from vishnu.backend.client import PickleableSession import pickle from pymemcache.client.base import Client as PyMemcacheClient class Client(Ba...
57
24.4
65
15
324
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_de47616afdf80325_17238a14", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 33, 57 ]
[ 33, 57 ]
[ 32, 39 ]
[ 60, 65 ]
[ "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" ]
pymemcache.py
/vishnu/backend/client/memcache/pymemcache.py
anomaly/vishnu
Apache-2.0
2024-11-19T00:59:40.827907+00:00
1,576,382,915,000
33de86da15ee01458aa3f3033cb56b5f68e2ed8b
3
{ "blob_id": "33de86da15ee01458aa3f3033cb56b5f68e2ed8b", "branch_name": "refs/heads/master", "committer_date": 1576382915000, "content_id": "00c4f14c4ca90a1aef3b277cc2f3eeeba240ab50", "detected_licenses": [ "MIT" ], "directory_id": "4257a1b4d066a937daf1964a4dad892964b38229", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python """ To check your Git commits locally for: * no trailing whitespace * PEP8 (python only) * mypy type hint (python only) 1. set Git to look for pre-commit hook by in Terminal: git config --global core.hooksPath ~/.git/hooks 2. put this script at ~/.git/hooks/pre-commit (no .py extension) Work...
62
28.13
102
13
476
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_e2c7783d9b9b9c98_65f9c4bb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
7
true
[ "CWE-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" ]
[ 48, 52 ]
[ 48, 52 ]
[ 12, 12 ]
[ 48, 46 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functi...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
pre-commit.py
/pre-commit.py
jayvdb/gitMC
MIT
2024-11-19T00:59:41.924870+00:00
1,582,673,514,000
150ed9c0adbcbd2e47d3470f09423446a302b5b0
3
{ "blob_id": "150ed9c0adbcbd2e47d3470f09423446a302b5b0", "branch_name": "refs/heads/master", "committer_date": 1582673514000, "content_id": "2ff251921da2361a43dade8d7c91b30b81b867ff", "detected_licenses": [ "MIT" ], "directory_id": "b3897797dfc237ce6d6b974c942b2ac62dc8cc32", "extension": "py", "fi...
2.703125
stackv2
#!/usr/bin/env python import os, sys, time from optparse import OptionParser def getVm_Size(pid): if os.path.exists("/proc/"+str(pid)+"/status"): lines=[line for line in open("/proc/"+str(pid)+"/status").readlines() if line.find("VmSize")!=-1] return sum([int(li...
123
36.68
128
18
1,153
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_a5355d4ef74bb425_39ae1878", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 37, 85 ]
[ 37, 85 ]
[ 21, 17 ]
[ 38, 34 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
memonitor.py
/lib/utils/memonitor.py
tcezard/RADmapper
MIT
2024-11-19T00:59:46.795436+00:00
1,425,720,700,000
54c0d551ed992a86556e8805d5515f743394561e
3
{ "blob_id": "54c0d551ed992a86556e8805d5515f743394561e", "branch_name": "refs/heads/master", "committer_date": 1425720700000, "content_id": "9edb70b20a400c93044933c2a8970c40c0fa12e1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5bea451af85253005a2c8ed529d0307da3869a74", "extension": "py"...
2.546875
stackv2
#!/usr/bin/env python # coding: utf-8 import ConfigParser import json import os import shutil import argparse import re class CMakeGenerator(object): def __init__(self): self.read_config() self.build_dir = 'build-({0})-{1}'.format(self.project_type, ...
70
31.01
87
14
495
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_f7a9470cb703ce5a_aab02926", "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" ]
[ 54 ]
[ 54 ]
[ 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" ]
cmake.py
/cmake.py
QianChenglong/lily
Apache-2.0
2024-11-19T00:59:47.268464+00:00
1,595,094,354,000
4e13d5de1630d084965e04151984bea2a08e5134
2
{ "blob_id": "4e13d5de1630d084965e04151984bea2a08e5134", "branch_name": "refs/heads/master", "committer_date": 1595094354000, "content_id": "f1c44279c1c78e6d3ae1d50d41837fb4c6fd7df0", "detected_licenses": [ "MIT" ], "directory_id": "4751461f3f767ff6b5b02082a16cc7afc8dca800", "extension": "py", "fi...
2.421875
stackv2
from getpass import getpass import os from .utils import Command from .db import DB class Init(Command): name = 'init' description = "Initializes a new Stylobate project, forking the original" def add_args(self, parser): parser.add_argument( 'name', type=str, ...
67
32.88
119
14
480
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_554fdbc3b31bfefc_4cd953a7", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
5
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 32, 41, 41, 49, 49 ]
[ 32, 41, 41, 49, 49 ]
[ 9, 13, 13, 9, 9 ]
[ 120, 63, 63, 107, 107 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
init.py
/stylobate_mgmt/commands/init.py
digitaltembo/stylobate-mgmt
MIT
2024-11-19T01:00:01.491768+00:00
1,619,475,160,000
5d896638a0dcea8ad7b47ad0aa6e9cb9fbd0e145
3
{ "blob_id": "5d896638a0dcea8ad7b47ad0aa6e9cb9fbd0e145", "branch_name": "refs/heads/master", "committer_date": 1619475160000, "content_id": "4890bd81fa91190e716c165178df3eb0908c33e5", "detected_licenses": [ "MIT" ], "directory_id": "43cf480864045e182313744f85df6640a7afda85", "extension": "py", "fi...
2.765625
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #@author: Sven Serneels, Ponalytics # Created on Sun Feb 4 2018 # Updated on Sun Dec 16 2018 # Refactored on Sat Dec 21 2019 # Refactored on Sat Mar 28 2020 # Class for classical and robust centering and scaling of input data for # regression and machine learning # Ve...
216
30.44
104
15
1,574
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_71de0db5a2701821_ca2afe96", "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" ]
[ 114, 119 ]
[ 114, 119 ]
[ 22, 21 ]
[ 39, 37 ]
[ "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" ]
robcent.py
/src/direpack/preprocessing/robcent.py
I-zhouqh/direpack
MIT
2024-11-19T01:00:02.190377+00:00
1,633,263,495,000
aa101fb2a2dc37a8d6dcaec34a460e32f010d6f2
3
{ "blob_id": "aa101fb2a2dc37a8d6dcaec34a460e32f010d6f2", "branch_name": "refs/heads/master", "committer_date": 1633263495000, "content_id": "7e2e093eb3236cdb4c8eda76c56d49970d1cf80d", "detected_licenses": [ "MIT" ], "directory_id": "3187e787b9cece89256b530dae6a7ba33729fcaa", "extension": "py", "fi...
3.1875
stackv2
import tkinter as tk from tkinter import ttk root = tk.Tk() win_width = 300 win_height = 350 root.geometry(f"{win_width}x{win_height}+200+200") root.title("Calculator") root.resizable(False, False) input_value = tk.StringVar() def get_frame(): frame = ttk.Frame(root, width=win_width) frame["padding"] = 2 ...
211
22.67
87
14
1,270
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_e31818c599db142e_62742d12", "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" ]
[ 59 ]
[ 59 ]
[ 21 ]
[ 44 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
main.py
/Calculator/main.py
CodesDope/python-pro-course-projects
MIT
2024-11-19T01:00:03.489293+00:00
1,441,524,629,000
74a7c8ac7f31cb085e970ba28a5de79885bb2bf1
3
{ "blob_id": "74a7c8ac7f31cb085e970ba28a5de79885bb2bf1", "branch_name": "refs/heads/master", "committer_date": 1441524629000, "content_id": "76cc8de4500171f01264a5271765221fd746874e", "detected_licenses": [ "MIT" ], "directory_id": "932840dc85bf279b47106091cbd415e0e75d110d", "extension": "py", "fi...
2.8125
stackv2
import os import time import subprocess from signal import SIGTERM from utils import SimpleResponse class BackgroundProcessHandler(object): def __init__(self, command, pid_file, logger): self.pid_file = pid_file self.logger = logger self.command = command def start(self): if ...
82
24.82
103
20
456
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_193399ea528bb322_1e36dd64", "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" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 19 ]
[ 19 ]
[ 15 ]
[ 45 ]
[ "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" ]
background_process_handler.py
/background_process_handler.py
voidpp/deprecated-python-tools
MIT
2024-11-19T01:00:13.123889+00:00
1,566,028,105,000
1f4d7d5ffeb6ab402ce1d39f47b7758bb7a114eb
2
{ "blob_id": "1f4d7d5ffeb6ab402ce1d39f47b7758bb7a114eb", "branch_name": "refs/heads/master", "committer_date": 1566028105000, "content_id": "d29cbeaed0da3f9da429b20cba81c5169b29e93e", "detected_licenses": [ "MIT" ], "directory_id": "30f9d07f4b78e585c970cbbb31077bc91006819e", "extension": "py", "fi...
2.359375
stackv2
# pip install redis import redis import MySQLdb from mysqlbinlog import * from mysql_rowdata import * import json class RedisHandler(MySQLRowDataHandler): client = None reader = None concern_tables = [] fields_map = {} def __init__(self): pass def get_redis(self, host='127.0.0.1', ...
95
26.68
99
18
615
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_2c04a77f422a4d39_88f4a240", "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" ]
[ 39, 39 ]
[ 39, 39 ]
[ 17, 17 ]
[ 71, 71 ]
[ "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" ]
sync_to_redis.py
/deprecated/mysqlbinlog/sync_to_redis.py
healerkx/PySQLKits
MIT
2024-11-19T01:00:13.295995+00:00
1,590,596,053,000
0cdd73d435699f9ffbe565efccf8dcf256183478
3
{ "blob_id": "0cdd73d435699f9ffbe565efccf8dcf256183478", "branch_name": "refs/heads/master", "committer_date": 1590596053000, "content_id": "63de7df448a4f9767e93fdbb337cde7a99d7e4a4", "detected_licenses": [ "MIT" ], "directory_id": "a5f0aaf90fac851dbdb96e782543b831f5c084b1", "extension": "py", "fi...
2.640625
stackv2
import argparse import csv import datetime import math import os import os.path import pickle from collections import defaultdict from enum import Enum from typing import Dict, List, DefaultDict, Optional, Tuple import iso8601 from google.auth.transport.requests import Request from google_auth_oauthlib.flow import Ins...
225
39.62
116
17
1,949
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cf915dc1cef06625_f806a6a7", "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...
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" ]
[ 76, 86 ]
[ 76, 86 ]
[ 21, 13 ]
[ 39, 38 ]
[ "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" ]
gcal-summary.py
/gcal-summary.py
steveryb/gcal-summary
MIT
2024-11-19T01:00:13.976663+00:00
1,692,588,584,000
ab39b362710127f553e159346bec839751505647
3
{ "blob_id": "ab39b362710127f553e159346bec839751505647", "branch_name": "refs/heads/master", "committer_date": 1692588584000, "content_id": "a393fe99b49e4105c1bcfa41c7c374c49285fc50", "detected_licenses": [ "MIT" ], "directory_id": "636849fc7edd9dcb095cf3410a121ab37de69f02", "extension": "py", "fi...
2.515625
stackv2
import click import os.path import shutil import subprocess import sys from pprint import pprint as pp def make_html(): """Build HTML docs""" click.secho("Building HTML") subprocess.run('make html', cwd='docs', shell=True) def upload(): """Upload distribution to PyPi""" cmd_setup = 'python setup....
67
26.15
82
11
464
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_def51b0f5b3b9266_6fdc7197", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
6
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shel...
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 17, 57, 57, 63, 63 ]
[ 17, 57, 57, 63, 63 ]
[ 5, 5, 35, 5, 36 ]
[ 42, 40, 39, 41, 40 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functio...
[ 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "HIGH", "LOW", "HIGH", "LOW" ]
fabfile.py
/fabfile.py
softlayer/softlayer-python
MIT
2024-11-19T01:00:17.722900+00:00
1,566,270,778,000
ecc8a8ffa90549448baa4522bccd5de0b94efd06
3
{ "blob_id": "ecc8a8ffa90549448baa4522bccd5de0b94efd06", "branch_name": "refs/heads/master", "committer_date": 1566270778000, "content_id": "65754f3d3244b22ced7f992895c79bcac70007a4", "detected_licenses": [ "MIT" ], "directory_id": "1a86b37fb94ec6c88f58e2218770ed3132d0fd75", "extension": "py", "fi...
2.859375
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- try : import cPickle as pickle except: import pickle import numpy as np import copy import progress as prg def obj_dump(obj, fname = 'dump.dump'): with open(fname, 'wb') as file: pickle.dump((obj), file) def obj_load(fname = 'dump.dump'): with open(fname, ...
124
38.19
100
19
1,401
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_f2bcf8fcf282b74e_d311bc38", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ...
4
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 12, 12, 15, 15 ]
[ 12, 12, 15, 15 ]
[ 37, 37, 43, 43 ]
[ 61, 61, 60, 60 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead t...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
dump.py
/mln/BatchLearning/dump.py
WaterIsland/DLStudy
MIT
2024-11-19T01:11:40.619091+00:00
1,605,858,332,000
c97f12fc5913460b2a855300e2737ce39ac0335d
3
{ "blob_id": "c97f12fc5913460b2a855300e2737ce39ac0335d", "branch_name": "refs/heads/master", "committer_date": 1605858332000, "content_id": "e210168999d8d28d4a39c30bf538507580f88055", "detected_licenses": [ "MIT" ], "directory_id": "acc0f57febffcf06b254dd09c573dea1f667f004", "extension": "py", "fi...
2.71875
stackv2
from jinja2 import Environment, FileSystemLoader, select_autoescape from pathlib import Path import json from ..utilities.path_ops import rel_path from ..utilities.str_ops import make_str_filename_safe, normalize_file_page_num from ..utilities.process_content import update_text_paragraph from .site import SiteChapter, ...
407
34.06
94
20
2,921
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_63fe8e5cd9589e0a_0c95554c", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
2
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 13, 53 ]
[ 18, 59 ]
[ 13, 21 ]
[ 2, 14 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected direct use of jinja2. If n...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
excavation.py
/src/generate_new_site/site_data_structs/excavation.py
aychen99/Excavating-Occaneechi-Town
MIT