PyCQA / PyCQA/bandit

Allow using test_name in custom formatter

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

Nobody has claimed this yet.

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

Description

It would be great if we could use the test_name field in the custom formatter (https://github.com/PyCQA/bandit/blob/main/bandit/formatters/custom.py).

It is used in other formatter like the csv formatter (https://github.com/PyCQA/bandit/blob/main/bandit/formatters/csv.py#L58)

I'd be happy to try implement this myself if it seems relevant and not blocked by something obvious I haven't noticed.

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 with bandit/formatters/custom.py and compare how bandit/formatters/csv.py uses the test_name field around line 58. Trace the custom formatter's existing output handling, then verify that test_name is available in the custom formatter without changing its other output behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.