New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more_info URL to csv formatter #361
Conversation
Patch set adds more_info URL to the csv formatter. Closes: PyCQA#323 Signed-off-by: Tin Lam <tin@irrational.io>
bandit/formatters/csv.py
Outdated
@@ -24,10 +24,10 @@ | |||
.. code-block:: none | |||
|
|||
filename,test_name,test_id,issue_severity,issue_confidence,issue_text, | |||
line_number,line_range | |||
more_info,line_number,line_range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think more_info should be listed after the line_range. That should help those that may be parsing the CSV with the introduction of a new column.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
bandit/formatters/csv.py
Outdated
examples/yaml_load.py,blacklist_calls,B301,MEDIUM,HIGH,"Use of unsafe yaml | ||
load. Allows instantiation of arbitrary objects. Consider yaml.safe_load(). | ||
",5,[5] | ||
",https://bandit.readthedocs.io/en/latest/,5,[5] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, put after [5]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
bandit/formatters/csv.py
Outdated
@@ -63,14 +65,17 @@ def report(manager, fileobj, sev_level, conf_level, lines=-1): | |||
'issue_severity', | |||
'issue_confidence', | |||
'issue_text', | |||
'more_info', | |||
'line_number', | |||
'line_range'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, put after line_range
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
bandit/formatters/csv.py
Outdated
examples/yaml_load.py,blacklist_calls,B301,MEDIUM,HIGH,"Use of unsafe yaml | ||
load. Allows instantiation of arbitrary objects. Consider yaml.safe_load(). | ||
",5,[5] | ||
",https://bandit.readthedocs.io/en/latest/,5,[5] | ||
|
||
.. versionadded:: 0.11.0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add
.. versionchanged:: 1.5.0
New field `more_info` added to output
Since this is a new column and may affect those that are parsing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Patch set adds more_info URL to the csv formatter. Closes: PyCQA#323 Signed-off-by: Tin Lam <tin@irrational.io>
…csv-links Signed-off-by: Tin Lam <tinlam@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Patch set adds more_info URL to the csv formatter.
Closes: #323
Signed-off-by: Tin Lam tin@irrational.io