Skip to content

Commit 8fa63f3

Browse files
Enable bandit for servicebus (#12763)
1 parent 77892ae commit 8fa63f3

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

eng/pipelines/templates/steps/run_bandit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ steps:
1515
--service="${{ parameters.ServiceDirectory }}"
1616
--toxenv="bandit"
1717
--disablecov
18-
--filter-type="Bandit"
18+
--filter-type="Omit_management"
1919
env: ${{ parameters.EnvVars }}
2020
condition: and(succeededOrFailed(), ne(variables['Skip.Bandit'],'true'))

scripts/devops_tasks/common_tasks.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@
5959
"azure-mgmt-core",
6060
]
6161

62-
BANDIT_EXCLUDED_PACKAGES = [
63-
"azure-servicebus",
64-
]
65-
6662
omit_regression = (
6763
lambda x: "nspkg" not in x
6864
and "mgmt" not in x
@@ -74,15 +70,14 @@
7470
omit_build = lambda x: x # Dummy lambda to match omit type
7571
lambda_filter_azure_pkg = lambda x: x.startswith("azure") and "-nspkg" not in x
7672
omit_mgmt = lambda x: "mgmt" not in x or os.path.basename(x) in MANAGEMENT_PACKAGES_FILTER_EXCLUSIONS
77-
omit_bandit = lambda x: not(os.path.basename(x) in BANDIT_EXCLUDED_PACKAGES or "mgmt" in x)
73+
7874

7975
# dict of filter type and filter function
8076
omit_funct_dict = {
8177
"Build": omit_build,
8278
"Docs": omit_docs,
8379
"Regression": omit_regression,
8480
"Omit_management": omit_mgmt,
85-
"Bandit": omit_bandit,
8681
}
8782

8883
def log_file(file_location, is_error=False):

scripts/devops_tasks/setup_execute_tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def execute_global_install_and_test(
280280
dest="filter_type",
281281
default='Build',
282282
help="Filter type to identify eligible packages. for e.g. packages filtered in Build can pass filter type as Build,",
283-
choices=['Build', "Docs", "Regression", "Omit_management", "Bandit"]
283+
choices=['Build', "Docs", "Regression", "Omit_management"]
284284
)
285285

286286

0 commit comments

Comments
 (0)