microsoft / microsoft/AzureTRE
Bandit warnings about use of assert in tests should be ignored
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 235
- Forks
- 192
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 13
Description
Describe the bug
Bandit currently warns about the use of assert, this can be safely ignored via bandit config.
Steps to reproduce
- with bandit extension active view any test file which contains "assert" and observe the B101 warning.
Azure TRE release version (e.g. v0.14.0 or main):
main
Deployed Azure TRE components - click the (i) in the UI:
N/A
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 by locating the Bandit configuration and reviewing how test files are scanned for B101 warnings. Confirm the configuration can safely ignore assert usage in tests, then run Bandit against a test file containing assert and verify that the warning no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100