added stringdate 2024-11-18 17:59:49 2024-11-19 03:44:43 | created int64 126B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.09 | source stringclasses 1
value | text stringlengths 257 22.3k | num_lines int64 16 648 | avg_line_length float64 15 61 | max_line_length int64 31 179 | ast_depth int64 8 40 | length int64 101 3.8k | lang stringclasses 1
value | sast_semgrep_findings stringlengths 1.56k 349k | sast_semgrep_findings_count int64 1 162 | sast_semgrep_success bool 1
class | sast_semgrep_error stringclasses 1
value | cwe_ids listlengths 1 162 | rule_ids listlengths 1 162 | subcategories listlengths 1 162 | confidences listlengths 1 162 | severities listlengths 1 162 | line_starts listlengths 1 162 | line_ends listlengths 1 162 | column_starts listlengths 1 162 | column_ends listlengths 1 162 | owasp_categories listlengths 1 162 | messages listlengths 1 162 | cvss_scores listlengths 1 162 | likelihoods listlengths 1 162 | impacts listlengths 1 162 | filename stringlengths 4 105 | path stringlengths 5 372 | repo_name stringlengths 5 115 | license stringclasses 385
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-19T02:18:03.182622+00:00 | 1,687,675,916,000 | 157a5be73a8be189c54f2ba153dbb0cab9d6e297 | 3 | {
"blob_id": "157a5be73a8be189c54f2ba153dbb0cab9d6e297",
"branch_name": "refs/heads/master",
"committer_date": 1687675916000,
"content_id": "fc69ca3aa7486306f757d13b2c7a3c1efbc6fdc2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8cae186abe4880375ccbea9b404a2f5f349a40ab",
"extension": "py"... | 2.625 | stackv2 | import uvicorn
import os
from diskcache import Cache
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from starlette.responses import FileResponse
from starlette.requests import Request
from helpers.milvus_helpers import MilvusHelper
from helpers.mysql_helpers import MySQLHelper
from con... | 124 | 29.88 | 96 | 16 | 960 | python | [{"finding_id": "semgrep_rules.python.fastapi.security.wildcard-cors_adadd1661d756e79_0cc1ce3f", "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... | 2 | true | [
"CWE-942",
"CWE-918"
] | [
"rules.python.fastapi.security.wildcard-cors",
"rules.python.django.security.injection.tainted-url-host"
] | [
"security",
"security"
] | [
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
23,
88
] | [
23,
88
] | [
19,
19
] | [
24,
75
] | [
"A05:2021 - Security Misconfiguration",
"A10:2021 - Server-Side Request Forgery (SSRF)"
] | [
"CORS policy allows any origin (using wildcard '*'). This is insecure and should be avoided.",
"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 se... | [
5,
5
] | [
"HIGH",
"LOW"
] | [
"LOW",
"MEDIUM"
] | main.py | /solutions/medical/molecular_similarity_search/quick_deploy/server/src/main.py | shiyu22/bootcamp | Apache-2.0 | |
2024-11-19T02:18:07.838968+00:00 | 1,570,563,284,000 | 20791a957599086a42a9baacee7c1fd017fcfd94 | 3 | {
"blob_id": "20791a957599086a42a9baacee7c1fd017fcfd94",
"branch_name": "refs/heads/master",
"committer_date": 1570563284000,
"content_id": "257b4ab9822e9951b94173983a9d0e5990ddba14",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0f242ebd3f5a4e672871554ae712040130170f68",
"extension": "py"... | 2.6875 | stackv2 | #!/usr/bin/env python
""" Web app for dosna over ceph to see and display objects"""
from flask import Flask, render_template
import argparse
import re
import numpy as np
import rados
import dosna as dn
import matplotlib.image as plt
import matplotlib
BACKEND = 'ceph'
ERROR = 'Object not found'
def parse_args():
... | 205 | 34.27 | 78 | 29 | 1,698 | python | [{"finding_id": "semgrep_rules.python.flask.security.injection.raw-html-format_0e81066f1e3afcf5_ef495adb", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.raw-html-format", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected user input flowing into a ... | 3 | true | [
"CWE-79"
] | [
"rules.python.flask.security.injection.raw-html-format"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
49
] | [
56
] | [
28
] | [
62
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected user input flowing into a manually constructed HTML string. You may be accidentally bypassing secure methods of rendering HTML by manually constructing HTML and this could create a cross-site scripting vulnerability, which could let attackers steal sensitive user data. To be sure this is safe, check that ... | [
5
] | [
"MEDIUM"
] | [
"MEDIUM"
] | webapp.py | /dosna/webapp/webapp.py | DiamondLightSource/DosNa | Apache-2.0 | |
2024-11-19T02:18:08.976718+00:00 | 1,447,779,855,000 | 6a72ae4c155b0b00c9fc8adfb951e424fe939494 | 2 | {
"blob_id": "6a72ae4c155b0b00c9fc8adfb951e424fe939494",
"branch_name": "refs/heads/master",
"committer_date": 1447779855000,
"content_id": "3a5f97e250fe5338034e70e1b471daedcf092958",
"detected_licenses": [
"Unlicense",
"BSD-3-Clause"
],
"directory_id": "d072b72a28103044bd83644d58126c44f2d03464",
... | 2.40625 | stackv2 | from sys import argv
from xml.dom import minidom
import csv
stem = argv[1][:-4] if argv[1].endswith('.xml') else argv[1]
xmldoc = minidom.parse('%s.xml'%stem)
labellist = xmldoc.getElementsByTagName('label')
labels = [l.attributes['name'].value for l in labellist]
labelset = set(labels)
for split in 'train','test':
... | 24 | 33.54 | 70 | 14 | 243 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_4324c7e9e6f9f074_5b51cfb1", "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"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
2
] | [
2
] | [
1
] | [
28
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | xmlcsv2xy.py | /mulan/xmlcsv2xy.py | pmineiro/randembed | Unlicense,BSD-3-Clause | |
2024-11-19T02:18:09.471050+00:00 | 1,558,455,168,000 | 4d090767e57b53cd2d02a0be4c3b2e68fd425914 | 3 | {
"blob_id": "4d090767e57b53cd2d02a0be4c3b2e68fd425914",
"branch_name": "refs/heads/master",
"committer_date": 1558455168000,
"content_id": "8df33f720d60b36895e3ed7391fc4f2b6c7e3b77",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2b11f834d52e09414f1b498e5dcfe4f794689f89",
"extension": "p... | 2.90625 | stackv2 | #Imports.
import RPi.GPIO as GPIO
from sense_hat import SenseHat
class Light_switch:
def __init__(self, channel1, channel2, channel3, id):
self.name = "light_switch/" + id
self.settings_topic = "settings/" + self.name
self.last_color = "[255,255,255]"
self.topic = "" # topic, which... | 61 | 35.07 | 101 | 13 | 525 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_05448442ff64a943_37946e7b", "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
] | [
25
] | [
40
] | [
"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"
] | light_switch.py | /light_switch/light_switch.py | milosferencik/bachelor-thesis-smart-home-components | BSD-3-Clause | |
2024-11-19T02:18:10.892113+00:00 | 1,613,742,190,000 | 80006f407dc1aee34799a1ac7f54d783d7c2fe84 | 3 | {
"blob_id": "80006f407dc1aee34799a1ac7f54d783d7c2fe84",
"branch_name": "refs/heads/main",
"committer_date": 1614083458000,
"content_id": "fd5c64f7c1a8d8de43aeb17ee2996fb43242a157",
"detected_licenses": [
"MIT"
],
"directory_id": "0ebcaae68cb1c3c586bdadbba5daf104e50d5f41",
"extension": "py",
"file... | 3.203125 | stackv2 | #!/usr/bin/env python3
"""
Usage:
./line_bisect.py [options] <commands-file> <test>
Options:
--good=<line> The line number of a line where the test succeeds.
--bad=<line> The line number of a line where the test fails.
"""
import os
import sys
from dataclasses import dataclass
from pathlib import Path
from ... | 191 | 25.29 | 95 | 18 | 1,188 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_bcb94ec2f6a7dd9a_52f499a8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
147
] | [
147
] | [
12
] | [
30
] | [
"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"
] | line_bisect.py | /line_bisect.py | davidparsson/line-bisect | MIT | |
2024-11-19T02:18:11.899473+00:00 | 1,582,682,238,000 | 9b74fc26b8761a0929bfc5409e1e48f4cf100a63 | 2 | {
"blob_id": "9b74fc26b8761a0929bfc5409e1e48f4cf100a63",
"branch_name": "refs/heads/master",
"committer_date": 1582682238000,
"content_id": "bbf4628e2abb914b1aff9bf2bc03b950927d096c",
"detected_licenses": [
"MIT"
],
"directory_id": "65ef662ff94c102975bc54bb03c1e9f1ea1a1dca",
"extension": "py",
"fi... | 2.40625 | stackv2 | # src/models/score_models.py
import json
from pathlib import Path
import pickle
import sys
from typing import Any, Dict, NoReturn, Optional, Tuple, Union
from src.models.base_tuner import BaseTuner
from src.models.model_tuners import LassoRidgeTuner, ElasticNetTuner, RFRTuner, XGBRTuner
import pandas as pd
from skle... | 126 | 31.28 | 100 | 14 | 1,076 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ded365fd99c9e73d_f0120c99", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
34,
35,
36
] | [
34,
35,
38
] | [
5,
5,
5
] | [
91,
99,
6
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | score_models.py | /src/models/score_models.py | theLongLab/phx-parameter-map | MIT | |
2024-11-19T02:18:12.076830+00:00 | 1,602,190,441,000 | 4530d17ba27bc5c845ff0c9ecc66071ad3f2b8f4 | 3 | {
"blob_id": "4530d17ba27bc5c845ff0c9ecc66071ad3f2b8f4",
"branch_name": "refs/heads/master",
"committer_date": 1602190441000,
"content_id": "a8ef48200e40a8d79bd8296f034a79c01a05d94b",
"detected_licenses": [
"MIT"
],
"directory_id": "ad6bd9d14919a88ff86436983b6bfa4638ed111f",
"extension": "py",
"fi... | 3.203125 | stackv2 | import sys
class MissingVariableError(Exception):
pass
class BraceExpressionMissesVariable(Exception):
pass
class WrongTokenType(Exception):
pass
class WrongNumberOfParenthesses(Exception):
pass
class WrongArrayExpressionError(Exception):
pass
class MissingArrayError(Exception):
pass
clas... | 414 | 31.83 | 118 | 28 | 3,106 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_7a62f21d4a962d5a_0eb7cfc7", "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"
] | [
100,
105
] | [
100,
105
] | [
20,
20
] | [
29,
29
] | [
"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"
] | pilang.py | /pilang.py | paulinia/pilang | MIT | |
2024-11-19T02:18:15.565073+00:00 | 1,594,485,456,000 | c03ef4f0483bedf46a6a3aa7e3d37d7ca3cca0b5 | 3 | {
"blob_id": "c03ef4f0483bedf46a6a3aa7e3d37d7ca3cca0b5",
"branch_name": "refs/heads/master",
"committer_date": 1594485456000,
"content_id": "87347a6dab8f105b23fc3dd82ac5a16b31a37a7f",
"detected_licenses": [
"MIT"
],
"directory_id": "b140633e3638744577dc86ba7931d5724d4ecd46",
"extension": "py",
"fi... | 2.828125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 22 06:58:17 2019
@author: ankit
"""
from bs4 import BeautifulSoup as soup # HTML data structure
from urllib.request import urlopen as uReq # Web client
import os, ssl
if (not os.environ.get('PYTHONHTTPSVERIFY', '') and
getattr(ssl, '_create_unverified_context', No... | 60 | 33.48 | 134 | 12 | 563 | python | [{"finding_id": "semgrep_rules.python.lang.security.unverified-ssl-context_ed15240358c44c26_a277fd83", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.unverified-ssl-context", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Unverified SSL context detected. This will pe... | 1 | true | [
"CWE-295"
] | [
"rules.python.lang.security.unverified-ssl-context"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
14
] | [
14
] | [
5
] | [
71
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"Unverified SSL context detected. This will permit insecure connections without verifying SSL certificates. Use 'ssl.create_default_context' instead."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | flipkart scrapping.py | /flipkart scrapping.py | ankitnayan12/Web-Scrapping-using-BeautifulSoup2 | MIT | |
2024-11-19T02:18:19.856572+00:00 | 1,479,921,604,000 | 81f6c9fe239ab1ef68cc59243247652f9d15af4b | 2 | {
"blob_id": "81f6c9fe239ab1ef68cc59243247652f9d15af4b",
"branch_name": "refs/heads/master",
"committer_date": 1479921604000,
"content_id": "2862088870030e1b506ac7e10dff65b01743065e",
"detected_licenses": [
"MIT"
],
"directory_id": "61551b2b8d76587357ed6e32b16aea6adeeab902",
"extension": "py",
"fi... | 2.40625 | stackv2 | from __future__ import print_function
import tensorflow as tf
import argparse
import os
from six.moves import cPickle
from model import Model
sess = None
with open(os.path.join('save/save', 'config.pkl'), 'rb') as f:
saved_args = cPickle.load(f)
with open(os.path.join('save/save', 'words_vocab.pkl'), 'rb') as f:
... | 43 | 32.44 | 113 | 11 | 334 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_f28f48cea8110a5c_b2831bb8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
10,
12
] | [
10,
12
] | [
18,
20
] | [
33,
35
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `cPickle`, which is known to lead ... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | sample.py | /word-rnn-tensorflow-master/sample.py | PorkShoulderHolder/battlebots | MIT | |
2024-11-19T02:18:21.895518+00:00 | 1,537,447,319,000 | dd2a1e190911a62325b13fe2f1eca70eaffabd3c | 3 | {
"blob_id": "dd2a1e190911a62325b13fe2f1eca70eaffabd3c",
"branch_name": "refs/heads/master",
"committer_date": 1537447319000,
"content_id": "c3132dc315c6905cfee2b491d069dd467c43e10b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8f52a8a38b9a7a1d58d46b3149b595d43697c82a",
"extension": "py"... | 2.578125 | stackv2 | import argparse
import pickle
import os
import numpy as np
from numpy import zeros, ones, array, arange, copy, ravel_multi_index, unravel_index
from numpy import setdiff1d, hstack, hsplit, vsplit, sort, prod, lexsort, unique, bincount
from numpy import dot, zeros, array, eye, kron, prod
from scipy.sparse import lil_mat... | 92 | 34.07 | 126 | 11 | 832 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_467928382576f5b3_4f65dd88", "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",
"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"
] | [
26,
32,
74,
84
] | [
26,
32,
74,
84
] | [
9,
5,
1,
1
] | [
32,
28,
41,
41
] | [
"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"
] | dataCoherence.py | /src/dataCoherence.py | HarshitaD/sictf | Apache-2.0 | |
2024-11-19T02:29:54.215582+00:00 | 1,539,025,636,000 | 1140e300735677598cd5f886191d8951e42873d3 | 3 | {
"blob_id": "1140e300735677598cd5f886191d8951e42873d3",
"branch_name": "refs/heads/master",
"committer_date": 1539025636000,
"content_id": "27d866f56de9edecf078f24ea21e7069c8618390",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "443721b65b3ee5236d2ab67cccd623ae736f74d5",
"extension": "py"... | 2.609375 | stackv2 | #!/usr/bin/env python
import subprocess
import yaml
import fileinput
import requests
import sys
import json
#Set your config file route here:
config = "/route/to/your/config/goes/here/config.yml"
#This is the subdirectory that your tests live in amongst the code in your git repository.
test_subdirectory = "subdir... | 92 | 32.24 | 117 | 17 | 715 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_bc195d52b119c409_008ff928", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 10 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
22,
22,
24,
24,
35,
35
] | [
22,
22,
24,
24,
35,
35
] | [
9,
112,
9,
113,
17,
77
] | [
117,
116,
118,
117,
82,
81
] | [
"A01:2017 - Injection",
"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()'.",
"Found 'subprocess' functi... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW"
] | apif-git.py | /apif-git.py | jioanni/apif-git | Apache-2.0 | |
2024-11-19T02:29:58.730850+00:00 | 1,687,936,235,000 | 449c8597440cf24a81ccc941e6199c7a34cfc3c3 | 2 | {
"blob_id": "449c8597440cf24a81ccc941e6199c7a34cfc3c3",
"branch_name": "refs/heads/master",
"committer_date": 1687938634000,
"content_id": "e71a1236dcced7e64875374925c418e068729223",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6da842ed788ef50c6b9d040f5ec8cf0a082af420",
"extension": "py"... | 2.3125 | stackv2 | # Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# 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... | 498 | 30.48 | 79 | 17 | 3,455 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_5b7763a2d9a1f37f_08209c6a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr... | 1 | true | [
"CWE-776"
] | [
"rules.python.lang.security.use-defused-xmlrpc"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
35
] | [
35
] | [
1
] | [
39
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | msgpackutils.py | /oslo_serialization/msgpackutils.py | openstack/oslo.serialization | Apache-2.0 | |
2024-11-19T02:30:05.369608+00:00 | 1,545,747,860,000 | 99c4449526e112b0b6ccb34fe9552768ea08a28e | 3 | {
"blob_id": "99c4449526e112b0b6ccb34fe9552768ea08a28e",
"branch_name": "refs/heads/master",
"committer_date": 1545747860000,
"content_id": "5e9fad0053c246ebe44534e0bed9d9d1ba3376b9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "85c1aa2c9b3b60237e58a438193484600f39584d",
"extension": "py"... | 2.953125 | stackv2 | import os, time, itertools, imageio, pickle
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
class GAN:
#GAN Generator and Discriminator hidden layer config
Generator_config = {"layer_1":256,"layer_2":512,"layer_3":1024,"layer... | 297 | 36.76 | 153 | 17 | 3,143 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fc44eed4659fd366_81df4185", "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"
] | [
250
] | [
250
] | [
13
] | [
39
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | GAN.py | /GANNet/GAN.py | zhaoqiange/GAN_tensorflow | Apache-2.0 | |
2024-11-19T02:30:17.273859+00:00 | 1,457,809,852,000 | 7ef8cbccc55b265717eb77dd711502cb62fb1488 | 2 | {
"blob_id": "7ef8cbccc55b265717eb77dd711502cb62fb1488",
"branch_name": "refs/heads/master",
"committer_date": 1457809852000,
"content_id": "d005472e6695a9e73248b17932da614e978c9dd8",
"detected_licenses": [
"MIT"
],
"directory_id": "52eb0c33bf2b6ff210d915801fd2f7a6025743a9",
"extension": "py",
"fi... | 2.34375 | stackv2 | from flask import Flask, request, jsonify, redirect, url_for
from newspaper import Article
from xml.etree import ElementTree
from BeautifulSoup import BeautifulSoup
from flask.ext.cors import CORS, cross_origin
from urlparse import urljoin
app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-... | 98 | 22.63 | 68 | 17 | 586 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_e006f994880901df_2f041323", "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
] | [
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"
] | __init__.py | /abstract/__init__.py | aredotna/abstract | MIT | |
2024-11-19T02:30:17.832444+00:00 | 1,582,517,208,000 | b0d835861617e6b5a4c56422320eaa30364c9ed4 | 3 | {
"blob_id": "b0d835861617e6b5a4c56422320eaa30364c9ed4",
"branch_name": "refs/heads/master",
"committer_date": 1582517208000,
"content_id": "e29dbf41b9bd198e6e7bda3044c3ab6b833ef7e6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3348fd7a98ab72cdc6f62c192284e99f04a5dbc5",
"extension": "p... | 2.734375 | stackv2 | """
Convert data tables from linear iq,diq to log(iq), diq/iq
"""
from __future__ import print_function
import argparse
import sys
from contextlib import closing
import numpy as np
from .. import sas_io
from ..sas_io import asblob, asdata
parser = argparse.ArgumentParser()
parser.add_argument(
"--database", typ... | 46 | 27.91 | 70 | 17 | 331 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_e5b38a00f0680c89_603ca0fb", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 4 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"HIGH",
"HIGH"
] | [
34,
34,
36,
41
] | [
34,
34,
38,
43
] | [
9,
9,
13,
13
] | [
56,
56,
26,
34
] | [
"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,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | logsql.py | /sasnets/util/logsql.py | scattering/sasnets | BSD-3-Clause | |
2024-11-19T02:30:17.960779+00:00 | 1,543,716,429,000 | d0fd8833cf99057e2a44214431db634c62dd457c | 2 | {
"blob_id": "d0fd8833cf99057e2a44214431db634c62dd457c",
"branch_name": "refs/heads/master",
"committer_date": 1543716429000,
"content_id": "dde8bb85e42e1e0b4461f38148de765b6fd74573",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c627d118bfbdbd1e1a64c9d43c49e3d74b3a3fd2",
"extension": "py"... | 2.484375 | stackv2 | import numpy as np
import os
import pickle
import string
import sys
import torch
import torch.nn as nn
import torch.nn.functional as F
import pdb
from IPython import embed
from torch.utils.data import Dataset
import click
from flask import Flask, jsonify, request
from qanta.dataset import QuizBowlDataset
DAN_MODEL_... | 523 | 30.52 | 91 | 20 | 3,763 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_dd36e6ddc49d5321_91c4c400", "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;... | 11 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
192,
194,
342
] | [
192,
194,
342
] | [
52,
45,
20
] | [
66,
59,
34
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | hao-dan.py | /src/qanta/hao-dan.py | haochen-rye/qanta | Apache-2.0 | |
2024-11-19T02:30:24.510315+00:00 | 1,593,723,056,000 | 3a558750e4b5b73c9a1d902618f1f240583d52b7 | 3 | {
"blob_id": "3a558750e4b5b73c9a1d902618f1f240583d52b7",
"branch_name": "refs/heads/master",
"committer_date": 1593723056000,
"content_id": "f302bfca369b12e46aac629f852220ac0213a9e0",
"detected_licenses": [
"AFL-3.0"
],
"directory_id": "4de0c6d3a820d7669fcef5fd035416cf85b35f23",
"extension": "py",
... | 2.671875 | stackv2 | from flask import Flask,render_template,redirect,request,jsonify,make_response,Markup
app = Flask(__name__)
@app.template_global()
def sbbbbbbb(a1, a2):
"""
每个模板中可以调用的函数
:param a1:
:param a2:
:return:
"""
return a1 + a2
def gen_input(value):
# return "<input value='%s'/>" %value
r... | 45 | 18.2 | 85 | 12 | 279 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.explicit-unescape-with-markup_3154deb4313f4c64_6afa7f9b", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.explicit-unescape-with-markup", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected e... | 1 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
17
] | [
17
] | [
12
] | [
48
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected explicitly unescaped content using 'Markup()'. This permits the unescaped data to include unescaped HTML which could result in cross-site scripting. Ensure this data is not externally controlled, or consider rewriting to not use 'Markup()'."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | s1.py | /ITcoach/flask框架/Flask WEB框架全套剖析2/Flask WEB框架全套剖析2/day123/6. 模板/s1.py | ww35133634/chenxusheng | AFL-3.0 | |
2024-11-19T02:30:24.995437+00:00 | 1,568,189,732,000 | 1010a524db5b294ad6f992544bb9ef600d1af5bd | 4 | {
"blob_id": "1010a524db5b294ad6f992544bb9ef600d1af5bd",
"branch_name": "refs/heads/master",
"committer_date": 1568189732000,
"content_id": "663327b4b1ac6cbdfdb501b8c457a2a468ccafaa",
"detected_licenses": [
"MIT"
],
"directory_id": "178231e653e89c26b61ccfdc2cf0df36e81ff2d8",
"extension": "py",
"fi... | 4.125 | stackv2 | # Row Wise Matrix Print
row=eval(input("Enter No. Of Rows:- "))
col=eval(input("Enter No. Of Columns:- "))
def row_matrix():
Matrix=[]
a=row
b=col
for r in range(a):
Matrix.append([])
for r in range(a):
for c in range(b):
value=eval(input("Enter Value Row Wise :- ... | 36 | 17.86 | 57 | 15 | 178 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_7e093c7f11813034_f771d81d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 3 | true | [
"CWE-95",
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
4,
5,
16
] | [
4,
5,
16
] | [
5,
5,
19
] | [
40,
43,
58
] | [
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | Row Wise Matrix.py | /Class 12/Python Programs/Row Wise Matrix.py | edwardmasih/Python-School-Level | MIT | |
2024-11-19T02:30:25.662054+00:00 | 1,563,385,246,000 | 0bf3aa88eb98954392ebe4ae4b61e3560cb01959 | 3 | {
"blob_id": "0bf3aa88eb98954392ebe4ae4b61e3560cb01959",
"branch_name": "refs/heads/master",
"committer_date": 1563385246000,
"content_id": "58b63107bdb56f4d061615e3de29daee27610e21",
"detected_licenses": [
"MIT"
],
"directory_id": "e464bbd380ad86d5b2cb2a3c668e73ebba8692cb",
"extension": "py",
"fi... | 2.8125 | stackv2 | #################################################################################################
# This file contains the functions to be used to compute the site accessibility of the mRNA.
# In order to compute this value a region of size equal to the FOLDING_CHUNK_LEN parameter is
# extracted from the 3'UTR and pass... | 72 | 47.85 | 106 | 14 | 832 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_62e291ba9b142c7a_952587c9", "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"
] | [
39
] | [
39
] | [
14
] | [
79
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | site_accessibility.py | /src/deepmirna/site_accessibility.py | simosini/deepmiRNA | MIT | |
2024-11-19T02:30:27.413509+00:00 | 1,642,379,085,000 | 296cae67b48cfc497937be64f3efabe3690068f8 | 3 | {
"blob_id": "296cae67b48cfc497937be64f3efabe3690068f8",
"branch_name": "refs/heads/master",
"committer_date": 1642379085000,
"content_id": "cb4d2b43cdf72219cb8fdac45e3ec1f96f612aec",
"detected_licenses": [
"BSD-3-Clause",
"BSD-2-Clause"
],
"directory_id": "46409c390d5f0f62b7a7c9861eaef2104f7634a1... | 3.046875 | stackv2 | #! /usr/bin/python
"""Retrieve the weather report for the requested location."""
__author__ = 'Ken Andrews <paddlebike@google.com>'
__copyright__ = 'Copyright (c) 2013'
__license__ = 'Apache License, Version 2.0'
import logging
import requests
from xml.dom import minidom
class NoaaClass:
"""A class for SOAP in... | 156 | 31.67 | 129 | 19 | 1,248 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_856f790068fe15cf_92b0d07a", "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"
] | [
10
] | [
10
] | [
1
] | [
28
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | noaa.py | /noaa/noaa.py | paddlebike/Noaa | BSD-3-Clause,BSD-2-Clause | |
2024-11-19T02:30:33.962447+00:00 | 1,592,857,164,000 | 1a1cfbb3baaada23cdb309b81d84f7c50f81469f | 3 | {
"blob_id": "1a1cfbb3baaada23cdb309b81d84f7c50f81469f",
"branch_name": "refs/heads/master",
"committer_date": 1592857164000,
"content_id": "cb2f94037465795bf48eb2fc52582140ef1b403b",
"detected_licenses": [
"MIT"
],
"directory_id": "a89729c6211755491b8eba3c4035b14a0152f472",
"extension": "py",
"fi... | 2.515625 | stackv2 | import matplotlib.pyplot as plt
import numpy as np
import lmfit
from labfis import labfloat
r4, vg = np.loadtxt('ponte').T
print(r4)
print(vg)
ponte = lambda R4,ar,R3,V: (ar-R3/(R3+R4))*V
pmodel = lmfit.Model(ponte)
params = pmodel.make_params(ar=0.7,R3=222,V=10)
result = pmodel.fit(vg, params, R4=r4)
res = resu... | 64 | 25.16 | 115 | 13 | 682 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_1b6f47b3d147667e_30fd998b", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se... | 2 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
59
] | [
59
] | [
1
] | [
109
] | [
"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"
] | wheensone.py | /pra2/wheensone.py | hlouzada/labfis3 | MIT | |
2024-11-19T02:30:35.267175+00:00 | 1,594,932,891,000 | 8f4c4800feabfb1b9907819c17279ea459607e4c | 2 | {
"blob_id": "8f4c4800feabfb1b9907819c17279ea459607e4c",
"branch_name": "refs/heads/master",
"committer_date": 1594932891000,
"content_id": "dcd07240e4a6206b9fc3d199149d8400897ffdda",
"detected_licenses": [
"MIT"
],
"directory_id": "4e6dcb09ac3dc0bb71daa14cbeab057dd0ebf439",
"extension": "py",
"fi... | 2.328125 | stackv2 | from django import template
from django.utils.safestring import mark_safe
from private_sharing.models import DataRequestProject
register = template.Library()
@register.simple_tag()
def erasure_requested_checkbox(object):
"""
If a Data Request Project supports member data erasure, then return the
html to... | 28 | 26.82 | 75 | 14 | 156 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_e72c282b1a7c05f0_49aa668d", "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"
] | [
26
] | [
26
] | [
16
] | [
64
] | [
"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"
] | private_sharing.py | /private_sharing/templatetags/private_sharing.py | madprime/open-humans | MIT | |
2024-11-19T02:30:39.314758+00:00 | 1,619,811,130,000 | cd45a9ec26d56850c2ac439370d88b021064349f | 3 | {
"blob_id": "cd45a9ec26d56850c2ac439370d88b021064349f",
"branch_name": "refs/heads/main",
"committer_date": 1619811130000,
"content_id": "db42796e80c9bd885ff142888ce5915e498dbedc",
"detected_licenses": [
"MIT"
],
"directory_id": "d97e5da2f7819e3f805dcdf5d6515a6853d915e6",
"extension": "py",
"file... | 2.734375 | stackv2 | """
Markdown extension that supports tufte-style side and margin notes.
Supports multi-block notes (e.g. embedded paragraphs), but doing so requires
the additional use of an extension to convert paragraphs to divs.
Syntax:
this is a ->[margin note,
which can span multiple lines
and be embedded within a p... | 128 | 35.08 | 110 | 20 | 1,041 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_1ac235703fc32896_a3d886c8", "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"
] | [
21
] | [
21
] | [
1
] | [
38
] | [
"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"
] | tufte.py | /tufte.py | ttrefren/tufte-css-markdown-python | MIT | |
2024-11-19T02:41:38.168980+00:00 | 1,624,190,216,000 | 2916ac28f30620d0f67d3feeb5bc06a0def02f01 | 3 | {
"blob_id": "2916ac28f30620d0f67d3feeb5bc06a0def02f01",
"branch_name": "refs/heads/master",
"committer_date": 1624190216000,
"content_id": "35e69f826df2d90f9085eac980905173b4fc6dba",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "f5528bc666c8321825e7435382db227330fe7d67",
"extension": "p... | 2.515625 | stackv2 | #!/usr/bin/env python3
import argparse
import inspect
import json
import os
import webbrowser
from jinja2 import Environment
from jinja2 import FileSystemLoader
from analyzer import analyze
def main(args=None):
if not args:
module_path = os.path.dirname(inspect.getfile(analyze))
arg_parser = a... | 52 | 34.83 | 107 | 18 | 389 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_d1cd699dc71d7f3a_ca07127a", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 5 | true | [
"CWE-79",
"CWE-116",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
34,
34,
36
] | [
34,
34,
36
] | [
19,
19,
43
] | [
95,
95,
73
] | [
"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 | /seoanalyzer/__main__.py | sparshvrao/python-seo-analyzer | BSD-2-Clause | |
2024-11-19T02:41:38.617026+00:00 | 1,603,076,026,000 | 43c945070a855518a0569b51f99be632b00dda8b | 3 | {
"blob_id": "43c945070a855518a0569b51f99be632b00dda8b",
"branch_name": "refs/heads/master",
"committer_date": 1603076026000,
"content_id": "4a4a5db670cfc9f7b2261f1da195e4755fa5e176",
"detected_licenses": [
"MIT"
],
"directory_id": "9aec1b91b9a6dba8c4cae83bbfe1d67885562abc",
"extension": "py",
"fi... | 3.0625 | stackv2 |
# Standard Library Dependencies
import os # Used for path validation
import logging # Used for optional logging details
import subprocess # Used to invoke installer binaries
from shutil import copyfile # Used to copy files between directories
from sys import pla... | 208 | 43.31 | 143 | 15 | 2,253 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_0f0668355af9d148_ab0f7e7e", "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 ... | 26 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
71,
71,
94,
107,
107,
112,
112,
115,
115,
115,
120,
120,
120,
139,
139
] | [
71,
71,
94,
107,
107,
112,
112,
115,
115,
115,
120,
120,
120,
139,
139
] | [
5,
42,
77,
5,
85,
9,
69,
5,
21,
116,
9,
25,
136,
5,
104
] | [
47,
46,
81,
90,
89,
74,
73,
121,
108,
120,
141,
128,
140,
109,
108
] | [
"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 subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW",
"MEDIUM",
"HIGH",
"LOW",
"MEDIUM",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH",
"MEDIUM",
"LOW",
"HIGH",
"MEDIUM",
"LOW",
"HIGH",
"LOW"
] | install.py | /install.py | Schulich-Ignite/installation-script | MIT | |
2024-11-19T02:41:38.658398+00:00 | 1,562,583,427,000 | f6740b22af9790e32653fe86be5ed3739f0f1733 | 3 | {
"blob_id": "f6740b22af9790e32653fe86be5ed3739f0f1733",
"branch_name": "refs/heads/master",
"committer_date": 1562583427000,
"content_id": "b171efb63688ee4fa9588d5732e71a8d42580be1",
"detected_licenses": [
"MIT"
],
"directory_id": "33ca9a21a1ac99b02413dd9b32c49042a7427001",
"extension": "py",
"fi... | 2.53125 | stackv2 | import os
import pickle
import numpy as np
import torch
from torch.utils.data import DataLoader, Dataset
from .hyperparams import hyperparams as hp
from .utils import mulaw_quantize, inv_mulaw_quantize
class AudiobookDataset(Dataset):
def __init__(self, data_path):
self.path = os.path.join(data_path, ""... | 146 | 31.87 | 95 | 15 | 1,323 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b639b253a7f9ca84_5cd8679f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
16,
106,
128
] | [
16,
106,
128
] | [
29,
23,
23
] | [
43,
37,
37
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | dataset.py | /wavernn/dataset.py | m-toman/tacorn | MIT | |
2024-11-19T02:41:38.764032+00:00 | 1,435,530,678,000 | e4bd8171471adb7c6e136c2ee36b5db3ba590921 | 3 | {
"blob_id": "e4bd8171471adb7c6e136c2ee36b5db3ba590921",
"branch_name": "refs/heads/master",
"committer_date": 1435530678000,
"content_id": "4d0063e857240e5175b2045897da249ed992a972",
"detected_licenses": [
"MIT"
],
"directory_id": "8ef21c0efa61d77beb7633643f38704d980dba2a",
"extension": "py",
"fi... | 3.421875 | stackv2 |
# encoding: utf-8
__author__ = "Nils Tobias Schmidt"
__email__ = "schmidt89 at informatik.uni-marburg.de"
import collections
from copy import deepcopy
from os.path import join
def get_apk_path(package_name, version_name, _hash):
'''
Returns the sub path structure by supplying all arguments needed for it.
... | 121 | 25.3 | 113 | 20 | 704 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.dict-del-while-iterate_8aa7c46bcf00da29_77530d80", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.dict-del-while-iterate", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "It appears that `_dict[key]` is a ... | 1 | true | [
""
] | [
"rules.python.lang.correctness.dict-del-while-iterate"
] | [
"correctness"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
90
] | [
113
] | [
13
] | [
41
] | [
""
] | [
"It appears that `_dict[key]` is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration"
] | [
5
] | [
""
] | [
""
] | Util.py | /androlyze/storage/Util.py | nachtmaar/androlyze | MIT | |
2024-11-19T02:41:39.355130+00:00 | 1,615,379,551,000 | 719b8eba4a74da31d38be94ab6730e0f8d3c4f2c | 3 | {
"blob_id": "719b8eba4a74da31d38be94ab6730e0f8d3c4f2c",
"branch_name": "refs/heads/main",
"committer_date": 1615379551000,
"content_id": "ffb16a85aa5bcc8c86964a6b688a115a505ae86b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "d4a625abcbb4917bb38e0e09f8fb3a89e0a42787",
"extension": "py"... | 2.671875 | stackv2 | import os.path
import pickle
import requests
import torch
FILE_NAME = 'decays.pkl'
def download_data(path: str = 'https://bwsyncandshare.kit.edu/s/xDm7iBdKBZKYoJG/download') -> torch.Tensor:
"""
Download the data containing particle decays simulated with phasespace
"""
if not os.path.exists(FILE_NAM... | 23 | 25.35 | 107 | 13 | 155 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_e7e94f9b7c78a5ed_486961e2", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
20
] | [
20
] | [
16
] | [
35
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | util.py | /notebooks/util.py | Helmholtz-AI-Energy/kseta_2021 | BSD-3-Clause | |
2024-11-19T02:41:39.521465+00:00 | 1,688,398,223,000 | 984ac80298359b90cbcc935546bcc8c3baa50c2f | 2 | {
"blob_id": "984ac80298359b90cbcc935546bcc8c3baa50c2f",
"branch_name": "refs/heads/master",
"committer_date": 1688398223000,
"content_id": "5ac9146e571a85e32b31aacbd6c3e8e8b8d55e4f",
"detected_licenses": [
"MIT"
],
"directory_id": "bee4b8a10d36f6b9a2b9ec860129b4754449330c",
"extension": "py",
"fi... | 2.421875 | stackv2 | #! /usr/bin/env python3
import argparse
from pathlib import Path
import shutil
import subprocess
import sys
from armory import __version__ as armory_version
script_dir = Path(__file__).parent
root_dir = script_dir.parent
armory_frameworks = ["armory", "pytorch-deepspeech", "yolo"]
# NOTE: Podman is not officially ... | 150 | 28.56 | 85 | 14 | 1,004 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8523c57c9f726e9c_b390e0db", "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"
] | [
111
] | [
111
] | [
16
] | [
45
] | [
"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"
] | build.py | /docker/build.py | twosixlabs/armory | MIT | |
2024-11-19T02:41:40.073977+00:00 | 1,623,155,211,000 | d4095c573b96b59d471e66a0698d54c38e02fb87 | 3 | {
"blob_id": "d4095c573b96b59d471e66a0698d54c38e02fb87",
"branch_name": "refs/heads/master",
"committer_date": 1623155211000,
"content_id": "8acc0481843cafe3aa7cd8bf25b775d926242647",
"detected_licenses": [
"MIT"
],
"directory_id": "b22fa833a2b6138df6ffa3faaf0f28d45dad8161",
"extension": "py",
"fi... | 2.796875 | stackv2 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import requests
import urllib.request
import re
import xlsxwriter
import json
import os
def getHTMLText(url):
response = urllib.request.urlopen(url)
myjson = json.loads(response.read().decode())
return myjson
# try:
# r = requests.get(url)
# ... | 101 | 26.5 | 76 | 15 | 739 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_88cd526059ad3e12_b825309a", "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... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
33
] | [
33
] | [
9
] | [
36
] | [
"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"
] | splider.py | /app-store/splider.py | wangwanjie/fetch-appstore-comments | MIT | |
2024-11-19T02:41:42.644078+00:00 | 1,447,915,974,000 | a40086c12c94d2f5e99f8ed1854de777928740b2 | 4 | {
"blob_id": "a40086c12c94d2f5e99f8ed1854de777928740b2",
"branch_name": "refs/heads/master",
"committer_date": 1447915974000,
"content_id": "4e4b0a0d59ca38b376844596d93a69bc4d3765e4",
"detected_licenses": [
"MIT"
],
"directory_id": "10476139fc50177fcc34da0890fd7c8f35e57eed",
"extension": "py",
"fi... | 3.5625 | stackv2 | # Import required libraries
import os
#
# Open Text file with host list
with open('device_file1.txt') as fname:
# Set Variable Switches to read each line int file we opened
switches = fname.read().splitlines()
# Create a for loop named switch that iterates throug the lines in switches
for switch in switches:
# R... | 17 | 31.65 | 77 | 10 | 142 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_282247f20cde4011_02f23e9b", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
11
] | [
11
] | [
13
] | [
45
] | [
"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"
] | ping.py | /A Few Easy Steps/multi device ping tool/ping.py | joshobrien77/staticnat | MIT | |
2024-11-19T02:41:49.777913+00:00 | 1,630,135,665,000 | e68689af490d7df7beb05005ae70abdb9276b409 | 3 | {
"blob_id": "e68689af490d7df7beb05005ae70abdb9276b409",
"branch_name": "refs/heads/main",
"committer_date": 1630135665000,
"content_id": "b1269bd13d09091c833f35c1b6a580de7094fc8d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6d52ef583ee949fb4233c3a590c32dda1019d0fc",
"extension": "py",
... | 2.640625 | stackv2 | from django.shortcuts import render
from rest_framework.views import APIView
import pickle, base64
from rest_framework.response import Response
from rest_framework import status
from django_redis import get_redis_connection
from .serializers import CartSerializer, SKUCartSerializer, CartDeletedSerializer, CartSelected... | 352 | 32.01 | 108 | 19 | 3,033 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_7bbb6d380a111518_bdf80714", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 26 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-614",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-614",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-614",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-614"
] | [
"rules.python.django.security.audit.avoid-insecure-deserialization",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.django.security.audit.avoid-insecure-deserialization",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.django.security.audit.django-secure-se... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
79,
79,
98,
98,
107,
149,
149,
215,
215,
226,
230,
271,
271,
282,
282,
284,
338,
338,
348,
348,
350
] | [
79,
79,
98,
98,
107,
149,
149,
215,
215,
226,
230,
271,
271,
282,
282,
284,
338,
338,
348,
348,
350
] | [
29,
29,
26,
26,
13,
29,
29,
29,
29,
41,
13,
29,
29,
45,
45,
17,
29,
29,
41,
41,
13
] | [
53,
53,
49,
49,
50,
53,
53,
78,
78,
64,
50,
78,
78,
68,
68,
54,
78,
78,
64,
64,
50
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A05:2021 - Security Misconfiguration",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deseria... | [
"Avoid using insecure deserialization library, backed by `pickle`, `_pickle`, `cpickle`, `dill`, `shelve`, or `yaml`, which are known to lead to remote code execution vulnerabilities.",
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be m... | [
7.5,
5,
7.5,
5,
5,
7.5,
5,
7.5,
5,
5,
5,
7.5,
5,
7.5,
5,
5,
7.5,
5,
7.5,
5,
5
] | [
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"LOW",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"LOW"
] | views.py | /meiduo_mall/meiduo_mall/apps/carts/views.py | rishinkaku/Django_html_vue.js | Apache-2.0 | |
2024-11-19T02:41:53.103851+00:00 | 1,597,848,929,000 | e69000991d91978876708ad677741dea10e604c2 | 3 | {
"blob_id": "e69000991d91978876708ad677741dea10e604c2",
"branch_name": "refs/heads/master",
"committer_date": 1597848929000,
"content_id": "961dcb03fb5587ac9cc75f5eb6acabed1cab0dcf",
"detected_licenses": [
"MIT"
],
"directory_id": "7acf5c54793e93a3f2f40784f14e97035dca6afe",
"extension": "py",
"fi... | 3.140625 | stackv2 | import sqlite3
import hashlib
def _hash(password):
return hashlib.sha256(password).hexdigest()
def init():
try:
open("Userdb.db", "r")
created = True
except:
created = False
conn = sqlite3.connect("Userdb.db")
cur = conn.cursor()
cur.execute(
"CREATE TABLE ... | 58 | 17.86 | 77 | 10 | 251 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_60b302e4b8dd1246_3d72fd79", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH"
] | [
34,
34,
53,
53
] | [
34,
34,
53,
53
] | [
5,
5,
5,
5
] | [
78,
78,
76,
76
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | login.py | /login.py | bigboy32/RaspiNetworkStore | MIT | |
2024-11-19T02:41:54.063359+00:00 | 1,306,341,454,000 | ef15c9de765311e63633c6e5bb8cacca4450dba2 | 3 | {
"blob_id": "ef15c9de765311e63633c6e5bb8cacca4450dba2",
"branch_name": "refs/heads/master",
"committer_date": 1306341454000,
"content_id": "d1cae6c1bff9b47f464e16589c5db065f56d460a",
"detected_licenses": [
"MIT"
],
"directory_id": "defba0f8cc8021feded115473d800f94abe19cc7",
"extension": "py",
"fi... | 3.09375 | stackv2 | import xmlrpclib
import collections
import types
class Client(object):
"""
Connection to a WordPress XML-RPC API endpoint.
To execute XML-RPC methods, pass an instance of an
`XmlrpcMethod`-derived class to `Client`'s `call` method.
"""
def __init__(self, url, username, password, blog_id=0):
... | 129 | 32.78 | 130 | 16 | 897 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_fd87d24b275807cc_7ac1efec", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr... | 1 | true | [
"CWE-776"
] | [
"rules.python.lang.security.use-defused-xmlrpc"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
1
] | [
1
] | [
1
] | [
17
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | base.py | /wordpress_xmlrpc/base.py | onyxfish/python-wordpress-xmlrpc | MIT | |
2024-11-19T02:41:55.117326+00:00 | 1,412,824,523,000 | 049a2dd9dd3e5e24242dee0e90a0270af7e76091 | 3 | {
"blob_id": "049a2dd9dd3e5e24242dee0e90a0270af7e76091",
"branch_name": "refs/heads/master",
"committer_date": 1412824523000,
"content_id": "52ba39cbc7fb572147ab2b78903b1a54e6357b9c",
"detected_licenses": [
"ISC"
],
"directory_id": "3e04ea60aa8a7b48ad7f89f9f7a08f93a18af529",
"extension": "py",
"fi... | 3.125 | stackv2 | import collections
import logging
import StringIO
from . import exc, Request, Expression
logger = logging.getLogger(__name__)
class CompiledRule(object):
"""
Compiled version of a routing rule.
`symbols`
A `rump.fields.Symbols` table used to store symbolic information used
in the compi... | 369 | 29.04 | 80 | 19 | 2,310 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_5a89899e6ff86834_41954f33", "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"
] | [
55
] | [
55
] | [
19
] | [
61
] | [
"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"
] | rule.py | /rump/rule.py | bninja/rump | ISC | |
2024-11-19T02:41:57.945150+00:00 | 1,617,762,973,000 | 6c76268b07f7547cc8f3da767d994339764055c1 | 3 | {
"blob_id": "6c76268b07f7547cc8f3da767d994339764055c1",
"branch_name": "refs/heads/master",
"committer_date": 1617762973000,
"content_id": "bd4b5106103392140c7d1174f08fa8bdf0e7ca0d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7eb116be67f178f50181b89efcbf58cce4ff9530",
"extension": "py"... | 2.5625 | stackv2 | # AUTOGENERATED! DO NOT EDIT! File to edit: 00_srag_data.ipynb (unless otherwise specified).
__all__ = ['get_last_bd_srag_csv_url', 'get_srag_data', 'get_cities_states_dictionaries', 'treat_srag_data']
# Cell
def get_last_bd_srag_csv_url(year=2021):
available_years = (2020,2021)
if year not in available_year... | 131 | 37.24 | 127 | 16 | 1,430 | python | [{"finding_id": "semgrep_rules.python.lang.security.unverified-ssl-context_c1161a2078ea04d3_da9e5391", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.unverified-ssl-context", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Unverified SSL context detected. This will pe... | 1 | true | [
"CWE-295"
] | [
"rules.python.lang.security.unverified-ssl-context"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
16
] | [
16
] | [
15
] | [
47
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"Unverified SSL context detected. This will permit insecure connections without verifying SSL certificates. Use 'ssl.create_default_context' instead."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | srag_data.py | /srag_data/srag_data.py | victor-marchesini/opendatasus | Apache-2.0 | |
2024-11-19T02:41:58.332394+00:00 | 1,634,143,656,000 | 2ce91bf93a30616d7f079e0e3fc9eadcd2f9080e | 3 | {
"blob_id": "2ce91bf93a30616d7f079e0e3fc9eadcd2f9080e",
"branch_name": "refs/heads/main",
"committer_date": 1634143656000,
"content_id": "f3512ec8e837ec5b7446b4633c6a4a543c61a80d",
"detected_licenses": [
"MIT"
],
"directory_id": "3cad56e3105d23a7894698df18042cd15a3565ae",
"extension": "py",
"file... | 2.765625 | stackv2 | import binascii
import os
import warnings
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, padding
from cryptography.ha... | 162 | 30.62 | 80 | 15 | 1,448 | python | [{"finding_id": "semgrep_rules.python.cryptography.security.crypto-mode-without-authentication_e0f28fae7705591f_3194e3d3", "tool_name": "semgrep", "rule_id": "rules.python.cryptography.security.crypto-mode-without-authentication", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "An en... | 1 | true | [
"CWE-327"
] | [
"rules.python.cryptography.security.crypto-mode-without-authentication"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
139
] | [
140
] | [
14
] | [
42
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"An encryption mode of operation is being used without proper message authentication. This can potentially result in the encrypted content to be decrypted by an attacker. Consider instead use an AEAD mode of operation like GCM. "
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | ciphers.py | /ansible_vault/ciphers.py | AchieveGoals/ansible-vault-win | MIT | |
2024-11-19T02:42:00.089798+00:00 | 1,620,699,120,000 | 8113e84bb14d195f201a00438bb4b5ce66974a38 | 3 | {
"blob_id": "8113e84bb14d195f201a00438bb4b5ce66974a38",
"branch_name": "refs/heads/master",
"committer_date": 1620699120000,
"content_id": "940c624e73fc840afeea44eb9bcf8758e67ff935",
"detected_licenses": [
"MIT"
],
"directory_id": "109a58d8d5f1616d4013ca530326d7e903af13cf",
"extension": "py",
"fi... | 2.53125 | stackv2 | r"""find aligned pairs
Given: nll matrix: nll_matrix
Output: aligned pairs and confidence level
Refer to C:\dl\Dropbox\mat-dir\myapps\pytorch-nlp\rnn_embed\heatmap_nll.py
"""
import sys
import logging
import pickle
# import inspect
import numpy as np
import pytest
LOGGER = logging.getLogger(__name__)
LOGGER.addHand... | 222 | 29.87 | 80 | 17 | 1,960 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_69fa8dc9bb0ff9d1_86aba027", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
154,
166,
180,
194
] | [
154,
166,
180,
194
] | [
22,
22,
22,
22
] | [
42,
42,
42,
42
] | [
"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"
] | find_aligned_pairs.py | /light_aligner/find_aligned_pairs.py | ffreemt/light-aligner | MIT | |
2024-11-19T02:42:20.986954+00:00 | 1,692,531,188,000 | 66e0b44e75ef35d4d02b046fea4bca7c50377ede | 3 | {
"blob_id": "66e0b44e75ef35d4d02b046fea4bca7c50377ede",
"branch_name": "refs/heads/main",
"committer_date": 1692531188000,
"content_id": "da3d4329b2f1419fd9d44c2e24a5fb3ca6f4002b",
"detected_licenses": [
"MIT"
],
"directory_id": "b6530510b7a074a3e8254be2159198b11e54f748",
"extension": "py",
"file... | 2.8125 | stackv2 | import logging
import subprocess
from subprocess import PIPE, Popen
from threading import Lock
from typing import List, Optional, Union
from rhoknp.processors.processor import Processor
from rhoknp.units import Document, Morpheme, Sentence
from rhoknp.utils.comment import is_comment_line
logger = logging.getLogger(__... | 180 | 34.79 | 115 | 25 | 1,442 | python | [{"finding_id": "semgrep_rules.python.lang.compatibility.python36-compatibility-Popen2_75c5eb4b72b6aa23_8ad5aa7d", "tool_name": "semgrep", "rule_id": "rules.python.lang.compatibility.python36-compatibility-Popen2", "finding_type": "compatibility", "severity": "high", "confidence": "medium", "message": "the `encoding` a... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
56,
169
] | [
56,
169
] | [
26,
13
] | [
105,
88
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | kwja.py | /src/rhoknp/processors/kwja.py | ku-nlp/rhoknp | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.