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-18T23:18:41.708568+00:00 | 1,649,047,135,000 | c61643403e54228b726dff549f9bddd663010ffd | 2 | {
"blob_id": "c61643403e54228b726dff549f9bddd663010ffd",
"branch_name": "refs/heads/master",
"committer_date": 1649047135000,
"content_id": "bc928d03e56e39780971f0e97a807f662abe16e3",
"detected_licenses": [
"BSD-Source-Code"
],
"directory_id": "8b857a5111a8037f259fcb722cde4b3e233b3ed0",
"extension":... | 2.34375 | stackv2 | """
CGI-Tools Python Package
Copyright (C) 2016-2022 Assaf Gordon (assafgordon@gmail.com)
License: BSD (See LICENSE file)
"""
from __future__ import print_function
import sys, os, cgi, re, locale, resource, time, signal
from subprocess import Popen, PIPE
from .types import is_string, is_iterable, to_str_list
from .htt... | 124 | 33.62 | 88 | 15 | 1,159 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_59c1a4f0ca3ed4b5_ea2f1871", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
94
] | [
94
] | [
13
] | [
73
] | [
"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"
] | system.py | /cgi_tools/system.py | agordon/cgi-tools | BSD-Source-Code | |
2024-11-18T23:18:41.840180+00:00 | 1,516,135,127,000 | bfd111fc0c67b63ef79de2a951c47d7544486461 | 3 | {
"blob_id": "bfd111fc0c67b63ef79de2a951c47d7544486461",
"branch_name": "refs/heads/master",
"committer_date": 1516135127000,
"content_id": "7ec201f305442301ce07997543c5b5afcfaee09d",
"detected_licenses": [
"MIT"
],
"directory_id": "7a05ba0c0e0866f391b5f24140d28159dd0ae0be",
"extension": "py",
"fi... | 2.90625 | stackv2 | #!/usr/bin/env python
import os
import sys
import argparse
# FUNC
def interface():
parser = argparse.ArgumentParser(description="Creates command line to merge and split paired files.")
parser.add_argument('-1',
required=True,
dest='READS_1',
... | 83 | 28.46 | 127 | 13 | 497 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_d6d6996fe480e2d9_1db06656", "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"
] | [
82
] | [
82
] | [
5
] | [
128
] | [
"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"
] | array_merge.py | /LSFScripts/array_merge.py | joschif/LatentStrainAnalysis | MIT | |
2024-11-18T23:43:00.622223+00:00 | 1,531,699,077,000 | 274544337645d96ff1ef871da55c8f84209cc4a3 | 3 | {
"blob_id": "274544337645d96ff1ef871da55c8f84209cc4a3",
"branch_name": "refs/heads/master",
"committer_date": 1531699077000,
"content_id": "fff0eab00fb900f2a60389840e3aa202d7662866",
"detected_licenses": [
"MIT"
],
"directory_id": "e7e5ebe89d1a3409fc6c1bf4568be3f02a691e42",
"extension": "py",
"fi... | 2.75 | stackv2 | import networkx as nx
import os, errno
import pickle
class Organism:
def __init__(self,string_id,name=None):
self.string_id=string_id
if name is not None:
self.name=name
self.graph=nx.Graph()
self.essential_proteins=[]
def node_attributes(self,centralities='primary'):
'''
Parameters
------... | 71 | 21.76 | 101 | 22 | 403 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_06c1526d3585ff0a_92518b07", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
38,
63
] | [
38,
63
] | [
22,
6
] | [
41,
74
] | [
"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"
] | organism.py | /cleth/organism.py | shmakn99/cleth | MIT | |
2024-11-18T23:11:08.615780+00:00 | 1,494,372,078,000 | 963e0c97e39f53306c4a8bfe82a2080c54a664d3 | 2 | {
"blob_id": "963e0c97e39f53306c4a8bfe82a2080c54a664d3",
"branch_name": "refs/heads/master",
"committer_date": 1494372078000,
"content_id": "381341d1795ac804bd392e2e548d70ee3d975b40",
"detected_licenses": [
"MIT"
],
"directory_id": "6aecf1ea85cd4e9710956abc3fe4e4ddb9430162",
"extension": "py",
"fi... | 2.5 | stackv2 | import pickle
import os
import argparse
import sys
def main(task_dir, dry_run=False):
with open(os.path.join(task_dir,'file_list.p'),'rb') as f:
bucketed = pickle.load(f)
if dry_run:
print("Got {} (for example)".format(bucketed[0][0]))
bucketed = [['./bucket_' + x.split('bucket_')[1] for x ... | 25 | 38.28 | 113 | 17 | 249 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_66bedd751aa93044_3387e2f3", "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"
] | [
8,
17
] | [
8,
17
] | [
20,
13
] | [
34,
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"
] | fix_old_file_list.py | /fix_old_file_list.py | JancisWang/gated-graph-transformer-network | MIT | |
2024-11-18T23:11:09.023156+00:00 | 1,693,195,417,000 | a71045f03fbf9c524b74c6ff08f38f6f237df8a4 | 3 | {
"blob_id": "a71045f03fbf9c524b74c6ff08f38f6f237df8a4",
"branch_name": "refs/heads/master",
"committer_date": 1693195417000,
"content_id": "89618692aa1280958ddab04833c19eb35a515cc2",
"detected_licenses": [
"MIT"
],
"directory_id": "deda1742a61225a8c7ecd1833ec388f72d8bcc4f",
"extension": "py",
"fi... | 2.59375 | stackv2 | import logging
from .models import User
from .. import db
logger = logging.getLogger()
class UserService():
def __init__(self):
pass
def get_user_id(self, external_id, external_type):
try:
user = db.session.query(User).filter_by(
external_id=external_id).filter... | 52 | 29.96 | 77 | 19 | 336 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_c983b8cd3bb91eb8_c10bc2e1", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'new_user' is bein... | 1 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
35
] | [
35
] | [
13
] | [
61
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'new_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"
] | user_service.py | /app/auth/user_service.py | seal0112/stocker | MIT | |
2024-11-18T23:11:09.833707+00:00 | 1,525,212,351,000 | 5ef6fc3c612a9b9b1da07ff2317ea7c58dfc9609 | 2 | {
"blob_id": "5ef6fc3c612a9b9b1da07ff2317ea7c58dfc9609",
"branch_name": "refs/heads/master",
"committer_date": 1525212351000,
"content_id": "a5a23325ee30fb7754cc40c621e3522c688acdff",
"detected_licenses": [
"MIT"
],
"directory_id": "2a7b12db25bd667785424ab9d882df8bb4b47340",
"extension": "py",
"fi... | 2.5 | stackv2 | import sys
import MySQLdb
import time
def main():
ENTRANCE = 100
EXIT = 500
incount = 0
outcount = 0
lastquery = 0
people = {}
connection = MySQLdb.connect(
host="visitorinfo.cor4qvbqsu7p.us-east-2.rds.amazonaws.com",
user="atdao42",
passwd="X5ujNkX8DG",
db="v... | 63 | 31.84 | 113 | 18 | 533 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_b41b4b4e5ed2e22e_3ec95745", "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"
] | [
50,
50
] | [
50,
50
] | [
17,
17
] | [
38,
38
] | [
"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"
] | traffic.py | /traffic.py | tntech-csc-team4-2018/Tracking-with-darkflow | MIT | |
2024-11-18T23:11:09.888147+00:00 | 1,435,668,636,000 | f9b8fa15e105439e7f0f28246117b46a781f1599 | 3 | {
"blob_id": "f9b8fa15e105439e7f0f28246117b46a781f1599",
"branch_name": "refs/heads/master",
"committer_date": 1435668636000,
"content_id": "9b8b21ec83136f6711886978ea29dc50218c2bc3",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ad216be6044023aaf87894d31783da2e94b1a7b3",
"extension": "p... | 2.5625 | stackv2 | #!/usr/bin/env python
#
# Copyright (c) 2012 Martin Decky
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this li... | 107 | 30.18 | 89 | 14 | 784 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c098864e269d08ff_714a8391", "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"
] | [
104
] | [
104
] | [
9
] | [
31
] | [
"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"
] | dest_build.py | /tools/dest_build.py | narke/Einherjar.tmp | BSD-3-Clause | |
2024-11-18T23:11:10.229918+00:00 | 1,615,859,059,000 | 5178fdedad104ab02b2ad3551bedf9cab6f119a6 | 3 | {
"blob_id": "5178fdedad104ab02b2ad3551bedf9cab6f119a6",
"branch_name": "refs/heads/master",
"committer_date": 1615859059000,
"content_id": "9edb761038fa751faf791780591aae556dd071b7",
"detected_licenses": [
"MIT"
],
"directory_id": "2d047cd0283c52a7d6bc114e757f8ed178ed4e78",
"extension": "py",
"fi... | 3.296875 | stackv2 | # This is file help me reciting words, you can input help to see
# all commands and their meaning. I know there are some way to
# optimize the code, but now it's enough for me. By the way, who
# need to reciting thousands words?
# author: carl
# email: bearcarl@qq.com
# version: 1.0
# time: 2019.10.2
impor... | 308 | 22.87 | 79 | 16 | 1,695 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_eb37fe42b1ee1774_37246166", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
101,
104,
114,
116
] | [
101,
104,
114,
116
] | [
27,
25,
13,
13
] | [
41,
39,
40,
38
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | recite_words.py | /recite_words/recite_words.py | LiuYinCarl/tools | MIT | |
2024-11-19T01:21:37.263648+00:00 | 1,570,162,956,000 | 45ea3677a8aca0c8e4fb4006e22ef887b811bfc2 | 2 | {
"blob_id": "45ea3677a8aca0c8e4fb4006e22ef887b811bfc2",
"branch_name": "refs/heads/master",
"committer_date": 1570162956000,
"content_id": "8317ad02cd9b098d570be4745506f1073293c88a",
"detected_licenses": [
"MIT"
],
"directory_id": "aa3f670fcc2b43d8a5eb8a131082510bed2eb4d8",
"extension": "py",
"fi... | 2.3125 | stackv2 | """
process the output of ldmadmin printmetrics
getTime(), getLoad(), getPortCount(), getPq(), getCpu()
20121019.190728 date -u +%Y%m%d.%H%M%S
1.35 2.01 2.24 last three vals of `uptime`
49 8 downstream hosts, upstream hosts
3699 230388 7999874360 queue age, product count, byte count
21 2 77 0 ... | 60 | 29 | 74 | 12 | 557 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7a9c42ed867e1f57_de07c942", "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"
] | [
27,
28
] | [
29,
28
] | [
16,
47
] | [
10,
51
] | [
"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"
] | check_ldm.py | /nagios/check_ldm.py | jamayfieldjr/iem | MIT | |
2024-11-19T01:21:38.336875+00:00 | 1,581,802,338,000 | cfd70dbba807a6237699e3c12c361ae9d9470a81 | 3 | {
"blob_id": "cfd70dbba807a6237699e3c12c361ae9d9470a81",
"branch_name": "refs/heads/master",
"committer_date": 1581802338000,
"content_id": "91362dcd95118868eb791ca2005c84364396c3b0",
"detected_licenses": [
"MIT"
],
"directory_id": "b1d7f79705ec5d25ae286de55169b5c64b852ff2",
"extension": "py",
"fi... | 3.0625 | stackv2 | """Continuous Reading of Sensors
Make continuous readings from the sensors and begin
a take measurements function.
We Believe the Following:
Magnet x:
Magnet y:
Magnet z:
Euler Heading: Dir w/ 0 being North 90 East, 180 South, 270 West
Euler Roll:
Euler Pitch: Angle up
Accel x:
Accel y:
Accel z:
Euler x:
Euler y:
E... | 139 | 29.19 | 95 | 12 | 1,125 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_eeb6fe5961809a5f_bf4d6841", "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"
] | [
138
] | [
138
] | [
5
] | [
25
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | take_measurements.py | /measure/take_measurements.py | justinbooms/imu-positioning | MIT | |
2024-11-19T01:21:40.048406+00:00 | 1,606,815,377,000 | 80101e3930cd346ebb97671e70d0761d308fa6ce | 3 | {
"blob_id": "80101e3930cd346ebb97671e70d0761d308fa6ce",
"branch_name": "refs/heads/master",
"committer_date": 1606815377000,
"content_id": "b31d962bc304e6f6c809f04260018ac1efcc03d6",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "8433b22bb7287c058c24f083e11dd5e2340173ad",
"extension": "py",
... | 2.671875 | stackv2 | import os
from xml.dom.minidom import parse
#current_directory = os.path.abspath(os.curdir)
current_work_directory = os.getcwd()
class Project:
u'Project information'
projects = []
for d, dirs, files in os.walk(current_work_directory):
for file in files:
if(file.endswith('.csproj')):
proj... | 38 | 32.5 | 92 | 15 | 251 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_02a65647aca9ca7c_39aa44e8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
2
] | [
2
] | [
1
] | [
34
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | references report.py | /references report.py | coreline/sandbox | CC0-1.0 | |
2024-11-19T01:21:42.044113+00:00 | 1,580,346,663,000 | e897ff87413b807b151efba7c7644c81e644db04 | 3 | {
"blob_id": "e897ff87413b807b151efba7c7644c81e644db04",
"branch_name": "refs/heads/master",
"committer_date": 1580346663000,
"content_id": "216c6b2172448dec9a8c317bbd8e15c5245bb1f8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4b9f0cabec3d251e39636e593717ad9ba6fd2e25",
"extension": "py"... | 2.765625 | stackv2 | print('Writing database to csv file')
import csv
import time
import datetime
import os
import mysql.connector
import yaml
import uuid
### Read config parameters for mysql
with open('config.yaml') as f:
config = yaml.safe_load(f)
host = config['mysql_hostname']
username = config['mysql_username']
password = config... | 47 | 21.94 | 128 | 14 | 251 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9fbd6dd41fd816ad_a26fdfcd", "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-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"
] | [
40,
40
] | [
40,
40
] | [
2,
2
] | [
23,
23
] | [
"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"
] | save_all_data.py | /sql_savers/save_all_data/save_all_data.py | jonlwowski012/RabbitMqSwarm | Apache-2.0 | |
2024-11-19T01:21:42.098232+00:00 | 1,604,860,292,000 | ba42cfed636965fb89a1e48e14566ed54db0266e | 3 | {
"blob_id": "ba42cfed636965fb89a1e48e14566ed54db0266e",
"branch_name": "refs/heads/main",
"committer_date": 1604860292000,
"content_id": "61075889ffbf9a79e508707dcaf4bd09466d0d91",
"detected_licenses": [
"MIT"
],
"directory_id": "6519563d8aac85b9ffafafcd83bd175cbbbd56f4",
"extension": "py",
"file... | 2.84375 | stackv2 | import smtplib
import os
import subprocess
import sys
def check_setup():
try:
host = os.environ['EMAIL_HOST']
port = os.environ['EMAIL_PORT']
user = os.environ['EMAIL_USER']
password = os.environ['EMAIL_PASSWORD']
recipient = [os.environ['EMAIL_RECIPIENT']]
return h... | 99 | 24.45 | 87 | 15 | 643 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b8f106379dcf22ba_55e8b3d4", "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"
] | [
34
] | [
34
] | [
15
] | [
60
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | mail.py | /src/mail.py | mb1069/job_mailer | MIT | |
2024-11-19T00:11:39.038845+00:00 | 1,524,594,789,000 | 36c7d3ffbd7486f5bfea74763065b7ff9ed42dba | 3 | {
"blob_id": "36c7d3ffbd7486f5bfea74763065b7ff9ed42dba",
"branch_name": "refs/heads/master",
"committer_date": 1524594789000,
"content_id": "ccb2526135d8794bdd3b89df76ac71e59d02f351",
"detected_licenses": [
"MIT"
],
"directory_id": "17bc1aac486acd06aa46daca53aea6c2df94fc00",
"extension": "py",
"fi... | 3.015625 | stackv2 | from .base_classes import Person
# Note: a recruiter can have many job postings
class Recruiter(Person):
"""
This class is dedicated to modeling a recruiter.
class properties include:
- table_name: str
- cloumns: tuple - db column names
- columns_with_uid: tuple - db column names (including i... | 163 | 29.69 | 116 | 13 | 1,128 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_01c4e5f1235d0102_1cbd418a", "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... | 4 | true | [
"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.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"HIGH",
"HIGH"
] | [
84,
95,
95,
110
] | [
84,
95,
95,
110
] | [
19,
16,
16,
16
] | [
59,
43,
43,
51
] | [
"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,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | recruiter_class.py | /src/recruiter_class.py | crazcalm/job-search | MIT | |
2024-11-19T00:11:49.529512+00:00 | 1,552,612,954,000 | 5d2844adf97bfb8d369e07f9b9370bd0e9056671 | 3 | {
"blob_id": "5d2844adf97bfb8d369e07f9b9370bd0e9056671",
"branch_name": "refs/heads/master",
"committer_date": 1552612954000,
"content_id": "dde1f3988fb7f1ad247c26da4a098034d2179419",
"detected_licenses": [
"MIT"
],
"directory_id": "3ed3b0697847cb1ce79dd1347463605ae9772bdc",
"extension": "py",
"fi... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
from hermod.database import db, Column, Model,SurrogatePK
from hermod.extensions import bcrypt, login
from flask_login import UserMixin
class User(UserMixin,SurrogatePK,Model):
username = Column(db.String(80), unique=True, index=True, nullable=False)
email = Column(db.String(100), uni... | 43 | 30.33 | 77 | 13 | 292 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_86c53b9606bd8136_39fc8e9d", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'self' is being se... | 1 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
18
] | [
18
] | [
13
] | [
40
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'self' 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 | /hermodserver/hermod/user/models.py | codacy-badger/hermod | MIT | |
2024-11-19T00:11:50.984201+00:00 | 1,594,752,128,000 | 4d2d8ed58e42cb55e0f720906b32f945eea63596 | 3 | {
"blob_id": "4d2d8ed58e42cb55e0f720906b32f945eea63596",
"branch_name": "refs/heads/master",
"committer_date": 1594752128000,
"content_id": "c33af1f541b239fa46dd0a85e310fe62f741b443",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f7e15d8aa84c04957f5b5caf99daaf5166494127",
"extension": "py"... | 2.796875 | stackv2 |
import numpy as np
from sklearn.svm import SVR
from sklearn.metrics import accuracy_score
from sklearn.neighbors import KNeighborsRegressor
from sklearn.tree import DecisionTreeRegressor
import matplotlib.pyplot as plt
from collections import OrderedDict
import pickle
file1 = open('diff.pkl', 'rb')
data = pickle.loa... | 38 | 22.97 | 58 | 10 | 258 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_425e57f76b2a9ea5_66c0e266", "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... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
13
] | [
13
] | [
8
] | [
26
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | Latitude_Non_Linear_Regression.py | /Analysis/Latitude_Non_Linear_Regression.py | skandavc18/ClimateChange.org | Apache-2.0 | |
2024-11-19T00:24:53.962575+00:00 | 1,574,920,606,000 | 241ba032b0901d9cf79cef0e5609c9186f612eda | 3 | {
"blob_id": "241ba032b0901d9cf79cef0e5609c9186f612eda",
"branch_name": "refs/heads/master",
"committer_date": 1574920606000,
"content_id": "f63cb19a0d1570f1061a77c108f1e7bb9d8707cc",
"detected_licenses": [
"MIT"
],
"directory_id": "f3256e31fc16bee69613cfb655ab0c5a61de697b",
"extension": "py",
"fi... | 2.546875 | stackv2 | from nltk.tag import UnigramTagger, BigramTagger, TrigramTagger, DefaultTagger
import pickle
datas = open('Indonesian_Manually_Tagged_Corpus.tsv', 'r').read()
datas = datas.split('\n\n')
train_sents = []
for data in datas:
train_sents.append(list(tuple(i.split('\t')) for i in data.split('\n')))
def backoff_tagger(... | 25 | 26.96 | 99 | 15 | 199 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_8066051e9ff1cae5_1bad161e", "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"
] | [
24
] | [
24
] | [
1
] | [
34
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | indonesian_ngram_tagger.py | /event-report-engine/coba/pos-tag-indonesian/indonesian_ngram_tagger.py | yolandahp/its-event-report | MIT | |
2024-11-19T00:36:47.468860+00:00 | 1,583,173,614,000 | 18781addd6c876799091dcd6c06c7ae9e1a526bb | 3 | {
"blob_id": "18781addd6c876799091dcd6c06c7ae9e1a526bb",
"branch_name": "refs/heads/master",
"committer_date": 1583173614000,
"content_id": "7a5ffeb6014d388925e9f394cfa35413816dc36e",
"detected_licenses": [
"BSL-1.0"
],
"directory_id": "261e99bc4846d56ab2fd4519beff7e4d10cdd2a5",
"extension": "py",
... | 2.828125 | stackv2 | """
This script re-creates the images and
the readme.md file from the .py files
found in this directory that do not start with "_".
"""
import subprocess
import sys
from os import listdir
from os.path import isfile, join
# Yes, I use Windows. Sorry.
python = "c:/python38/python"
openscad = "C:/Program Files (x86)/op... | 70 | 23.99 | 64 | 13 | 556 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ea60e670501ab015_3f96bc26", "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"
] | [
28
] | [
28
] | [
8
] | [
30
] | [
"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"
] | _update.py | /examples/_update.py | ipsod/psml | BSL-1.0 | |
2024-11-19T00:36:47.896088+00:00 | 1,594,606,415,000 | 97be48c526c5446922f2c3b9e9c4eafc747b0b4e | 2 | {
"blob_id": "97be48c526c5446922f2c3b9e9c4eafc747b0b4e",
"branch_name": "refs/heads/master",
"committer_date": 1594606415000,
"content_id": "8645f5e58bc9d13dc62be54b289eec0ea63887d5",
"detected_licenses": [
"MIT"
],
"directory_id": "23e19a49e1257fbdf5d9cf2293db4c77eb264611",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
@File: minivisor.py
@Project: minivisor
@Desc: 监控进程
@Time: 2020/06/28 16:51:06
@Author: wuwenrufeng (wuwenrufeng@163.com)
@Last Modified: 2020/06/28 16:51:06
@Modified By: wuwenrufeng (wuwenrufeng@163.com)
@Version: 1.0
@License: Copyright(C) 2019 - 2020 Borland
"""
... | 88 | 24.41 | 106 | 21 | 671 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_7505967c7fea6f38_0a5cb193", "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"
] | [
76
] | [
76
] | [
29
] | [
51
] | [
"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"
] | minivisor.py | /minivisor.py | lxngoddess5321/minivisor | MIT | |
2024-11-19T00:36:51.158338+00:00 | 1,575,866,468,000 | 5532522918a53047d0d22e1a28b5e4e8d2334246 | 2 | {
"blob_id": "5532522918a53047d0d22e1a28b5e4e8d2334246",
"branch_name": "refs/heads/master",
"committer_date": 1575866468000,
"content_id": "3718ad0842c9bd4d625e60111525256158fd725f",
"detected_licenses": [
"MIT"
],
"directory_id": "4756b9b9d51c6f69ee8d27b0fa5fdc398821b508",
"extension": "py",
"fi... | 2.3125 | stackv2 | from flask import request, jsonify
from flask_restful import Resource
from flask_jwt_extended import jwt_required
from sqlalchemy.exc import IntegrityError
from http import client as httpclient
from app import db, api
from app.models import User as UserModel
from app.schemas import UserSchema
def error_template(mess... | 84 | 28.35 | 77 | 15 | 495 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_72fe47bc8bc0c982_c6ee8a61", "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",
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password",
"rules.python.django.security.audit.unvalidated-password"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
37,
54
] | [
37,
54
] | [
9,
17
] | [
44,
41
] | [
"A07:2021 - Identification and Authentication Failures",
"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.",
"The password on 'user' is being se... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | resources.py | /app/resources.py | ashwani99/splitter | MIT | |
2024-11-19T00:36:53.762186+00:00 | 1,634,316,393,000 | 7c02d5334b730d84634664bccfd8aaf03e779080 | 4 | {
"blob_id": "7c02d5334b730d84634664bccfd8aaf03e779080",
"branch_name": "refs/heads/main",
"committer_date": 1634316393000,
"content_id": "160b323a5d9aa30b2b122aa8f2048bfd0176756a",
"detected_licenses": [],
"directory_id": "a63284787a80024f31a15b0d3a4da48d85593aa3",
"extension": "py",
"filename": "Heap ... | 3.859375 | stackv2 | #getting heap elements using bottom up approach
def heapBottomUp(l): #bottom uping the heap
n=len(l)-1
for i in range(n//2,0,-1):
k=i
v=l[k]
heap=False
while(not heap and 2*k<=n):
j=2*k
if(j<n):
if(l[j]<l[j+1]):
j=j+1
if (v>=l[j]):
heap=True
else:
l[k]=l[j]
k=j
l[k]=v
retu... | 41 | 17.9 | 55 | 15 | 265 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_69d31cb4eab51891_beb6d2c1", "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"
] | [
33,
36
] | [
33,
36
] | [
4,
12
] | [
55,
25
] | [
"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"
] | Heap sort.py | /PYTHON/Heap sort.py | Christy538/Hacktoberfest-2021 | ||
2024-11-19T00:36:53.971441+00:00 | 1,665,867,018,000 | 12d1d83cdce8a240254b3e09c57985631419193e | 3 | {
"blob_id": "12d1d83cdce8a240254b3e09c57985631419193e",
"branch_name": "refs/heads/master",
"committer_date": 1665867018000,
"content_id": "53a89f14da0415b62ea6d9e0610696ac70ba66c2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e278f9aaa394c656659ad8d47d793404cf1accd5",
"extension": "py"... | 2.953125 | stackv2 | import json
class Track(object):
"""
Plugin to manage
@author: Fabio "BlackLight" Manganiello <blacklight86@gmail.com>
"""
def __init__(self, track_info):
"""
Track constructor
track_info -- Dictionary containing the track information:
['file'] -- The file ID (... | 95 | 37.87 | 96 | 15 | 828 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_3bf398e860508efe_db0322a8", "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"
] | [
86
] | [
86
] | [
9
] | [
97
] | [
"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"
] | music.py | /lib/music.py | BlackLight/Armando | Apache-2.0 | |
2024-11-19T00:36:58.011627+00:00 | 1,620,229,532,000 | 54bfbf1504a359d7b36fce27b388acc9460e000c | 3 | {
"blob_id": "54bfbf1504a359d7b36fce27b388acc9460e000c",
"branch_name": "refs/heads/main",
"committer_date": 1620229532000,
"content_id": "fa0c05429cdb05791acfc025e965a83e86abb9ec",
"detected_licenses": [
"MIT"
],
"directory_id": "49ab42731f95b6efd453fcc6e9a014b6af8588d6",
"extension": "py",
"file... | 2.96875 | stackv2 |
import pickle
import nltk
import re
import numpy as np
from string import punctuation
# English
from nltk.stem.lancaster import LancasterStemmer
from nltk.stem.rslp import RSLPStemmer
class BagOfWordsCorpus:
def __init__(self, save_path, commands, verbose, force_training=False):
self.verbose = verbose
... | 144 | 28.12 | 91 | 19 | 914 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_94376361e9a044d2_aa4e9755", "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",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
33,
91,
128,
142
] | [
33,
91,
128,
142
] | [
75,
13,
59,
17
] | [
89,
62,
73,
74
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | bag_words.py | /dsbot/corpus/bag_words.py | jefrysastre/dsbot | MIT | |
2024-11-19T00:37:02.814401+00:00 | 1,574,284,158,000 | 28ce1ee52d00f2460bd5e4cb0d1d6bced7688b33 | 3 | {
"blob_id": "28ce1ee52d00f2460bd5e4cb0d1d6bced7688b33",
"branch_name": "refs/heads/master",
"committer_date": 1574284158000,
"content_id": "ec0d424b2221d8eabc1a58186dbb0db46375d670",
"detected_licenses": [
"MIT"
],
"directory_id": "50baceae5be6504bd2c3231ac1233f1449751725",
"extension": "py",
"fi... | 2.734375 | stackv2 | import dill
import click
from crawl.crawler import BfsCrawler
@click.group()
def main():
pass
@main.command()
@click.option('-m', '--movie_url', help='Url address to filmweb movie site.', default='https://www.filmweb.pl/Piraci.Z.Karaibow', required=True)
@click.option('-s', '--storage_dir', help='Path to director... | 24 | 27.71 | 144 | 12 | 179 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_57e235bcb401abc8_a893f970", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.pass-body-fn", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "`pass` is the body of function main. Consider re... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-dill"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
19
] | [
19
] | [
15
] | [
55
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `dill`, 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"
] | main.py | /main.py | Ninoko/MovieScraper | MIT | |
2024-11-19T00:37:04.225696+00:00 | 1,527,144,145,000 | ce15db5ea9be8f82ae90215f0b971234c506a643 | 3 | {
"blob_id": "ce15db5ea9be8f82ae90215f0b971234c506a643",
"branch_name": "refs/heads/master",
"committer_date": 1527144145000,
"content_id": "05b4454e29c550e88b608bf00f6110b7b24b421c",
"detected_licenses": [
"MIT"
],
"directory_id": "c9051196742227a840b0c307f3f76869df14ad5f",
"extension": "py",
"fi... | 2.96875 | stackv2 | import requests
import re
from bs4 import BeautifulSoup
import pickle
url = 'https://sv.wikipedia.org/wiki/Wikipedia:Lista_%C3%B6ver_vanliga_spr%C3%A5kfel'
result = requests.get(url)
soup = BeautifulSoup(result.content, 'html.parser')
or_pattern = re.compile(r'(el\.|eller|\.\.\.|;|/)', re.I)
parentheses_pattern = r... | 51 | 31.69 | 85 | 17 | 443 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_08905a069ce142aa_68d25629", "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-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
51
] | [
51
] | [
3
] | [
27
] | [
"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"
] | scrape_wikipedia.py | /LSTM/scrape_wikipedia.py | JohanG2012/Swedish_NLP_LSTM | MIT | |
2024-11-19T00:51:25.007539+00:00 | 1,527,382,314,000 | c0a64ca3e74ae5c790562f1bcc4b38bac89f3ea4 | 3 | {
"blob_id": "c0a64ca3e74ae5c790562f1bcc4b38bac89f3ea4",
"branch_name": "refs/heads/master",
"committer_date": 1527382314000,
"content_id": "12163d4e8282e670f6a5e0c38dce43dc69a91ab7",
"detected_licenses": [
"MIT"
],
"directory_id": "03bfa40295ebb169c68a953074815a94339fe835",
"extension": "py",
"fi... | 2.65625 | stackv2 | #urllib-version
from urllib import request
import re
def paqu58(i):
url = "http://wh.58.com/chuzu/pn"+i+"/?PGTID=0d3090a7-0009-ec1a-9b66-5f003c5a2533&ClickID=1"
req = request.Request(url)
res = request.urlopen(req)
html = res.read().decode('utf-8')
#print(html)
print("paquzhong...")
'''
... | 52 | 23.83 | 111 | 13 | 464 | python | [{"finding_id": "semgrep_rules.python.django.security.injection.ssrf.ssrf-injection-urllib_229490ba14194c54_da0d455a", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.ssrf.ssrf-injection-urllib", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from req... | 2 | true | [
"CWE-918"
] | [
"rules.python.django.security.injection.ssrf.ssrf-injection-urllib"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
7
] | [
8
] | [
5
] | [
31
] | [
"A10:2021 - Server-Side Request Forgery (SSRF)"
] | [
"Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF), which could result in attackers gaining access to private organization data. To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the us... | [
7.5
] | [
"MEDIUM"
] | [
"HIGH"
] | 2-urllib.py | /第四章:Python网络爬虫基础(上)/2-urllib.py | zwq-qianyu/python-learning-projects | MIT | |
2024-11-19T01:02:10.626916+00:00 | 1,417,902,549,000 | 9db9ae5b7783522632b7456c50c13997cbd279ea | 3 | {
"blob_id": "9db9ae5b7783522632b7456c50c13997cbd279ea",
"branch_name": "refs/heads/master",
"committer_date": 1417902549000,
"content_id": "47bf862c6e31cf978b0a2c2ce09ea33b9eecd881",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d12e61292e432a0824fa3f1aa98b7ad740409cd8",
"extension": "py"... | 2.609375 | stackv2 | import os,json
from cgi import escape
def unescape(s):
s = s.replace("<", "<")
s = s.replace(">", ">")
# this has to be last:
s = s.replace("&", "&")
return s
class FilesystemMixin:
def h_fs_get(_,path,eltName=''):
from stat import S_ISDIR
data = (escape(open(path).re... | 37 | 33.24 | 93 | 20 | 341 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_70ce4b3d0e419127_acb5f813", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
28
] | [
28
] | [
14
] | [
80
] | [
"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"
] | fs.py | /fssvr/fs.py | val314159/framist | Apache-2.0 | |
2024-11-19T01:02:11.556834+00:00 | 1,690,821,683,000 | 723348616b5cd926c2407a5566b716d857ecb497 | 3 | {
"blob_id": "723348616b5cd926c2407a5566b716d857ecb497",
"branch_name": "refs/heads/main",
"committer_date": 1690821683000,
"content_id": "d37a81e1dd1d0403710fb031b2f25e574a649309",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0d4a917bf45457424d8702d252760745854b8181",
"extension": "py",
... | 2.703125 | stackv2 | #!/usr/bin/env python
'''
Upload assets to a given Github release
This utility uploads a set of assets to an existing Github release
which is specified by the tag for that release.
'''
import argparse
import glob
import os
import re
import requests
import shutil
import subprocess
import sys
import tarfile
from urll... | 128 | 30.05 | 90 | 17 | 858 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_540d18d4d0152f04_82fda38b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 7 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
43
] | [
43
] | [
12
] | [
40
] | [
"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"
] | upload-assests.py | /cicd/upload-assests.py | sassoftware/python-swat | Apache-2.0 | |
2024-11-19T01:02:18.673254+00:00 | 1,587,305,287,000 | c1d3045e7f9c674e780772d7e5f3ace17579351b | 2 | {
"blob_id": "c1d3045e7f9c674e780772d7e5f3ace17579351b",
"branch_name": "refs/heads/master",
"committer_date": 1587305287000,
"content_id": "f8804e35e282c48adabdcdd509f1e091f84935cb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3d31b7e6a4c8606103f9f3a1eb74f05df4454332",
"extension": "py"... | 2.421875 | stackv2 | from utils import list_individual_images, break_captcha, save_candidate_name, save_image
import sys
import random
import os
import readline
READ_PATH = './src/classifier/pieces/'
SAVE_PATH = './src/classifier/classified/'
CAPTCHAS_TXT = './list_captchas.txt'
with open(CAPTCHAS_TXT, 'r') as fp:
SOLVED = [i.strip()... | 37 | 29.73 | 88 | 14 | 301 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_31a6bbee2b514f0c_de2fa0f8", "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"
] | [
33
] | [
33
] | [
9
] | [
49
] | [
"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"
] | classify.py | /src/classifier/classify.py | Leocardoso94/bbb-v2 | Apache-2.0 | |
2024-11-19T01:02:26.496085+00:00 | 1,608,564,641,000 | 1d94fc5ff01943b31331837dff49a0a08c3d0c76 | 2 | {
"blob_id": "1d94fc5ff01943b31331837dff49a0a08c3d0c76",
"branch_name": "refs/heads/main",
"committer_date": 1608564641000,
"content_id": "f9c745924e8b3568e8f0cd327db568a5944ad796",
"detected_licenses": [
"MIT"
],
"directory_id": "d965d7158dac0b5486c241fa599762950d6452e6",
"extension": "py",
"file... | 2.3125 | stackv2 | import torch
import torch.nn as nn
from torch.distributions import MultivariateNormal
import gym
import numpy as np
from datetime import datetime
from PIL import Image
import sys
from collections import namedtuple
sys.path.insert(0, '../../metaworld')
sys.path.insert(0, '../supervised')
from metaworld.envs.mujoco.sawye... | 200 | 36.07 | 104 | 23 | 1,742 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d1f0deb352f79b14_aa03eb51", "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",
"CWE-95",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
25,
26,
27,
54,
55
] | [
25,
26,
27,
54,
55
] | [
17,
17,
19,
17,
24
] | [
31,
31,
33,
70,
87
] | [
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM"
] | train_policy.py | /src/rl/train_policy.py | prasoongoyal/PixL2R | MIT | |
2024-11-19T01:02:27.524855+00:00 | 1,690,987,386,000 | 11542e673d190c8bd89fa659539f7f2240af0439 | 2 | {
"blob_id": "11542e673d190c8bd89fa659539f7f2240af0439",
"branch_name": "refs/heads/master",
"committer_date": 1690987386000,
"content_id": "25e235e9d5c7e4018e2700a21ea7231c7d2f07a1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0acb17a85af6482fd4c55e043231710fc59e50ee",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# snapshotreports.py
# April 2019
#
# this tool will export all the reports in your viya system to there own
# individual json file in a directory.
#
# The purpose of the tools is to be able to have a granular backup of reports
# so that you could restore an individual report... | 202 | 33.79 | 164 | 26 | 1,746 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-uuid-version_a210d6ed4438cb0e_2d1afaef", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-uuid-version", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Using UUID version 1 for UUID generation can ... | 10 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"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.subp... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
175,
175,
190,
190,
190,
194,
194
] | [
175,
175,
190,
190,
190,
194,
194
] | [
6,
37,
6,
22,
37,
27,
145
] | [
42,
41,
42,
29,
41,
150,
149
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"MEDIUM",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"MEDIUM",
"LOW",
"HIGH",
"LOW"
] | snapshotreports.py | /snapshotreports.py | sassoftware/pyviyatools | Apache-2.0 | |
2024-11-19T01:02:28.139650+00:00 | 1,677,679,212,000 | e52702863c84533c16e9af082d4e081d31264460 | 2 | {
"blob_id": "e52702863c84533c16e9af082d4e081d31264460",
"branch_name": "refs/heads/main",
"committer_date": 1677679953000,
"content_id": "536506f3dc3055cdaa37948ed5ac8e1a47c51fe2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "14227351264f0ee61b4b98a9b132fe479d84a9c3",
"extension": "py",
... | 2.40625 | stackv2 | from __future__ import annotations
import logging
import subprocess # nosec
def get_kustomize_version(kustomize_command: str) -> str | None:
try:
proc = subprocess.run([kustomize_command, "version"], capture_output=True) # nosec
version_output = proc.stdout.decode("utf-8")
if "Version:... | 25 | 35.4 | 107 | 16 | 218 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_17c17c15ecb678ff_bb636e4a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
9
] | [
9
] | [
16
] | [
83
] | [
"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"
] | utils.py | /checkov/kustomize/utils.py | jlosito/checkov | Apache-2.0 | |
2024-11-19T01:02:29.922550+00:00 | 1,693,450,897,000 | fd39376761c3b8c9079b1047852486288f6c6635 | 3 | {
"blob_id": "fd39376761c3b8c9079b1047852486288f6c6635",
"branch_name": "refs/heads/main",
"committer_date": 1693461700000,
"content_id": "5c5faef823b55f2c71ebb5a8cfdd1cfbb40479c2",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8886361e436c7598419f444a52ae587bf94b1fbe",
"extension": "py"... | 2.5625 | stackv2 | """
Copyright (c) 2021 The Blosc Development Team <blosc@blosc.org>
https://blosc.org
License: BSD 3-Clause (see LICENSE.txt)
Script for plotting the results of the 'suite' benchmark.
Invoke without parameters for usage hints.
"""
import matplotlib as mpl
from pylab import *
KB_ = 1024
MB_ = 1024*KB_
GB_ = 1024*MB_
... | 225 | 32.09 | 107 | 18 | 1,881 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_f1e02d68ea881b57_8a580bf4", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
181
] | [
181
] | [
24
] | [
43
] | [
"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"
] | plot-speeds.py | /bench/plot-speeds.py | Blosc/c-blosc2 | BSD-3-Clause | |
2024-11-18T23:48:37.684012+00:00 | 1,493,281,441,000 | c0494ed103ae88753a1522e05bb9015f75bc5d4e | 2 | {
"blob_id": "c0494ed103ae88753a1522e05bb9015f75bc5d4e",
"branch_name": "refs/heads/master",
"committer_date": 1493281441000,
"content_id": "d2382a018fa5e04c06416342a1344d2744d1a015",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "81fb817dbe35601009f3ab123e57c3d1281fb86d",
"extension": "py"... | 2.484375 | stackv2 | # -*- coding: gb2312 -*-
"""
输入:jenkins服务器的地址,用户名和密码
输出:已定义的job的列表
"""
import datetime, time
from jenkinsapi.jenkins import *
from jenkinsapi.job import *
from jenkinsapi.build import Build
def Url_Get_Job_List(url='http://10.167.210.237:8081/', username='panwei', password='666666'):
jenkins = Jenkins(url, username... | 18 | 29.61 | 94 | 12 | 181 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.hardcoded-password-default-argument_17011f071e0c4841_0124072f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.hardcoded-password-default-argument", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Hardcode... | 1 | true | [
"CWE-798"
] | [
"rules.python.lang.security.audit.hardcoded-password-default-argument"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
10
] | [
16
] | [
1
] | [
50
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"Hardcoded password is used as a default argument to 'Url_Get_Job_List'. This could be dangerous if a real password is not supplied."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | jenkins_get_jobs.py | /examples/how_to/jenkins_get_jobs.py | pingod/python-jenkins_api | Apache-2.0 | |
2024-11-18T23:48:44.519740+00:00 | 1,571,730,821,000 | f9eb58f221775d2b6caa483f7ce6f3bf2bcae3f6 | 3 | {
"blob_id": "f9eb58f221775d2b6caa483f7ce6f3bf2bcae3f6",
"branch_name": "refs/heads/master",
"committer_date": 1571730821000,
"content_id": "b48f9f4169b2c4eac417a7d1fb4960809e3a9ddc",
"detected_licenses": [
"MIT"
],
"directory_id": "6219e6536774e8eeb4cadc4a84f6f2bea376c1b0",
"extension": "py",
"fi... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
"""
Read RSS xml file and save its data to couchdb
Created by Giang Nguyen Truong on 2014-09-23.
Copyright (c) 2014 Chongiadung All rights reserved.
"""
from collections import defaultdict
import json, io, os
import sys
import xml.etree.ElementTree as ET
import time
import math
import re
def ... | 79 | 31.75 | 98 | 16 | 628 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_04304dc7f8a0f012_afd7e1f7", "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"
] | [
12
] | [
12
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | convert_xml.py | /service/convert_xml.py | nguyenminhthai/choinho | MIT | |
2024-11-18T23:49:53.746630+00:00 | 1,629,367,335,000 | 36baffa8b2185fbf0af776f3e5efd7aa576874c2 | 3 | {
"blob_id": "36baffa8b2185fbf0af776f3e5efd7aa576874c2",
"branch_name": "refs/heads/main",
"committer_date": 1629367335000,
"content_id": "cfbad3bc53a7db393b93cccad5c783d9697884d1",
"detected_licenses": [
"MIT"
],
"directory_id": "6b437822ca8ef67b20bfc390ccb0eed23586afc4",
"extension": "py",
"file... | 2.734375 | stackv2 |
import sys
import networkx as nx
import pickle
from collections import defaultdict
from argparse import ArgumentParser, FileType, ArgumentDefaultsHelpFormatter
from annotation_parser import AnnotationParser
from sheet_parser import SheetParser
from deco_features_interface import DECOFeaturesInterface
from cell_obje... | 356 | 43.08 | 160 | 23 | 3,163 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_305fac9f69e24283_9b8acdb3", "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... | 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"
] | [
236,
245
] | [
236,
245
] | [
9,
18
] | [
29,
32
] | [
"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"
] | feature_generator.py | /deco_classifier/feature_generator.py | guenthermi/table-embeddings | MIT | |
2024-11-18T23:50:01.095798+00:00 | 1,608,905,044,000 | 1b11ec52a3afa06b7d6f0a986cf8893ae81c0ce2 | 4 | {
"blob_id": "1b11ec52a3afa06b7d6f0a986cf8893ae81c0ce2",
"branch_name": "refs/heads/master",
"committer_date": 1608905044000,
"content_id": "13a9f32f9323afee7fb64b1ba8bedddad74d4875",
"detected_licenses": [
"MIT"
],
"directory_id": "857fc21a40aa32d2a57637de1c723e4ab51062ff",
"extension": "py",
"fi... | 3.515625 | stackv2 | #!/usr/bin/env python3
# coding:utf-8
import os
def arrange(addr):
"""
前提:文件夹中全是满足条件的图片
功能:生成指定的文件夹;将图片放入对应的文件夹
addr: 指定的目录
return: 输出一个收集 jpg 文件信息的 list
"""
os.chdir(addr)
jpg_set = set()
jpg_list = list()
for afile in os.listdir():
jpg_set.add(afile.split('-')[0])
... | 41 | 19.9 | 77 | 13 | 313 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_716d4b71dc97822b_6eff5a17", "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
] | [
13
] | [
48
] | [
"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"
] | 021_02.py | /FishCDailyQuestion/ex021-030/Python3_021/021_02.py | YorkFish/git_study | MIT | |
2024-11-19T00:13:40.877293+00:00 | 1,636,429,695,000 | 55c6afb3b64af543523348164b981732584b901c | 3 | {
"blob_id": "55c6afb3b64af543523348164b981732584b901c",
"branch_name": "refs/heads/master",
"committer_date": 1636429695000,
"content_id": "f0e5c762d14edb8558808c6604cd678db3b41f63",
"detected_licenses": [
"MIT"
],
"directory_id": "28df6816edfa3436e9e7d79da61dcbddb890c493",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/usr/bin/env python3
import pickle
import types
import pickle_function
def roundtrip(val):
pickled = pickle_function.dumps(val)
# use _loads (the python implementation) for better stacktraces
return pickle._loads(pickled)
_IGNORED_TYPES = (
# we aren't trying to pickle the types.CodeType/types.Fu... | 42 | 32.95 | 77 | 12 | 334 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_9f7fc931a5f690c7_94785f05", "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"
] | [
11
] | [
11
] | [
12
] | [
34
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | pickle_util.py | /pickle_util.py | benjaminjkraft/pickle-junk | MIT | |
2024-11-19T01:26:13.103433+00:00 | 1,559,940,602,000 | 024490b212865f6ae91210129d5d7140ff6873b8 | 3 | {
"blob_id": "024490b212865f6ae91210129d5d7140ff6873b8",
"branch_name": "refs/heads/master",
"committer_date": 1559940602000,
"content_id": "3d87ccbcb35240c7c453fec0729dcbf809cee4e0",
"detected_licenses": [
"MIT"
],
"directory_id": "5ddd69f0f6bddf7d402f87bd441bf4ae93eb4f17",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
'''Auto-deploy a python application to the Heroku Cloud Platform.
Place your application files and dependencies into this directory and run
this script from the command line. This script automatically initializes
the directory, generates all of the neces... | 180 | 30.28 | 92 | 14 | 1,253 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_baf28969899d0b60_5480684e", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
94,
158
] | [
94,
158
] | [
10,
5
] | [
81,
23
] | [
"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 dynamic content use... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | hero_deploy.py | /heroku_deploy_template/hero_deploy.py | le-prometheen/heroku_auto_deploy_template | MIT | |
2024-11-19T01:51:53.414188+00:00 | 1,642,543,969,000 | 6c7bf37b8be9b23846b5c3e804e28aefa6f0f192 | 3 | {
"blob_id": "6c7bf37b8be9b23846b5c3e804e28aefa6f0f192",
"branch_name": "refs/heads/master",
"committer_date": 1642543969000,
"content_id": "091b778c70feafdc214cf0425993b998752e178c",
"detected_licenses": [
"MIT"
],
"directory_id": "1b6d16e1576cbacd19d88efb732d6a3fd88a6b62",
"extension": "py",
"fi... | 2.96875 | stackv2 | # PTB reading code modified from
# https://github.com/awni/semantic-rntn/blob/master/tree.py
# credit to Awni Hannun
import collections, cPickle
from nltk.corpus import stopwords
from collections import Counter
import string, sys
UNK = 'UNK'
class Node:
def __init__(self,label,word=None):
self.label = la... | 219 | 27.92 | 118 | 17 | 1,669 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_71d4bd09edaed1a6_53758423", "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... | 14 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
91,
91,
127,
156,
168,
169,
170,
190,
205,
219
] | [
91,
91,
127,
156,
168,
169,
170,
190,
205,
219
] | [
16,
16,
9,
9,
13,
11,
12,
5,
5,
5
] | [
32,
32,
34,
119,
73,
69,
71,
74,
74,
76
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserial... | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5,
5,
5,
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | sentiment_trees.py | /preprocess/sentiment_trees.py | miyyer/dan | MIT | |
2024-11-19T01:51:54.717039+00:00 | 1,631,110,938,000 | 35f1e456bd42b338f2d4d2a0c9e46758d340565c | 3 | {
"blob_id": "35f1e456bd42b338f2d4d2a0c9e46758d340565c",
"branch_name": "refs/heads/master",
"committer_date": 1631110938000,
"content_id": "ef153d30b00285408a0e722a0bba1b08fda0f109",
"detected_licenses": [
"MIT"
],
"directory_id": "9fa8c280571c099c5264960ab2e93255d20b3186",
"extension": "py",
"fi... | 2.890625 | stackv2 | class ManageUserModel:
def __init__(self, database):
self.database = database
def load_user(self, name):
self.database.execute(f"select name, passwd, role, access from _user where name = '{name}'")
info_list = self.database.fetchone()
info = {
'name': info_list[0],
... | 25 | 28.96 | 100 | 13 | 165 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_069506aa3f431f6f_5607999d", "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"
] | [
7,
7
] | [
7,
7
] | [
9,
9
] | [
101,
101
] | [
"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"
] | model.py | /system/manager/access/user/model.py | thuchula6792/AutoOED | MIT | |
2024-11-19T01:51:55.230600+00:00 | 1,523,293,693,000 | ed15cd81023e305bf97de1447b2f74d0644dc1d7 | 4 | {
"blob_id": "ed15cd81023e305bf97de1447b2f74d0644dc1d7",
"branch_name": "refs/heads/master",
"committer_date": 1523293693000,
"content_id": "e5dcb1594f02e44e750f4800d3501f863d3e6b55",
"detected_licenses": [
"MIT"
],
"directory_id": "bb3e11de422ab2328db03de15c4235140efd023c",
"extension": "py",
"fi... | 3.515625 | stackv2 | """Primera sesion.
Este es un análisis de humansize.py basado en
http://www.diveintopython3.net/your-first-python-program.html
"""
""" humansize.py:
# $ python3 humansize.py
# 1.0 TB
# 931.3 GiB
"""
""" import:
¿Dónde python busca el código?
¿Dónde ipython busca el código?
¿Cómo se importa código?
"""
import sys
... | 91 | 21.11 | 75 | 12 | 616 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_22b4fcc68f10700b_09e69bcd", "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"
] | [
81
] | [
81
] | [
5
] | [
42
] | [
"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"
] | first.py | /ejemplos/sesion-2/first.py | hashcodezgz/training | MIT | |
2024-11-19T01:51:55.803877+00:00 | 1,693,155,568,000 | b1bf9464c99a0681b7ca0910cb0f1cc0439be627 | 3 | {
"blob_id": "b1bf9464c99a0681b7ca0910cb0f1cc0439be627",
"branch_name": "refs/heads/main",
"committer_date": 1693155568000,
"content_id": "cbea9ca22e5e9634e0dfa2e726179d4f94453155",
"detected_licenses": [
"MIT"
],
"directory_id": "be63eb4f1e09a0220bf2ab39de03d10ce77aa9b0",
"extension": "py",
"file... | 2.890625 | stackv2 | import os
import yaml
from jinja2 import Environment, FileSystemLoader
# Get script's directory
script_dir = os.path.dirname(os.path.abspath(__file__))
# Define the absolute path to the templates directory
templates_dir = os.path.join(script_dir, '../docs/showcase')
templates_dir = os.path.abspath(templates_dir)
prin... | 57 | 36.61 | 96 | 17 | 447 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_0cbac6fe264954dc_053a95c2", "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... | 7 | true | [
"CWE-79",
"CWE-116",
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
14,
14,
41,
55
] | [
14,
14,
41,
55
] | [
7,
7,
26,
22
] | [
58,
58,
55,
65
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | generate_showcase_pages.py | /build_tools/generate_showcase_pages.py | missionpinball/mpf-docs | MIT | |
2024-11-19T00:17:34.231550+00:00 | 1,575,393,665,000 | 814e4ab5d3e00239944897258f29282d6e47d9d0 | 2 | {
"blob_id": "814e4ab5d3e00239944897258f29282d6e47d9d0",
"branch_name": "refs/heads/master",
"committer_date": 1575393665000,
"content_id": "82fe0f5d29e833f6e0f437a2592dbcddaea19d85",
"detected_licenses": [
"MIT"
],
"directory_id": "cee032266847b5dec3653707220e8588c1bfbf85",
"extension": "py",
"fi... | 2.359375 | stackv2 | import argparse
import os
import subprocess
import mongoengine as me
import rmc.html_snapshots.utils as utils
import rmc.shared.constants as c
def crawl_page(url):
args = [
'phantomjs',
'--disk-cache=true',
os.path.join(utils.FILE_DIR, 'phantom-server.js'),
url,
]
rendere... | 59 | 28.39 | 77 | 13 | 395 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1a4724c9a3c54633_a9e697a5", "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"
] | [
18
] | [
18
] | [
21
] | [
50
] | [
"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"
] | snapshot.py | /html_snapshots/snapshot.py | joshkergan/rmc | MIT | |
2024-11-19T00:17:37.213116+00:00 | 1,594,747,147,000 | 145460ed8ff46e7ede66b590b058a23c72864eb2 | 2 | {
"blob_id": "145460ed8ff46e7ede66b590b058a23c72864eb2",
"branch_name": "refs/heads/master",
"committer_date": 1594747147000,
"content_id": "3f40032880cb1f996395ee58821d24ab1d1b37f9",
"detected_licenses": [
"MIT"
],
"directory_id": "2bd8cbf7d9bc750b2b8a8351a3c4de19d48b5803",
"extension": "py",
"fi... | 2.390625 | stackv2 | # python3.6.5
# coding:utf-8
# 天猫淘宝自动下单 用于定时抢购
import os
import sys
from selenium import webdriver
import requests
import time
from selenium.webdriver.chrome.options import Options
# 创建浏览器对象
chrome_options = Options()
# 关闭使用 ChromeDriver 打开浏览器时上部提示语 "Chrome正在受到自动软件的控制"
chrome_options.add_argument("disable-infobars")
#... | 144 | 26.27 | 173 | 20 | 1,217 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_081e88b9d82e542d_4e0f287f", "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... | 6 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
111
] | [
111
] | [
9
] | [
22
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | tmall_order.py | /tmall_order.py | lijin132/N95-watcher | MIT | |
2024-11-19T00:55:23.803844+00:00 | 1,559,055,119,000 | 5da73d18c2ca641a6bdc022333a458e91eab4739 | 2 | {
"blob_id": "5da73d18c2ca641a6bdc022333a458e91eab4739",
"branch_name": "refs/heads/master",
"committer_date": 1559055119000,
"content_id": "2fb7ac4d5516b89e1ab96ec0c2be7a793036741f",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a84fa2fe932bdd0318cf3c08eeb44d1d835c30c2",
"extension": "p... | 2.390625 | stackv2 | from enum import Enum
import libvirt
import logging
import os
import socket
import sys
import time
import xml.etree.ElementTree as ET
log = logging.getLogger(__name__)
log.addHandler(logging.StreamHandler())
log.setLevel(logging.DEBUG) # TODO
ENDIANNESS = 'little'
def itob(value, length=4):
""" Converts an integ... | 372 | 30.81 | 127 | 24 | 2,610 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_1fb2e22e80fa545a_2f567c95", "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",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
8,
90,
291
] | [
8,
90,
291
] | [
1,
24,
16
] | [
35,
63,
54
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | proxy.py | /python/proxy.py | pdressen/hermit-caves | BSD-3-Clause | |
2024-11-19T00:55:24.041072+00:00 | 1,455,250,878,000 | 15b84a577ecae00248dc4e0995477ba3c32521aa | 3 | {
"blob_id": "15b84a577ecae00248dc4e0995477ba3c32521aa",
"branch_name": "refs/heads/master",
"committer_date": 1455250878000,
"content_id": "0947726f03fac9f8b4c4a71d4390e8b925ac5762",
"detected_licenses": [
"MIT"
],
"directory_id": "c5b8e5112d988de8734f989e4470a63b75c3601d",
"extension": "py",
"fi... | 2.921875 | stackv2 | import os, time
import psycopg2
def is_up(host='8.8.8.8'):
return os.system("ping -c 1 -w2 " + host + " > /dev/null 2>&1") == 0
# Call is_up every period seconds, and insert the results into the postgres db
def monitor(period=30):
conn = psycopg2.connect("dbname=webstatus user=postgres")
cur = conn.cursor... | 21 | 27.19 | 78 | 12 | 170 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_366b7c3d412d071a_b6501bce", "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"
] | [
5
] | [
5
] | [
12
] | [
68
] | [
"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"
] | check_status.py | /check_status.py | JTKBowers/webstatus | MIT | |
2024-11-19T00:55:28.733228+00:00 | 1,571,750,474,000 | 7ec52ddee7360cf6f45a105a636a6c16bb50ab61 | 2 | {
"blob_id": "7ec52ddee7360cf6f45a105a636a6c16bb50ab61",
"branch_name": "refs/heads/master",
"committer_date": 1571750474000,
"content_id": "063821bfe071afad884a2e5bb4f1e3272f0a86bd",
"detected_licenses": [
"MIT"
],
"directory_id": "618296e0b00f9bee3f2a3a5a7f4e61e890b7b32e",
"extension": "py",
"fi... | 2.421875 | stackv2 | import random
from django.shortcuts import render, get_object_or_404, redirect
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import login, authent... | 67 | 31.19 | 75 | 13 | 462 | python | [{"finding_id": "semgrep_rules.python.django.security.nan-injection_6fd1a88b927b1f7e_16721b8f", "tool_name": "semgrep", "rule_id": "rules.python.django.security.nan-injection", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found user input going directly into typecast for bool(), f... | 2 | true | [
"CWE-704"
] | [
"rules.python.django.security.nan-injection"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
58
] | [
58
] | [
15
] | [
45
] | [
""
] | [
"Found user input going directly into typecast for bool(), float(), or complex(). This allows an attacker to inject Python's not-a-number (NaN) into the typecast. This results in undefind behavior, particularly when doing comparisons. Either cast to a different type, or add a guard checking for all capitalizations ... | [
7.5
] | [
"MEDIUM"
] | [
"MEDIUM"
] | views.py | /core/views.py | jakobzmrzlikar/Capitals | MIT | |
2024-11-19T00:55:29.284964+00:00 | 1,478,437,465,000 | 0d8214e0b158e071ff45747efd671aa1f8df47e7 | 2 | {
"blob_id": "0d8214e0b158e071ff45747efd671aa1f8df47e7",
"branch_name": "refs/heads/master",
"committer_date": 1478437465000,
"content_id": "dabeeb8ab9412669f2d649db08b1264dbd1cee34",
"detected_licenses": [
"MIT"
],
"directory_id": "10173511342f4287acd6028e8788b56efb711d29",
"extension": "py",
"fi... | 2.453125 | stackv2 | """
This script runs preprocessing on either a CProject folder or an elasticsearch-dump,
and produces dataframes as input for visualizations.
"""
import pandas as pd
import numpy as np
import os
import pickle
import gzip, bz2
import itertools
import argparse
import config
def get_raw(filename):
with open(filena... | 300 | 38.45 | 130 | 20 | 2,983 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_8c30c54026f5a2dc_d7fd4f37", "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... | 19 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.pyth... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
70,
77,
102,
106,
119,
124,
149,
154,
187,
191,
208,
213,
224,
229,
240,
245
] | [
70,
77,
102,
106,
119,
124,
149,
154,
187,
191,
208,
213,
224,
229,
240,
245
] | [
18,
13,
27,
13,
22,
13,
30,
13,
30,
13,
27,
13,
25,
13,
29,
13
] | [
37,
49,
46,
58,
41,
53,
49,
61,
49,
61,
46,
58,
44,
56,
48,
60
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserial... | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | preprocessing.py | /preprocessing/preprocessing.py | ContentMine/visualizations | MIT | |
2024-11-19T01:39:55.197844+00:00 | 1,601,125,572,000 | 2de8be0908871caba134c8d2a66c2a48e6f7dce1 | 3 | {
"blob_id": "2de8be0908871caba134c8d2a66c2a48e6f7dce1",
"branch_name": "refs/heads/master",
"committer_date": 1601125572000,
"content_id": "61b6584516c2eca623c4549b2436c04f2ccd8660",
"detected_licenses": [
"MIT"
],
"directory_id": "b73c580b9db7c2ecda0849f91bd359c6069d82d8",
"extension": "py",
"fi... | 2.640625 | stackv2 | import flask
import numpy as np
import pickle
app = flask.Flask(__name__, template_folder=r'C:\Users\user\Desktop\Machine Learning\Iris\template')
model = pickle.load(open(r'C:\Users\user\Desktop\Machine Learning\Iris\model.pkl', 'rb'))
@app.route('/')
def home():
return flask.render_template('index.html')
@app.... | 21 | 33.05 | 100 | 13 | 173 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_68f00dc808b1216a_86571b26", "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"
] | [
6
] | [
6
] | [
9
] | [
90
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | app.py | /app.py | BhavyaShah1234/IrisSpeciesAnalysis | MIT | |
2024-11-19T01:39:56.193106+00:00 | 1,574,092,558,000 | d38442b92842fc4d50c9a7932a3a66093c85c74f | 3 | {
"blob_id": "d38442b92842fc4d50c9a7932a3a66093c85c74f",
"branch_name": "refs/heads/master",
"committer_date": 1574092558000,
"content_id": "f9aa3a72cd769e9c2d19479b4170f9695756e0b1",
"detected_licenses": [
"MIT"
],
"directory_id": "cf88d7c8017155efd00b948ee7374d58369aafe9",
"extension": "py",
"fi... | 2.5625 | stackv2 | #!/usr/bin/python
"""A pickle-to-json converter
Copyright 2016 Mitsubishi Electric Research Labs
"""
import argparse
import pickle
import json
parser = argparse.ArgumentParser()
parser.add_argument('--indir', '-i', default='', type=str,
help='Specify input directory')
parser.add_argument('--out... | 29 | 33.03 | 66 | 11 | 230 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f2d0c2e97d15945f_692ce382", "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"
] | [
27
] | [
27
] | [
12
] | [
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"
] | pickle2json.py | /AVSD_Baseline/Baseline/utils/pickle2json.py | hudaAlamri/DSTC7-Audio-Visual-Scene-Aware-Dialog-AVSD-Challenge | MIT | |
2024-11-19T01:39:59.114666+00:00 | 1,624,895,936,000 | 05b3c259df8b38294589449f7436f54d7c0c19d1 | 3 | {
"blob_id": "05b3c259df8b38294589449f7436f54d7c0c19d1",
"branch_name": "refs/heads/main",
"committer_date": 1624895936000,
"content_id": "b4c8f22e57f84755a68c6a6dcec91f6f8d4d5da4",
"detected_licenses": [
"MIT"
],
"directory_id": "524b53f7cffbcd26b756704a46be602bbb89c654",
"extension": "py",
"file... | 2.703125 | stackv2 | import os
import random
import subprocess
def code_start(code):
num = random.randint(0, 100000000)
try:
f = open(f'test{num}.py', 'w', encoding='utf8')
f.write(code)
f.close()
print(code)
result = subprocess.run(
f'python test{num}.py',
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
shell=Tru... | 28 | 23.25 | 53 | 15 | 205 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_82cee58f9eb9d68f_f2681e1a", "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"
] | [
12,
15
] | [
16,
15
] | [
12,
10
] | [
4,
14
] | [
"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()'.",
"Found 'subprocess' function... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | api.py | /scripts/api.py | vsecoder-old-account/PythonBite | MIT | |
2024-11-19T01:40:01.353374+00:00 | 1,601,638,212,000 | ae3c7d2a3f68a9dfc6120365e0d5d4ccf7819e54 | 3 | {
"blob_id": "ae3c7d2a3f68a9dfc6120365e0d5d4ccf7819e54",
"branch_name": "refs/heads/master",
"committer_date": 1601638212000,
"content_id": "3d8d8809820aa0af0fb61ffc7899d5ed01d3e292",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "d29f529b504d150d48c77048ca5e7510a2e0edee",
"extension": "p... | 2.65625 | stackv2 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
"""XML file reader and stored lists for FRGC database
"""
import xml.sax
import os
import numpy
import bob.db.base
class File (bob.db.base.File):
"""This class is just the File object that is returned by the objects function.
It will be created on need and i... | 318 | 35.25 | 171 | 19 | 2,871 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_05cfbea042d5b03d_f641c523", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
7
] | [
7
] | [
1
] | [
15
] | [
"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"
] | models.py | /bob/db/frgc/models.py | bioidiap/bob.db.frgc | BSD-3-Clause | |
2024-11-19T01:40:01.682898+00:00 | 1,617,376,338,000 | e58882605dd97c7fb73e564955609b71dd52e66c | 3 | {
"blob_id": "e58882605dd97c7fb73e564955609b71dd52e66c",
"branch_name": "refs/heads/main",
"committer_date": 1617376338000,
"content_id": "cd40ab72dc2825ca40a777acc7843683e6884ad2",
"detected_licenses": [
"MIT"
],
"directory_id": "83648bfa5c888b254401ff705a5fb5a4afb6029e",
"extension": "py",
"file... | 3.046875 | stackv2 | import pickle
import numpy as np
def add_dict(dict1, dict2):
"""
Combines two data dicts
"""
if 'length' in dict1.keys():
out_dict = {}
out_dict['x'] = np.vstack([dict1['x'],dict2['x']])
out_dict['aux_vars'] = np.vstack([dict1['aux_vars'],dict2['aux_vars']])
out_dict['qp_dot'] ... | 59 | 31.37 | 78 | 16 | 623 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3ff19337f75f44af_61305cda", "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"
] | [
47,
55
] | [
47,
55
] | [
14,
19
] | [
33,
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"
] | data_loader.py | /utils/data_loader.py | gbarber94/ConSciNet | MIT | |
2024-11-19T01:40:02.611716+00:00 | 1,574,613,933,000 | 6d7169bd6c558cfaaa60ea85468ea2ca5f145497 | 3 | {
"blob_id": "6d7169bd6c558cfaaa60ea85468ea2ca5f145497",
"branch_name": "refs/heads/master",
"committer_date": 1574613975000,
"content_id": "44779e0d03cb5e6ff5f655e81d38475553b47874",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9d8636232cfcc277919ba70ccf6924fd788c33dc",
"extension": "py"... | 2.859375 | stackv2 | # -*- coding: utf-8 -*-
# /usr/bin/python3
import pickle
import random
import tensorflow as tf
from utils.utils import calc_num_batches
def load_data(fpath, data_size):
""" Loads the preprocessed data pickle.
This assumes the following:
- image data is preprocessed with a VGGNet to (196,512) and this ar... | 111 | 28.34 | 116 | 15 | 853 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b82eebf699c43436_fca65490", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
24
] | [
24
] | [
12
] | [
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"
] | data_load.py | /utils/data_load.py | kwendel/deeplearning | Apache-2.0 | |
2024-11-18T23:43:30.623608+00:00 | 1,559,228,061,000 | af47c68a3769ec7dd9f6e7dbc75df3ef8ade1165 | 3 | {
"blob_id": "af47c68a3769ec7dd9f6e7dbc75df3ef8ade1165",
"branch_name": "refs/heads/master",
"committer_date": 1559228061000,
"content_id": "2be47e3c54a67703e730d98004ea321655e22960",
"detected_licenses": [
"MIT"
],
"directory_id": "3bfcf86ee125982488a35806130d78898435d722",
"extension": "py",
"fi... | 3.03125 | stackv2 | """
Handles requests
"""
import sys
import urllib3
from utils import constants
from utils import misc
def make_request(url, retries=5, timeout=5, headers=None):
""" function for sending request and receiving response """
http = urllib3.ProxyManager(constants.PROXY)
try:
resp = http.request("GE... | 87 | 30.1 | 97 | 16 | 636 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_b453879fb4d62951_f5f26a66", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
55,
86
] | [
55,
86
] | [
25,
29
] | [
52,
55
] | [
"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"
] | request.py | /utils/request.py | kaustubhhiware/swift | MIT | |
2024-11-18T23:43:33.511434+00:00 | 1,424,450,975,000 | ed43441a161531fe23035322ee6171555c3b1e89 | 2 | {
"blob_id": "ed43441a161531fe23035322ee6171555c3b1e89",
"branch_name": "refs/heads/master",
"committer_date": 1424450975000,
"content_id": "d95007fcc15d84279c33cf23a53b57017d0a5113",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3724a1b95e95e611cdd793d1af685f72dfea6b3e",
"extension": "py"... | 2.421875 | stackv2 | import json
import xml.etree.ElementTree as ET
from cafe.engine.models.base import AutoMarshallingModel
from cloudcafe.compute.common.constants import Constants
class VncConsole(AutoMarshallingModel):
def __init__(self, type, url):
self.type = type
self.url = url
@classmethod
def _json_... | 33 | 29.36 | 77 | 15 | 225 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_b7952e9032a16e41_6d7b638b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
2
] | [
2
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | vnc_console.py | /cloudcafe/compute/extensions/vnc_console_api/models/vnc_console.py | kurhula/cloudcafe | Apache-2.0 | |
2024-11-18T23:43:33.912021+00:00 | 1,509,009,714,000 | b9b52ef276e309efb227098b31f38f83e707f802 | 3 | {
"blob_id": "b9b52ef276e309efb227098b31f38f83e707f802",
"branch_name": "refs/heads/master",
"committer_date": 1509009729000,
"content_id": "836a77d2fc3c11ac50ed120c29c184c84c8ebdfe",
"detected_licenses": [
"MIT"
],
"directory_id": "26d4e8286bd94e0b513a3558113714695108534e",
"extension": "py",
"fi... | 2.953125 | stackv2 | import sqlite3
import cPickle as pickle
class CreatureDB(object):
def __init__(self, filename):
self.conn = sqlite3.connect(filename, isolation_level=None) # autocommit
self.conn.text_factory = str
self.cur = self.conn.cursor()
self.cur.execute("""
CREATE TABLE IF NOT E... | 120 | 27.88 | 81 | 13 | 750 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_6813557b34667c02_e1a5f800", "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"
] | [
40,
40,
51,
51
] | [
40,
40,
51,
51
] | [
19,
19,
16,
16
] | [
34,
34,
37,
37
] | [
"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"
] | db.py | /ev/db.py | antocuni/evolvingcopter | MIT | |
2024-11-18T23:43:36.545015+00:00 | 1,588,569,784,000 | c465a87aaa2c800efd05b28a7c3b6bbb8e5ae6f2 | 3 | {
"blob_id": "c465a87aaa2c800efd05b28a7c3b6bbb8e5ae6f2",
"branch_name": "refs/heads/master",
"committer_date": 1588569784000,
"content_id": "8d7b77433c668eaafc908a91a03ae582399ed00a",
"detected_licenses": [
"MIT"
],
"directory_id": "186113f6a311b3a6f27bb002a9617cbff8339059",
"extension": "py",
"fi... | 3 | stackv2 | #!/usr/bin/env python
import glob
from pydub import AudioSegment
import os
from gtts import gTTS
def generate_audio(episode, dirpath):
"""
generate audio file from google tts
:return:
"""
raw = []
txt_filename = dirpath + '[raw]' + episode + '.txt'
input = open(txt_filename, "r", encoding='... | 65 | 29.86 | 134 | 15 | 522 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_f6a08c52b07d76bf_5264ccad", "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... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
53
] | [
53
] | [
5
] | [
19
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | generate_audio.py | /generate_audio.py | kosehy/rezero_text_to_audio | MIT | |
2024-11-19T00:33:02.357751+00:00 | 1,559,250,341,000 | 1092eec2827195220c821eb5ab1098e712902b15 | 3 | {
"blob_id": "1092eec2827195220c821eb5ab1098e712902b15",
"branch_name": "refs/heads/master",
"committer_date": 1559250341000,
"content_id": "1e9148a68f4795c8795a0f0e0d62f917c71cdd87",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b17cb7da7264f3c419684afe4b89987ce6954ec7",
"extension": "py"... | 2.890625 | stackv2 | #!/usr/bin/env python
import os
from urllib import urlencode
from httplib import HTTPConnection
from xml.dom.minidom import parse
from isbndb import ISBNdbException
from isbndb import ISBNdbHttpException
from isbndb.catalog import *
def find_credentials( ):
"""
Look in the current environment for the ISBNdb A... | 131 | 29.19 | 82 | 14 | 891 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_86b40bdd9452e1c4_736f6940", "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"
] | [
6
] | [
6
] | [
1
] | [
34
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | client.py | /isbndb/isbndb/client.py | ciaciafelipe/Scripts | Apache-2.0 | |
2024-11-19T00:33:06.523733+00:00 | 1,667,925,767,000 | 37dae0f58a0b9327cb9506fc90188895aadd33d4 | 3 | {
"blob_id": "37dae0f58a0b9327cb9506fc90188895aadd33d4",
"branch_name": "refs/heads/master",
"committer_date": 1667925767000,
"content_id": "effaff1c8ba5e3959191505c1c20697d2310e2de",
"detected_licenses": [
"MIT"
],
"directory_id": "935eab9fafd0f99980ac007e4b7dc6f51a24fa53",
"extension": "py",
"fi... | 3.015625 | stackv2 | from matchreporter.constants import STRING_ZERO
def remove_prefix(prefixed, prefix):
if prefixed.startswith(prefix):
return prefixed[len(prefix):]
return prefixed
def parse_int(int_str):
try:
return int(eval(str(remove_prefix(int_str, STRING_ZERO))))
except:
return 0
def s... | 39 | 23.13 | 66 | 15 | 204 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_c1c83b3d74b86af5_b1aff8ab", "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"
] | [
13
] | [
13
] | [
20
] | [
66
] | [
"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"
] | stringhelper.py | /matchreporter/helpers/stringhelper.py | moynihanrory/matchreporter | MIT | |
2024-11-19T00:33:07.529243+00:00 | 1,359,386,960,000 | 9b6737bcd5656d6ba7ff02f1b484d7f89c66f8f5 | 3 | {
"blob_id": "9b6737bcd5656d6ba7ff02f1b484d7f89c66f8f5",
"branch_name": "refs/heads/master",
"committer_date": 1359386960000,
"content_id": "e9e6d6a751ea7e25351ecec0203726cfb0f45f48",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bb4241ec40d0f3bc7484957a3aad2c7921f3ab5f",
"extension": "p... | 2.65625 | stackv2 | """
Database for bug information.
Talks to remote bug databases and caches information locally.
"""
from collections import defaultdict
from os import path
import shelve
from tracewhack import config, log
from tracewhack.bugs import github
SUPPORTED_DB_TYPES = {'github': github}
VERSION = 1
class BugDb(object):
... | 127 | 26.2 | 75 | 17 | 731 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_fe7f272a5f7dccb6_d2c11bf8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-shelve"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
120
] | [
120
] | [
12
] | [
65
] | [
"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"
] | db.py | /src/tracewhack/bugs/db.py | wingu/tracewhack | BSD-3-Clause | |
2024-11-19T01:17:58.786372+00:00 | 1,660,744,043,000 | 55953c3b921a3ccc6a824ffcedd9ff98eb50bfc5 | 2 | {
"blob_id": "55953c3b921a3ccc6a824ffcedd9ff98eb50bfc5",
"branch_name": "refs/heads/master",
"committer_date": 1660744043000,
"content_id": "9c55e07deaf629fb81690d0434f22f5e2b2344a4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "10190de5d8006352d1bc03bbd56ff52aeea8119c",
"extension": "py"... | 2.5 | stackv2 | """
Definition of forms.
"""
from django import forms
from django.contrib.auth.forms import AuthenticationForm, UserCreationForm
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.utils.html import escape
fr... | 273 | 36.84 | 132 | 16 | 2,442 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_7e96606fb472ffa2_c3b67296", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-mark-safe", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "'mark_safe()' is used to mark a string as \"... | 1 | true | [
"CWE-79"
] | [
"rules.python.django.security.audit.avoid-mark-safe"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
54
] | [
54
] | [
17
] | [
57
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escaping and could therefore subject the content to XSS attacks. Use 'django.utils.html.format_html()' to build HTML for rendering instead."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | forms.py | /asrbank/asrbank/transcription/forms.py | ErwinKomen/RU-asrbank | Apache-2.0 | |
2024-11-19T01:17:58.975390+00:00 | 1,606,412,499,000 | c2acd1ffb4261d1c79a80ab6fb907f3fe1a0ef8d | 2 | {
"blob_id": "c2acd1ffb4261d1c79a80ab6fb907f3fe1a0ef8d",
"branch_name": "refs/heads/master",
"committer_date": 1606412499000,
"content_id": "be9c019c37cf9e2bb56581db1c4e8ce8faba6a63",
"detected_licenses": [
"MIT"
],
"directory_id": "e064754f60d43320efaf24e225f71635db9bda3a",
"extension": "py",
"fi... | 2.390625 | stackv2 | """
Q learning
"""
from future import standard_library
standard_library.install_aliases()
# ...
from builtins import bytes
from builtins import open
from future.utils import with_metaclass
import random, math, pickle, time
import interface, utils
import numpy as np
from agent import Agent
from rl import RLAlgori... | 337 | 33.05 | 148 | 19 | 2,584 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_6be7ce1bd2b274c2_7edd75a7", "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"
] | [
130
] | [
130
] | [
29
] | [
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"
] | qlearning.py | /qlearning.py | unbun/snake.ai | MIT | |
2024-11-19T01:17:59.261364+00:00 | 1,621,886,282,000 | d3467918b2d7a467ae35f2819c4aacd3d9a31824 | 3 | {
"blob_id": "d3467918b2d7a467ae35f2819c4aacd3d9a31824",
"branch_name": "refs/heads/main",
"committer_date": 1621886282000,
"content_id": "236e485e0227491ad397a7d405ca14994d71771f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "66f9bbc30fab876666ac49c9943d650deb326e0c",
"extension": "py",
... | 3.40625 | stackv2 | """Fsm
A simple implimentation of a finite state machine that can be associated with a
model object to manage the model's state.
"""
from functools import partial
from voluptuous import MultipleInvalid
import yaml
from yaml import Loader
from fsm.schema import FSM_SCHEMA, STATE_SCHEMA, TRANSITION_SCHEMA
from fsm.st... | 261 | 33.01 | 80 | 18 | 1,789 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_4b03638bd508c7e4_3645d9e2", "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-pyyaml-load"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
254
] | [
254
] | [
16
] | [
45
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Detected a possible YAML deserialization vulnerability. `yaml.unsafe_load`, `yaml.Loader`, `yaml.CLoader`, and `yaml.UnsafeLoader` are all known to be unsafe methods of deserializing YAML. An attacker with control over the YAML input could create special YAML input that allows the attacker to run arbitrary Python ... | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | fsm.py | /src/fsm/fsm.py | tantonb/fsm | Apache-2.0 | |
2024-11-19T01:18:03.307538+00:00 | 1,562,682,778,000 | 92494c3095211db91b2b92affdcd7f379659e57e | 3 | {
"blob_id": "92494c3095211db91b2b92affdcd7f379659e57e",
"branch_name": "refs/heads/master",
"committer_date": 1562682778000,
"content_id": "9a1989bd69aecd0768d01867ad6a3665a264d103",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "62ea77e7f97b86a9f21536e24ebbb6246a232b7d",
"extension": "py"... | 2.890625 | stackv2 | import subprocess
import sys
import os
import time
print "Staging script for Juniper switches \n"
print "Scanning for active IP addresses \n"
while True:
starting_address = raw_input("Please enter X as starting address (192.168.0.X): ")
if int(starting_address) < 256 and int(starting_address) >= 0:
print ("The ... | 44 | 32.64 | 107 | 14 | 481 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_5c34eb3c4f5eb4de_62305bc6", "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... | 5 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
29
] | [
29
] | [
20
] | [
62
] | [
"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"
] | firmware_update_aruba.py | /juniper_switches_firmware_update/firmware_update_aruba.py | Maliek/staging | Apache-2.0 | |
2024-11-19T01:18:05.638923+00:00 | 1,597,295,191,000 | 33fd534d91dcd0d92f01e176b29d96aded977ca1 | 3 | {
"blob_id": "33fd534d91dcd0d92f01e176b29d96aded977ca1",
"branch_name": "refs/heads/master",
"committer_date": 1597295191000,
"content_id": "aaa37071c81d386e42cb109b729486ce67e116d3",
"detected_licenses": [
"MIT"
],
"directory_id": "bc37f8c7fe1fafd8644a934886a6e32fd1a29f2b",
"extension": "py",
"fi... | 2.546875 | stackv2 | # 导入python 自带库
# 导入自定义模块
from speech.baidu import Speech
from Mainwindow.Mainwindow import Ui_mainWindow
from PyQt5 import QtWidgets, QtGui
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QFileDialog
import os
class BaiduSpeech(QtWidgets.QMainWindow, Ui_mainWindow):
def __init__(self):
sup... | 82 | 27.11 | 105 | 14 | 598 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ba22898b83ea99f3_ebe33097", "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"
] | [
73
] | [
73
] | [
9
] | [
55
] | [
"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 | /main.py | soaringsoul/Text2Speech | MIT | |
2024-11-19T01:18:05.995459+00:00 | 1,627,891,885,000 | 058a9e1ac2b4655f76db4c4cee366a38ba881df8 | 2 | {
"blob_id": "058a9e1ac2b4655f76db4c4cee366a38ba881df8",
"branch_name": "refs/heads/main",
"committer_date": 1627891885000,
"content_id": "d9e3721d362627c14f0a6b9b8134753cfd9276d5",
"detected_licenses": [
"MIT"
],
"directory_id": "7675b17ee241b728062b0f853708f62d373652c5",
"extension": "py",
"file... | 2.484375 | stackv2 | import os, subprocess, time
import numpy as np
# normal configuration variables
test_files_dir = '/home/cme_practical_team_1/data/BS/'
project_dir = os.path.pardir
tmp_dir = "/home/cme_practical_team_1/tmp/"
our_exe = project_dir + "/bin/commandline_rf"
result_file_path = project_dir + '/benchmark_ours/'
metrics = ["MC... | 127 | 43.81 | 133 | 20 | 1,328 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_bbb1cb1a66a11d67_6c5b92f5", "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"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
101
] | [
101
] | [
28
] | [
105
] | [
"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"
] | benchmarkOurs.py | /misc/benchmarkOurs.py | DoktorBotti/RF_Metrics | MIT | |
2024-11-19T01:18:06.640472+00:00 | 1,614,082,062,000 | 06c3506109f4bb4894cc7e94042b856b0199a6bb | 3 | {
"blob_id": "06c3506109f4bb4894cc7e94042b856b0199a6bb",
"branch_name": "refs/heads/main",
"committer_date": 1614082062000,
"content_id": "d92be5e013dd0daefd901693a6726cef87e6e796",
"detected_licenses": [
"MIT"
],
"directory_id": "791646d347320e272f51cf2ecd15e1bbcf07a909",
"extension": "py",
"file... | 2.84375 | stackv2 | """
Contains all crawlers for the project
"""
import subprocess
import os
import time
import logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s",
handlers=[
logging.FileHandler(
"{0}/{1}.log".format(os.getcwd(),... | 120 | 36.09 | 132 | 13 | 850 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_4b4d24ceaa3b4b95_1537fa79", "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"
] | [
85,
85,
110,
110
] | [
85,
85,
110,
110
] | [
9,
56,
9,
56
] | [
61,
60,
61,
60
] | [
"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()'.",
"Found 'subprocess' function... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | crawler.py | /crawler.py | RougeRedWired/screaming-frog-python-driver | MIT | |
2024-11-19T01:18:07.813450+00:00 | 1,632,313,704,000 | 12751844118c7131aedc3ea37ecb65371cf304ff | 3 | {
"blob_id": "12751844118c7131aedc3ea37ecb65371cf304ff",
"branch_name": "refs/heads/master",
"committer_date": 1632313704000,
"content_id": "8ef12c7ec72253b93b7a82efd264aa1cfc94a8fe",
"detected_licenses": [
"MIT"
],
"directory_id": "7cea076affab3b05c480622f4937ff7db00563cb",
"extension": "py",
"fi... | 2.78125 | stackv2 | import flask
import os
from pathlib import Path
from urllib.parse import urljoin
import markdown
from markdown.inlinepatterns import InlineProcessor, LinkInlineProcessor, ImageInlineProcessor, LINK_RE, IMAGE_LINK_RE
from markdown.extensions import Extension
class SnippetLinkProcessor(InlineProcessor):
def ... | 132 | 29.52 | 120 | 17 | 902 | python | [{"finding_id": "semgrep_rules.python.flask.security.unescaped-template-extension_78df3550200d1e19_06ba5e0f", "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... | 6 | true | [
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.unescaped-template-extension",
"rules.python.flask.security.unescaped-template-extension",
"rules.python.flask.security.unescaped-template-extension",
"rules.python.flask.security.unescaped-template-extension"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
60,
71,
107,
126
] | [
65,
76,
113,
130
] | [
12,
12,
12,
16
] | [
6,
6,
6,
10
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Flask does not automatically escape Jinja templates unless they have .html, .htm, .xml, or .xhtml extensions. This could lead to XSS attacks. Use .html, .htm, .xml, or .xhtml for your template extensions. See https://flask.palletsprojects.com/en/1.1.x/templating/#jinja-setup for more information.",
"Flask does n... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | __init__.py | /blogka/__init__.py | geajack/blogka | MIT | |
2024-11-19T01:18:10.747635+00:00 | 1,628,180,620,000 | 09d4c0a104661e5939b34dd283d66e5c0825b124 | 3 | {
"blob_id": "09d4c0a104661e5939b34dd283d66e5c0825b124",
"branch_name": "refs/heads/master",
"committer_date": 1628180620000,
"content_id": "9175b789a8e9346461752cbaa807d422210f115b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "02bd06b46482ce69c12105f3170e2052ad37578a",
"extension": "py"... | 2.671875 | stackv2 | # USAGE
# python hard_negative_mine.py --conf conf/cars.json
# import the necessary packages
from __future__ import print_function
from object_detection import ObjectDetector
from descriptors import HOG
from utils import dataset
from utils import Conf
from imutils import paths
import numpy as np
import progressbar
imp... | 73 | 35.62 | 96 | 14 | 652 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_efcde011269c58d0_55e35e86", "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"
] | [
29
] | [
29
] | [
9
] | [
65
] | [
"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"
] | hard_negative_mine.py | /Basic/Module_2_Building_Custom_Object_Detector/2.9_hard_negative_mining/hard_negative_mine.py | thinhemb/Computer_Vision | Apache-2.0 | |
2024-11-19T01:54:17.856240+00:00 | 1,590,811,223,000 | 7845d1e28a56128022430af3ca56832fc9c8b007 | 2 | {
"blob_id": "7845d1e28a56128022430af3ca56832fc9c8b007",
"branch_name": "refs/heads/master",
"committer_date": 1590811223000,
"content_id": "bc899b0bd1d441f0386275eee2f06e0c239c7446",
"detected_licenses": [
"MIT"
],
"directory_id": "753ebeb538694e3c86d19fad3e54609d89531fb6",
"extension": "py",
"fi... | 2.46875 | stackv2 | import requests
from bs4 import BeautifulSoup, Comment, Tag
from pathlib import Path
import pickle
import re
utcDocRegistry_urls = {
2000: "https://www.unicode.org/L2/L2000/Register-2000.html",
2001: "https://www.unicode.org/L2/L2001/Register-2001.html",
2002: "https://www.unicode.org/L2/L2002/Register-20... | 322 | 36.52 | 97 | 21 | 3,199 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_76dbf0625889b9b6_a42a1468", "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... | 16 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.pyth... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
59,
67,
90,
102,
217,
226,
251,
263,
275,
301
] | [
59,
67,
90,
102,
217,
226,
251,
263,
275,
301
] | [
27,
13,
27,
13,
22,
13,
28,
13,
29,
13
] | [
44,
77,
44,
77,
39,
72,
45,
78,
46,
79
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserial... | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | utc_actions.py | /UTC_Actions/utc_actions.py | PeterConstable/UTC_Actions | MIT | |
2024-11-19T00:02:44.103547+00:00 | 1,495,179,297,000 | 4a4a1051fd459801ea1e8999f140a870962f2b6a | 3 | {
"blob_id": "4a4a1051fd459801ea1e8999f140a870962f2b6a",
"branch_name": "refs/heads/master",
"committer_date": 1495179297000,
"content_id": "97280f34c569cd01eff9bd37bf0db2157120f7d8",
"detected_licenses": [
"MIT"
],
"directory_id": "3a973a913e0cdf537f2436fcd2631cdd205e6c01",
"extension": "py",
"fi... | 2.828125 | stackv2 | import numpy as np
import random
import re
import pickle
from rdkit import Chem
import sys
class Vocabulary(object):
def __init__(self, max_length=140):
self.special_tokens = ['EOS', 'GO']
self.additional_chars = set()
self.chars = self.special_tokens
self.vocab_size = len(self.char... | 143 | 33.49 | 88 | 17 | 1,161 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3e323b3698e3ff48_d59fd239", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
111,
132
] | [
111,
132
] | [
9,
9
] | [
50,
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"
] | data_structs.py | /data_structs.py | CHEMPHY/REINVENT | MIT | |
2024-11-19T00:15:30.759029+00:00 | 1,452,111,580,000 | 4144aabeb26e6ddcdb2f82e0d18c198bf8f2cf52 | 2 | {
"blob_id": "4144aabeb26e6ddcdb2f82e0d18c198bf8f2cf52",
"branch_name": "refs/heads/master",
"committer_date": 1452112380000,
"content_id": "c69e2b1ba38c8ea0a966836b497a5c03a5027e2c",
"detected_licenses": [
"BSD-3-Clause",
"Apache-2.0"
],
"directory_id": "1ac829447973a4bbba99770bfc90a86e299cbfaa",... | 2.4375 | stackv2 | # Copyright 2015 Bloomberg Finance L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 199 | 31.35 | 96 | 18 | 1,457 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d8524cd6edc384c9_67c4ad78", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
159
] | [
159
] | [
5
] | [
35
] | [
"A03:2021 - Injection"
] | [
"Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | setup.py | /setup.py | hohn/bqplot | BSD-3-Clause,Apache-2.0 | |
2024-11-19T00:25:26.262620+00:00 | 1,517,657,094,000 | bc5cec4d63c3f37a6687bf2fc2f9897a82ca9a87 | 3 | {
"blob_id": "bc5cec4d63c3f37a6687bf2fc2f9897a82ca9a87",
"branch_name": "refs/heads/master",
"committer_date": 1517657094000,
"content_id": "d0d11f04d0a974a6f9c8045656504029aea3df81",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "afba8612198cebf9e1a4da06fff5816600615dd0",
"extension": "py"... | 2.953125 | stackv2 | # -*- coding: utf-8 -*-
"""
__author__ = "Rodrigo Pasti"
__copyright__ = "Copyright 2015/2016/2017, Mackenzie University"
__credits__ = ["Ahirton Lopes", "Rodrigo Pasti", "Leandro de Castro"]
__license__ = "None"
__version__ = "1.0"
__maintainer__ = "Ahirton Lopes"
__email__ = "ahirton.xd@gmail.com"
"""
import pickle... | 52 | 30.29 | 159 | 15 | 455 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1df6c39b0e550748_bcbae47d", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 12 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
40,
49
] | [
40,
49
] | [
5,
11
] | [
27,
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"
] | file_utils.py | /file_utils.py | romulosimiquel/Text-Mining-Open-Course | Apache-2.0 | |
2024-11-19T00:25:26.698905+00:00 | 1,619,778,682,000 | e3a476d7e1c428a26e15a4aa51b9d8dbcc5ff703 | 3 | {
"blob_id": "e3a476d7e1c428a26e15a4aa51b9d8dbcc5ff703",
"branch_name": "refs/heads/main",
"committer_date": 1619778682000,
"content_id": "c33eec65cbfd4091843ee091f9184f84abd8755d",
"detected_licenses": [
"MIT"
],
"directory_id": "c0dc1994c8c33c82f62e05c5dbc84cd2847ef133",
"extension": "py",
"file... | 2.953125 | stackv2 | # zippyshare-downloader
# utils.py
import re
import math
from .errors import InvalidURL
ALLOWED_NAMES = {
k: v for k, v in math.__dict__.items() if not k.startswith("__")
}
# Credit for the evaluate() method: Leodanis Pozo Ramos https://realpython.com/python-eval-function/
def evaluate(expression):
"""Evalu... | 50 | 34.26 | 106 | 14 | 575 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_68142395040d0e90_89b0c964", "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"
] | [
24
] | [
24
] | [
12
] | [
59
] | [
"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"
] | utils.py | /zippyshare_downloader/utils.py | 5l1v3r1/zippyshare-downloader | MIT | |
2024-11-19T00:25:26.892456+00:00 | 1,530,789,634,000 | b8e093cee228c592d12ddac64cb3b73deb0682a8 | 2 | {
"blob_id": "b8e093cee228c592d12ddac64cb3b73deb0682a8",
"branch_name": "refs/heads/master",
"committer_date": 1530789634000,
"content_id": "49468ca00ea9d1dde95cf6e0e4f59e2936f0f648",
"detected_licenses": [
"MIT"
],
"directory_id": "b44322ba912dc583b88f149b0d49e96f73359315",
"extension": "py",
"fi... | 2.34375 | stackv2 | from django.contrib import messages
from django.http import HttpResponse
from django.shortcuts import render, redirect
from .forms import RegisterForm
from django.contrib.auth.models import User
# Create your views here.
from .forms import LoginForm
from django.contrib.auth import authenticate, login,logout
#######
... | 86 | 28.88 | 111 | 12 | 557 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_9d1bf0516e26e002_638a7557", "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... | 2 | true | [
"CWE-521",
"CWE-96"
] | [
"rules.python.django.security.audit.unvalidated-password",
"rules.python.django.security.locals-as-template-context"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
42,
57
] | [
42,
57
] | [
9,
16
] | [
36,
58
] | [
"A07:2021 - Identification and Authentication Failures",
"A03:2021 - Injection"
] | [
"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.",
"Using 'locals()' as a context to '... | [
5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | views.py | /user/views.py | SumeyyeOzkan/iot-board | MIT | |
2024-11-19T00:25:35.023403+00:00 | 1,631,551,292,000 | 88a10eca505c05f44a00d3e08befdb122538536a | 3 | {
"blob_id": "88a10eca505c05f44a00d3e08befdb122538536a",
"branch_name": "refs/heads/master",
"committer_date": 1631551292000,
"content_id": "21d782e51075607c2c6c79d5226e6bb7b4fd5d03",
"detected_licenses": [
"MIT"
],
"directory_id": "07801f00700377cb0ccdc670e3cf9ff333ad930f",
"extension": "py",
"fi... | 2.765625 | stackv2 | from flask import render_template,request,redirect,url_for
from . import main
from ..request import get_news_source, get_top_headlines, news_article_source, get_news_categories, search_article
# Views
@main.route('/')
def index():
'''
Index page view function that returns the index page and its data
'''
news... | 50 | 31.68 | 114 | 13 | 361 | python | [{"finding_id": "semgrep_rules.python.flask.security.open-redirect_cd1b0a21b2ba86cf_c0a4f44a", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.open-redirect", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Data from request is passed to redirect(). This is an open redir... | 1 | true | [
"CWE-601"
] | [
"rules.python.flask.security.open-redirect"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
16
] | [
20
] | [
3
] | [
90
] | [
"A01:2021 - Broken Access Control"
] | [
"Data from request is passed to redirect(). This is an open redirect and could be exploited. Consider using 'url_for()' to generate links to known locations. If you must use a URL to unknown pages, consider using 'urlparse()' or similar and checking if the 'netloc' property is the same as your site's host name. See... | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | views.py | /app/main/views.py | ikinoti/news-app-flask | MIT | |
2024-11-19T00:25:38.154050+00:00 | 1,430,426,801,000 | 34d2efadccec1e9c138c44ce683a2356b4c97eb9 | 2 | {
"blob_id": "34d2efadccec1e9c138c44ce683a2356b4c97eb9",
"branch_name": "refs/heads/master",
"committer_date": 1430426801000,
"content_id": "f06d6637d7f885068ffac43704a1bcc83bd871e6",
"detected_licenses": [
"MIT"
],
"directory_id": "c30e0869d42dd9cb93f61c3c80735c9a073224c9",
"extension": "py",
"fi... | 2.359375 | stackv2 | import os, sys, json
import pickle
import numpy as np
import datetime
import Quandl
atoke = open("../../api_key.ig", 'r').read().strip()
def run():
# Read in the symbols
syms = []
with open("../../WIKI_tickers.csv", 'r') as fp:
fp.readline()
for line in fp:
syms.append(line.split(',')[0].strip())
... | 24 | 25.33 | 77 | 18 | 179 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0499aa391074382f_7911d04d", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
19
] | [
19
] | [
7
] | [
36
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | pull_data.py | /pull_scripts/Quandl/pull_data.py | nlageman/CSE597C_Term_Project | MIT | |
2024-11-19T01:02:37.364756+00:00 | 1,518,102,303,000 | 135f9b006336a7930d92829151a3ac560ac90782 | 3 | {
"blob_id": "135f9b006336a7930d92829151a3ac560ac90782",
"branch_name": "refs/heads/master",
"committer_date": 1518102303000,
"content_id": "72c915de6943729b1e8061b7d3c687f2a106f552",
"detected_licenses": [
"MIT"
],
"directory_id": "7bb2e6c04602e12621efa57bf0331783f27fbc37",
"extension": "py",
"fi... | 2.65625 | stackv2 | import sys
import os
from typing import List
from xml.dom import minidom
from antlr4 import CommonTokenStream, FileStream, ParseTreeWalker
from XqlLang import XqlLexer, XqlParser, XqlListener
class KeyPrinter(XqlListener.XqlListener):
def enterR(self, ctx):
print("Oh, a key!", ctx.ID().getText())
de... | 58 | 22.64 | 65 | 13 | 332 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_20755bd3993e9a27_7490ad51", "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"
] | [
4
] | [
4
] | [
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"
] | xml_master.py | /xml_master.py | Vladislav-Zolotaryov/XmlMaster | MIT | |
2024-11-19T01:02:40.186822+00:00 | 1,638,519,218,000 | 02d3157279609d6b5ed03afb7685877ca6f33e5d | 2 | {
"blob_id": "02d3157279609d6b5ed03afb7685877ca6f33e5d",
"branch_name": "refs/heads/master",
"committer_date": 1638519218000,
"content_id": "ad630e7a08c2dee6c4e8105947a9e03f6854a163",
"detected_licenses": [
"MIT"
],
"directory_id": "355db92107732e631e0c21ba4ff0e5125337fdd1",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''A simple HTTP accessible database for IoT projects.'''
__author__ = 'luphord'
__email__ = 'luphord@protonmail.com'
__version__ = '0.4.0'
import json
import sqlite3
import urllib.parse
from datetime import datetime, date, timedelta
from typing import Dict, Union, Any,... | 398 | 39.91 | 79 | 21 | 3,429 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_a04ba9cc2df3dc1f_a19a2ecc", "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"
] | [
131
] | [
132
] | [
13
] | [
75
] | [
"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"
] | blanketdb.py | /blanketdb.py | luphord/blanketdb | MIT | |
2024-11-19T01:02:44.503126+00:00 | 1,565,183,620,000 | 948491a477e84992b18defb4d60ebf801f33599b | 2 | {
"blob_id": "948491a477e84992b18defb4d60ebf801f33599b",
"branch_name": "refs/heads/master",
"committer_date": 1565183620000,
"content_id": "b018de41c2e3581b61c8381727632d32c8104619",
"detected_licenses": [
"MIT"
],
"directory_id": "8fe2af32a03703f10ec12fee1c422814909760e2",
"extension": "py",
"fi... | 2.34375 | stackv2 | import ConfigParser
import datetime
import json
import os
import pickle
import sqlite3
import sys
from datetime import datetime
from elasticsearch import Elasticsearch
global es
global indexName
global location
global soplocation
es = Elasticsearch()
# import logging
# import sys
# logging.basicConfig(stream=sys.st... | 285 | 22.84 | 85 | 15 | 1,760 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9d6afa2cee2f43f4_030db80c", "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"
] | [
217
] | [
217
] | [
9
] | [
60
] | [
"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"
] | elasticMain.py | /SOPRanking/RocsafeCode/Demo-IR/elasticMain.py | NUIG-ROCSAFE/CBRNeVirtualEnvironment | MIT | |
2024-11-19T01:02:45.273829+00:00 | 1,581,582,195,000 | 7c2fa58d4788cc84887f073246e9f8d29c92b0ba | 3 | {
"blob_id": "7c2fa58d4788cc84887f073246e9f8d29c92b0ba",
"branch_name": "refs/heads/master",
"committer_date": 1581582195000,
"content_id": "310e34808f3e1a960ae870dc08b63102483f1587",
"detected_licenses": [
"MIT"
],
"directory_id": "613b4e1fcbb8ec48ab0153aa9cb7df6983f2ddf9",
"extension": "py",
"fi... | 2.71875 | stackv2 | import optuna
import pickle
import pandas as pd
import numpy as np
import lightgbm as lgb
from sklearn.model_selection import StratifiedKFold, train_test_split, KFold
from sklearn.metrics import mean_squared_error, roc_auc_score
from sklearn.preprocessing import StandardScaler
from category_encoders.ordinal import Ordi... | 211 | 49.53 | 155 | 17 | 2,336 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7542c782d2623d11_8266be95", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
202,
207,
211
] | [
202,
207,
211
] | [
13,
13,
13
] | [
56,
59,
43
] | [
"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"
] | merlion.py | /merlion/merlion.py | thufirtan/merlion | MIT | |
2024-11-19T01:02:55.240168+00:00 | 1,609,087,011,000 | 55e624241c367fbbc2825d015c737e7c8531edd2 | 3 | {
"blob_id": "55e624241c367fbbc2825d015c737e7c8531edd2",
"branch_name": "refs/heads/master",
"committer_date": 1609087011000,
"content_id": "5673e52d87cfa793298d521ad0d5eeff70ceb7b5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "32c92b7687357fd22251af0eda1d89f676a36fa8",
"extension": "py"... | 2.90625 | stackv2 | import xml.etree.ElementTree as ET
from xml.dom import minidom
import numpy as np
class GXLGraph(object):
def __init__(self, name, mean, std, label=None):
self.name = name
self.org_mean = mean
self.org_std = std
self.nodes = {}
self.edges = []
self.label = label
... | 201 | 29.79 | 77 | 16 | 1,496 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_389b2779c81f9a44_e93a347d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611",
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
1,
2,
62
] | [
1,
2,
62
] | [
1,
1,
16
] | [
35,
28,
34
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | gxl_graph.py | /src/lib/gxl_graph.py | MHHamdan/DAS2020 | Apache-2.0 | |
2024-11-19T01:39:19.867206+00:00 | 1,633,006,072,000 | c3a71f5c0d9fc2c361eaac90f02ec8e229b8bc96 | 2 | {
"blob_id": "c3a71f5c0d9fc2c361eaac90f02ec8e229b8bc96",
"branch_name": "refs/heads/master",
"committer_date": 1633006072000,
"content_id": "9162466dfe69840d2c299896547f8085602f6452",
"detected_licenses": [
"MIT"
],
"directory_id": "16b6fad61ede4e9b9ef70b936bbf8c2d80a9e39a",
"extension": "py",
"fi... | 2.359375 | stackv2 | # %% IMPORTS
from multiprocessing import Pool
import itertools as itt
import slopeOP as sop
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import pickle
from sklearn.metrics import adjusted_rand_score
import os
# local imports
import simulation_tools as tools
from nice_plotting import savefig, ... | 214 | 26.15 | 119 | 16 | 1,773 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_2331584a26cc9f5e_bc92fe91", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
24
] | [
24
] | [
16
] | [
30
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | figure4.py | /simulations/simulations_Figure4/figure4.py | vrunge/slopeOP | MIT | |
2024-11-19T00:15:56.260052+00:00 | 1,302,953,315,000 | e6440ee6f4adebf329952a798a94a28dbbb03dc5 | 2 | {
"blob_id": "e6440ee6f4adebf329952a798a94a28dbbb03dc5",
"branch_name": "refs/heads/master",
"committer_date": 1302953315000,
"content_id": "992f6dedd7cc2879c7afef703735c4741ca93477",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a8e3b55c0c0697a23eaae3290ce0844ea2a5d993",
"extension": "p... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
"""
flaskext.validatornu
~~~~~~~~~~~~~~~~~~~~
Adds automatic HTML5 validation to Flask with the help of the Validator.nu_
service.
.. _Validator.nu: http://validator.nu/
:copyright: (c) 2011 by Janne Vanhala.
:license: BSD, see LICENSE for more details.
"""
im... | 146 | 32.25 | 81 | 15 | 983 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_6df93239de3b890a_85c5637c", "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... | 6 | 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"
] | [
63,
85
] | [
67,
85
] | [
27,
16
] | [
10,
42
] | [
"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"
] | __init__.py | /flaskext/validatornu/__init__.py | jpvanhal/flask-validator.nu | BSD-3-Clause | |
2024-11-19T00:15:59.594858+00:00 | 1,665,913,673,000 | fb8432584e1f378d092bfd46a86972bfd3af832f | 3 | {
"blob_id": "fb8432584e1f378d092bfd46a86972bfd3af832f",
"branch_name": "refs/heads/master",
"committer_date": 1665913673000,
"content_id": "8794f8eae347c5437c522ee5037b29563f5d18fd",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "730a0291d90bf220d162791287e422bc4225d164",
"extension": "p... | 2.625 | stackv2 | #!/usr/bin/env python
"""
PyModel Viewer - call pma, pmg, dot.
Collect all the command line options and redistribute them to each program
"""
import os
import ViewerOptions
# an option in a singleton tuple means there might be a list of such options
# use tuples not lists here so they can be keys in dict
pma_keys = (... | 51 | 36.02 | 98 | 17 | 481 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_81183cb829cb768c_7ac75c00", "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"
] | [
31
] | [
31
] | [
14
] | [
28
] | [
"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"
] | pmv.py | /pymodel/pmv.py | jon-jacky/PyModel | BSD-3-Clause | |
2024-11-19T00:16:13.656081+00:00 | 1,441,839,159,000 | 9d5d498ff838e0a6768d62e14cc7e2d584abe99d | 2 | {
"blob_id": "9d5d498ff838e0a6768d62e14cc7e2d584abe99d",
"branch_name": "refs/heads/master",
"committer_date": 1441839159000,
"content_id": "81a27e781f5b884b342ba82482a520ef7d8118a6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "57090fde46a8ffae4fba32063a4759bdde582224",
"extension": "py"... | 2.375 | stackv2 | import StringIO
__author__ = 'johnrocamora'
import pymongo as mg
import datetime
import pickle
import sys
class Freezer():
def __init__(self, addr):
try:
print addr
self.client = mg.MongoClient(addr)
self.db = self.client.cadaverdb
self.posts = self.db.post... | 80 | 27.6 | 77 | 13 | 558 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0ce5b76f920b5f8b_b7e651db", "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"
] | [
62
] | [
62
] | [
28
] | [
51
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | Freezer.py | /Freezer.py | minosniu/TimeGrinder | Apache-2.0 | |
2024-11-19T00:28:40.652149+00:00 | 1,582,326,776,000 | 27baf80951c070fac87bf73f83bfaf02b98f9d4e | 2 | {
"blob_id": "27baf80951c070fac87bf73f83bfaf02b98f9d4e",
"branch_name": "refs/heads/master",
"committer_date": 1582326776000,
"content_id": "b9c2d951734c541cdb4b4c79e1dcddeb1e9bc65f",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "689e5feb97e284a0eb9939dc0e25b7f29589a8a2",
"extension": "p... | 2.484375 | stackv2 | import numpy as np
import pickle
import pulse2percept as p2p
# Place an Argus I array on the retina
argus = p2p.implants.ArgusII(x_center=0, y_center=0, h=100)
sim = p2p.Simulation(argus)
# Set parameters of the optic fiber layer (OFL)
# In previous versions of the model, this used to be called the `Retina`
# object... | 33 | 45.12 | 79 | 8 | 437 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fdd2027c2984e589_752a3d29", "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"
] | [
28,
32
] | [
28,
32
] | [
1,
1
] | [
53,
66
] | [
"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"
] | video2percept-boston.py | /scripts/video2percept-boston.py | garethgeorge/pulse2percept | BSD-3-Clause | |
2024-11-19T00:28:42.007220+00:00 | 1,412,887,018,000 | cbf773e8dd5fba831c96d109e976c4cad53c968d | 2 | {
"blob_id": "cbf773e8dd5fba831c96d109e976c4cad53c968d",
"branch_name": "refs/heads/master",
"committer_date": 1412887018000,
"content_id": "c0d7d05a249cf843659407479bf025610f5aedcf",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "fc02d5f17d7e2f71401d1a94e05441b59236c774",
"extension": "p... | 2.453125 | stackv2 | #!/usr/bin/env python
# Copyright (c) 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.
"""Run a command and report its results in machine-readable format."""
import collections
import optparse
import os
import pickl... | 461 | 30.3 | 80 | 17 | 3,182 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8e5949c1bf4dc706_a126a02b", "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",
"CWE-502",
"CWE-78"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"HIGH"
] | [
51,
96,
176,
255
] | [
52,
96,
176,
256
] | [
20,
13,
13,
10
] | [
76,
40,
39,
50
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A01:2017 - Injection"
] | [
"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,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"HIGH"
] | run_cmd.py | /scripts/run_cmd.py | weaver-viii/skia-buildbot | BSD-3-Clause | |
2024-11-19T00:50:16.107545+00:00 | 1,542,294,548,000 | 3b6c58b9d925107e7d22a25d4e4233ea36037fb5 | 3 | {
"blob_id": "3b6c58b9d925107e7d22a25d4e4233ea36037fb5",
"branch_name": "refs/heads/master",
"committer_date": 1542294548000,
"content_id": "6a6cd12209911dd74500efd163681531745f7834",
"detected_licenses": [
"MIT"
],
"directory_id": "e40890ed8060c1a387176d5c6b82b6eca8f31607",
"extension": "py",
"fi... | 3.453125 | stackv2 | from .__templates__ import Static
import itchat
from math import *
class RPN(Static):
one_param_func = ["sin", "cos", "tan", "atan", "acos", "asin", "floor", "ceil", "factorial", "radians", "degrees",
"sinh", "cosh", "tanh", "acosh", "asinh", "atanh", "round"]
two_param_func = ["log", "... | 99 | 36.28 | 130 | 21 | 879 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_0e9e744f492d2b67_64e04862", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 3 | true | [
"CWE-95",
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
32,
34,
38
] | [
32,
34,
38
] | [
30,
30,
30
] | [
55,
59,
54
] | [
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | RPN.py | /modules/RPN.py | hanzhi713/WeChat-CLI-Tool | MIT | |
2024-11-19T00:51:29.175626+00:00 | 1,682,677,104,000 | e41333048b4d43f0254f585eb7a9518d3d464aa3 | 3 | {
"blob_id": "e41333048b4d43f0254f585eb7a9518d3d464aa3",
"branch_name": "refs/heads/master",
"committer_date": 1682677291000,
"content_id": "27bc36283704368cfaa2825d0deaca3760c24063",
"detected_licenses": [
"MIT"
],
"directory_id": "d513496067e4c6e63bb19be0b8886b4c97d41482",
"extension": "py",
"fi... | 2.578125 | stackv2 | """
WDL template for running a *ChRIS* plugin on SLURM.
Maybe it would be nice to set a workflow name instead of just "ChrisPlugin"
but it doesn't really matter.
"""
import shlex
from typing import Optional, Tuple, List
from serde import from_dict, deserialize
from jinja2 import Environment
from pman.abstractmgr imp... | 183 | 29.38 | 111 | 17 | 1,452 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_00e60f5d27de64a5_a15ffb7b", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 2 | true | [
"CWE-79",
"CWE-116"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
21,
21
] | [
21,
21
] | [
12,
12
] | [
25,
25
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | wdl.py | /pman/cromwell/slurm/wdl.py | FNNDSC/pman | MIT | |
2024-11-19T00:51:35.834174+00:00 | 1,435,524,326,000 | dbd63d93ca42edb2fdfe3919e72d2a2c684f0fd2 | 3 | {
"blob_id": "dbd63d93ca42edb2fdfe3919e72d2a2c684f0fd2",
"branch_name": "refs/heads/master",
"committer_date": 1435524326000,
"content_id": "e683f6cc8880dcaa41df650972fa8091d9894bcc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4aa84f8053dc4f87bc9331420bb92003ba599c1a",
"extension": "py"... | 2.6875 | stackv2 | import subprocess, hashlib, os, magic, tempfile
from files.models import FileName, File, FileMetadata
from ctypes import cast, c_char_p
from files import filetype
class AnalysisFactory:
"""Create an object to analyze a file or input stream.
@param filename: if provided, the filename to open and analyze.
... | 253 | 40.26 | 96 | 20 | 2,157 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_38d71e308f4374a3_1a6a206d", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 8 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
192,
237
] | [
194,
239
] | [
24,
20
] | [
53,
47
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | AnalysisFactory.py | /files/filetype/AnalysisFactory.py | plus-provenance/dataidentity | Apache-2.0 | |
2024-11-19T01:30:50.208565+00:00 | 1,682,096,942,000 | f6043b3c0d89837bd29d019aa5960878027aaec8 | 3 | {
"blob_id": "f6043b3c0d89837bd29d019aa5960878027aaec8",
"branch_name": "refs/heads/master",
"committer_date": 1682096942000,
"content_id": "b535b44873d359be24be05a8cd3d179b35661c49",
"detected_licenses": [
"MIT"
],
"directory_id": "a1dddd0570d9e27f5d443d7b0759452430a1db38",
"extension": "py",
"fi... | 2.625 | stackv2 | from .MultiSeqAlign import muscleAlign
from Bio import SeqIO
from multiprocessing import Pool
import os
import re
import subprocess
import tempfile
'''Sequence classifier to classify ARG protein sequences according to predefined annotation scheme'''
class SequenceClassifier:
'''
Function name: create_hmm
I... | 148 | 39.43 | 114 | 20 | 1,199 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.tempfile.tempfile-without-flush_4a76d99626695afa_509a33fb", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.tempfile.tempfile-without-flush", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Using 'ftemp.name'... | 7 | 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"
] | [
28,
57,
126
] | [
31,
60,
130
] | [
25,
25,
25
] | [
68,
68,
68
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | SequenceClassifier.py | /ArgditLib/SequenceClassifier.py | phglab/ARGDIT | MIT | |
2024-11-19T01:30:52.957449+00:00 | 1,608,741,560,000 | 2d515dc9e900ea47adf96ed9ae981e034cc07b6b | 2 | {
"blob_id": "2d515dc9e900ea47adf96ed9ae981e034cc07b6b",
"branch_name": "refs/heads/master",
"committer_date": 1608741560000,
"content_id": "5e457b650cac72f20df7f6a446769b1beb279805",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "58cc38c8e3c8c9006692667ab5ef3ab86bd90ed5",
"extension": "py",
... | 2.46875 | stackv2 | """
authors: Kai Middlebrook
"""
import random
import time
from datetime import datetime
import pandas as pd
import config as config
import spotipy
from celery import group
from celery.utils.log import get_task_logger
from dsjobs import app
from utils import SpotipyMux, chunkify, flow_complete
logger = get_task_log... | 274 | 38.17 | 87 | 26 | 2,317 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_da9211c070f53b03_796fc59d", "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... | 3 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
271,
271
] | [
271,
271
] | [
9,
9
] | [
28,
28
] | [
"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"
] | tracks.py | /app/tracks.py | krmiddlebrook/artists_popularity | CC0-1.0 | |
2024-11-19T01:30:53.958865+00:00 | 1,690,963,874,000 | d47298f4671bc8b378138037e4f1eab625ced83c | 2 | {
"blob_id": "d47298f4671bc8b378138037e4f1eab625ced83c",
"branch_name": "refs/heads/master",
"committer_date": 1690963874000,
"content_id": "0ed6c2ba042ba4fb96624b8595b65ad491f0cd93",
"detected_licenses": [
"MIT"
],
"directory_id": "13cfd852ac21f1e7b4d8965f4bf1f7bca12f788a",
"extension": "py",
"fi... | 2.375 | stackv2 | import json
from markupsafe import Markup, escape
from wtforms.fields import HiddenField, StringField
from wtforms.widgets import Select, TextInput, html_params
class TextInputGroup(TextInput):
field_flags = ('hidden',)
def __init__(self, prepend=None, *args, **kwargs):
super().__init__(*args, **kwa... | 50 | 35.3 | 97 | 16 | 401 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.default-mutable-dict_da3fabe7f8f091d4_5b3cbbc3", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.default-mutable-dict", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Function... | 2 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
17
] | [
24
] | [
16
] | [
10
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected explicitly unescaped content using 'Markup()'. This permits the unescaped data to include unescaped HTML which could result in cross-site scripting. Ensure this data is not externally controlled, or consider rewriting to not use 'Markup()'."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | jsonform.py | /src/www/fields/jsonform.py | headout/dagen-airflow | MIT | |
2024-11-19T01:54:55.546614+00:00 | 1,619,669,827,000 | 7d6a23712b28014786685e16fe866f536863342c | 2 | {
"blob_id": "7d6a23712b28014786685e16fe866f536863342c",
"branch_name": "refs/heads/master",
"committer_date": 1619669827000,
"content_id": "6d34d7260a4a45fe4c3e8d00936c6408d94d398a",
"detected_licenses": [
"MIT"
],
"directory_id": "c6d166e82bd4277194a3e4d32cd59ba8875e265f",
"extension": "py",
"fi... | 2.46875 | stackv2 | import os
import pickle
from typing import List, Union
from src.interface.driver import FirestoreDriver
class SampleDriverImpl(FirestoreDriver):
def get_room(self, room_id: str) -> Union[dict, None]:
return self.__restore_cache(f"room_{room_id}")
def get_user(self, user_id: str) -> Union[dict, None]... | 32 | 33.16 | 86 | 15 | 266 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_75cdfd8676ec6e47_72ff2403", "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"
] | [
29
] | [
29
] | [
30
] | [
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"
] | sample_driver.py | /backend/src/driver/sample_driver.py | mukasun/omakasetli | MIT | |
2024-11-19T01:54:55.663066+00:00 | 1,556,136,913,000 | 9d4137e2f230db57089a0c6c898f90e1ef1f68e6 | 3 | {
"blob_id": "9d4137e2f230db57089a0c6c898f90e1ef1f68e6",
"branch_name": "refs/heads/master",
"committer_date": 1556136913000,
"content_id": "d3dd0d99ce56a0538e87766208b14318f5bb17d0",
"detected_licenses": [
"MIT"
],
"directory_id": "4f6d0e04302509fd10e561b2a8a74d54688e9f20",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/usr/bin/python3
"""This is the file storage class for AirBnB"""
import json
import os
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import scoped_session
from sqlalchemy import (create_engine)
from models.base_model import BaseModel, Base
from models.user import User
from models.state import State
fr... | 112 | 31.38 | 76 | 16 | 750 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_6478b7f6fc59171a_2ae663b6", "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"
] | [
71
] | [
71
] | [
43
] | [
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"
] | db_storage.py | /models/engine/db_storage.py | BennettDixon/AirBnB_clone_v2 | MIT | |
2024-11-19T01:54:57.157591+00:00 | 1,630,089,014,000 | 5328ad2782ff1111a9e02b83830cea2e3a4dec1b | 2 | {
"blob_id": "5328ad2782ff1111a9e02b83830cea2e3a4dec1b",
"branch_name": "refs/heads/main",
"committer_date": 1630089014000,
"content_id": "46999b4fc80f903a60b54c9080b6a25be664b099",
"detected_licenses": [
"MIT"
],
"directory_id": "41c0dd1f9eac6bb3647d7232b59d19890c7416c5",
"extension": "py",
"file... | 2.421875 | stackv2 | #!/usr/bin/env python3
import os
import sys
import signal
import boto3
import botocore.exceptions
from simple_term_menu import TerminalMenu
all_regions = ["af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-3", "ap-northeast-2", "ap-southeast-1",
"ap-southeast-2", "ap-northeast-1", "ca-central-1", "... | 107 | 28.21 | 169 | 13 | 781 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_4d6218c5cfc9a311_7bbacc0c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
32
] | [
33
] | [
9
] | [
170
] | [
"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"
] | aws_session_connector.py | /aws_session_connector.py | efanon/AWS-ECS-Session-Connector | MIT | |
2024-11-19T01:54:59.840526+00:00 | 1,627,670,127,000 | f52e547343660b319d292ac3fb326b521534ab98 | 3 | {
"blob_id": "f52e547343660b319d292ac3fb326b521534ab98",
"branch_name": "refs/heads/main",
"committer_date": 1627670127000,
"content_id": "ae810caaa951b3f0addc85483526d3eb6213c631",
"detected_licenses": [
"MIT"
],
"directory_id": "e5ff337a5c993bbcd60cec9cef8c500f3df42bdc",
"extension": "py",
"file... | 2.90625 | stackv2 | import os
import copy
import logging
import pickle
from collections import OrderedDict
import numpy as np
import pandas as pd
from sklearn.metrics import mutual_info_score
from scipy.stats import entropy
from ..constants import DATA_ROOT, PKL_PROTO
from ..dtypes import is_categorical
L = logging.getLogger(__name__)
... | 206 | 36.14 | 155 | 18 | 1,893 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_804030c43810ba02_d4da22c7", "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"
] | [
169,
177
] | [
169,
177
] | [
9,
21
] | [
50,
35
] | [
"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"
] | dataset.py | /lecarb/dataset/dataset.py | anshumandutt/AreCELearnedYet | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.