codefactor-io/codefactor

Trouble with custom bandit config

djhoese opened this issue · 4 comments

I have a branch with a custom bandit config named .bandit in the root of the repository. Its contents are:

[bandit]
skips: B506
exclude: satpy/tests

Which are described here. However, CodeFactor seems to not recognize/use the skips parameter as I still get failures for B506: https://www.codefactor.io/repository/github/pytroll/satpy/pull/1901. This configuration seems to work when using bandit locally.

Any ideas what I'm doing wrong? Is this a bug in bandit? In CodeFactor?

@djhoese thanks for reporting. It was an issue on CodeFactor. The PR for your repo should no longer report skipped issues.

Thanks @cordis-dev. The B506 does seem to be skipped now, but now the exclude directory seems to be ignored as I'm getting issues identified with using assert in my satpy/tests directory.

The path for exclude: was not resolving as expected. Thanks again. The PR should now exclude ignored paths.

Looks good now. Thank you!