azdev 0.1.80__tar.gz → 0.1.82__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {azdev-0.1.80 → azdev-0.1.82}/HISTORY.rst +8 -0
- {azdev-0.1.80/azdev.egg-info → azdev-0.1.82}/PKG-INFO +10 -2
- {azdev-0.1.80 → azdev-0.1.82}/azdev/__init__.py +1 -1
- {azdev-0.1.80 → azdev-0.1.82}/azdev/commands.py +3 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/help.py +11 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/command_change/__init__.py +3 -21
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/secret.py +26 -14
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/statistics/__init__.py +6 -4
- {azdev-0.1.80 → azdev-0.1.82}/azdev/params.py +18 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/__init__.py +3 -1
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/path.py +27 -1
- {azdev-0.1.80 → azdev-0.1.82/azdev.egg-info}/PKG-INFO +10 -2
- {azdev-0.1.80 → azdev-0.1.82}/azdev.egg-info/requires.txt +1 -1
- {azdev-0.1.80 → azdev-0.1.82}/setup.py +1 -1
- {azdev-0.1.80 → azdev-0.1.82}/LICENSE +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/MANIFEST.in +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/README.md +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/README.rst +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/__main__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/completer.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/config/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/config/cli.flake8 +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/config/cli_pylintrc +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/config/ext.flake8 +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/config/ext_pylintrc +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/HISTORY.rst +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/README.rst +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/_client_factory.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/_help.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/_params.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/_validators.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/azext_metadata.json +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/blank__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/commands.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/custom.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/module__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/pkg_declare__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/setup.cfg +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/setup.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/mod_templates/test_service_scenario.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/_macros.j2 +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/cmdcov.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/component.css +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/component.js +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/favicon.ico +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/index.j2 +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/index2.j2 +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/cmdcov/module.j2 +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/code_gen.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/command_change/custom.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/command_change/util.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/constant.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/extensions/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/extensions/util.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/extensions/version_upgrade.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/help/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/help/refdoc/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/help/refdoc/conf.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/legal.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/linter.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/pylint_checkers/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/pylint_checkers/show_command.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rule_decorators.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rules/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rules/ci_exclusions.yml +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rules/command_coverage_rules.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rules/command_group_rules.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rules/command_rules.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rules/help_rules.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rules/linter_exclusions.yml +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/rules/parameter_rules.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/linter/util.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/performance.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/pypi.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/python_sdk.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/regex.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/resource.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/setup.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/statistics/util.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/style.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/testtool/__init__.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/testtool/incremental_strategy.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/testtool/profile_context.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/operations/testtool/pytest_runner.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/transformers.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/command.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/config.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/const.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/display.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/git_util.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/pypi.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/testing.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev/utilities/tools.py +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev.egg-info/SOURCES.txt +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev.egg-info/dependency_links.txt +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev.egg-info/entry_points.txt +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/azdev.egg-info/top_level.txt +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/pyproject.toml +0 -0
- {azdev-0.1.80 → azdev-0.1.82}/setup.cfg +0 -0
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Release History
|
|
4
4
|
===============
|
|
5
|
+
0.1.82
|
|
6
|
+
++++++
|
|
7
|
+
* `azdev generate-breaking-change-report`: New command to collect upcoming breaking changes from codebase.
|
|
8
|
+
|
|
9
|
+
0.1.81
|
|
10
|
+
++++++
|
|
11
|
+
* `azdev scan/mask`: Add `--confidence-level` to support secret pattern levels
|
|
12
|
+
|
|
5
13
|
0.1.80
|
|
6
14
|
++++++
|
|
7
15
|
* `azdev cmdcov`: Support both extension short name and long name
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.82
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -40,7 +40,7 @@ Requires-Dist: azure-cli-diff-tool~=0.0.6
|
|
|
40
40
|
Requires-Dist: packaging
|
|
41
41
|
Requires-Dist: tqdm
|
|
42
42
|
Requires-Dist: wheel==0.30.0
|
|
43
|
-
Requires-Dist: microsoft-security-utilities-secret-masker
|
|
43
|
+
Requires-Dist: microsoft-security-utilities-secret-masker~=1.0.0b2
|
|
44
44
|
|
|
45
45
|
Microsoft Azure CLI Dev Tools (azdev)
|
|
46
46
|
=====================================
|
|
@@ -148,6 +148,14 @@ License
|
|
|
148
148
|
|
|
149
149
|
Release History
|
|
150
150
|
===============
|
|
151
|
+
0.1.82
|
|
152
|
+
++++++
|
|
153
|
+
* `azdev generate-breaking-change-report`: New command to collect upcoming breaking changes from codebase.
|
|
154
|
+
|
|
155
|
+
0.1.81
|
|
156
|
+
++++++
|
|
157
|
+
* `azdev scan/mask`: Add `--confidence-level` to support secret pattern levels
|
|
158
|
+
|
|
151
159
|
0.1.80
|
|
152
160
|
++++++
|
|
153
161
|
* `azdev cmdcov`: Support both extension short name and long name
|
|
@@ -84,3 +84,6 @@ def load_command_table(self, _):
|
|
|
84
84
|
|
|
85
85
|
with CommandGroup(self, 'extension', operation_group('help')) as g:
|
|
86
86
|
g.command('generate-docs', 'generate_extension_ref_docs')
|
|
87
|
+
|
|
88
|
+
with CommandGroup(self, '', operation_group('breaking_change')) as g:
|
|
89
|
+
g.command('generate-breaking-change-report', 'collect_upcoming_breaking_changes')
|
|
@@ -377,3 +377,14 @@ helps['cmdcov'] = """
|
|
|
377
377
|
- name: Check CLI modules command test coverage in argument level.
|
|
378
378
|
text: azdev cmdcov CLI --level argument
|
|
379
379
|
"""
|
|
380
|
+
|
|
381
|
+
helps['generate-breaking-change-report'] = """
|
|
382
|
+
short-summary: Collect pre-announced breaking changes items and generate the report.
|
|
383
|
+
examples:
|
|
384
|
+
- name: Collect all pre-announced breaking changes, including any that did not specify a target version and group them by target version.
|
|
385
|
+
text: azdev generate-breaking-change-report CLI --group-by-version --target-version None
|
|
386
|
+
- name: Collect all pre-announced breaking changes target before next breaking change window, and display them in markdown.
|
|
387
|
+
text: azdev generate-breaking-change-report CLI --output-format markdown
|
|
388
|
+
- name: Collect all pre-announced breaking changes in vm, including those failed to specify a target version, and display them in json
|
|
389
|
+
text: azdev generate-breaking-change-report vm --target-version None
|
|
390
|
+
"""
|
|
@@ -10,7 +10,8 @@ import time
|
|
|
10
10
|
|
|
11
11
|
from knack.log import get_logger
|
|
12
12
|
import azure_cli_diff_tool
|
|
13
|
-
from azdev.utilities import display, require_azure_cli, heading, get_path_table, filter_by_git_diff
|
|
13
|
+
from azdev.utilities import display, require_azure_cli, heading, get_path_table, filter_by_git_diff, \
|
|
14
|
+
calc_selected_mod_names
|
|
14
15
|
from .custom import DiffExportFormat, get_commands_meta, STORED_DEPRECATION_KEY
|
|
15
16
|
from .util import export_commands_meta, dump_command_tree, add_to_command_tree
|
|
16
17
|
from ..statistics import _create_invoker_and_load_cmds, _get_command_source, \
|
|
@@ -144,26 +145,7 @@ def cmp_command_meta(base_meta_file, diff_meta_file, only_break=False, output_ty
|
|
|
144
145
|
def export_command_tree(modules, output_file=None):
|
|
145
146
|
require_azure_cli()
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
cli_only = modules == ['CLI']
|
|
149
|
-
ext_only = modules == ['EXT']
|
|
150
|
-
if cli_only or ext_only:
|
|
151
|
-
modules = None
|
|
152
|
-
|
|
153
|
-
selected_modules = get_path_table(include_only=modules)
|
|
154
|
-
|
|
155
|
-
if cli_only:
|
|
156
|
-
selected_modules['ext'] = {}
|
|
157
|
-
if ext_only:
|
|
158
|
-
selected_modules['core'] = {}
|
|
159
|
-
selected_modules['mod'] = {}
|
|
160
|
-
|
|
161
|
-
if not any(selected_modules.values()):
|
|
162
|
-
logger.warning('No commands selected to check.')
|
|
163
|
-
|
|
164
|
-
selected_mod_names = list(selected_modules['mod'].keys())
|
|
165
|
-
selected_mod_names += list(selected_modules['ext'].keys())
|
|
166
|
-
selected_mod_names += list(selected_modules['core'].keys())
|
|
148
|
+
selected_mod_names = calc_selected_mod_names(modules)
|
|
167
149
|
|
|
168
150
|
if selected_mod_names:
|
|
169
151
|
display('Modules selected: {}\n'.format(', '.join(selected_mod_names)))
|
|
@@ -75,19 +75,29 @@ def _get_files_from_directory(directory_path, recursive=None, include_pattern=No
|
|
|
75
75
|
return target_files
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
def _load_built_in_regex_patterns():
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
def _load_built_in_regex_patterns(confidence_level=None):
|
|
79
|
+
if not confidence_level:
|
|
80
|
+
confidence_level = 'HIGH'
|
|
81
|
+
patterns = set()
|
|
82
|
+
if confidence_level in ['HIGH', 'MEDIUM', 'LOW']:
|
|
83
|
+
patterns.update(load_regex_patterns_from_json_file('HighConfidenceSecurityModels.json'))
|
|
84
|
+
if confidence_level in ['MEDIUM', 'LOW']:
|
|
85
|
+
patterns.update(load_regex_patterns_from_json_file('MediumConfidenceSecurityModels.json'))
|
|
86
|
+
if confidence_level == 'LOW':
|
|
87
|
+
patterns.update(load_regex_patterns_from_json_file('LowConfidenceSecurityModels.json'))
|
|
88
|
+
return patterns
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _load_regex_patterns(confidence_level=None, custom_pattern=None):
|
|
92
|
+
built_in_regex_patterns = _load_built_in_regex_patterns(confidence_level)
|
|
84
93
|
|
|
85
94
|
if not custom_pattern:
|
|
86
95
|
return built_in_regex_patterns
|
|
87
96
|
|
|
88
97
|
try:
|
|
89
98
|
if os.path.isfile(custom_pattern):
|
|
90
|
-
custom_pattern =
|
|
99
|
+
with open(custom_pattern, 'r', encoding='utf8') as f:
|
|
100
|
+
custom_pattern = json.load(f)
|
|
91
101
|
else:
|
|
92
102
|
custom_pattern = json.loads(custom_pattern)
|
|
93
103
|
except JSONDecodeError as err:
|
|
@@ -115,11 +125,11 @@ def _load_regex_patterns(custom_pattern=None):
|
|
|
115
125
|
return regex_patterns
|
|
116
126
|
|
|
117
127
|
|
|
118
|
-
def _scan_secrets_for_string(data, custom_pattern=None):
|
|
128
|
+
def _scan_secrets_for_string(data, confidence_level=None, custom_pattern=None):
|
|
119
129
|
if not data:
|
|
120
130
|
return None
|
|
121
131
|
|
|
122
|
-
regex_patterns = _load_regex_patterns(custom_pattern)
|
|
132
|
+
regex_patterns = _load_regex_patterns(confidence_level, custom_pattern)
|
|
123
133
|
secret_masker = SecretMasker(regex_patterns)
|
|
124
134
|
detected_secrets = secret_masker.detect_secrets(data)
|
|
125
135
|
secrets = []
|
|
@@ -135,7 +145,8 @@ def _scan_secrets_for_string(data, custom_pattern=None):
|
|
|
135
145
|
|
|
136
146
|
def scan_secrets(file_path=None, directory_path=None, recursive=False,
|
|
137
147
|
include_pattern=None, exclude_pattern=None, data=None,
|
|
138
|
-
save_scan_result=None, scan_result_path=None,
|
|
148
|
+
save_scan_result=None, scan_result_path=None,
|
|
149
|
+
confidence_level=None, custom_pattern=None):
|
|
139
150
|
_validate_data_path(file_path=file_path, directory_path=directory_path,
|
|
140
151
|
include_pattern=include_pattern, exclude_pattern=exclude_pattern, data=data)
|
|
141
152
|
target_files = []
|
|
@@ -149,7 +160,7 @@ def scan_secrets(file_path=None, directory_path=None, recursive=False,
|
|
|
149
160
|
target_files.append(file_path)
|
|
150
161
|
|
|
151
162
|
if data:
|
|
152
|
-
secrets = _scan_secrets_for_string(data, custom_pattern)
|
|
163
|
+
secrets = _scan_secrets_for_string(data, confidence_level, custom_pattern)
|
|
153
164
|
if secrets:
|
|
154
165
|
scan_results['raw_data'] = secrets
|
|
155
166
|
elif target_files:
|
|
@@ -159,7 +170,7 @@ def scan_secrets(file_path=None, directory_path=None, recursive=False,
|
|
|
159
170
|
data = f.read()
|
|
160
171
|
if not data:
|
|
161
172
|
continue
|
|
162
|
-
secrets = _scan_secrets_for_string(data, custom_pattern)
|
|
173
|
+
secrets = _scan_secrets_for_string(data, confidence_level, custom_pattern)
|
|
163
174
|
logger.debug('%d secrets found for %s', len(secrets), target_file)
|
|
164
175
|
if secrets:
|
|
165
176
|
scan_results[target_file] = secrets
|
|
@@ -232,7 +243,8 @@ def _mask_secret_for_string(data, secret, redaction_type=None):
|
|
|
232
243
|
|
|
233
244
|
def mask_secrets(file_path=None, directory_path=None, recursive=False,
|
|
234
245
|
include_pattern=None, exclude_pattern=None, data=None,
|
|
235
|
-
save_scan_result=None, scan_result_path=None,
|
|
246
|
+
save_scan_result=None, scan_result_path=None,
|
|
247
|
+
confidence_level=None, custom_pattern=None,
|
|
236
248
|
saved_scan_result_path=None, redaction_type='FIXED_VALUE', yes=None):
|
|
237
249
|
scan_results = {}
|
|
238
250
|
if saved_scan_result_path:
|
|
@@ -247,7 +259,7 @@ def mask_secrets(file_path=None, directory_path=None, recursive=False,
|
|
|
247
259
|
scan_response = scan_secrets(file_path=file_path, directory_path=directory_path, recursive=recursive,
|
|
248
260
|
include_pattern=include_pattern, exclude_pattern=exclude_pattern, data=data,
|
|
249
261
|
save_scan_result=save_scan_result, scan_result_path=scan_result_path,
|
|
250
|
-
custom_pattern=custom_pattern)
|
|
262
|
+
confidence_level=confidence_level, custom_pattern=custom_pattern)
|
|
251
263
|
if save_scan_result and scan_response['scan_result_path']:
|
|
252
264
|
with open(scan_response['scan_result_path'], encoding='utf8') as f:
|
|
253
265
|
scan_results = json.load(f)
|
|
@@ -194,7 +194,7 @@ def _get_command_source(command_name, command):
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
|
|
197
|
-
def _create_invoker_and_load_cmds(cli_ctx):
|
|
197
|
+
def _create_invoker_and_load_cmds(cli_ctx, load_arguments=False):
|
|
198
198
|
from knack.events import (
|
|
199
199
|
EVENT_INVOKER_PRE_CMD_TBL_CREATE, EVENT_INVOKER_POST_CMD_TBL_CREATE)
|
|
200
200
|
from azure.cli.core.commands import register_cache_arguments
|
|
@@ -215,9 +215,11 @@ def _create_invoker_and_load_cmds(cli_ctx):
|
|
|
215
215
|
invoker.commands_loader.load_command_table(None)
|
|
216
216
|
invoker.commands_loader.command_name = ''
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
if load_arguments:
|
|
219
|
+
from azure.cli.core.commands.events import EVENT_INVOKER_PRE_LOAD_ARGUMENTS, EVENT_INVOKER_POST_LOAD_ARGUMENTS
|
|
220
|
+
cli_ctx.raise_event(EVENT_INVOKER_PRE_LOAD_ARGUMENTS, commands_loader=invoker.commands_loader)
|
|
221
|
+
invoker.commands_loader.load_arguments()
|
|
222
|
+
cli_ctx.raise_event(EVENT_INVOKER_POST_LOAD_ARGUMENTS, commands_loader=invoker.commands_loader)
|
|
221
223
|
|
|
222
224
|
cli_ctx.raise_event(EVENT_INVOKER_POST_CMD_TBL_CREATE, commands_loader=invoker.commands_loader)
|
|
223
225
|
invoker.parser.cli_ctx = cli_ctx
|
|
@@ -125,6 +125,10 @@ def load_arguments(self, _):
|
|
|
125
125
|
'If specified, --save-scan-result will be True anyway. '
|
|
126
126
|
'If not speficied but set --save-scan-result to True, '
|
|
127
127
|
'the file will be saved as `scan_result_YYYYmmddHHMMSS.json` in your `.azdev` directory ')
|
|
128
|
+
c.argument('confidence_level', choices=['HIGH', 'MEDIUM', 'LOW'], default='HIGH',
|
|
129
|
+
help='Which confidence level can you accept for built-in scanning patterns. If you choose HIGH, '
|
|
130
|
+
'we will only scan with high confidence level patterns. If you choose MEDIUM, '
|
|
131
|
+
'we will use patterns of medium confidence level or above, which is medium and high level.')
|
|
128
132
|
c.argument('custom_pattern',
|
|
129
133
|
help='Additional patterns you want to apply or built-in patterns you want to exclude '
|
|
130
134
|
'for scanning. Can be json string or path to the json file.')
|
|
@@ -252,3 +256,17 @@ def load_arguments(self, _):
|
|
|
252
256
|
'If the base directory does not exist, it will be created')
|
|
253
257
|
c.argument('output_type', choices=['xml', 'html', 'text', 'man', 'latex'], default="xml",
|
|
254
258
|
help='Output type of the generated docs.')
|
|
259
|
+
|
|
260
|
+
with ArgumentsContext(self, 'generate-breaking-change-report') as c:
|
|
261
|
+
c.positional('modules', modules_type)
|
|
262
|
+
c.argument('target_version', default='NextWindow',
|
|
263
|
+
help='Only the breaking changes scheduled prior to the specified version will be displayed. '
|
|
264
|
+
'The value could be `NextWindow`, `None` or a specified version like `3.0.0`')
|
|
265
|
+
c.argument('source', choices=['deprecate_info', 'pre_announce'], default='pre_announce',
|
|
266
|
+
help='The source of pre-announced breaking changes. `deprecate_info` represents all breaking changes '
|
|
267
|
+
'marked through `deprecation_info`; `pre_announce` represents the breaking changes announced in '
|
|
268
|
+
'`breaking_change.py` file.')
|
|
269
|
+
c.argument('group_by_version', action='store_true',
|
|
270
|
+
help='If specified, breaking changes would be grouped by their target version as well.')
|
|
271
|
+
c.argument('output_format', choices=['structure', 'markdown'], default='structure',
|
|
272
|
+
help='Output format of the collected breaking changes.')
|
|
@@ -47,7 +47,8 @@ from .path import (
|
|
|
47
47
|
get_cli_repo_path,
|
|
48
48
|
get_ext_repo_paths,
|
|
49
49
|
get_path_table,
|
|
50
|
-
get_name_index
|
|
50
|
+
get_name_index,
|
|
51
|
+
calc_selected_mod_names
|
|
51
52
|
)
|
|
52
53
|
from .testing import test_cmd
|
|
53
54
|
from .tools import (
|
|
@@ -93,4 +94,5 @@ __all__ = [
|
|
|
93
94
|
'require_virtual_env',
|
|
94
95
|
'require_azure_cli',
|
|
95
96
|
'diff_branches_detail',
|
|
97
|
+
'calc_selected_mod_names',
|
|
96
98
|
]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
4
|
# license information.
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
|
-
|
|
6
|
+
import logging
|
|
7
7
|
import os
|
|
8
8
|
from glob import glob
|
|
9
9
|
|
|
@@ -11,6 +11,8 @@ from knack.util import CLIError
|
|
|
11
11
|
|
|
12
12
|
from .const import COMMAND_MODULE_PREFIX, EXTENSION_PREFIX, ENV_VAR_VIRTUAL_ENV
|
|
13
13
|
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
14
16
|
|
|
15
17
|
def extract_module_name(path):
|
|
16
18
|
|
|
@@ -261,3 +263,27 @@ def get_path_table(include_only=None, include_whl_extensions=False):
|
|
|
261
263
|
raise CLIError('unrecognized modules: [ {} ]'.format(', '.join(include_only)))
|
|
262
264
|
|
|
263
265
|
return table
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def calc_selected_mod_names(modules=None):
|
|
269
|
+
# allow user to run only on CLI or extensions
|
|
270
|
+
cli_only = modules == ['CLI']
|
|
271
|
+
ext_only = modules == ['EXT']
|
|
272
|
+
if cli_only or ext_only:
|
|
273
|
+
modules = None
|
|
274
|
+
|
|
275
|
+
selected_modules = get_path_table(include_only=modules)
|
|
276
|
+
|
|
277
|
+
if cli_only:
|
|
278
|
+
selected_modules['ext'] = {}
|
|
279
|
+
if ext_only:
|
|
280
|
+
selected_modules['core'] = {}
|
|
281
|
+
selected_modules['mod'] = {}
|
|
282
|
+
|
|
283
|
+
if not any(selected_modules.values()):
|
|
284
|
+
logger.warning('No commands selected to check.')
|
|
285
|
+
|
|
286
|
+
selected_mod_names = list(selected_modules['mod'].keys())
|
|
287
|
+
selected_mod_names += list(selected_modules['ext'].keys())
|
|
288
|
+
selected_mod_names += list(selected_modules['core'].keys())
|
|
289
|
+
return selected_mod_names
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.82
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -40,7 +40,7 @@ Requires-Dist: azure-cli-diff-tool~=0.0.6
|
|
|
40
40
|
Requires-Dist: packaging
|
|
41
41
|
Requires-Dist: tqdm
|
|
42
42
|
Requires-Dist: wheel==0.30.0
|
|
43
|
-
Requires-Dist: microsoft-security-utilities-secret-masker
|
|
43
|
+
Requires-Dist: microsoft-security-utilities-secret-masker~=1.0.0b2
|
|
44
44
|
|
|
45
45
|
Microsoft Azure CLI Dev Tools (azdev)
|
|
46
46
|
=====================================
|
|
@@ -148,6 +148,14 @@ License
|
|
|
148
148
|
|
|
149
149
|
Release History
|
|
150
150
|
===============
|
|
151
|
+
0.1.82
|
|
152
|
+
++++++
|
|
153
|
+
* `azdev generate-breaking-change-report`: New command to collect upcoming breaking changes from codebase.
|
|
154
|
+
|
|
155
|
+
0.1.81
|
|
156
|
+
++++++
|
|
157
|
+
* `azdev scan/mask`: Add `--confidence-level` to support secret pattern levels
|
|
158
|
+
|
|
151
159
|
0.1.80
|
|
152
160
|
++++++
|
|
153
161
|
* `azdev cmdcov`: Support both extension short name and long name
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|