make bandit happy

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
Brian S. Stephan 2025-03-16 21:27:24 -05:00
parent 46f8cdcc24
commit 7639e0738e
Signed by: bss
GPG Key ID: 3DE06D3180895FCB
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ def parse_md(path: str):
entry = input_file.read()
logger.debug("path '%s' read", path)
md = init_md()
content = Markup(md.convert(entry))
content = Markup(md.convert(entry)) # nosec B704
except (OSError, FileNotFoundError):
logger.exception("path '%s' could not be opened!", path)
raise
@ -131,7 +131,7 @@ def generate_parent_navs(path):
try:
with open(path, 'r') as entry_file:
entry = entry_file.read()
_ = Markup(md.convert(entry))
_ = Markup(md.convert(entry)) # nosec B704
page_name = (" ".join(md.Meta.get('title')) if md.Meta.get('title')
else request_path_to_breadcrumb_display(request_path))
return generate_parent_navs(parent_resource_path) + [(page_name, request_path)]

View File

@ -4,7 +4,7 @@ SPDX-FileCopyrightText: © 2022 Brian S. Stephan <bss@incorporeal.org>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
import re
from xml.etree.ElementTree import SubElement # nosec B405 - not parsing untrusted XML here
from xml.etree.ElementTree import SubElement # nosec B405
import markdown