Skip to content

Commit 2024e6e

Browse files
xiangyan99scbedd
andauthored
enable bandit (#37693)
* enable bandit * fix the issue with bandit not honoring the prebuilt wheel directory. AdditionalTestarts is what CONTAINS the artifacts directory argument. Not providing it is the reason for this not resolving * we don't need to install the package to run bandit against the files on disk --------- Co-authored-by: Scott Beddall <scbedd@microsoft.com>
1 parent 9ec655b commit 2024e6e

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

eng/pipelines/templates/steps/run_bandit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ parameters:
22
ServiceDirectory: ''
33
TestMarkArgument: ''
44
EnvVars: {}
5+
AdditionalTestArgs: ''
56

67
# Please use `$(TargetingString)` to refer to the python packages glob string. This variable is set from resolve-package-targeting.yml.
78
steps:
@@ -21,5 +22,6 @@ steps:
2122
--toxenv="bandit"
2223
--disablecov
2324
--filter-type="Omit_management"
25+
${{ parameters.AdditionalTestArgs }}
2426
env: ${{ parameters.EnvVars }}
2527
condition: and(succeededOrFailed(), ne(variables['Skip.Bandit'],'true'))

eng/tox/tox.ini

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,6 @@ setenv =
471471
deps =
472472
{[base]deps}
473473
commands =
474-
python {repository_root}/eng/tox/create_package_and_install.py \
475-
-d {envtmpdir} \
476-
-p {tox_root} \
477-
-w {envtmpdir} \
478-
--package-type sdist
479474
python -m pip freeze
480475
python {repository_root}/eng/tox/run_bandit.py -t {tox_root}
481476

sdk/evaluation/azure-ai-evaluation/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ mypy = true
33
pyright = false
44
pylint = true
55
black = true
6-
bandit = false
76
verifytypes = false
87

98
[tool.isort]

sdk/storage/azure-storage-extensions/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ verifysdist = false
99
verifywhl = false
1010
sdist = false
1111
breaking = false
12-
bandit = false
1312
# these can be any number of suppressions. note that * present means that ALL warnings will be suppressed for this package
1413
suppressed_skip_warnings = ["*"]
1514

0 commit comments

Comments
 (0)