azdev 0.1.79__tar.gz → 0.1.81__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.79 → azdev-0.1.81}/HISTORY.rst +10 -0
- {azdev-0.1.79/azdev.egg-info → azdev-0.1.81}/PKG-INFO +12 -2
- {azdev-0.1.79 → azdev-0.1.81}/azdev/__init__.py +1 -1
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/cmdcov.py +7 -3
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/component.js +26 -23
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/secret.py +26 -14
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/testtool/pytest_runner.py +2 -1
- {azdev-0.1.79 → azdev-0.1.81}/azdev/params.py +4 -0
- {azdev-0.1.79 → azdev-0.1.81/azdev.egg-info}/PKG-INFO +12 -2
- {azdev-0.1.79 → azdev-0.1.81}/azdev.egg-info/requires.txt +1 -1
- {azdev-0.1.79 → azdev-0.1.81}/setup.py +1 -1
- {azdev-0.1.79 → azdev-0.1.81}/LICENSE +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/MANIFEST.in +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/README.md +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/README.rst +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/__main__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/commands.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/completer.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/config/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/config/cli.flake8 +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/config/cli_pylintrc +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/config/ext.flake8 +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/config/ext_pylintrc +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/help.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/HISTORY.rst +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/README.rst +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/_client_factory.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/_help.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/_params.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/_validators.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/azext_metadata.json +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/blank__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/commands.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/custom.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/module__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/pkg_declare__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/setup.cfg +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/setup.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/mod_templates/test_service_scenario.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/_macros.j2 +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/component.css +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/favicon.ico +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/index.j2 +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/index2.j2 +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/cmdcov/module.j2 +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/code_gen.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/command_change/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/command_change/custom.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/command_change/util.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/constant.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/extensions/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/extensions/util.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/extensions/version_upgrade.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/help/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/help/refdoc/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/help/refdoc/conf.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/legal.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/linter.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/pylint_checkers/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/pylint_checkers/show_command.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rule_decorators.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rules/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rules/ci_exclusions.yml +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rules/command_coverage_rules.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rules/command_group_rules.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rules/command_rules.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rules/help_rules.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rules/linter_exclusions.yml +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/rules/parameter_rules.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/linter/util.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/performance.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/pypi.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/python_sdk.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/regex.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/resource.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/setup.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/statistics/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/statistics/util.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/style.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/testtool/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/testtool/incremental_strategy.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/operations/testtool/profile_context.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/transformers.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/__init__.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/command.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/config.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/const.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/display.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/git_util.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/path.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/pypi.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/testing.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev/utilities/tools.py +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev.egg-info/SOURCES.txt +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev.egg-info/dependency_links.txt +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev.egg-info/entry_points.txt +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/azdev.egg-info/top_level.txt +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/pyproject.toml +0 -0
- {azdev-0.1.79 → azdev-0.1.81}/setup.cfg +0 -0
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Release History
|
|
4
4
|
===============
|
|
5
|
+
0.1.81
|
|
6
|
+
++++++
|
|
7
|
+
* `azdev scan/mask`: Add `--confidence-level` to support secret pattern levels
|
|
8
|
+
|
|
9
|
+
0.1.80
|
|
10
|
+
++++++
|
|
11
|
+
* `azdev cmdcov`: Support both extension short name and long name
|
|
12
|
+
* `azdev cmdcov`: Fix sorting issues
|
|
13
|
+
* `azdev test`: Fix executable inconsistence in `subprocess` of windows platform
|
|
14
|
+
|
|
5
15
|
0.1.79
|
|
6
16
|
++++++
|
|
7
17
|
* Fix profile options
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.81
|
|
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,16 @@ License
|
|
|
148
148
|
|
|
149
149
|
Release History
|
|
150
150
|
===============
|
|
151
|
+
0.1.81
|
|
152
|
+
++++++
|
|
153
|
+
* `azdev scan/mask`: Add `--confidence-level` to support secret pattern levels
|
|
154
|
+
|
|
155
|
+
0.1.80
|
|
156
|
+
++++++
|
|
157
|
+
* `azdev cmdcov`: Support both extension short name and long name
|
|
158
|
+
* `azdev cmdcov`: Fix sorting issues
|
|
159
|
+
* `azdev test`: Fix executable inconsistence in `subprocess` of windows platform
|
|
160
|
+
|
|
151
161
|
0.1.79
|
|
152
162
|
++++++
|
|
153
163
|
* Fix profile options
|
|
@@ -116,12 +116,16 @@ class CmdcovManager:
|
|
|
116
116
|
print("\033[31m" + "Get all commands".center(self.width, self.fillchar) + "\033[0m")
|
|
117
117
|
time.sleep(0.1)
|
|
118
118
|
for _, y in tqdm(self.loaded_help.items()):
|
|
119
|
+
module = None
|
|
119
120
|
if hasattr(y, 'command_source') and y.command_source in self.selected_mod_names:
|
|
120
121
|
module = y.command_source
|
|
121
122
|
elif hasattr(y, 'command_source') and hasattr(y.command_source, 'extension_name'):
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
ext_name = y.command_source.extension_name
|
|
124
|
+
full_ext_name = 'azext_' + ext_name.replace('-', '_')
|
|
125
|
+
if ext_name in self.selected_mod_names:
|
|
126
|
+
module = ext_name
|
|
127
|
+
elif full_ext_name in self.selected_mod_names:
|
|
128
|
+
module = full_ext_name
|
|
125
129
|
else:
|
|
126
130
|
continue
|
|
127
131
|
if (not y.deprecate_info) and module:
|
|
@@ -31,19 +31,19 @@ function sortStrDesc(a, b)
|
|
|
31
31
|
}
|
|
32
32
|
function sortTextAS(a, b)
|
|
33
33
|
{
|
|
34
|
-
if (a==='Not applicable'){
|
|
35
|
-
a = -1
|
|
36
|
-
} else if (a===''){
|
|
37
|
-
a = 100
|
|
34
|
+
if (a === 'Not applicable' || a === 'N/A') {
|
|
35
|
+
a = -1;
|
|
36
|
+
} else if (a === '') {
|
|
37
|
+
a = 100;
|
|
38
38
|
} else {
|
|
39
|
-
a = parseFloat(a.substr(0,a.length-1))
|
|
39
|
+
a = parseFloat(a.substr(0, a.length - 1));
|
|
40
40
|
}
|
|
41
|
-
if (b==='N/A'){
|
|
42
|
-
b = -1
|
|
43
|
-
} else if (b===''){
|
|
44
|
-
b = 100
|
|
41
|
+
if (b === 'Not applicable' || b === 'N/A') {
|
|
42
|
+
b = -1;
|
|
43
|
+
} else if (b === '') {
|
|
44
|
+
b = 100;
|
|
45
45
|
} else {
|
|
46
|
-
b = parseFloat(b.substr(0,b.length-1))
|
|
46
|
+
b = parseFloat(b.substr(0, b.length - 1));
|
|
47
47
|
}
|
|
48
48
|
if (a < b) {
|
|
49
49
|
return -1;
|
|
@@ -51,22 +51,23 @@ function sortTextAS(a, b)
|
|
|
51
51
|
if (a > b) {
|
|
52
52
|
return 1;
|
|
53
53
|
}
|
|
54
|
+
return 0; // In case a and b are equal
|
|
54
55
|
}
|
|
55
56
|
function sortTextDesc(a, b)
|
|
56
57
|
{
|
|
57
|
-
if (a==='N/A'){
|
|
58
|
-
a = -1
|
|
59
|
-
} else if (a===''){
|
|
60
|
-
a = 100
|
|
61
|
-
}
|
|
62
|
-
a = parseFloat(a.substr(0,a.length-1))
|
|
63
|
-
}
|
|
64
|
-
if (b==='N/A'){
|
|
65
|
-
b = -1
|
|
66
|
-
} else if (b===''){
|
|
67
|
-
b = 100
|
|
68
|
-
}
|
|
69
|
-
b = parseFloat(b.substr(0,b.length-1))
|
|
58
|
+
if (a === 'Not applicable' || a === 'N/A') {
|
|
59
|
+
a = -1;
|
|
60
|
+
} else if (a === '') {
|
|
61
|
+
a = 100;
|
|
62
|
+
} else {
|
|
63
|
+
a = parseFloat(a.substr(0, a.length - 1));
|
|
64
|
+
}
|
|
65
|
+
if (b === 'Not applicable' || b === 'N/A') {
|
|
66
|
+
b = -1;
|
|
67
|
+
} else if (b === '') {
|
|
68
|
+
b = 100;
|
|
69
|
+
} else {
|
|
70
|
+
b = parseFloat(b.substr(0, b.length - 1));
|
|
70
71
|
}
|
|
71
72
|
if (a < b) {
|
|
72
73
|
return 1;
|
|
@@ -74,8 +75,10 @@ function sortTextDesc(a, b)
|
|
|
74
75
|
if (a > b) {
|
|
75
76
|
return -1;
|
|
76
77
|
}
|
|
78
|
+
return 0; // In case a and b are equal
|
|
77
79
|
}
|
|
78
80
|
|
|
81
|
+
|
|
79
82
|
function SortTable(obj){
|
|
80
83
|
var column=obj.id
|
|
81
84
|
var tdModule=document.getElementsByName("td-module");
|
|
@@ -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)
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
|
|
7
7
|
import os
|
|
8
|
+
import sys
|
|
8
9
|
|
|
9
10
|
from knack.log import get_logger
|
|
10
11
|
|
|
@@ -35,7 +36,7 @@ def get_test_runner(parallel, log_path, last_failed, no_exit_first, mark):
|
|
|
35
36
|
arguments.append('--lf')
|
|
36
37
|
if pytest_args:
|
|
37
38
|
arguments += pytest_args
|
|
38
|
-
cmd = '
|
|
39
|
+
cmd = sys.executable + ' -m pytest {}'.format(' '.join(arguments))
|
|
39
40
|
logger.info('Running: %s', cmd)
|
|
40
41
|
return call(cmd)
|
|
41
42
|
|
|
@@ -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.')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.81
|
|
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,16 @@ License
|
|
|
148
148
|
|
|
149
149
|
Release History
|
|
150
150
|
===============
|
|
151
|
+
0.1.81
|
|
152
|
+
++++++
|
|
153
|
+
* `azdev scan/mask`: Add `--confidence-level` to support secret pattern levels
|
|
154
|
+
|
|
155
|
+
0.1.80
|
|
156
|
+
++++++
|
|
157
|
+
* `azdev cmdcov`: Support both extension short name and long name
|
|
158
|
+
* `azdev cmdcov`: Fix sorting issues
|
|
159
|
+
* `azdev test`: Fix executable inconsistence in `subprocess` of windows platform
|
|
160
|
+
|
|
151
161
|
0.1.79
|
|
152
162
|
++++++
|
|
153
163
|
* Fix profile options
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|