PyCQA / PyCQA/bandit

HTML output should use absolute paths

Open
#215 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.3k
Forks
835
Avg merge
5d 3h
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the HTML report generation reached by the bandit assert.py -f html -o ~/report.html command and inspect how file links are constructed. Decide whether the report targets filesystem access or web hosting, then verify that links remain usable when the output file is written outside the current working directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.