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:10:15.952598+00:00 | 1,666,391,684,000 | 9b98d74ea744c5a58adfc5ad86fba6c6ec3bcae1 | 3 | {
"blob_id": "9b98d74ea744c5a58adfc5ad86fba6c6ec3bcae1",
"branch_name": "refs/heads/master",
"committer_date": 1666391684000,
"content_id": "3416bd726013d0984c2ddbda02e628bcb2740b27",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d8458fc45e4b1c9148ce178192d9d2a2ced29f15",
"extension": "py"... | 3.0625 | stackv2 | """ Crawls every pdf urls from WTO database and pickle the result."""
import pickle
from multiprocessing import Pool
from selenium import webdriver
def get_pdf_urls(chrome_driver, dispute_idx):
"""
Retrieve all the possible pdf urls for the given dispute number
:param chrome_driver: chrome driver path
... | 150 | 33.9 | 80 | 16 | 1,147 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3667c359f612a202_fcd6ed5c", "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
] | [
13
] | [
41
] | [
"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"
] | crawl.py | /prep/download/crawl.py | syyunn/DeepWTO | Apache-2.0 | |
2024-11-18T23:21:45.855523+00:00 | 1,625,920,522,000 | 50ecf27ea26be6aa65ea7182706caee6dd0c91fc | 3 | {
"blob_id": "50ecf27ea26be6aa65ea7182706caee6dd0c91fc",
"branch_name": "refs/heads/main",
"committer_date": 1625920522000,
"content_id": "2ab35a7893a83c9d90fa560213d6c2a44d59c73d",
"detected_licenses": [
"MIT"
],
"directory_id": "9068aaaacfb9eaefc24825d37dde010c14be71a2",
"extension": "py",
"file... | 2.53125 | stackv2 | import json
from cassandra.cqlengine import connection
from cassandra.cqlengine.management import sync_table
from cassandra.cluster import Cluster
import time
keyspace= "twitter"
# set up of the connection with the cassandra cluster
cluster = Cluster(['127.0.0.1'],port=9042)
session = cluster.connect(keyspace,wait_for... | 103 | 39.36 | 139 | 17 | 928 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_abafd301e3c95c07_b51d63b7", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 2 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
31,
64
] | [
31,
64
] | [
5,
9
] | [
39,
43
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | utils_streaming.py | /src/utils_streaming.py | GabrieleFerrario/DataArchitecture | MIT | |
2024-11-18T23:21:47.587967+00:00 | 1,404,718,182,000 | eeb477e627ab6ee4aa24f3ecf02c748332826586 | 3 | {
"blob_id": "eeb477e627ab6ee4aa24f3ecf02c748332826586",
"branch_name": "refs/heads/master",
"committer_date": 1404718182000,
"content_id": "06f6be2aa74b86625a0f5ff7094bfae700046ee3",
"detected_licenses": [
"MIT"
],
"directory_id": "e1d1b625c49f43b3dbd2e75114a5a1ef22376303",
"extension": "py",
"fi... | 2.703125 | stackv2 | # -*- coding: utf-8 -*-
from xml.sax import saxutils
import weakref, re, sys
def quoteattr(value):
'''Works like quoteattr from saxutils (returns escaped string in quotes),
but is safe for HTML'''
if value == '':
return '""'
return '"%s"' % saxutils.escape(unicode(value), {'"': '"'})
de... | 136 | 28.97 | 85 | 13 | 1,034 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_536eef9545f1ac48_4265adf4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
3
] | [
3
] | [
1
] | [
29
] | [
"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"
] | __init__.py | /iktomi/utils/__init__.py | nickolaylavrinenko/iktomi | MIT | |
2024-11-18T23:21:48.406640+00:00 | 1,413,644,401,000 | a2b16aa2931336a1f5e4b608bd7ffec03ebc63a5 | 3 | {
"blob_id": "a2b16aa2931336a1f5e4b608bd7ffec03ebc63a5",
"branch_name": "refs/heads/master",
"committer_date": 1413644401000,
"content_id": "baecc25209054703f34d1596e51091e471638a48",
"detected_licenses": [
"MIT"
],
"directory_id": "188ef87a1b970e208ab33a1d3e71117046926b4f",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python3
"""
USAGE: ./cvim_socket.py
If you want to use native Vim to edit text boxes
you must be running this script. To begin editing,
press <C-i> inside a text box. By default, this
script will spawn a urxvt shell, but this action
can be changed via the COMMAND variable below.
"""
from platform impor... | 71 | 31.2 | 74 | 16 | 586 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_104cc5654f0c92f3_05e13776", "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"
] | [
52
] | [
52
] | [
16
] | [
66
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | cvim_socket.py | /cvim_socket.py | freeo/chromium-vim | MIT | |
2024-11-18T23:21:49.385622+00:00 | 1,599,500,434,000 | 29950ffe08c19066127bc90bcc2f5f75545bd158 | 3 | {
"blob_id": "29950ffe08c19066127bc90bcc2f5f75545bd158",
"branch_name": "refs/heads/master",
"committer_date": 1599500434000,
"content_id": "7b6eaec34a0de67bd6620c55862dc1e7d8d34d7c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e3ad9d4baae2cd4b344246c387f8dd9fb88b09b0",
"extension": "py"... | 2.5625 | stackv2 | """Copyright © 2020-present, Swisscom (Schweiz) AG.
All rights reserved."""
from pickle import dump, load
import tensorflow as tf
import numpy as np
from tensorflow import keras
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.utils import class_weight... | 170 | 40.76 | 120 | 17 | 1,449 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_02b655b70126c41f_2c504203", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 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"
] | [
131,
152
] | [
131,
152
] | [
9,
27
] | [
75,
80
] | [
"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"
] | nlp_trainer.py | /codi/nlp_trainer.py | isabella232/ai-research-data-valuation-repository | Apache-2.0 | |
2024-11-18T23:21:51.600637+00:00 | 1,464,981,456,000 | a3efa4df28b58040b0ced10c5f4eb64ddb60c20e | 3 | {
"blob_id": "a3efa4df28b58040b0ced10c5f4eb64ddb60c20e",
"branch_name": "refs/heads/master",
"committer_date": 1464981456000,
"content_id": "65f0c97f240907b814803818683dbe61f8f70735",
"detected_licenses": [
"MIT"
],
"directory_id": "21ee36eb05ded5d53cabdff8625b1ed06574fc41",
"extension": "py",
"fi... | 2.859375 | stackv2 | import os
import sys
import pickle
import random
import numpy as np
if __name__ == "__main__":
if len(sys.argv) > 1:
input_file = sys.argv[1]
else:
input_file = "data.hsdat"
with open(input_file, "rb") as f:
X, y= pickle.load(f)
i = 2
while 1:
try:
... | 26 | 22.54 | 43 | 14 | 166 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7a75885b41ccf29f_5b5f102d", "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"
] | [
14,
18
] | [
14,
18
] | [
15,
30
] | [
29,
44
] | [
"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"
] | how_many_points.py | /how_many_points.py | jirenz/CS229_Project | MIT | |
2024-11-18T21:33:29.091318+00:00 | 1,537,033,895,000 | 36ef3599c81e18ee8b11fa7af5b2f960d1c31f1b | 2 | {
"blob_id": "36ef3599c81e18ee8b11fa7af5b2f960d1c31f1b",
"branch_name": "refs/heads/master",
"committer_date": 1537033895000,
"content_id": "54e76e6ba5af364b6877b8911e580c30c4da4dd8",
"detected_licenses": [
"MIT"
],
"directory_id": "757f1c5e73ae6e1c959ad2b98ff7f947fe9a44f3",
"extension": "py",
"fi... | 2.390625 | stackv2 | """posts.py - Views handling ajax calls related to votes"""
import json
import logging
from django.http import (Http404, HttpResponse, JsonResponse,
HttpResponseBadRequest)
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404
from django.vie... | 51 | 33.63 | 66 | 15 | 360 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.no-csrf-exempt_2e31bfec22ea2329_ff9dd1eb", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.no-csrf-exempt", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected usage of @csrf_exempt, which indicate... | 1 | true | [
"CWE-352"
] | [
"rules.python.django.security.audit.no-csrf-exempt"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
15
] | [
50
] | [
1
] | [
34
] | [
"A01:2021 - Broken Access Control"
] | [
"Detected usage of @csrf_exempt, which indicates that there is no CSRF token set for this route. This could lead to an attacker manipulating the user's account and exfiltration of private data. Instead, create a function without this decorator."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | votes.py | /discussions/views/votes.py | jeury301/classmo | MIT | |
2024-11-18T21:33:35.594932+00:00 | 1,602,367,964,000 | 08f96ea394d528ec7c4c80f4ea02909b9bed6939 | 3 | {
"blob_id": "08f96ea394d528ec7c4c80f4ea02909b9bed6939",
"branch_name": "refs/heads/master",
"committer_date": 1602367964000,
"content_id": "55add69d3f8f1fa3812cad6bb893fb853658376e",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "373f46887a1d6b57b52fe4392e3df872f3f6f9da",
"extension": "p... | 2.6875 | stackv2 | # -- coding: utf-8 --
from datetime import datetime, timezone
import glob
import os
import shutil
import re
import sys
import xlrd
import xlrd.sheet
from xlrd.sheet import ctype_text
import xml.etree.ElementTree as ET #not yet working with lxml
from Generic import Generic
verbose = 1
'''
Mainly convert export data ... | 246 | 35.91 | 127 | 20 | 2,141 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_34f621516ceda741_063daf47", "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"
] | Xls2xml.py | /lib/Xls2xml.py | mokko/RST-levelup | BSD-2-Clause | |
2024-11-18T21:33:38.200416+00:00 | 1,415,585,086,000 | 5a625d927b041c59ab6fe58621b3861ced06cce2 | 3 | {
"blob_id": "5a625d927b041c59ab6fe58621b3861ced06cce2",
"branch_name": "refs/heads/master",
"committer_date": 1415585086000,
"content_id": "b55452c9efe8f1b6d921d30279845b05d0357668",
"detected_licenses": [
"MIT"
],
"directory_id": "f1db4f09dc1a852c048ceb601355fbef34bad98e",
"extension": "py",
"fi... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
"""
Optimized images (gif, jpeg & png)
Assumes that Gifsicle, ImageMagick's convert and pngquant are isntalled on path
http://www.lcdf.org/gifsicle/
http://www.imagemagick.org/
http://pngquant.org/
Copyright (c) 2014 Marc Alexandre (http://www.malexandre.fr)
"""
import os
import re
import shut... | 102 | 29.39 | 79 | 20 | 751 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.unchecked-subprocess-call_a480b1aa97408bc1_58be9ece", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.unchecked-subprocess-call", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "This is not checking the ret... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
82,
82
] | [
82,
82
] | [
5,
25
] | [
30,
29
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | pelican_image_optimizer.py | /pelican_image_optimizer.py | malexandre/pelican-image-optimizer | MIT | |
2024-11-18T23:15:54.242358+00:00 | 1,517,077,504,000 | b8707cbe8d13aae066be8846103679c9f62a5821 | 3 | {
"blob_id": "b8707cbe8d13aae066be8846103679c9f62a5821",
"branch_name": "refs/heads/master",
"committer_date": 1517077504000,
"content_id": "9a41a27e8dbbfd6edfb68533cae281a4ad003efd",
"detected_licenses": [
"MIT"
],
"directory_id": "94dae7b46273b0813da23b1efdf2a7148a36735a",
"extension": "py",
"fi... | 2.75 | stackv2 | import argparse
import re
import subprocess
import sys
DOCKER_VERSION = 17
def run(cmd, check=True, stdout=subprocess.PIPE, split=True):
"""Run command and return it's output."""
try:
p = subprocess.run(cmd, check=check, stdout=stdout)
output = p.stdout.decode('utf-8')
if split:
... | 117 | 29.08 | 121 | 18 | 828 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_4cf457a3395ff25f_bfb993da", "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"
] | [
12
] | [
12
] | [
13
] | [
60
] | [
"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"
] | main.py | /main.py | romantomjak/docker-gc | MIT | |
2024-11-18T23:15:55.744645+00:00 | 1,350,580,122,000 | 05ab28851f907f22c34b1b81b49241b0a1c4e4e6 | 3 | {
"blob_id": "05ab28851f907f22c34b1b81b49241b0a1c4e4e6",
"branch_name": "refs/heads/master",
"committer_date": 1350580122000,
"content_id": "b765540981de717ef5bbb488d1867e96af70a64e",
"detected_licenses": [
"BSD-3-Clause",
"BSD-2-Clause"
],
"directory_id": "cd8a548a6764142978608be95e01f4680ff0580e... | 2.9375 | stackv2 | #!/usr/bin/env python
import argparse
import os
import re
import sys
import fileinput
def getAllFiles(directory, fileExtention=".txt"):
fileList = []
for top, dirs, files in os.walk(directory):
for nm in files:
if nm.endswith(fileExtention):
fileList.append(nm)
return fileList
# this is to he... | 84 | 33.44 | 90 | 16 | 676 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_0ea0497ee3c1347c_ebf0f66e", "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... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
82,
82,
84,
84
] | [
82,
82,
84,
84
] | [
7,
7,
5,
5
] | [
87,
87,
84,
84
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found user-controll... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | nvterm.py | /nvterm.py | btobolaski/nvterm | BSD-3-Clause,BSD-2-Clause | |
2024-11-18T23:15:58.929551+00:00 | 1,625,173,779,000 | a51381b2f8f88ecd643aaff189038b8d6e747edd | 3 | {
"blob_id": "a51381b2f8f88ecd643aaff189038b8d6e747edd",
"branch_name": "refs/heads/main",
"committer_date": 1625173779000,
"content_id": "c5e989024918eef9b4132c10729231a97bc8e16e",
"detected_licenses": [
"MIT"
],
"directory_id": "8de75a6e4c6e79322c01728f0b3d123f63c346a5",
"extension": "py",
"file... | 2.625 | stackv2 | from typing import Union, Optional
import requests
from ldcoolp_figshare import FigshareInstituteAdmin
from fastapi import APIRouter, HTTPException
router = APIRouter()
api_key: Optional[str] = None
stage_api_key: Optional[str] = None
def figshare_metadata_readme(figshare_dict: dict) -> dict:
"""
Function... | 164 | 34.18 | 83 | 24 | 1,219 | python | [{"finding_id": "semgrep_rules.python.flask.security.injection.ssrf-requests_55219a9c7494ff75_73381dcf", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.ssrf-requests", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from request object is passed to a n... | 2 | true | [
"CWE-918"
] | [
"rules.python.flask.security.injection.ssrf-requests"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
103
] | [
105
] | [
32
] | [
37
] | [
"A10:2021 - Server-Side Request Forgery (SSRF)"
] | [
"Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox... | [
7.5
] | [
"MEDIUM"
] | [
"HIGH"
] | figshare.py | /readme_tool/figshare.py | astrochun/ReM | MIT | |
2024-11-18T22:30:11.047183+00:00 | 1,581,201,324,000 | b7c49fb920067011696fa7940059d9cfaf77a316 | 3 | {
"blob_id": "b7c49fb920067011696fa7940059d9cfaf77a316",
"branch_name": "refs/heads/master",
"committer_date": 1581201324000,
"content_id": "b8ac8462385393b2bbe01d6c2cfa43e2b94b946b",
"detected_licenses": [
"MIT"
],
"directory_id": "2520e09058e7ece06fc8e4a2be967c3eaff9f01f",
"extension": "py",
"fi... | 2.890625 | stackv2 | from django.contrib.auth.models import BaseUserManager
class UserManager(BaseUserManager):
def create_user(self, username, password, **extra_fields):
"""
Create and save a User with the given username and password
"""
if not username:
raise ValueError('The username mus... | 28 | 30.86 | 74 | 12 | 172 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_67d11aa98558025d_75b80959", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'user' is being se... | 3 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
13
] | [
13
] | [
9
] | [
36
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'user' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | managers.py | /cardgame/core/managers.py | anjalichaudhary/glcardgame | MIT | |
2024-11-18T22:30:13.665120+00:00 | 1,693,411,147,000 | 04c42c09771d44b3b8949efc4a6229b08d0447ae | 2 | {
"blob_id": "04c42c09771d44b3b8949efc4a6229b08d0447ae",
"branch_name": "refs/heads/master",
"committer_date": 1693411147000,
"content_id": "f96a2b13c29760dc82d104ccaa8679efeec872cf",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "fdbfbcf4d6a0ef6f3c1b600e7b8037eed0f03f9e",
"extension": "p... | 2.46875 | stackv2 | #!/usr/bin/env python3
"""kcoverage.py -- mimic coverage.py[1] just enough to shim kcov into bazel
coverage builds.
[1]: https://pypi.org/project/coverage/
"""
import argparse
import os
import subprocess
import sys
def parse_run_command(argv):
"""Absorb the coverage.py 'run' command line. Drake will ignore most... | 60 | 31.95 | 79 | 13 | 512 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7e72bb888369725e_a25ff160", "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"
] | [
43
] | [
43
] | [
14
] | [
38
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | kcoverage.py | /tools/dynamic_analysis/kcoverage.py | RobotLocomotion/drake | BSD-3-Clause | |
2024-11-18T22:30:14.144451+00:00 | 1,537,424,045,000 | e31ac52dace4118661527813efecdf96782ae0ca | 2 | {
"blob_id": "e31ac52dace4118661527813efecdf96782ae0ca",
"branch_name": "refs/heads/master",
"committer_date": 1537424045000,
"content_id": "773aabe8010d12babb7bc2d2c59fb026b29fad23",
"detected_licenses": [
"MIT"
],
"directory_id": "f2b27d112bb2ae29062fb3105895160e36b01ca0",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/local/bin/python3
# exit('shuijiao')
import pymysql
import math
import jieba.analyse
import re
comment_file = 'comment.py'
connect = pymysql.connect('127.0.0.1', 'root', 'root', 'comment', charset = 'utf8')
cursor = connect.cursor()
id = 0
size = 50000
sql = "SELECT count(1) as num FROM comment"
curso... | 71 | 23.24 | 106 | 16 | 506 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_c8e6904fd7463d6a_1d887a48", "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"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
39
] | [
39
] | [
5
] | [
24
] | [
"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"
] | create_comment_list.py | /create_comment_list.py | renxinqiang/NLTK_EMOTION | MIT | |
2024-11-18T22:30:15.792128+00:00 | 1,595,601,020,000 | 24e967c17541be36d728ff51c10d7b9e5f97d27f | 2 | {
"blob_id": "24e967c17541be36d728ff51c10d7b9e5f97d27f",
"branch_name": "refs/heads/master",
"committer_date": 1595601020000,
"content_id": "af8782a44832518e94033329008977ebb18b7374",
"detected_licenses": [
"MIT"
],
"directory_id": "12c6283d9d231398b7f6d5fb72677fceb427e549",
"extension": "py",
"fi... | 2.5 | stackv2 | from selenium import webdriver
from bs4 import BeautifulSoup as BS
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
from . import config as cfg
imp... | 324 | 31.19 | 153 | 24 | 2,520 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d4d67c49ff95d192_6033ae76", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 6 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
61,
77
] | [
61,
77
] | [
9,
21
] | [
62,
59
] | [
"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"
] | Scrap.py | /scrap/Scrap.py | ryuinw123/linkedin-profile-scraper | MIT | |
2024-11-18T22:30:16.285437+00:00 | 1,616,094,604,000 | 769228e087049a67f8b9132ce4ba054ccb471069 | 2 | {
"blob_id": "769228e087049a67f8b9132ce4ba054ccb471069",
"branch_name": "refs/heads/master",
"committer_date": 1616094604000,
"content_id": "c8b0b85c9b5f3092bed9feb45cb7c7048ff29554",
"detected_licenses": [
"MIT"
],
"directory_id": "d7496579c25a451a8ddcfcdfa0b0b9bc44ee8f29",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/env python3
import ipaddress
import requests
import re
import binascii
from .enum import *
from sqlmap.lib.core.convert import decodeBase64,getUnicode
from sqlmap.thirdparty import six
def obfuscate_ip(ip):
ips = []
for match in re.finditer(r'((?P<a>\d+)\.)((?P<b>\d+)\.)((?P<c>\d+)\.)'
... | 242 | 47.11 | 151 | 26 | 2,883 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_493db72e85029399_6ee33ddc", "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 ... | 4 | true | [
"CWE-918"
] | [
"rules.python.django.security.injection.tainted-url-host"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
231
] | [
231
] | [
29
] | [
89
] | [
"A10:2021 - Server-Side Request Forgery (SSRF)"
] | [
"User data flows into the host portion of this manually-constructed URL. This could allow an attacker to send data to their own server, potentially exposing sensitive data such as cookies or authorization information sent with this request. They could also probe internal servers or other resources that the server r... | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | common.py | /utils/common.py | cyberstruggle/whitepass | MIT | |
2024-11-18T22:30:16.750758+00:00 | 1,678,740,976,000 | da1ccef31ee8792f01e380e9b0c6f16072cf924a | 3 | {
"blob_id": "da1ccef31ee8792f01e380e9b0c6f16072cf924a",
"branch_name": "refs/heads/master",
"committer_date": 1678740976000,
"content_id": "f0ebea377f9a5eecad73d56ecb4e2b28c8b0ffea",
"detected_licenses": [
"Unlicense"
],
"directory_id": "2910006fed805a12032b1a0e4e1b1e129172d786",
"extension": "py",... | 3.078125 | stackv2 | #!/usr/bin/env python
import sys
import yaml
def out (s):
sys.stdout.write(s)
uniq = 1
def getID():
global uniq
n = str(uniq)
uniq += 1
return n
def asAttr(attr, val):
escaped = val.replace('\"', '\\\"') # " -> \"
return " [" + attr + "=\"" + escaped + "\"]"
def render(ast, name=None... | 88 | 20.02 | 78 | 22 | 480 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_b3ef83c8727ace30_89f0202c", "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"
] | [
77
] | [
77
] | [
15
] | [
53
] | [
"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"
] | show.py | /show.py | kavon/yaml-ast | Unlicense | |
2024-11-18T22:30:20.884489+00:00 | 1,448,970,918,000 | 9c4a7d105008849598ad59ca9e7a217361a29784 | 3 | {
"blob_id": "9c4a7d105008849598ad59ca9e7a217361a29784",
"branch_name": "refs/heads/master",
"committer_date": 1448970918000,
"content_id": "86fb6b4b66a65842ac2fe220e4aa634d8430d831",
"detected_licenses": [
"MIT"
],
"directory_id": "ce008f1dc36fca446a2dc2f545c179c7440c65d3",
"extension": "py",
"fi... | 2.578125 | stackv2 | # main.py
# -------------------------
# Fall 2014; Alex Safatli
# -------------------------
# Webapp interface.
import webapp2, jinja2, os, cgi, hearthstone, json
from drafter import drafter
from gameMode import gameModeContext
VERSIONTYPE = 'Beta'
VERSION = 5
JINJA_ENVIRONMENT = jinja2.Environment(
loader = jinj... | 48 | 34.33 | 91 | 16 | 383 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_a750310efceb0a4f_3795854b", "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... | 3 | true | [
"CWE-79",
"CWE-116",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
13,
13,
46
] | [
14,
14,
46
] | [
21,
21,
29
] | [
65,
65,
61
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | main.py | /main.py | AlexSafatli/HearthstoneDrafter | MIT | |
2024-11-18T22:30:26.381375+00:00 | 1,665,677,166,000 | acb05ac52c2604135c8d7e63bda21c7f7c6a52df | 2 | {
"blob_id": "acb05ac52c2604135c8d7e63bda21c7f7c6a52df",
"branch_name": "refs/heads/master",
"committer_date": 1665677166000,
"content_id": "1039800f340cd7da558b8cd98cfd76e8b74a2fba",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "4a2412731904016f6e040d8bb11c22c4cfcdcabd",
"extension": "p... | 2.46875 | stackv2 | import base64
import pickle
from typing import List
import zlib
from django.core.mail import EmailMessage
from django.core.mail.backends.base import BaseEmailBackend
from .tasks import tasks, send_emails
class BackgroundEmailBackend(BaseEmailBackend):
def send_messages(self, messages):
msg_count = 0
... | 43 | 27.58 | 77 | 15 | 256 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4faf0a0c687a360a_fa0f366a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
33,
41
] | [
33,
41
] | [
40,
9
] | [
67,
59
] | [
"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"
] | mail.py | /spinach/contrib/spinachd/mail.py | NicolasLM/spinach | BSD-2-Clause | |
2024-11-18T22:30:27.166499+00:00 | 1,615,942,979,000 | 4e20c81cb2727680bc221ef48a2cfdd9fbe9033c | 3 | {
"blob_id": "4e20c81cb2727680bc221ef48a2cfdd9fbe9033c",
"branch_name": "refs/heads/main",
"committer_date": 1615942979000,
"content_id": "1deb35b25db22442138e11d346a8e917db560c52",
"detected_licenses": [
"MIT"
],
"directory_id": "8cb4468ff7df558196a62948e5a6f1eae0fab0c9",
"extension": "py",
"file... | 2.796875 | stackv2 | """
Implement numba JIT decorators used to speed-up the execution
of Tax-Calculator functions in the calcfunctions.py module.
"""
# CODING-STYLE CHECKS:
# pycodestyle decorators.py
# pylint --disable=locally-disabled decorators.py
import os
import io
import ast
import inspect
import numba
from taxcalc.policy import Po... | 330 | 33.34 | 78 | 19 | 2,563 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_b826461ebabdd24e_51c7abd4", "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"
] | [
194,
322
] | [
195,
323
] | [
5,
13
] | [
46,
63
] | [
"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"
] | decorators.py | /taxcalc_arp/taxcalc/decorators.py | grantseiter/Tax-Cruncher-ARP | MIT | |
2024-11-18T22:30:28.501822+00:00 | 1,550,968,544,000 | c8b771a032d18cb013b4593c5fa4bd328aa5f730 | 3 | {
"blob_id": "c8b771a032d18cb013b4593c5fa4bd328aa5f730",
"branch_name": "refs/heads/master",
"committer_date": 1550968544000,
"content_id": "655a510e570d3febfeeb5ec4695e1606f5e0683a",
"detected_licenses": [
"MIT"
],
"directory_id": "0235e8ffeead128bcb133151ec1f313a3d9d752c",
"extension": "py",
"fi... | 2.6875 | stackv2 | import serial
import datetime
import pickle
FRAME_DLE = b'\x10'
FRAME_STX = b'\x02'
FRAME_ETX = b'\x03'
FRAME_START = FRAME_DLE + FRAME_STX
FRAME_END = FRAME_DLE + FRAME_ETX
frame = bytearray()
data = list()
BYTES_TO_READ = 2000
log_name = "/home/hkeene/pool/aqualogic/playground/logs/31_pool_pump_off.bin"
if __n... | 45 | 23.47 | 81 | 14 | 304 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_88ae3734c1bca06e_7ed7fb54", "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"
] | [
43
] | [
43
] | [
9
] | [
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"
] | logger_timetag.py | /playground/logger_timetag.py | hkeene/aqualogic | MIT | |
2024-11-18T22:30:33.578436+00:00 | 1,525,970,199,000 | 8e2d16b939d0810fa60e04d1b4924fe3de1a5ef0 | 3 | {
"blob_id": "8e2d16b939d0810fa60e04d1b4924fe3de1a5ef0",
"branch_name": "refs/heads/master",
"committer_date": 1525970199000,
"content_id": "61a9a67920b04931a9ff0912877649dbb6f1692a",
"detected_licenses": [
"MIT"
],
"directory_id": "765f3544489c32ae24076ba83c5cf9f2e87a6b1f",
"extension": "py",
"fi... | 2.8125 | stackv2 |
# coding: utf-8
# ### Imports
# In[1]:
import os
import nltk
import pickle
import re
from nltk.tokenize import word_tokenize
from nltk.tokenize import sent_tokenize
import string
import collections
import math
import operator
# ### Helper functions for cleaning corpus
# In[2]:
regex = "["+string.punctuation+"... | 466 | 26.3 | 150 | 21 | 3,110 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_941f94bb7f6a8ecf_255d6175", "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... | 14 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.pyth... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
149,
154,
174,
255,
303,
440,
464
] | [
149,
154,
174,
255,
303,
440,
464
] | [
5,
17,
5,
9,
9,
5,
5
] | [
85,
97,
42,
67,
67,
76,
56
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | tf_idf.py | /Project/Smoothed QLM/code/tf_idf.py | aksh4y/Information-Retrieval | MIT | |
2024-11-18T22:44:42.626904+00:00 | 1,553,807,230,000 | e1c9ad4acc6bbced1fdb2318985f90582fc7edf0 | 3 | {
"blob_id": "e1c9ad4acc6bbced1fdb2318985f90582fc7edf0",
"branch_name": "refs/heads/master",
"committer_date": 1553807230000,
"content_id": "074208fac48a6577d7bace5334ae95130a546b10",
"detected_licenses": [
"MIT"
],
"directory_id": "6ac1ef684a44390c86f8ece6a8d46bf55db0cb17",
"extension": "py",
"fi... | 3.09375 | stackv2 | # ### Loads the Eng Vocab Dictionary, Creates a tree, Adds the dictionary to the tree and Dumps the created Tree to a PICKLE OBJECT
import os
import json
import pickle
def pickle_load(filename):
try:
filepath = os.path.join(filename)
with open(filepath, 'rb') as f:
tree = pickle.load(f)... | 18 | 31.72 | 131 | 13 | 143 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_dade7959fbf2ca0c_72274d93", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
10
] | [
10
] | [
20
] | [
34
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | run.py | /SpellingCorrectionUsingBiTriGrams/run.py | destro-2698/vectorentry-backend | MIT | |
2024-11-18T22:44:50.001167+00:00 | 1,542,120,069,000 | 6077ff0131de8fa32087f82303d5e63d2c39a973 | 3 | {
"blob_id": "6077ff0131de8fa32087f82303d5e63d2c39a973",
"branch_name": "refs/heads/master",
"committer_date": 1542120069000,
"content_id": "f72735f89fc1ed0d1f4a6d357de28bedba7dcb87",
"detected_licenses": [
"MIT"
],
"directory_id": "fc3217c171383bc20bda8578da5cbf79c4991b40",
"extension": "py",
"fi... | 3.390625 | stackv2 | import turtle
import tkinter
import tkinter.colorchooser
import tkinter.filedialog
import xml.dom.minidom
import random
# The Tile class inherits from RawTurtle. A RawTurtle is a Turtle but we
# get to say which canvas it will draw on when it is created. There are
# a number of arguments passed to the Tile object when... | 42 | 31.88 | 80 | 11 | 322 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8e4806016588956c_60244aac", "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"
] | [
5
] | [
5
] | [
1
] | [
23
] | [
"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"
] | minesweeper.py | /build/html/_static/minesweeper/minesweeper.py | kentdlee/SCSI | MIT | |
2024-11-18T23:36:49.525045+00:00 | 1,513,307,136,000 | 8e1d141345e4bb2f76a00c584d530e9e05253cb9 | 3 | {
"blob_id": "8e1d141345e4bb2f76a00c584d530e9e05253cb9",
"branch_name": "refs/heads/master",
"committer_date": 1513307136000,
"content_id": "f8ab79026c40b53d337f0efc498edb3dae5a4c82",
"detected_licenses": [
"MIT"
],
"directory_id": "83967be46fae20eabad6db1cd59ae38c9de6f959",
"extension": "py",
"fi... | 2.796875 | stackv2 | print("Enter the bits in Client")
ClientBit = input()
print("Enter the bits in Server")
ServerBit = input()
with open("./Circuits/Gen.cir","w") as f:
print(".input a 1 " + ClientBit, file = f)
print(".input b 2 " + ServerBit, file = f)
print(".output Product", file = f)
for i in range(int(ClientBit))... | 52 | 36.48 | 109 | 20 | 615 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_262a77d635dc32a4_bb4c9052", "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"
] | [
50
] | [
50
] | [
1
] | [
52
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | CircuitGen.py | /Other homeworks/Homework_2/GCParser/CircuitGen.py | mohammedjasam/Secure-Data-Analysis | MIT | |
2024-11-18T23:36:49.980928+00:00 | 1,468,274,407,000 | 0d45dc1ff63ea19f17ecb3c80d6ec1ce13d0d106 | 2 | {
"blob_id": "0d45dc1ff63ea19f17ecb3c80d6ec1ce13d0d106",
"branch_name": "refs/heads/master",
"committer_date": 1468274407000,
"content_id": "807b3212996d5d4cdc64f69b261434f1c7b53630",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e73b53540848c0411ccf4d68e84b6f4737c2f1ff",
"extension": "py"... | 2.359375 | stackv2 | #import psycopg2
import sqlite3
import datetime as dt
from pytz import timezone
import sys
import os
from common import *
SQLITE_DB = 'data.db'
# Load Postgres Connection Data from enviornment (or load defaults)
# HOST = os.environ.get('PGHOST', 'localhost')
# DBNAME = os.environ.get('PGDATABASE', 'postgr... | 312 | 29.43 | 137 | 15 | 2,485 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_cbfa28d6ed0adbaf_325685c3", "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... | 49 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE... | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.p... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"securit... | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"... | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"HIGH",
"MEDIUM",
"HIGH",
... | [
114,
114,
128,
128,
130,
130,
132,
132,
135,
135,
143,
143,
146,
146,
154,
154,
163,
163,
172,
172,
174,
174,
180,
180,
195,
195,
222,
234,
234,
240,
240,
251,
251,
268,
268,
280,
280,
285,
285,
291,
291,
301,
301,
303,
303,
3... | [
114,
114,
128,
128,
130,
130,
132,
132,
137,
137,
144,
144,
147,
147,
154,
154,
166,
166,
172,
172,
174,
174,
180,
180,
198,
198,
222,
234,
234,
240,
240,
254,
254,
268,
268,
280,
280,
285,
285,
291,
291,
301,
301,
303,
303,
3... | [
7,
7,
3,
3,
5,
5,
5,
5,
3,
3,
5,
5,
5,
5,
5,
5,
5,
5,
3,
3,
3,
3,
3,
3,
3,
3,
3,
5,
5,
3,
3,
3,
3,
3,
3,
5,
5,
7,
7,
3,
3,
3,
3,
5,
5,
3,
3,
3,
3
] | [
25,
25,
74,
74,
76,
76,
82,
82,
83,
83,
101,
101,
138,
138,
87,
87,
28,
28,
61,
61,
69,
69,
75,
75,
62,
62,
70,
93,
93,
58,
58,
51,
51,
74,
74,
83,
83,
85,
85,
60,
60,
66,
66,
59,
59,
71,
71,
63,
63
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01... | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"... | db.py | /tools/scheduler/scheduler/db.py | DaMSL/K3 | Apache-2.0 | |
2024-11-18T23:36:52.731147+00:00 | 1,461,439,922,000 | 1c38331718de9a1d2a1ef089bb1bed60c528d946 | 3 | {
"blob_id": "1c38331718de9a1d2a1ef089bb1bed60c528d946",
"branch_name": "refs/heads/master",
"committer_date": 1461439922000,
"content_id": "08343e7c94b2ef76e9d909e0787fbfbcd3016512",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5e1f2e7db78beb46bfd86ea565345e0a594b6d62",
"extension": "py"... | 2.59375 | stackv2 | import re
import pickle
import os
# ###用于生成替换列表的代码
# #hxdict = {}
##hxlist =list(hxdict.items())
def addword(hx, original):
'''rplRule must be formated as a=b'''
with open(package_dir + os.sep + 'hxlist.txt', 'a', encoding='utf8') as f:
f.write(hx + '=' + original + '\n')
rebuild()
def rebuild():... | 41 | 27.46 | 78 | 13 | 343 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_272ecfa833c0cc39_109363c6", "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"
] | [
34,
36
] | [
34,
36
] | [
9,
9
] | [
32,
30
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | hxlistBulider.py | /hxchange/hxlistBulider.py | PaleNeutron/EpubBuilder | Apache-2.0 | |
2024-11-18T23:36:57.810462+00:00 | 1,628,049,321,000 | 9835b2b3edd7ebdb275918b9aecd6b31a43e2612 | 2 | {
"blob_id": "9835b2b3edd7ebdb275918b9aecd6b31a43e2612",
"branch_name": "refs/heads/master",
"committer_date": 1628049321000,
"content_id": "a0d13d32cd82144c06edea0d83a524c2c9414b45",
"detected_licenses": [
"MIT"
],
"directory_id": "9c8425e141ed1e961df16eb4779fdb8cf692dfaa",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/python
"""
extract_stems_script.py - Script to process pointclouds to pull out stems for high-res/hovermap data
"""
import os
from math import *
import random
import colorsys
import csv
import numpy as np
import laspy.file as lpf
import pickle
import treepointcloud
import tp_visualisation
import open3d... | 285 | 33.72 | 142 | 22 | 2,706 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_49131fdf9049c9a6_7d16d50a", "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... | 8 | 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"
] | [
96,
100,
115,
119
] | [
96,
100,
115,
119
] | [
5,
14,
5,
15
] | [
62,
54,
51,
55
] | [
"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"
] | extract_stems_script.py | /src/hovermap/extract_stems_script.py | ashlinrichardson/forest_3d_app | MIT | |
2024-11-18T23:36:59.470471+00:00 | 1,675,331,071,000 | 91edf68317cbe715270bad3b0357970ddcf3682e | 2 | {
"blob_id": "91edf68317cbe715270bad3b0357970ddcf3682e",
"branch_name": "refs/heads/master",
"committer_date": 1675331071000,
"content_id": "64b03b1d8ab04815b72ade29098982320270ea7b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a0122a860e797efe16df86d37d236e8e8adb3ff7",
"extension": "py"... | 2.328125 | stackv2 | import datetime
import webapp2
import jinja2
import os
from google.appengine.api import users
template_env = jinja2.Environment(
loader = jinja2.FileSystemLoader(os.getcwd())
)
class MainPage(webapp2.RequestHandler):
def get(self):
current_time = datetime.datetime.now()
user = users.get_curre... | 29 | 27.14 | 68 | 12 | 169 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_8cabffea8ebc872b_150b5fd9", "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... | 3 | true | [
"CWE-79",
"CWE-116",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
8,
8,
26
] | [
10,
10,
26
] | [
16,
16,
33
] | [
2,
2,
57
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | main.py | /gcp/clock/main.py | xuzewei/devops | Apache-2.0 | |
2024-11-18T23:37:02.671870+00:00 | 1,633,268,969,000 | 3446d9ff77524bcdb8c43da278100c841b3651e5 | 2 | {
"blob_id": "3446d9ff77524bcdb8c43da278100c841b3651e5",
"branch_name": "refs/heads/main",
"committer_date": 1633268969000,
"content_id": "b5ae89379e271b27246a3b8bc3398cb85e2d601c",
"detected_licenses": [
"MIT"
],
"directory_id": "fba6bba262f0cdb7661ef30bdeb1e7f893647c8f",
"extension": "py",
"file... | 2.375 | stackv2 | import json
import os
import redis
from flask import Flask, render_template, request
from light_emitting_desk.desk import Desk
from light_emitting_desk.utils import conf
app = Flask(__name__)
app.redis = redis.Redis()
desk_conf = conf["sectors"]
if "TEST_SECTORS" in os.environ:
desk_conf = json.loads(os.environ... | 169 | 23.59 | 84 | 17 | 979 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_fee5d9a4d3472e1f_4ebb932c", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se... | 5 | true | [
"CWE-96",
"CWE-96"
] | [
"rules.python.lang.security.dangerous-globals-use",
"rules.python.lang.security.dangerous-globals-use"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
93,
100
] | [
93,
100
] | [
19,
23
] | [
48,
70
] | [
"A03:2021 - Injection",
"A03:2021 - Injection"
] | [
"Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'.",
"Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | webserver.py | /webserver.py | pikesley/light-emitting-desk | MIT | |
2024-11-18T23:37:07.937252+00:00 | 1,689,065,317,000 | b3e4a0f52a6a074173f28c16f0e02a3bfd7e25bd | 3 | {
"blob_id": "b3e4a0f52a6a074173f28c16f0e02a3bfd7e25bd",
"branch_name": "refs/heads/master",
"committer_date": 1689065317000,
"content_id": "ab8a59287957daa049b4754cd76b2ca1777d885b",
"detected_licenses": [
"MIT"
],
"directory_id": "21ef758a6c8ae4d7eac85603353f0c895e4b2130",
"extension": "py",
"fi... | 2.78125 | stackv2 | from dataclasses import dataclass
from apischema import deserialize, deserializer
from apischema.json_schema import deserialization_schema
@dataclass
class Expression:
value: int
@deserializer
def evaluate_expression(expr: str) -> Expression:
return Expression(int(eval(expr)))
# Could be shorten into des... | 27 | 25.11 | 86 | 12 | 158 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_1a64828f353cad46_2eac5c63", "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"
] | [
14
] | [
14
] | [
27
] | [
37
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | multiple_deserializers.py | /examples/multiple_deserializers.py | wyfo/apischema | MIT | |
2024-11-18T23:37:09.610766+00:00 | 1,523,627,473,000 | 9ccc9287178f4440a287f62831177a7ee09ddedc | 3 | {
"blob_id": "9ccc9287178f4440a287f62831177a7ee09ddedc",
"branch_name": "refs/heads/master",
"committer_date": 1523627473000,
"content_id": "efe8f8577a581c28a71b99c00a08504194243a6e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7a5120d0d5c1b083f280ce87860d3f878a528237",
"extension": "py"... | 2.84375 | stackv2 | import subprocess, urllib.parse, collections, re, os, time
from weakref import proxy
from config import config
_brace_re = re.compile(r'(?<=[^\\])[\{\}]')
def validate_bibtex_value(txt):
'''
we only perform rudimentary validation - just check whether braces are
balanced. Otherwise, we assume the user know... | 239 | 26.23 | 164 | 17 | 1,570 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_718884c4ab6bf9b6_49120040", "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"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
118
] | [
120
] | [
13
] | [
58
] | [
"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"
] | utils.py | /py/utils.py | michaelpalmeruw/mbib | Apache-2.0 | |
2024-11-18T23:37:09.665719+00:00 | 1,495,551,097,000 | 0ca59a23b9f5272910c315159e9aa21dfbfe65d1 | 3 | {
"blob_id": "0ca59a23b9f5272910c315159e9aa21dfbfe65d1",
"branch_name": "refs/heads/master",
"committer_date": 1495551097000,
"content_id": "0057066f5a56878af790f0c502ad8e0f45a8d3aa",
"detected_licenses": [
"MIT"
],
"directory_id": "4a13a42dd3993ac6c5c07b5ee20bf378a77abd50",
"extension": "py",
"fi... | 2.546875 | stackv2 | import os
import shutil
import argparse
def extract_frames_from_one_video(video_file, frames_path, fps):
images_counter = 1
counter = 1
# get the video name without the extension and path
video_file_name = get_video_file_name(video_file)
# get the name of cut file of the video
cut_video_file = os.path.di... | 117 | 38.33 | 161 | 24 | 1,217 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_9370c95b7475f732_b8d5b7f4", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.use-sys-exit", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected use of `exit`. Use `sys.exit` over the python... | 8 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-c... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
42,
45,
53,
65,
69,
77
] | [
42,
45,
53,
65,
70,
77
] | [
7,
7,
7,
11,
11,
11
] | [
37,
162,
37,
41,
95,
41
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found dynamic conte... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | extract_frames.py | /extract_frames.py | MuhammadHamed/Annotation-Tool | MIT | |
2024-11-18T23:37:11.092653+00:00 | 1,564,566,041,000 | ecd69f2edd3b7d9e3b243be137ee55899592b888 | 2 | {
"blob_id": "ecd69f2edd3b7d9e3b243be137ee55899592b888",
"branch_name": "refs/heads/master",
"committer_date": 1564566041000,
"content_id": "3b51c95167b0cf2438f9477c06004dfe09d49be5",
"detected_licenses": [
"MIT"
],
"directory_id": "0950d552058cc86f95fdce78625d6722e4480469",
"extension": "py",
"fi... | 2.453125 | stackv2 | import hashlib
import json
import gnsq
import sqlite3
from deeputil import Dummy
from diskdict import DiskDict
from pymongo import MongoClient
DUMMY_LOG = Dummy
class SQLiteStore(object):
def __init__(self, db_name="Gmail", table_name="gmail_dump", log=DUMMY_LOG):
self.db_name = db_name
self.tab... | 78 | 28.81 | 80 | 15 | 543 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_211fa5e6574a12dc_ad58b492", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 4 | true | [
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"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"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"HIGH"
] | [
23,
23,
32
] | [
26,
26,
35
] | [
9,
9,
13
] | [
10,
10,
14
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | messagestore.py | /gmaildump/messagestore.py | deep-compute/gmaildump | MIT | |
2024-11-18T23:37:11.364598+00:00 | 1,490,730,685,000 | 89ba06465ab2587cd35def901959c2f3bbdcb9c2 | 3 | {
"blob_id": "89ba06465ab2587cd35def901959c2f3bbdcb9c2",
"branch_name": "refs/heads/master",
"committer_date": 1490730685000,
"content_id": "3215311e79a4babbf16e6ae6d3d492a1610e1ed5",
"detected_licenses": [
"Apache-2.0",
"BSD-3-Clause"
],
"directory_id": "126102b0bbd73f73f9405faedf445e1369aa366b",... | 2.71875 | stackv2 | #recognize finger
import numpy as np
import cv2
import time
from mouse import *
from PositionCalculator import *
#corners_x = [105, 434, 440, 171]
#corners_y = [132, 160, 303, 280]
path_from = "c:\\Dmitry_Soft\\python\\tablet\\img"
template_file = 'template_finger.jpg'
template_file_full = path_from + '\\' + templ... | 90 | 27.61 | 75 | 10 | 769 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_d439f3a92021d280_d5b0c7d1", "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"
] | [
34
] | [
34
] | [
14
] | [
24
] | [
"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"
] | finger_recongize.py | /Scripts/finger_recongize.py | dmvlasenk/CameraTablet | Apache-2.0,BSD-3-Clause | |
2024-11-18T23:37:11.667646+00:00 | 1,693,241,515,000 | 94bea07a04c77d505a12f182e7259fb9b4576c2b | 2 | {
"blob_id": "94bea07a04c77d505a12f182e7259fb9b4576c2b",
"branch_name": "refs/heads/main",
"committer_date": 1693241515000,
"content_id": "947ba0258ac2d4ec13aacf27d680ab90ec8c8038",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "c168fe819b446640957e5e310ef89fcfe28662b3",
"extension": "py"... | 2.421875 | stackv2 | """Scribe Uploader for Pytorch Benchmark V2 Data
Currently supports data in pytest-benchmark format but can be extended.
New fields can be added just by modifying the schema in this file, schema
checking is only here to encourage reusing existing fields and avoiding typos.
"""
import argparse
import time
import mult... | 222 | 38.77 | 108 | 20 | 1,845 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_fcca64f262840f31_0378e9cf", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
74
] | [
74
] | [
13
] | [
32
] | [
"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"
] | upload_scribe_v2.py | /scripts/upload_scribe_v2.py | pytorch/benchmark | BSD-3-Clause | |
2024-11-18T21:14:06.240289+00:00 | 1,599,195,313,000 | e58af4ba18217543f1892216ed53bbe1915db794 | 3 | {
"blob_id": "e58af4ba18217543f1892216ed53bbe1915db794",
"branch_name": "refs/heads/master",
"committer_date": 1599195313000,
"content_id": "72928a919ea96f80a2ee0aad20df95f74c4092d8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e028c9bec1c3a5cf828a0323c28e2f9ded7de81c",
"extension": "py"... | 2.59375 | stackv2 | """Benchmark the training of VGG16 convpolutional neural
network on synthetic data. Returns images per time as
result metric.
"""
import tensorflow as tf
from tensorflow.python.client import timeline
import keras
import numpy as np
import time
def benchmark_VGG16(
imgwidth,
imgheight,
numclass... | 81 | 28.6 | 130 | 14 | 553 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_24f98bcdc17c4e73_717cf033", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 3 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
24
] | [
24
] | [
16
] | [
47
] | [
"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"
] | benchmark_VGG16_keras.py | /benchmark/utils_tf/benchmark_VGG16_keras.py | profnote/ml-performance-prediction | Apache-2.0 | |
2024-11-18T21:14:06.775575+00:00 | 1,608,834,615,000 | cd18018737c587d95b122ed596e8a461b3c522f5 | 2 | {
"blob_id": "cd18018737c587d95b122ed596e8a461b3c522f5",
"branch_name": "refs/heads/main",
"committer_date": 1608834615000,
"content_id": "313a24fd26a3899c63420944e531deef5f121685",
"detected_licenses": [
"MIT"
],
"directory_id": "e8f33ae05e82e44bc3899b18ecf1c189dbc5be7d",
"extension": "py",
"file... | 2.484375 | stackv2 | # from google.colab import drive
# drive.mount('/content/gdrive')
import pandas as pd
import numpy as np
import scipy.optimize as opt
from sklearn import preprocessing
# %matplotlib inline
import matplotlib.pyplot as plt
import pylab as pl
import pickle #Modifications for flask
text = open("./paysim.csv", "r")
#... | 82 | 26.74 | 96 | 10 | 572 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_f1bf9b93ebfe1849_61aeebe6", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 5 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
76,
78
] | [
76,
78
] | [
1,
9
] | [
41,
45
] | [
"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"
] | model.py | /GTHACKER/F-DetectoR/model.py | premakhil/Code-Innovation-Series-ModelEngineeringCollege | MIT | |
2024-11-18T21:14:07.714812+00:00 | 1,408,221,245,000 | b0760ac6e9df139e9ee56b20e9382ad2da83e535 | 3 | {
"blob_id": "b0760ac6e9df139e9ee56b20e9382ad2da83e535",
"branch_name": "refs/heads/master",
"committer_date": 1408221745000,
"content_id": "acc475b2d9c437efde0ae87faa1f432cd9f7f31b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "560457c97e927ca64425e29fd0f439e1bf441c2b",
"extension": "py"... | 2.65625 | stackv2 | from django import template
from django.core.urlresolvers import reverse, NoReverseMatch
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter('message_alert_class')
def message_alert_class(value):
"""
Maps Django messages tags to Bootstrap alert classes
Bootstrap ... | 93 | 26.1 | 73 | 14 | 593 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_04aebd411ccf6d93_610f1cc6", "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"
] | [
44
] | [
44
] | [
12
] | [
39
] | [
"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"
] | djunk_filters.py | /djunk_drawer/templatetags/djunk_filters.py | smajda/django-djunk-drawer | Apache-2.0 | |
2024-11-18T21:14:13.296387+00:00 | 1,591,828,223,000 | 4c489b257bea53c60a3858fc945052c1b62d152f | 3 | {
"blob_id": "4c489b257bea53c60a3858fc945052c1b62d152f",
"branch_name": "refs/heads/master",
"committer_date": 1591828223000,
"content_id": "a60c63ddc1e0b778a1565a4a3db304d236ba5f85",
"detected_licenses": [
"MIT"
],
"directory_id": "50849ed7530afcfcc4556c0ef73cd31cb589ad11",
"extension": "py",
"fi... | 2.8125 | stackv2 | import httpx
import xml.etree.ElementTree as ElementTree
import datetime
class Apex(object):
"""
Abstracts the interaction with the Neptune Apex Aquacontroller.
Allows querying of current probe and outlet states as well as control
of individual outlets.
"""
def __init__(self, ip_address, user... | 185 | 37.79 | 107 | 19 | 1,578 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_84b270c1f1299983_506fa35f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611",
"CWE-798"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.audit.hardcoded-password-default-argument"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM"
] | [
2,
13
] | [
2,
24
] | [
1,
5
] | [
44,
26
] | [
"A04:2017 - XML External Entities (XXE)",
"A07:2021 - Identification and Authentication Failures"
] | [
"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.",
"Hardcoded password is used as a default argument to '__ini... | [
7.5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | pynepsys.py | /pynepsys/pynepsys.py | jpelzer/pynepsys | MIT | |
2024-11-18T21:14:15.027215+00:00 | 1,390,990,515,000 | 7a9344b0840dc7017aade70dbc27ed484014aeb2 | 3 | {
"blob_id": "7a9344b0840dc7017aade70dbc27ed484014aeb2",
"branch_name": "refs/heads/master",
"committer_date": 1390990515000,
"content_id": "13138a3fae0caa32fbac6ca8ec566efd3f06c1cb",
"detected_licenses": [
"MIT"
],
"directory_id": "f535a8a108c4ea5aafee2d130ccd7c7fe6fdb67b",
"extension": "py",
"fi... | 2.546875 | stackv2 | '''
Created on 07-Nov-2013
@author: Ghanshyam Agrawal
'''
import sys
import os
import time
import random
import logging
app_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) # src folder
sys.path.insert(0, app_folder + "/src")
from scraper.page_scrapper import PageScrapper
from scraper impo... | 99 | 28.78 | 126 | 17 | 812 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_84c6eb86b4c9e28c_ecc79c80", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 3 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
26,
41
] | [
26,
41
] | [
21,
21
] | [
81,
117
] | [
"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"
] | price_checker.py | /src/scraper/price_checker.py | just4jc/scraperpy | MIT | |
2024-11-18T21:14:15.240070+00:00 | 1,529,504,729,000 | 15794fd96b5a68b4e1a5e70e781c1b1a5c5c21ea | 3 | {
"blob_id": "15794fd96b5a68b4e1a5e70e781c1b1a5c5c21ea",
"branch_name": "refs/heads/master",
"committer_date": 1529504729000,
"content_id": "998c14de63988d7e16edcd16e27c35a1835bde82",
"detected_licenses": [],
"directory_id": "a19f7fcaa2e1630fa3cafaf3cc7d9bc2e4283261",
"extension": "py",
"filename": "obv... | 2.71875 | stackv2 | #!/usr/bin/env python
import argparse
import os
import subprocess
def load_version_file(fh):
vn_context = {}
exec(fh.read(), vn_context)
return vn_context['__version__']
def identify_branch_name(directory):
# TODO: Consider using the tag name too (git describe --tags --exact-match)
return subproc... | 45 | 43.27 | 113 | 20 | 409 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_d3c25d03c126ffd5_ee636e22", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ... | 4 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
8
] | [
8
] | [
5
] | [
32
] | [
"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"
] | obvci_substitute_conda_recipe_version.py | /scripts/obvci_substitute_conda_recipe_version.py | pelson/Obvious-CI | ||
2024-11-18T21:14:15.605142+00:00 | 1,666,205,807,000 | 8101d2eef61cc6cac874f192af58199982ae26a2 | 2 | {
"blob_id": "8101d2eef61cc6cac874f192af58199982ae26a2",
"branch_name": "refs/heads/master",
"committer_date": 1666205807000,
"content_id": "79bda3795dc083b3f1fc895941be8e9df1a3bd74",
"detected_licenses": [
"MIT"
],
"directory_id": "34d0f7446c1ad697376deb6b6003a451e0a68fb5",
"extension": "py",
"fi... | 2.359375 | stackv2 | """Wrapper for Harmony's CLI.
This module makes it easy for one to interact with the Harmony CLI.
It also natively manages all of the keystore related features to help with scripting.
Example:
Below is a demo of how to import, manage keys, and interact with the CLI::
>>> from pyhmy import cli
>>> ... | 489 | 31.68 | 96 | 21 | 3,676 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ebfb1200b9522394_4880fb1c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 9 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.danger... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
226,
274,
366,
448,
451
] | [
232,
280,
370,
448,
456
] | [
14,
10,
16,
13,
17
] | [
10,
6,
10,
57,
18
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | cli.py | /pyhmy/cli.py | harmony-one/pyhmy | MIT | |
2024-11-18T21:14:41.879422+00:00 | 1,643,379,592,000 | 2751b898302a3bd222fced05e5f203c1963b8a1c | 3 | {
"blob_id": "2751b898302a3bd222fced05e5f203c1963b8a1c",
"branch_name": "refs/heads/master",
"committer_date": 1643379592000,
"content_id": "2d80cc2d7c8cd8ed2fa057623a78bf7b3ba515ae",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "4518699229752baea849a53264033010997bb3ed",
"extension": "p... | 2.75 | stackv2 | import logging
import pickle
from collections import deque
from offsetbasedgraph.graphtraverser import GraphTravserserBetweenNodes
import offsetbasedgraph as obg
from pyvg import Snarls
class SnarlGraph(obg.GraphWithReversals):
def __init__(self, blocks, edges, id=None, parent=None,
children=[... | 380 | 35.31 | 113 | 21 | 3,006 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e1f63fb5c306a652_2e97621b", "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"
] | [
234,
239
] | [
234,
239
] | [
13,
19
] | [
33,
41
] | [
"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"
] | snarls.py | /graph_peak_caller/legacy/snarls.py | cgroza/graph_peak_caller | BSD-3-Clause | |
2024-11-18T21:14:44.026142+00:00 | 1,636,986,035,000 | f152a512a86710e05049358a3987128598b4d9ff | 3 | {
"blob_id": "f152a512a86710e05049358a3987128598b4d9ff",
"branch_name": "refs/heads/main",
"committer_date": 1636986035000,
"content_id": "c8df31d39e68c65d6d8cf7405bcfd16828423bdf",
"detected_licenses": [
"MIT"
],
"directory_id": "7436943e97861767b6bd4bc7094ba0f5c2c3753b",
"extension": "py",
"file... | 2.859375 | stackv2 | # From: https://blog.paperspace.com/train-yolov5-custom-data/
import torch
from IPython.display import Image # for displaying images
import os
import random
import shutil
from sklearn.model_selection import train_test_split
import xml.etree.ElementTree as ET
from xml.dom import minidom
from tqdm import tqdm
from PI... | 207 | 33.31 | 141 | 21 | 1,748 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_6dbf9ddd86fbdf9d_6bbfd956", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 5 | true | [
"CWE-611",
"CWE-611",
"CWE-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"
] | [
9,
10,
20
] | [
9,
10,
20
] | [
1,
1,
12
] | [
35,
28,
30
] | [
"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"
] | convert_annotations.py | /yolov5/convert_annotations.py | mantyni/Multi-object-detection-lego | MIT | |
2024-11-18T21:14:44.474129+00:00 | 1,554,913,632,000 | 527a3d6f9a12eead13fa7688bf48003b8a4b69f9 | 3 | {
"blob_id": "527a3d6f9a12eead13fa7688bf48003b8a4b69f9",
"branch_name": "refs/heads/master",
"committer_date": 1554913632000,
"content_id": "fa4fce71fe6d96784a15288f6d6184433ab2c734",
"detected_licenses": [
"MIT"
],
"directory_id": "632400054c08a0074e13dd5def5f78dbb870519b",
"extension": "py",
"fi... | 2.75 | stackv2 | from __future__ import absolute_import
import warnings
import tensorflow as tf
from six.moves import cPickle as pickle
PKL_PROTOCOL = 2
def save_weights_to_state_dict(variables=None, sess=None, scope=None):
""" Save all weights to a state dict """
if sess is None:
sess = tf.get_default_session()
... | 74 | 29.12 | 80 | 14 | 482 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5732cf354907bd2b_162a34d7", "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"
] | [
56,
61
] | [
56,
61
] | [
9,
22
] | [
58,
36
] | [
"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"
] | weights_io.py | /tensorbreeze/utils/weights_io.py | mingruimingrui/TensorBreeze | MIT | |
2024-11-18T21:14:44.891210+00:00 | 1,534,150,715,000 | 20e5ff52497fc46a8818dc9fec26e747df2d2577 | 3 | {
"blob_id": "20e5ff52497fc46a8818dc9fec26e747df2d2577",
"branch_name": "refs/heads/master",
"committer_date": 1534150715000,
"content_id": "03ecc8f53201cfa4a7c11c4743a7d8dead5a5e4a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d39aae9c7830ca2a226d1ebb5838292a82120863",
"extension": "py"... | 2.796875 | stackv2 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# Copyright (c) 2018 Keyone (blog:http://www.key1.top)
import sys
import os
import getopt
import xml.dom.minidom
import sqlite3
VERSION = "1.1"
DEFAULT_DATABASE = "./nmap_scan.db" #默认sqlite数据库
true = 1
false = 0
def usage(name):
print "usage: %s [options] <nmap output... | 245 | 34.53 | 149 | 20 | 1,950 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_845adadafb0eb1c5_987e11c4", "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"
] | [
8
] | [
8
] | [
1
] | [
23
] | [
"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"
] | nmap2sqlite.py | /nmap2sqlite.py | hi-KK/nmap2sqlite | Apache-2.0 | |
2024-11-18T21:57:30.849429+00:00 | 1,622,714,233,000 | b7696e8a5fb947d380572666e8e7a7fb470a187d | 3 | {
"blob_id": "b7696e8a5fb947d380572666e8e7a7fb470a187d",
"branch_name": "refs/heads/master",
"committer_date": 1622714233000,
"content_id": "d99c08d8437f985ee5636b8df07e592c9c09eea9",
"detected_licenses": [
"MIT"
],
"directory_id": "06127d17c047e41cd5a6e17cf0ecf30e1abd4e97",
"extension": "py",
"fi... | 2.921875 | stackv2 | """
Allows to classify musical instrument families from audio clips using a trained
model.
Input:
- audio clip (WAV/FLAC), 2sec, 44100 Hz sampling rate, mono
- model files (architecture, weights)
Ouput: instrument family [brass, guitar, organ, piano, pipe, reed, strings]
"""
import argparse
import keras
from keras.ut... | 129 | 34.53 | 99 | 16 | 988 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0e00b450fe10589c_f3c92720", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-jsonpickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
51
] | [
51
] | [
17
] | [
44
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `jsonpickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data using `json` module."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | predict.py | /predict.py | NavdeepSinghBagga/deep-instrument-heroku | MIT | |
2024-11-18T21:57:32.183226+00:00 | 1,691,778,673,000 | be0630736ac92fc68fc2d356869fbd3500c6e6e2 | 3 | {
"blob_id": "be0630736ac92fc68fc2d356869fbd3500c6e6e2",
"branch_name": "refs/heads/master",
"committer_date": 1691778673000,
"content_id": "47f07ede4643faae33d7c067dd60f8f296c02730",
"detected_licenses": [
"MIT"
],
"directory_id": "da7c37c8503c8eb6e8a3aa418f381063b7e125bc",
"extension": "py",
"fi... | 2.859375 | stackv2 | import os
import faiss
import numpy as np
import pickle
import hashlib
from sentence_transformers import SentenceTransformer
def calculate_directory_hash(directory_path):
hash_md5 = hashlib.md5()
for subdir, _, files in os.walk(directory_path):
for file in sorted(files, key=lambda x: x.lower()): # sor... | 70 | 37.11 | 95 | 17 | 613 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-hash-algorithm-md5_526f7916a6537bac_18429525", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-hash-algorithm-md5", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected MD5 hash algorithm which... | 5 | 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"
] | [
52,
59
] | [
52,
59
] | [
37,
13
] | [
51,
52
] | [
"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"
] | code.py | /semanticSearchAllTheThings/code.py | noveoko/automatemyboringjob | MIT | |
2024-11-18T21:57:35.095892+00:00 | 1,379,416,492,000 | 5b10d2723f3181510d26fc7daebf699882f13176 | 2 | {
"blob_id": "5b10d2723f3181510d26fc7daebf699882f13176",
"branch_name": "refs/heads/master",
"committer_date": 1379416492000,
"content_id": "e4aee06b315003376f620380771cc87db3bf29cf",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "07e17cbb89e2c6df85198f7e0633f10795af2f7e",
"extension": "p... | 2.484375 | stackv2 | import MySQLdb
import xml.etree.cElementTree as ET
from xml.etree.ElementTree import tostring
namespace = '{http://www.mediawiki.org/xml/export-0.8/}'
params = {'id': 'log_id',
'type': 'log_type',
'action': 'log_action',
'timestamp': 'log_timestamp',
'contributor': 'log_contri... | 81 | 30.06 | 118 | 18 | 667 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_470cc7523c768efa_020fdf26", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
2,
3
] | [
2,
3
] | [
1,
1
] | [
36,
43
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | load_logging_table.py | /scripts/load_logging_table.py | wikimedia/analytics-user-metrics | BSD-3-Clause | |
2024-11-18T21:57:50.681823+00:00 | 1,686,752,332,000 | 389846b419f21b80e3845698511c0252e6cdb34e | 3 | {
"blob_id": "389846b419f21b80e3845698511c0252e6cdb34e",
"branch_name": "refs/heads/main",
"committer_date": 1686756129000,
"content_id": "84068c675a58501aba8ecc07e8b3ff3830210f99",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "97380323256ff336beef001f4747f78a12375a76",
"extension": "py",
... | 2.71875 | stackv2 | #!/usr/bin/env python3
import os
import pathlib
import re
from collections import defaultdict
from typing import Dict, List, Optional, TypeVar
import jinja2
MAJOR_VERSION = re.compile(r"(\d+)\.\d+\.\d+")
MINOR_VERSION = re.compile(r"\d+\.(\d+)\.\d+")
PATCH_VERSION = re.compile(r"\d+\.\d+\.(\d+)")
MAJOR_MINOR_VERSION ... | 146 | 37.34 | 118 | 22 | 1,397 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_f8642ec531a19a7a_7fc2d487", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `index_item` is... | 4 | true | [
"CWE-79",
"CWE-116",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
129,
129,
137
] | [
129,
129,
137
] | [
17,
17,
37
] | [
82,
82,
60
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | generate_release_notes_index.py | /tools/generate_release_notes_index.py | dynamic-entropy/documentation | Apache-2.0 | |
2024-11-18T21:57:53.369090+00:00 | 1,578,218,424,000 | 0db5cae5b2ecdd88b0948c9b2869f05cb0bd8be9 | 3 | {
"blob_id": "0db5cae5b2ecdd88b0948c9b2869f05cb0bd8be9",
"branch_name": "refs/heads/master",
"committer_date": 1578218424000,
"content_id": "de7a2d835ccff88c765bb2ce1cc9fa6b3743265f",
"detected_licenses": [
"MIT"
],
"directory_id": "871fa971d4ee8aca58d2e48d4496331515aeb849",
"extension": "py",
"fi... | 2.59375 | stackv2 | from flask import Flask, request
from bs4 import BeautifulSoup
import requests
app = Flask(__name__)
html = '''<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<style>
body{text-align:center}
</style>
</head>
<body>
</body>
</h... | 58 | 30.86 | 170 | 16 | 539 | python | [{"finding_id": "semgrep_rules.python.flask.security.injection.ssrf-requests_467c02cfb7f3f3dd_dad32fb2", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.ssrf-requests", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from request object is passed to a n... | 3 | true | [
"CWE-918"
] | [
"rules.python.flask.security.injection.ssrf-requests"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
26
] | [
26
] | [
16
] | [
80
] | [
"A10:2021 - Server-Side Request Forgery (SSRF)"
] | [
"Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox... | [
7.5
] | [
"MEDIUM"
] | [
"HIGH"
] | application.py | /find-ip-info_azure_app/application.py | wx2020/Multi-party-query-IP-address | MIT | |
2024-11-18T21:57:53.782282+00:00 | 1,674,025,758,000 | b66804fb881ebab2a2b7d311ed0a69a004987d4f | 3 | {
"blob_id": "b66804fb881ebab2a2b7d311ed0a69a004987d4f",
"branch_name": "refs/heads/master",
"committer_date": 1674025758000,
"content_id": "9b6f0016e79ee81e3608d0a3771284c4a4170ac6",
"detected_licenses": [
"ZPL-2.1"
],
"directory_id": "8de29da035d92ad94a284e6c1fdc98527fe17e08",
"extension": "py",
... | 2.578125 | stackv2 | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this
# distribution.
# THIS SOFTWARE IS PROVIDED "AS ... | 453 | 33.71 | 79 | 16 | 3,239 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_13f400601ed97a10_8a59cba3", "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"
] | [
19
] | [
19
] | [
1
] | [
40
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | exportimport.py | /src/Products/PluggableAuthService/plugins/exportimport.py | zopefoundation/Products.PluggableAuthService | ZPL-2.1 | |
2024-11-18T21:57:54.652012+00:00 | 1,529,634,462,000 | 20c6e119295887c5585793eb2f557275b8813758 | 3 | {
"blob_id": "20c6e119295887c5585793eb2f557275b8813758",
"branch_name": "refs/heads/master",
"committer_date": 1529634462000,
"content_id": "8296d693bb104c10a339000be191fe344483e6eb",
"detected_licenses": [
"MIT"
],
"directory_id": "870c1a9c569e12918598d3e7eb25e66a7eb667a0",
"extension": "py",
"fi... | 2.671875 | stackv2 | from .calayers.calayer2 import ByteStreamCA as bsca
from .keys import GetKey
import time
import pickle
import rsa
def GetCertificate(name):
gk = GetKey()
try:
with open('cert/cert.pkl', 'rb') as f:
cert = f.read()
with open('cert/cert_sig', 'rb') as f:
cert_sig = f.read(... | 45 | 34.56 | 79 | 13 | 526 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ca91ae20f3ea27d5_6dad7491", "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"
] | [
28,
41
] | [
28,
41
] | [
15,
13
] | [
32,
34
] | [
"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"
] | ca.py | /code/include/services/ca.py | 1049451037/SecureWeChat | MIT | |
2024-11-18T21:57:59.187310+00:00 | 1,650,568,914,000 | 587a2805c53367855ffb455f1eb9df45f2fe1ec8 | 3 | {
"blob_id": "587a2805c53367855ffb455f1eb9df45f2fe1ec8",
"branch_name": "refs/heads/master",
"committer_date": 1650568914000,
"content_id": "951e3e084e43214c31ef6eb9472b4dd568b361d2",
"detected_licenses": [
"MIT"
],
"directory_id": "58813e5fa0ee0b3fb7513a40c7495306a8b3c885",
"extension": "py",
"fi... | 2.859375 | stackv2 | import psycopg2
from bota import db_constants as dbc
import psycopg2.extras
import json
class BotaDB:
def __init__(self, host=dbc.HOST_NAME, database=dbc.DATABASE_NAME, user=dbc.USER, password=dbc.PASSWORD):
self.credentials_empty, self.credentials_empty_list = self._is_db_credentials_empty(host, database... | 163 | 38.01 | 123 | 17 | 1,511 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_31ee54b4b5f2a5ba_fedbb474", "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"
] | [
57,
57
] | [
57,
57
] | [
9,
9
] | [
108,
108
] | [
"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"
] | db_utility.py | /bota/utility/db_utility.py | bendangnuksung/bota | MIT | |
2024-11-18T21:57:59.819296+00:00 | 1,608,742,430,000 | 50b28ad08bbd536d876465d98c830107da8d6be0 | 3 | {
"blob_id": "50b28ad08bbd536d876465d98c830107da8d6be0",
"branch_name": "refs/heads/main",
"committer_date": 1608742430000,
"content_id": "8f95e64bc0d615710c31d46021e3dc69a192cbc1",
"detected_licenses": [
"MIT"
],
"directory_id": "70115bff1e5273135b7acac345878f6de33102e1",
"extension": "py",
"file... | 3.359375 | stackv2 | '''
:description: This program reads data from xml file and creates pandas DataFrame object
:author: Sławomir Kwiatkowski
:date: 2020-12-23
'''
import xml.dom.minidom
from collections import defaultdict
import pandas as pd
persons = defaultdict(list)
with xml.dom.minidom.parse(open('persons.xml')) as tree:
perso... | 21 | 36.19 | 88 | 16 | 182 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_f09215b129577a8d_bb94d075", "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"
] | [
6
] | [
6
] | [
1
] | [
23
] | [
"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"
] | main.py | /main.py | Slawomir-Kwiatkowski/xml2pandas-minidom | MIT | |
2024-11-18T21:58:01.186413+00:00 | 1,552,739,230,000 | 8ffbc4e8fa6ee3687ca7d7bb1e8b81167c38a4d6 | 3 | {
"blob_id": "8ffbc4e8fa6ee3687ca7d7bb1e8b81167c38a4d6",
"branch_name": "refs/heads/master",
"committer_date": 1552739230000,
"content_id": "f2beaab9f9bfcf80493d41daf7e143c29708b8e1",
"detected_licenses": [
"MIT"
],
"directory_id": "a61969ee566fffcab83c433bded9bc2da676e0ce",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/env python
# coding: utf-8
# hi 123
# In[ ]:
import speech_recognition as sr
import tempfile
from gtts import gTTS
from pygame import mixer
import requests
from time import ctime
import time
import imutils
from bs4 import BeautifulSoup
import tkinter as tk
import os
from PIL import Image
from PIL import Imag... | 196 | 29.55 | 116 | 15 | 1,629 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_62cf76b133a4a9d2_f678eeeb", "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... | 16 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
54
] | [
54
] | [
17
] | [
44
] | [
"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"
] | Sara.py | /Sara.py | MuMuShy/Sara | MIT | |
2024-11-18T21:58:02.918502+00:00 | 1,525,171,834,000 | 000c9de5a33a89ef2cb01ccc4cc2819bd7339f2d | 2 | {
"blob_id": "000c9de5a33a89ef2cb01ccc4cc2819bd7339f2d",
"branch_name": "refs/heads/master",
"committer_date": 1525171834000,
"content_id": "2910df8e4af37a0111bc39a69228c4c541eddad8",
"detected_licenses": [
"MIT"
],
"directory_id": "08a051afae7f0566685dd5ec8142d7041865abee",
"extension": "py",
"fi... | 2.375 | stackv2 | from flask import Flask, jsonify, request, make_response
import flask_restful
from flask_restful import Resource, Api
from flasgger.utils import swag_from
from werkzeug.security import generate_password_hash, check_password_hash
from . import users
from app.models import database, User
import jwt
import datetime
from f... | 112 | 44.51 | 106 | 21 | 1,188 | python | [{"finding_id": "semgrep_rules.python.jwt.security.jwt-python-hardcoded-secret_3586cd123537b00c_2f4e870e", "tool_name": "semgrep", "rule_id": "rules.python.jwt.security.jwt-python-hardcoded-secret", "finding_type": "security", "severity": "high", "confidence": "high", "message": "Hardcoded JWT secret or private key is ... | 1 | true | [
"CWE-522"
] | [
"rules.python.jwt.security.jwt-python-hardcoded-secret"
] | [
"security"
] | [
"HIGH"
] | [
"HIGH"
] | [
85
] | [
88
] | [
21
] | [
74
] | [
"A02:2017 - Broken Authentication"
] | [
"Hardcoded JWT secret or private key is used. This is a Insufficiently Protected Credentials weakness: https://cwe.mitre.org/data/definitions/522.html Consider using an appropriate security mechanism to protect the credentials (e.g. keeping secrets in environment variables)"
] | [
7.5
] | [
"HIGH"
] | [
"MEDIUM"
] | views.py | /app/v1/users/views.py | matthewacha/BookAMeal | MIT | |
2024-11-18T21:58:04.789784+00:00 | 1,404,970,207,000 | 46317b4fc321d04cdc3e540ea8f0ecfeb0d7536c | 2 | {
"blob_id": "46317b4fc321d04cdc3e540ea8f0ecfeb0d7536c",
"branch_name": "refs/heads/master",
"committer_date": 1404970207000,
"content_id": "bc2df6aa5f0c11165a3070c960120b77178896e5",
"detected_licenses": [
"MIT"
],
"directory_id": "8c9711c97ae0fd11c632cffe44659b5052527c98",
"extension": "py",
"fi... | 2.3125 | stackv2 | import os
import sys
import xml
from xml.etree import ElementTree
if len(sys.argv) == 1:
print "usage: %s <soapui-settings.xml>" % (os.path.basename(__file__))
sys.exit(1)
tree = ElementTree.parse(sys.argv[1])
root = tree.getroot()
node = root.find('.//*[@id="WSISettings@location"]')
print "WSISettings@location:... | 20 | 27 | 71 | 10 | 159 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_24fb4ee9ccede611_722f29d8", "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"
] | [
3,
4,
10
] | [
3,
4,
10
] | [
1,
1,
8
] | [
11,
34,
38
] | [
"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"
] | printsoapsettings.py | /tools/printsoapsettings.py | ktan2020/legacy-automation | MIT | |
2024-11-18T21:58:05.884433+00:00 | 1,409,515,745,000 | a78f1ba42f0ca11dc1ba2c4aaa4c230b7ec325c8 | 3 | {
"blob_id": "a78f1ba42f0ca11dc1ba2c4aaa4c230b7ec325c8",
"branch_name": "refs/heads/master",
"committer_date": 1409515745000,
"content_id": "375c680b42fe4654ae39657cc49638bd71986808",
"detected_licenses": [
"MIT"
],
"directory_id": "fc03cefec84cac3fa3265ba142e520f2062ac3d2",
"extension": "py",
"fi... | 2.78125 | stackv2 | # -*- coding: utf-8 -*-
import copy
import cPickle as pickle
import json
_REGISTRY = {}
def _serialize(args, kwargs):
"""Serialize arguments"""
return pickle.dumps((args, kwargs))
def _deserialize(dump):
"""Deserialize arguments"""
return pickle.loads(dump)
def func_id(func, class_name=""):
... | 104 | 23.44 | 96 | 17 | 604 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_05ba150b618fc44f_9e38bd56", "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 ... | 6 | true | [
"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-pickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.p... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
13,
13,
19,
19,
36,
36
] | [
13,
13,
19,
19,
36,
36
] | [
12,
12,
12,
12,
29,
29
] | [
40,
40,
30,
30,
60,
60
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"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
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | keyregistry.py | /txcaching/keyregistry.py | alexgorin/txcaching | MIT | |
2024-11-18T21:58:07.705422+00:00 | 1,554,471,310,000 | 82a0817654a2c177c408d2355f6ef5d774e17535 | 2 | {
"blob_id": "82a0817654a2c177c408d2355f6ef5d774e17535",
"branch_name": "refs/heads/master",
"committer_date": 1554471310000,
"content_id": "c9899e5ed94648addd35de837239d61822b7d2c1",
"detected_licenses": [
"MIT"
],
"directory_id": "e1fc2c72d106eac36bc02aa4077a6a4ae1da7f46",
"extension": "py",
"fi... | 2.46875 | stackv2 | import random
from django.shortcuts import render
from django.db.models import Q
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.views import APIView
from rest_framework.response import Response
from accounts.models import User
from accounts.serializers import U... | 363 | 28.26 | 132 | 17 | 2,232 | python | [{"finding_id": "semgrep_rules.python.django.security.passwords.password-empty-string_98d3b7cabcbb2c85_d5157b1b", "tool_name": "semgrep", "rule_id": "rules.python.django.security.passwords.password-empty-string", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "'the_code' is the empty... | 4 | true | [
"CWE-521",
"CWE-521",
"CWE-521",
"CWE-521"
] | [
"rules.python.django.security.passwords.password-empty-string",
"rules.python.django.security.audit.unvalidated-password",
"rules.python.django.security.passwords.password-empty-string",
"rules.python.django.security.audit.unvalidated-password"
] | [
"security",
"security",
"security",
"security"
] | [
"MEDIUM",
"LOW",
"MEDIUM",
"LOW"
] | [
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM"
] | [
101,
124,
262,
282
] | [
143,
124,
311,
282
] | [
13,
17,
9,
13
] | [
82,
44,
98,
40
] | [
"A07:2021 - Identification and Authentication Failures",
"A07:2021 - Identification and Authentication Failures",
"A07:2021 - Identification and Authentication Failures",
"A07:2021 - Identification and Authentication Failures"
] | [
"'the_code' is the empty string and is being used to set the password on 'user'. If you meant to set an unusable password, set the password to None or call 'set_unusable_password()'.",
"The password on 'user' is being set without validating the password. Call django.contrib.auth.password_validation.validate_passw... | [
7.5,
5,
7.5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | views.py | /health_worker/views.py | Ngahu/FugeeDoc | MIT | |
2024-11-18T21:58:13.454315+00:00 | 1,607,514,516,000 | 18f1457d18e2c72ed1f349d678315e1205ad6a9b | 2 | {
"blob_id": "18f1457d18e2c72ed1f349d678315e1205ad6a9b",
"branch_name": "refs/heads/main",
"committer_date": 1607514516000,
"content_id": "bf9d745d2381a404054965a7b5323e8727143048",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "126ff681e8de0f87f20c81654f78e23b264458c9",
"extension": "py",
... | 2.40625 | stackv2 | from django.http import HttpResponse
from django.shortcuts import render
import joblib
import pandas as pd
import numpy as np
from .models import crop_data
from .recommender import CropDataForm
model = joblib.load('model.pkl')
xl_file = pd.ExcelFile('Features - Rev02.xlsx')
storage_df=xl_file.parse('Cold Storage Data'... | 49 | 31.12 | 86 | 13 | 398 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_ec0dbb0b63b8c29e_2deb5f90", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ... | 1 | true | [
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
30
] | [
30
] | [
12
] | [
27
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | views.py | /recommendation/views.py | Nabeel965/AgriTechies | Apache-2.0 | |
2024-11-18T21:58:15.809694+00:00 | 1,539,200,815,000 | f6e6f9ab7a7c3b9e27f60f095a491f2d63a0c860 | 3 | {
"blob_id": "f6e6f9ab7a7c3b9e27f60f095a491f2d63a0c860",
"branch_name": "refs/heads/master",
"committer_date": 1539200815000,
"content_id": "26825aa4c1807f61f9ee9e3d13e42eaea7580b0f",
"detected_licenses": [
"MIT"
],
"directory_id": "691c4a5365606e145b5272320064d17ae6e6aef8",
"extension": "py",
"fi... | 2.796875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Output the documentation in a certain format."""
from jinja2 import Template
import markdown
def create_html_output(json_docs):
"""Create html output for the playbook by converting the docs to markdown and then converting to html."""
markdown_docs = create_ma... | 94 | 32.47 | 166 | 11 | 727 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_1514e6c2f696a568_eb259940", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 1 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
94
] | [
94
] | [
12
] | [
48
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | output.py | /playbook_documenter/output.py | fhightower-tc/playbook-documenter | MIT | |
2024-11-18T21:58:15.933134+00:00 | 1,629,467,182,000 | dae89e37b42dcd5c4f43318e97b85eaa1581e40d | 3 | {
"blob_id": "dae89e37b42dcd5c4f43318e97b85eaa1581e40d",
"branch_name": "refs/heads/main",
"committer_date": 1629467182000,
"content_id": "4a604e20ba313636333301bf610b057e68538206",
"detected_licenses": [
"MIT"
],
"directory_id": "d21bc1be00737bbc7175e4806b4db16747b84d78",
"extension": "py",
"file... | 2.53125 | stackv2 | import json
import cv2
import numpy as np
from os.path import splitext, split
from tensorflow.keras.preprocessing.image import load_img
from tensorflow.keras.preprocessing.image import img_to_array
from distance_calculator import calc_distance_total
class Eye:
def __init__(self, json_path, image_path):
... | 253 | 34.54 | 102 | 15 | 2,126 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_ac997c2ca35f8393_054cd561", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 3 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
119,
142
] | [
119,
142
] | [
18,
25
] | [
25,
73
] | [
"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"
] | eye_input.py | /DeepMetis-UE/eye_input.py | testingautomated-usi/deepmetis | MIT | |
2024-11-18T21:58:17.030388+00:00 | 1,634,382,694,000 | fb9a185d05cb5965d96caac39a5306a249224ba7 | 2 | {
"blob_id": "fb9a185d05cb5965d96caac39a5306a249224ba7",
"branch_name": "refs/heads/master",
"committer_date": 1634382694000,
"content_id": "d9d7ba5692fc553a090ab08d943920ed5d2c8e26",
"detected_licenses": [
"MIT"
],
"directory_id": "7bc2366b858b9847b69d2605f1664535992a3230",
"extension": "py",
"fi... | 2.484375 | stackv2 | import subprocess
import os
import logging
from time import clock
logging.basicConfig(filename='classicor.log', level=logging.DEBUG)
def GenerateBook():
Books = ["DaXue", "ZhongYong", "LunYu", "MengZi"]
prefaceCommand = "pandoc ..\\Source\\Preface.md -o Preface.html --standalone"
with open("dujing.log", 'w') as tr... | 21 | 34.29 | 92 | 14 | 200 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_5f24485731ff3b28_a9f5562d", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
16,
16
] | [
16,
16
] | [
3,
88
] | [
93,
92
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | GenerateBook.py | /PythonScript/GenerateBook.py | fan-jiang/Dujing | MIT | |
2024-11-18T21:58:18.045576+00:00 | 1,522,834,732,000 | 8187d923f13dffd8e0ee32be5046269367c1b7ea | 2 | {
"blob_id": "8187d923f13dffd8e0ee32be5046269367c1b7ea",
"branch_name": "refs/heads/master",
"committer_date": 1522834732000,
"content_id": "a3114324fadb35fe88f1a8e039f2f5dcef2c41ba",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d58ed9989b914bc02488e5d6a44edd8702696a36",
"extension": "py"... | 2.390625 | stackv2 | import numpy as np
import pickle
import copy
from pprint import pprint
from ..image import image
class dataset :
def __init__( self, cfg, img_type=image ):
self._cfg = cfg
self._image = img_type
self._workset = None
self._images = None
def load( self, setting=None ):
if... | 99 | 27.15 | 69 | 15 | 683 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_25c743f4cc6574d5_686e024d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
21
] | [
21
] | [
25
] | [
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"
] | dataset.py | /codes/deeplearning/data/datasets/dataset.py | sarvai/proposalnet | Apache-2.0 | |
2024-11-18T21:58:19.308370+00:00 | 1,420,816,444,000 | d0a7fe81e19e7a77a47b6c4c18c7d0b8f470c8b8 | 2 | {
"blob_id": "d0a7fe81e19e7a77a47b6c4c18c7d0b8f470c8b8",
"branch_name": "refs/heads/master",
"committer_date": 1420816444000,
"content_id": "9a14d115075c823ec8eb0d9fb6353c1dac181db7",
"detected_licenses": [
"MIT"
],
"directory_id": "5fac3534c7375c5f489b1ae1df0e420a12e834d8",
"extension": "py",
"fi... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
import math
import re
import subprocess
import select
import fcntl
import os
import pexpect
from .encoding_options import EncodingOptions
from . import BINARY
class Transcoder(object):
timeout = 30
def __init__(self, movie, output_file,
options=EncodingOptions(), tr... | 106 | 29.76 | 111 | 22 | 706 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b8880e15bf2f9b0c_e0ae0a17", "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"
] | [
82
] | [
82
] | [
32
] | [
64
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'list2cmdline' 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"
] | transcoder.py | /lampwick/transcoder.py | sdispater/lampwick | MIT | |
2024-11-18T21:58:19.976255+00:00 | 1,679,084,769,000 | 6f9f9ce3ca561bbf9e0d722aabb653bb318d428d | 2 | {
"blob_id": "6f9f9ce3ca561bbf9e0d722aabb653bb318d428d",
"branch_name": "refs/heads/master",
"committer_date": 1679084769000,
"content_id": "4b50450fed4c027936ce00bd4eef1e172dd00fcb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "05cb962ad9b1d58423d4423fbd1f0ee9fc74ad3c",
"extension": "py"... | 2.5 | stackv2 | from collections import Iterable, OrderedDict
from copy import copy
from typing import Dict, Union, Any, Type, List, Tuple
from z_python_utils.classes import value_class_for_with, dummy_class_for_with
import sys
__all__ = [
'OptionDef',
'OptionDefaultValue',
'OptionStruct',
'SubOption',
]
global_inc... | 472 | 33.19 | 113 | 20 | 3,511 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.list-modify-while-iterate_165fd89a4b992da1_4528e6af", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.list-modify-while-iterate", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "It appears that `type_mapping`... | 3 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
413
] | [
413
] | [
9
] | [
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"
] | option_struct.py | /option_struct/option_struct.py | YutingZhang/zcode | Apache-2.0 | |
2024-11-18T21:58:21.227076+00:00 | 1,498,081,911,000 | 5e39a4508df45024abf20aecd58461655e0e39fc | 2 | {
"blob_id": "5e39a4508df45024abf20aecd58461655e0e39fc",
"branch_name": "refs/heads/master",
"committer_date": 1498081911000,
"content_id": "4420b5a21278b27483a5670fc2755c03c0470883",
"detected_licenses": [
"MIT"
],
"directory_id": "8b2d68082321637ddefb1b61ab6a209f4cc83365",
"extension": "py",
"fi... | 2.4375 | stackv2 | #BEGIN_HEADER
# The header block is where all import statments should live
import sys
import traceback
import uuid
import random
import os #for callig weka - fix later
from pprint import pprint, pformat
from biokbase.workspace.client import Workspace as workspaceService
#END_HEADER
class mcashman_FS:
'''
Modu... | 315 | 33.15 | 113 | 20 | 3,140 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_fb353f1ebe7ed2ad_a3b1bbd1", "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-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
184
] | [
184
] | [
3
] | [
107
] | [
"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"
] | mcashman_FSImpl.py | /lib/mcashman_FS/mcashman_FSImpl.py | mikacashman/mcashmanFS | MIT | |
2024-11-18T21:58:22.860718+00:00 | 1,370,793,555,000 | 17c04b671a95d4f82b812a08afa964f1922fb32a | 2 | {
"blob_id": "17c04b671a95d4f82b812a08afa964f1922fb32a",
"branch_name": "refs/heads/master",
"committer_date": 1370793555000,
"content_id": "a6e00a67c39566cbd6c0dce7108889d9a82b67b9",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "4095c41db5606221de7ce75968d97c3e88cc23f5",
"extension": "p... | 2.390625 | stackv2 | import codecs
import os
import re
import shutil
import subprocess
import tarfile
import uuid
import zipfile
import settings
from utils import working_directory
class DoesNotExist(Exception):
pass
class InvalidCompressedFileError(Exception):
def __init__(self, missing=None, extra=None):
self.missi... | 178 | 32.29 | 78 | 19 | 1,234 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_6a9c60ec7ae84970_09c25095", "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"
] | [
161
] | [
162
] | [
35
] | [
69
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | jobs.py | /jobs.py | matiasb/jaime | BSD-3-Clause | |
2024-11-18T21:58:23.965821+00:00 | 1,683,288,510,000 | f74ef476cd25646691f700d6e9f4f4bd30974223 | 3 | {
"blob_id": "f74ef476cd25646691f700d6e9f4f4bd30974223",
"branch_name": "refs/heads/main",
"committer_date": 1683288510000,
"content_id": "3efda447477be848ce6f5dd45ee5d73742092e84",
"detected_licenses": [
"MIT"
],
"directory_id": "c6cabd71dd617e2d20e3e53d434c2251663575f5",
"extension": "py",
"file... | 2.6875 | stackv2 |
import os, sys
import xml.etree.ElementTree as ET
from manafa.utils.Logger import log, LogSeverity
class PowerProfile(object):
"""Stores information regarding devices' power profile xml file.
Stores information about the file and each pair component, current contained in the file.
Attributes:
filename(str):... | 148 | 34.61 | 133 | 22 | 1,344 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_fbe7e96ea3e23ba9_f883b48e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
4,
48
] | [
4,
48
] | [
1,
11
] | [
35,
34
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | PowerProfile.py | /manafa/parsing/powerProfile/PowerProfile.py | greensoftwarelab/E-MANAFA | MIT | |
2024-11-18T21:58:29.817510+00:00 | 1,591,281,172,000 | c941c0f46ab2778aafd46e531769c6f4f44e4a59 | 3 | {
"blob_id": "c941c0f46ab2778aafd46e531769c6f4f44e4a59",
"branch_name": "refs/heads/master",
"committer_date": 1591281172000,
"content_id": "92bc03a617b8556701b271f9153ec881a9bb77e6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "25e4f576451617c6f9dbb590dee77670ea3befbe",
"extension": "p... | 3.328125 | stackv2 | from contextlib import contextmanager
import gc
import pickle
import re
import dataset
import filelock
import sqlalchemy
from ..base import Connection
class SQLiteConnection(Connection):
"""Connection to a SQLite database.
Before calling any method you must explicitly :meth:`lock` the database
since SQ... | 217 | 35.96 | 110 | 16 | 1,627 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_08ce688a9de457c7_1ef6583e", "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"
] | [
189,
201
] | [
189,
201
] | [
16,
59
] | [
75,
78
] | [
"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"
] | sqlite.py | /chocolate/connection/sqlite.py | NCMartins/chocolate | BSD-3-Clause | |
2024-11-18T21:58:31.332697+00:00 | 1,570,016,404,000 | 46da3a7a693e496af6877d701f70d24edfbf3e1e | 3 | {
"blob_id": "46da3a7a693e496af6877d701f70d24edfbf3e1e",
"branch_name": "refs/heads/master",
"committer_date": 1570016404000,
"content_id": "90f3f72913c274457da57814260724af3fb5e936",
"detected_licenses": [
"MIT"
],
"directory_id": "34cb2c27dfeb1302deb7b6f2ddf9615d381f2894",
"extension": "py",
"fi... | 2.703125 | stackv2 | import sqlite3
from operator import itemgetter
from pathlib import Path
from typing import List, Optional, Tuple
from iter_utils import get_first
from .metadata_storage import MetadataStorage
_SYMLINK_INDEX_TABLE = 'Symlink_index'
_FILE_INDEX_TABLE = 'File_index'
_SQL_SYMLINK_INDEX_TABLE = '''
CREATE TABLE Symlink_in... | 146 | 31.36 | 78 | 16 | 1,048 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_5a8abd803d273d78_f8c150b5", "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... | 6 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-exe... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
91,
96,
99,
111,
119,
133
] | [
91,
97,
100,
112,
119,
134
] | [
9,
17,
13,
9,
9,
9
] | [
73,
70,
79,
46,
77,
37
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | sqlite_metadata_storage.py | /deduplicate_files/storage/sqlite_metadata_storage.py | EngineerCoding/Random-python-scripts | MIT | |
2024-11-18T21:58:34.526461+00:00 | 1,693,800,228,000 | 2826513642a00a114ddc09b0e8a302475c7e9957 | 2 | {
"blob_id": "2826513642a00a114ddc09b0e8a302475c7e9957",
"branch_name": "refs/heads/master",
"committer_date": 1693800228000,
"content_id": "fc42e4163f329ef923e57c2fd294854c9e14b4e9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "020cfb93254c0e85a4e6eb406fd8c34d686cbfad",
"extension": "py"... | 2.40625 | stackv2 | #!/usr/bin/env python3
# Copyright 2017 The Kubernetes Authors.
#
# 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 appl... | 90 | 34.51 | 122 | 12 | 806 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_18d75a0eec6cbabe_6ec2573c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
50,
71
] | [
50,
71
] | [
11,
5
] | [
61,
39
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found dynamic cont... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | enable_soft_eviction.py | /experiment/maintenance/enable_soft_eviction.py | kubernetes/test-infra | Apache-2.0 | |
2024-11-18T21:58:34.875584+00:00 | 1,606,889,147,000 | 715c222343430d0779bdaf9d7ded3e65520f0601 | 3 | {
"blob_id": "715c222343430d0779bdaf9d7ded3e65520f0601",
"branch_name": "refs/heads/main",
"committer_date": 1606889147000,
"content_id": "7eb1f527040d081190cc980ca72d54f92fa23233",
"detected_licenses": [
"MIT"
],
"directory_id": "56f6f689b9b6877d91169adf3441a5e4996db375",
"extension": "py",
"file... | 2.59375 | stackv2 | from tkinter import *
from tkinter.ttk import Combobox
import tkinter.messagebox
from urllib import request, parse
import json
class CryptoCurrency:
def __init__(self,root):
self.root=root
self.root.title("Crypto Currency Conversion")
self.root.geometry("500x400")
self.root.iconbit... | 177 | 33.31 | 145 | 24 | 1,350 | python | [{"finding_id": "semgrep_rules.python.django.security.injection.ssrf.ssrf-injection-urllib_d72b9ef93b691f88_d6ad9149", "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... | 3 | true | [
"CWE-918"
] | [
"rules.python.django.security.injection.ssrf.ssrf-injection-urllib"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
73
] | [
74
] | [
29
] | [
60
] | [
"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"
] | app.py | /app.py | ShreyasMohite/Crypto-Coins-Conversion | MIT | |
2024-11-18T21:58:38.955300+00:00 | 1,597,561,222,000 | c8cb16ee2b346a74f25fccc5cfdde2311047ad91 | 2 | {
"blob_id": "c8cb16ee2b346a74f25fccc5cfdde2311047ad91",
"branch_name": "refs/heads/master",
"committer_date": 1597561238000,
"content_id": "48c0d44281a812ffc23f39b23e4b989be7a50826",
"detected_licenses": [
"MIT"
],
"directory_id": "1a8fdb2498a8dd3dc06c324865fd235d8a4b4df7",
"extension": "py",
"fi... | 2.5 | stackv2 | import datetime
import xml.etree.ElementTree as ET
from typing import List, Tuple
import pandas # type: ignore
import requests
from investments.currency import Currency
from investments.data_providers.cache import DataFrameCache
from investments.money import Money
class ExchangeRatesRUB:
def __init__(self, yea... | 46 | 36.52 | 136 | 17 | 435 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_605f8549e7994414_f2d63b91", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 4 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
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"
] | cbr.py | /investments/data_providers/cbr.py | infine8/investments-1 | MIT | |
2024-11-18T22:10:51.961318+00:00 | 1,644,846,667,000 | 4297b4ca7ecf0bbecf88c36dfa582677701955ed | 2 | {
"blob_id": "4297b4ca7ecf0bbecf88c36dfa582677701955ed",
"branch_name": "refs/heads/master",
"committer_date": 1644846667000,
"content_id": "d9fb4708c6b9d1a7fb07f53a2c239acfeb3d0f4a",
"detected_licenses": [
"MIT"
],
"directory_id": "089d93904f2e4ebaa1865a7dabdbb0f86937ecc6",
"extension": "py",
"fi... | 2.34375 | stackv2 | from flask import Flask, render_template_string, redirect
from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin, LoginManager, login_user, logout_user
from flask_blogging import SQLAStorage, BloggingEngine
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
db = SQLAlchemy(... | 98 | 29.45 | 75 | 13 | 745 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.avoid_hardcoded_config_SECRET_KEY_f182c6daa40bea1a_5235dd03", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.avoid_hardcoded_config_SECRET_KEY", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Hardcoded va... | 3 | true | [
"CWE-96"
] | [
"rules.python.flask.security.audit.render-template-string"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
82
] | [
82
] | [
12
] | [
50
] | [
"A03:2021 - Injection"
] | [
"Found a template created with string formatting. This is susceptible to server-side template injection and cross-site scripting attacks."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | blog_admin.py | /example/blog_admin.py | gouthambs/Flask-Blogging | MIT | |
2024-11-18T22:10:52.690355+00:00 | 1,562,028,074,000 | d441588d7e1be57729126e4f0377ef83c8537025 | 3 | {
"blob_id": "d441588d7e1be57729126e4f0377ef83c8537025",
"branch_name": "refs/heads/master",
"committer_date": 1562030434000,
"content_id": "ba4cbfd3e9be2cb9d826387fe925a16242322b38",
"detected_licenses": [
"MIT"
],
"directory_id": "5f0cc5539e037d8f725012c87ed8cc6e62785a04",
"extension": "py",
"fi... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
"""Utility functions for the django_bouncy app"""
try:
import urllib2 as urllib
except ImportError:
import urllib
try:
# Python 3
from urllib.request import urlopen
except ImportError:
# Python 2.7
from urllib import urlopen
try:
from urlparse import urlparse
except... | 161 | 24.53 | 78 | 14 | 929 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_4277ef6a57fd2f89_d33a766a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value... | 4 | true | [
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
150
] | [
150
] | [
12
] | [
39
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | utils.py | /django_bouncy/utils.py | ofa/django-bouncy | MIT | |
2024-11-18T23:10:51.611257+00:00 | 1,627,878,068,000 | 79dc32339d651aed0cd7bcd314e2ad4e05c5598d | 2 | {
"blob_id": "79dc32339d651aed0cd7bcd314e2ad4e05c5598d",
"branch_name": "refs/heads/main",
"committer_date": 1627878068000,
"content_id": "55da62cebbddcf72cbf6b88fe8b8dd5c29de366b",
"detected_licenses": [
"MIT"
],
"directory_id": "4f5cb87a758a3c69984f1ff54385fcf13c93a28d",
"extension": "py",
"file... | 2.34375 | stackv2 | #! /usr/bin/python
# coding=utf-8
import os
import sys
# import subprocess
def read_config():
global CACHE_SIZE
config_address = os.path.join('.', 'config.conf')
with open(config_address, 'r', encoding='utf-8') as config:
config_list = config.readlines()
for x in config_list:
... | 155 | 27.39 | 121 | 21 | 1,170 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_aa56f1c6f7b016e0_79a04a7b", "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... | 9 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangero... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
82,
122,
122,
141,
141
] | [
82,
122,
122,
141,
141
] | [
5,
12,
12,
8,
8
] | [
27,
26,
26,
22,
22
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found dynamic conte... | [
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | play_by_mpv.py | /play_by_mpv.py | Ylin97/Play-by-mpv | MIT | |
2024-11-18T23:10:54.879744+00:00 | 1,535,714,385,000 | 25bd51e03b676176b9b9e1d19d4520a694580b4e | 3 | {
"blob_id": "25bd51e03b676176b9b9e1d19d4520a694580b4e",
"branch_name": "refs/heads/master",
"committer_date": 1535714385000,
"content_id": "c4c34ce7d8768b235aa1e0912148ce63400810de",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "4aff2fb320f1a0e065352f6e7c9e70081f9b1af7",
"extension": "p... | 2.828125 | stackv2 | """
Copyright (c) 2018, Ankit R. Gadiya
BSD 3-Clause License
"""
from flask import Flask, request, Response, redirect
from random import sample
import re
from sqlite3 import connect
from string import ascii_letters, digits
# Configurations
DB_NAME = "nnpy.db"
VALID_CHARS = ascii_letters + digits
ID_LEN = 5
URL_REGEX ... | 60 | 28.9 | 95 | 19 | 445 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_d23da80a8feebfc1_c47a7f6c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 5 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-704"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.flask.security.injection.tainted-sql-string"
] | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"MEDIUM"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"HIGH"
] | [
32,
32,
48,
48,
48
] | [
32,
32,
48,
48,
48
] | [
21,
21,
17,
17,
34
] | [
96,
96,
92,
92,
91
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | nnpy.py | /nnpy.py | ankitrgadiya/nnpy | BSD-3-Clause | |
2024-11-18T23:10:57.036985+00:00 | 1,579,121,929,000 | 5927d0d3714138cb1d049cca10117357af5d1b40 | 3 | {
"blob_id": "5927d0d3714138cb1d049cca10117357af5d1b40",
"branch_name": "refs/heads/master",
"committer_date": 1579121929000,
"content_id": "4ad4d0b27c001a9f63270dffaa52fbf0ccd68ced",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6f2108551397b1f6b5adc5dd07ee496c4786aca7",
"extension": "py"... | 2.609375 | stackv2 | from math import sqrt
import pickle
import os
import sys
import cv2
import numpy as np
from .tool import NothingError, Tool
class BinarizationMethodError(Exception):
pass
class TriangleSizeError(Exception):
pass
class TriangleDetector(Tool):
def __init__(self, binarization, triangle_size):
super().__init__(... | 207 | 30.58 | 116 | 16 | 2,109 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_eba8a4df6ae051fe_f18c96c6", "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"
] | [
38
] | [
38
] | [
29
] | [
43
] | [
"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"
] | triangle_detection.py | /app/tools/triangle_detection.py | Polo3cat/amar-pargo | Apache-2.0 | |
2024-11-18T23:10:59.278307+00:00 | 1,584,679,997,000 | b2e777cb4a50f79f8862c211ed9af8531c6ca435 | 3 | {
"blob_id": "b2e777cb4a50f79f8862c211ed9af8531c6ca435",
"branch_name": "refs/heads/master",
"committer_date": 1584679997000,
"content_id": "e28d737b5e38c5f10e8848f9cd4b9f865cec6340",
"detected_licenses": [
"MIT"
],
"directory_id": "51f788959057e0c70a8473978725ea66c8adef23",
"extension": "py",
"fi... | 2.8125 | stackv2 | #Usage: run python gameplay.py level_name (where level_name is the
#file name of the level)
#This program allows one to play levels in such a way that
#gameplay data will be saved for training if you choose.
#to use it, go to a PP1-style level on the PP2 website
#and save its level code to your computer.
#PP2 websit... | 174 | 32.97 | 106 | 19 | 1,578 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_eb1508b4d73bd902_1d493993", "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"
] | [
165
] | [
165
] | [
17
] | [
51
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | gameplay.py | /gameplay.py | davidspencer6174/pp1solver | MIT | |
2024-11-18T23:11:13.531249+00:00 | 1,560,099,360,000 | a7d2dce78f0ab48d700e0922f0d68129bc95a8c5 | 3 | {
"blob_id": "a7d2dce78f0ab48d700e0922f0d68129bc95a8c5",
"branch_name": "refs/heads/master",
"committer_date": 1560099360000,
"content_id": "48b4ce07781b837c7551b3edd47498915413c3bb",
"detected_licenses": [
"MIT"
],
"directory_id": "4bd622a758dfa6fb8437167633197c80386e74b7",
"extension": "py",
"fi... | 2.65625 | stackv2 | import argparse
import datetime
import xml.dom.minidom
import dateparser
import requests
from lxml import html
from rfeed import *
def createfeeditem(_news):
link, guid = parse_link(_news)
_item = Item(
description=html.tostring(_news).strip().decode('utf-8'),
link=link,
pubDate=parse... | 101 | 22.39 | 111 | 15 | 588 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_317efda1750ef748_1b78dc48", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 4 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
4
] | [
4
] | [
1
] | [
23
] | [
"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"
] | html2feed4virtualbox.py | /html2feed4virtualbox.py | Wonno/html2feed4virtualbox | MIT | |
2024-11-18T22:05:53.498369+00:00 | 1,599,250,938,000 | d46a4a1481894164f73904f8dfa4b82055c0b2b3 | 3 | {
"blob_id": "d46a4a1481894164f73904f8dfa4b82055c0b2b3",
"branch_name": "refs/heads/master",
"committer_date": 1599250938000,
"content_id": "0c42aeb6b30bf850912bad2b1441ee1776dd24b8",
"detected_licenses": [
"MIT"
],
"directory_id": "9e45eb141bf7dd5c9e698cd6295938c2f7a55e81",
"extension": "py",
"fi... | 3.09375 | stackv2 | import sys
import re
import pandas as pd
import numpy as np
from sqlalchemy import create_engine
import nltk
nltk.download(['punkt', 'stopwords', 'wordnet'])
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.stem.porter import PorterStem... | 103 | 32.76 | 80 | 14 | 813 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_dc5563d235ba45b9_f6eae290", "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"
] | [
71
] | [
71
] | [
9
] | [
33
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | train_classifier.py | /models/train_classifier.py | tomgtqq/DSND-P2-Disaster-Response-Pipelines | MIT | |
2024-11-18T22:05:53.542623+00:00 | 1,564,264,671,000 | fec315802f4bcfbf1752084619130c176bb0e526 | 3 | {
"blob_id": "fec315802f4bcfbf1752084619130c176bb0e526",
"branch_name": "refs/heads/master",
"committer_date": 1564264671000,
"content_id": "1ac1d997abaacd3e6b125a05dd86d582474ed290",
"detected_licenses": [
"MIT"
],
"directory_id": "eba1f42269b017662f63806378393608dd9c5b0a",
"extension": "py",
"fi... | 2.65625 | stackv2 | import argparse
import librosa
import logging
import os
import pickle
import matplotlib.pyplot as plt
import numpy as np
import os.path as path
from librosa.display import specshow
def read_pickle(pickle_path):
"""Lightweight wrapper function to load pickled data.
Args:
pickle_path (str): Path to t... | 152 | 35.38 | 89 | 14 | 1,158 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_48dc67dcb378f870_16477862", "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"
] | preprocess.py | /autoencoda/preprocess.py | JNapoli/autoencoda | MIT | |
2024-11-18T22:35:54.576224+00:00 | 1,590,241,673,000 | 078d3b350d341d8a8b29d6bda846e2058d17e3c5 | 3 | {
"blob_id": "078d3b350d341d8a8b29d6bda846e2058d17e3c5",
"branch_name": "refs/heads/master",
"committer_date": 1590241673000,
"content_id": "89a61dc187da0861bd9a02dcd414b7af8573329f",
"detected_licenses": [
"MIT"
],
"directory_id": "79c482dec0ee76189ff9ec6adc77152a77e275b9",
"extension": "py",
"fi... | 2.8125 | stackv2 | """
Convert resutls of unit tests int XML format to HTML.
"""
from operator import attrgetter
import xml.etree.ElementTree as ET
import TestResult
import ntpath
import os
import shutil
def GenerateSummaryIndexHtml(ResultXmlPaths):
"""GenerateSummaryIndexHtml
Convert summary of unit tests in XML format... | 226 | 38.35 | 131 | 13 | 2,273 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_467eba2818c5fc1d_b8a1c47c", "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-parse",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
6,
47,
146
] | [
6,
47,
146
] | [
1,
19,
19
] | [
35,
42,
43
] | [
"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"
] | HtmlReportGenerator.py | /dev/HtmlReportGenerator.py | CountrySideEngineer/TestRunAndCov | MIT | |
2024-11-18T22:35:56.573803+00:00 | 1,598,207,837,000 | e1d4dd5d11502c03b4560d857ccecc1ed470d832 | 3 | {
"blob_id": "e1d4dd5d11502c03b4560d857ccecc1ed470d832",
"branch_name": "refs/heads/master",
"committer_date": 1598207837000,
"content_id": "3fec2842709647b624ac4ff46ece3ca24c6d97c9",
"detected_licenses": [
"MIT"
],
"directory_id": "7dad1694ceaf9ac2f0480894aa6dbd1e5c9ef44c",
"extension": "py",
"fi... | 2.65625 | stackv2 | import gensim
import pickle
import numpy as np
import os
import scipy.io
def process_sentence(vocab, typ):
nsentences = len(vocab)
print("number of sentences: " + str(nsentences))
print('mixing sentences...')
sentence_rep = []
for i in range(nsentences):
if typ == "avg":
sentence_rep.append(np.mean(vocab[i],... | 130 | 28.59 | 113 | 17 | 1,018 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_f0ccedfcbfd063df_499a1279", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
70,
114
] | [
70,
114
] | [
3,
3
] | [
87,
84
] | [
"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"
] | get_pretrained_embeddings.py | /get_pretrained_embeddings.py | chriskjou/opennmt-inspection | MIT | |
2024-11-18T22:35:59.178789+00:00 | 1,624,347,910,000 | 5f4bd3fe4dc9452fab61b30c189880b0bb97d21b | 2 | {
"blob_id": "5f4bd3fe4dc9452fab61b30c189880b0bb97d21b",
"branch_name": "refs/heads/master",
"committer_date": 1624347910000,
"content_id": "49cc8fbf96aaf2bcd610f16d6e87ed3f11ec7886",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e73cf78346901f00193dbfda7098de32afa99091",
"extension": "py"... | 2.421875 | stackv2 | import os
import logging
import time
from src.milvus_helpers import MilvusHelper
from src.mysql_helpers import MySQLHelper
from src.config import UPLOAD_PATH
from src.logs import LOGGER
from src.operations.load import do_load
from src.operations.search import do_search
from src.operations.count import do_count
from src... | 109 | 32.3 | 85 | 15 | 887 | python | [{"finding_id": "semgrep_rules.python.fastapi.security.wildcard-cors_c6b39463ce5b817f_2cf68e23", "tool_name": "semgrep", "rule_id": "rules.python.fastapi.security.wildcard-cors", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "CORS policy allows any origin (using wildcard '*'). Thi... | 1 | true | [
"CWE-942"
] | [
"rules.python.fastapi.security.wildcard-cors"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
25
] | [
25
] | [
19
] | [
24
] | [
"A05:2021 - Security Misconfiguration"
] | [
"CORS policy allows any origin (using wildcard '*'). This is insecure and should be avoided."
] | [
5
] | [
"HIGH"
] | [
"LOW"
] | main.py | /solutions/audio_similarity_search/quick_deploy/server/main.py | miia12/bootcamp | Apache-2.0 | |
2024-11-18T22:48:31.314494+00:00 | 1,631,284,902,000 | 0e2cce9ebf6464976d5ba8913a45d51da5a18716 | 2 | {
"blob_id": "0e2cce9ebf6464976d5ba8913a45d51da5a18716",
"branch_name": "refs/heads/main",
"committer_date": 1631284902000,
"content_id": "c95d4933a924bcda4234f3379abb8c312af6433e",
"detected_licenses": [
"MIT"
],
"directory_id": "15932a2a55662fb02932e6ff3b516ee3ec878f09",
"extension": "py",
"file... | 2.484375 | stackv2 | __author__ = 'Chris Joakim'
__email__ = "chjoakim@microsoft.com,christopher.joakim@gmail.com"
__license__ = "MIT"
__version__ = "2020.05.28"
import os
import time
import jinja2
class Template(object):
@classmethod
def get_template(cls, root_dir, name):
filename = 'templates/{}'.format(name)
... | 28 | 24.82 | 67 | 13 | 187 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_38d61d69e254d3bc_f26e8a21", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 1 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
26
] | [
28
] | [
16
] | [
44
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | template.py | /code/python/pysrc/cjcc/template.py | daniloescolin/azure-cosmosdb | MIT | |
2024-11-18T22:48:31.975981+00:00 | 1,510,891,775,000 | b27d854af061a004680c14dc869a7c59c6a2d7d2 | 2 | {
"blob_id": "b27d854af061a004680c14dc869a7c59c6a2d7d2",
"branch_name": "refs/heads/master",
"committer_date": 1510891775000,
"content_id": "eca71778b40f76da5fc13d26c2a3625329e784ff",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0a3b73f2c0d1dc03c93fe1155343f059da682583",
"extension": "py"... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2015 PyBuilder Team
#
# 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/l... | 350 | 31.21 | 117 | 19 | 2,519 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_f5a5429afdf3c844_5091552f", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 11 | 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"
] | [
174,
190,
200
] | [
179,
190,
200
] | [
23,
22,
23
] | [
41,
76,
95
] | [
"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"
] | utils.py | /src/main/python/pybuilder/utils.py | AlexeySanko/pybuilder | Apache-2.0 | |
2024-11-18T22:48:56.840093+00:00 | 1,516,455,635,000 | ac093c80bba034537b2409d29c4a08ee1b6542d9 | 2 | {
"blob_id": "ac093c80bba034537b2409d29c4a08ee1b6542d9",
"branch_name": "refs/heads/master",
"committer_date": 1516455635000,
"content_id": "b1e2b3aa965a73a9dd88f4b51d16ae1ab43113d5",
"detected_licenses": [
"MIT"
],
"directory_id": "07ab78a37324845d5a82715f9fb83c8d445003ff",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import flash, Flask, render_template, redirect, request, url_for
import onemillion
app = Flask(__name__)
app.secret_key = 'abc'
@app.route("/")
def index():
return render_template("index.html")
@app.route('/onemillion', methods=['POST'])
def get_onemillion():
if request.form['domain']:
d... | 30 | 24 | 75 | 14 | 175 | python | [{"finding_id": "semgrep_rules.python.flask.security.open-redirect_cf03811a9264f6f7_4466a938", "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... | 2 | true | [
"CWE-601",
"CWE-79"
] | [
"rules.python.flask.security.open-redirect",
"rules.python.flask.security.audit.directly-returned-format-string"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"MEDIUM"
] | [
16,
26
] | [
17,
26
] | [
9,
5
] | [
67,
52
] | [
"A01:2021 - Broken Access Control",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"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,
5
] | [
"LOW",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | onemillion_api.py | /onemillion_api.py | fhightower/onemillion-api | MIT | |
2024-11-18T22:48:57.240445+00:00 | 1,359,467,633,000 | 3649170dcfb8f6fb0889f2d6b7278892656f3839 | 3 | {
"blob_id": "3649170dcfb8f6fb0889f2d6b7278892656f3839",
"branch_name": "refs/heads/master",
"committer_date": 1359467633000,
"content_id": "870639d2581f0e8b303610b78c09e4cf89d240d4",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "11cdc1ab4a1d7574b76d5e2868360dbe8c1d9b1d",
"extension": "p... | 2.734375 | stackv2 | import xml.dom.minidom
# Get a child of 'parentNode' with the specified type and name.
def GetChildNode(parentNode, nodeType, nodeName):
n = parentNode.firstChild
while n != None:
if n.nodeType == n.ELEMENT_NODE:
if n.tagName == nodeType:
if n.getAttribute("sid") == nodeName:
return n
... | 95 | 36.96 | 102 | 19 | 988 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_888b1912d8a277d7_e93f1e3c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
1
] | [
1
] | [
1
] | [
23
] | [
"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"
] | ColladaBone.py | /py/ColladaBone.py | alph4delta/Odin | BSD-2-Clause | |
2024-11-18T22:49:01.355629+00:00 | 1,436,799,308,000 | 7cd0775f471cba5d00cd116349ca69ee4ed5a02e | 2 | {
"blob_id": "7cd0775f471cba5d00cd116349ca69ee4ed5a02e",
"branch_name": "refs/heads/master",
"committer_date": 1436799308000,
"content_id": "88ca7be1f8ff19423d06687ca844e0a6fcf47d2d",
"detected_licenses": [
"MIT"
],
"directory_id": "4d069f71cf906bebff24ba411539dd6757a95cd4",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os
import numpy as np
import scipy.io as sio
import CCA
import pickle
#X is the feature vector for the images
#T is the tag feature vector
#Y is the semantic class vector
#X=np.mat('[1 2 3 ; 3 4 5 ; 3 5 6 ; 3 6 7]')
#T=np.mat('[1 2 ; 4 5 ; 3 5 ; 4 6]')
img_features=sio.loadmat('../../../layers /layer22/Flick... | 74 | 26.28 | 85 | 11 | 713 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6f56f37d454873ed_7b9ae329", "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"
] | [
23
] | [
23
] | [
3
] | [
75
] | [
"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"
] | main_with_sklearn.py | /CCA/main_with_sklearn.py | eqperes/mvaproject | MIT | |
2024-11-18T22:49:01.806017+00:00 | 1,634,428,785,000 | e7ae311f0ab6a01355ec87a80d8b59708cec893e | 3 | {
"blob_id": "e7ae311f0ab6a01355ec87a80d8b59708cec893e",
"branch_name": "refs/heads/main",
"committer_date": 1634428785000,
"content_id": "8d5d07c27eefa92000cd6d11b8af775716e7aba8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "809bdd51464eb16f9037466234b69b9a7031e0b5",
"extension": "py",
... | 2.5625 | stackv2 | """--------------------------------------------------------------------------------------------------------------------
Copyright 2021 Market Maker Lite, LLC (MML)
Licensed under the Apache License, Version 2.0
THIS CODE IS PROVIDED AS IS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
This file is part of the MML Open S... | 265 | 44.07 | 133 | 22 | 2,587 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_1ed3186850cd4fb9_41329d8d", "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... | 8 | 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"
] | [
104,
104
] | [
104,
104
] | [
17,
17
] | [
53,
53
] | [
"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"
] | main.py | /options-data/main.py | bowwowden/Options-Scraper | Apache-2.0 | |
2024-11-18T22:49:05.265351+00:00 | 1,552,870,146,000 | 4cccc6a9c42404e6cceefdc3f71a2dcf9f1f6aee | 2 | {
"blob_id": "4cccc6a9c42404e6cceefdc3f71a2dcf9f1f6aee",
"branch_name": "refs/heads/master",
"committer_date": 1552870146000,
"content_id": "c07e50bfd6e338fa91a1301eee26ad64187cd56d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a59bf2fb11a3abc5b035102246fe6b18763a674d",
"extension": "py"... | 2.359375 | stackv2 | from __future__ import unicode_literals
import re
import StringIO
import urllib2
import os.path
import subprocess
import tempfile
import pykka
import sys
from operator import attrgetter
from PIL import Image
from mopidy.core import CoreListener
class NotifierFrontend(pykka.ThreadingActor, CoreListener):
def __in... | 97 | 36.05 | 124 | 21 | 755 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_10d1846fcf5da82d_823924a4", "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"
] | [
38
] | [
38
] | [
9
] | [
30
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | frontend.py | /mopidy_notifier/frontend.py | Bit-Doctor/mopidy-notifier | Apache-2.0 | |
2024-11-18T22:49:13.315958+00:00 | 1,525,595,260,000 | 598cc27769247e18a8a83159b5691b1acddf088e | 2 | {
"blob_id": "598cc27769247e18a8a83159b5691b1acddf088e",
"branch_name": "refs/heads/master",
"committer_date": 1525595260000,
"content_id": "f61b34322e0cf7870bae0a274b9714d23141d111",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9e1241f5bea0251b7db02cc66a55795d69a4337f",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/python
import os
from xml.sax.handler import ContentHandler
import xml.sax
class JUCMContentHandler(ContentHandler):
def __init__(self):
self.theComponents = []
def startElement(self,name,attrs):
if (name == 'components'):
self.theComponents.append(attrs['name'])
def components(self):... | 44 | 29.23 | 165 | 15 | 384 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_45ae6b1e590cd17f_e8477055", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 4 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
4,
5
] | [
4,
5
] | [
1,
1
] | [
43,
15
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | um2cu.py | /scripts/um2cu.py | anhhai986/webinos-design-data | Apache-2.0 | |
2024-11-18T22:49:13.562998+00:00 | 1,581,935,951,000 | 6256907c3e5b11882337b3317914fffec08dfb6d | 3 | {
"blob_id": "6256907c3e5b11882337b3317914fffec08dfb6d",
"branch_name": "refs/heads/master",
"committer_date": 1581935951000,
"content_id": "1c3a9b110a5850286ee33cd2b54e8186479fc867",
"detected_licenses": [
"MIT"
],
"directory_id": "0690039cd53426bc03f352d5ce5bf52afb916818",
"extension": "py",
"fi... | 2.796875 | stackv2 | import copy
import pickle
def create_list_of_dictionaries(num_items):
return [{} for _ in range(num_items)]
def clone(obj):
return copy.deepcopy(obj)
def save(file_name, **kwargs):
with open(file_name, 'wb') as fp:
pickle.dump(len(kwargs)+1, fp)
keys = list(kwargs.keys())
pickl... | 41 | 24.1 | 64 | 13 | 291 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5826b2bfa7aa8326_ebdcd26a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
15,
17,
19,
30,
31
] | [
15,
17,
19,
30,
31
] | [
9,
9,
13,
24,
25
] | [
39,
64,
65,
38,
39
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | misc.py | /src/utils/misc.py | eduardoandrade/deep-pyramidal-representations-person-re-identification | MIT | |
2024-11-18T23:25:53.424065+00:00 | 1,551,574,547,000 | 74b8bbbe815525e20a16b31785b490726eec05ab | 3 | {
"blob_id": "74b8bbbe815525e20a16b31785b490726eec05ab",
"branch_name": "refs/heads/master",
"committer_date": 1551574547000,
"content_id": "b198a3d00ed9229428ce968372e1fde5c84c5c13",
"detected_licenses": [
"MIT"
],
"directory_id": "5c8dd183a0c49f859e339d5d04561b26bb0ae588",
"extension": "py",
"fi... | 2.9375 | stackv2 | #!/usr/bin/env python3
"""Adds $CONTAINER_USERS users to the container:
(user-0, pass-0), (user-1, pass-1), ...
"""
import os
import subprocess
ADD_USER_COMMAND = "useradd user-{i}"
SET_PASS_COMMAND = r"echo -e 'pass-{i}\npass-{i}' | passwd --stdin user-{i}"
def get_user_count():
return int(os.environ['CONT... | 38 | 24.05 | 76 | 14 | 239 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_56e0360df88064d0_d70029e3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
32,
34
] | [
32,
34
] | [
5,
5
] | [
51,
55
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess ... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | add_users.py | /setup/add_users.py | garstka/idact-test-environment | MIT | |
2024-11-18T23:26:02.049487+00:00 | 1,620,206,235,000 | 717aafe3a221603c92c12d621b71e20b75a76dc2 | 3 | {
"blob_id": "717aafe3a221603c92c12d621b71e20b75a76dc2",
"branch_name": "refs/heads/master",
"committer_date": 1620206235000,
"content_id": "e399114f32e6040acab38e56e3f4224a5ab74bc5",
"detected_licenses": [
"MIT"
],
"directory_id": "b5964aed94fcc12de15f54217759a5cdd31ca943",
"extension": "py",
"fi... | 2.609375 | stackv2 | import pickle
import numpy as np
import pdb
def get_data(data_path):
data = open(data_path,"rb")
data_dict = pickle.load(data)
# rgb image
rgb = data_dict['rgb']
# depth data, unit is in millimeter
depth = data_dict['depth']
# visualzied depth image
depth_image = data_dict['depth_ima... | 22 | 18.41 | 42 | 9 | 116 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_deb2e5738acd54ef_e1ebd2b7", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.python-debugger-found", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Importing the python debugger;... | 5 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
7
] | [
7
] | [
17
] | [
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"
] | get_data.py | /utils/get_data.py | JiatianWu/tf-monodepth2 | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.