PyCQA / PyCQA/bandit

Bandit XML format should support working with baseline

Open
#512 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem? Please describe.

Bandit output XML format is useful for integration with CI systems.
For working with existing legacy code, starting with baseline is really of help, as one could not expect to initially fix all violations on legacy code.
Therefore, working with baseline is of great help.
But currently the XML report does not work with baseline - running bandit 1.6.2 with xml format and baseline gives

[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] WARNING Baseline must be used with one of the following formats: ['custom', 'html', 'json', 'screen', 'txt']

Describe the solution you'd like
XML output format should support working with baseline

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

First reproduce the reported command using a baseline and XML output, then trace Bandit's baseline handling and XML reporting paths. Done means baseline filtering works with XML output without the warning, with regression coverage for this combination.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.