Skip to content

mark_safe with a # nosec waiver on a DB-derived URL #1807

Description

@abkfenris
return mark_safe(f"<a href='{dataset_url}'>Test ERDDAP Timeseries</a>")  # nosec

format_html escapes correctly and needs no # nosec waiver. Low risk (the URL comes from dataset_url(), built from model fields), but the waiver is what makes it worth removing — it's suppressing the tool that would catch a real instance later.

Sites: admin.py:112, :177

(from #1781)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions