Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/pipelines/templates/steps/run_bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ steps:
--service="${{ parameters.ServiceDirectory }}"
--toxenv="bandit"
--disablecov
--filter-type="Bandit"
--filter-type="Omit_management"
env: ${{ parameters.EnvVars }}
condition: and(succeededOrFailed(), ne(variables['Skip.Bandit'],'true'))
7 changes: 1 addition & 6 deletions scripts/devops_tasks/common_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
"azure-mgmt-core",
]

BANDIT_EXCLUDED_PACKAGES = [
"azure-servicebus",
]

omit_regression = (
lambda x: "nspkg" not in x
and "mgmt" not in x
Expand All @@ -74,15 +70,14 @@
omit_build = lambda x: x # Dummy lambda to match omit type
lambda_filter_azure_pkg = lambda x: x.startswith("azure") and "-nspkg" not in x
omit_mgmt = lambda x: "mgmt" not in x or os.path.basename(x) in MANAGEMENT_PACKAGES_FILTER_EXCLUSIONS
omit_bandit = lambda x: not(os.path.basename(x) in BANDIT_EXCLUDED_PACKAGES or "mgmt" in x)


# dict of filter type and filter function
omit_funct_dict = {
"Build": omit_build,
"Docs": omit_docs,
"Regression": omit_regression,
"Omit_management": omit_mgmt,
"Bandit": omit_bandit,
}

def log_file(file_location, is_error=False):
Expand Down
2 changes: 1 addition & 1 deletion scripts/devops_tasks/setup_execute_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def execute_global_install_and_test(
dest="filter_type",
default='Build',
help="Filter type to identify eligible packages. for e.g. packages filtered in Build can pass filter type as Build,",
choices=['Build', "Docs", "Regression", "Omit_management", "Bandit"]
choices=['Build', "Docs", "Regression", "Omit_management"]
)


Expand Down