microsoft / microsoft/AzureTRE

Bandit warnings about use of assert in tests should be ignored

Open Beginner friendly
#5,057 0 comments 0 reactions 0 assignees View on GitHub

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

  1. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.