HTML output should use absolute paths
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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