Skip to content

HTML output should use absolute paths #215

@ericwb

Description

@ericwb

Bandit's HTML reports generate links to files. These links are relative
to Bandit's current working directory. If the output file is written
into a different directory, these links will be broken:

cd bandit/examples
bandit assert.py -f html -o ~/report.html
# The generated HTML links to "assert.py"

If the HTML reports are supposed to just be for filesystem access, then providing
absolute file:// URLs seems like a reasonable fix. If the HTML reports are intended
to live on a web server, then a different solution might be better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions