-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security] Introducing securitySolutionsReferenceData CLI #23336
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
88d6671
solutions_reference_data
ariklin 84f5f31
Introducing securitySolutionsReferenceData CLI
ariklin 8bd4902
Merge branch 'dev' into securitySolutionsReferenceData
ariklin bc8938f
Add recording
ariklin 9227cdd
Merge branch 'securitySolutionsReferenceData' of https://github.com/a…
ariklin a8b5e0a
fix style check
ariklin a89c71b
Update help
ariklin fb72482
update test module
ariklin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletions
114
...odules/security/tests/latest/recordings/test_security_securitySolutionsReferenceData.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
CommandName: | ||
- security security_solutions_reference_data list | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python/3.7.8rc1 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.3 | ||
azure-mgmt-security/0.6.0 Azure-SDK-For-Python AZURECLI/2.20.0 | ||
accept-language: | ||
- en-US | ||
method: GET | ||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/securitySolutionsReferenceData?api-version=2020-01-01 | ||
response: | ||
body: | ||
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/locations/centralus/securitySolutionsReferenceData/rapid7.insightplatform","name":"rapid7.insightplatform","type":"Microsoft.Security/locations/securitySolutionsReferenceData","properties":{"alertVendorName":"Rapid7","securityFamily":"Va","packageInfoUrl":"www.azure.com","productName":"Vulnerability | ||
Assessment","provisionType":"SemiIntegrated","publisher":"rapid7","publisherDisplayName":"Rapid7 | ||
Inc.","template":"rapid7/insightplatform"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/locations/centralus/securitySolutionsReferenceData/qualys.qualysAgent","name":"qualys.qualysAgent","type":"Microsoft.Security/locations/securitySolutionsReferenceData","properties":{"alertVendorName":"Qualys | ||
VA","securityFamily":"Va","packageInfoUrl":"http://www.qualys.com/","productName":"Vulnerability | ||
Assessment","provisionType":"SemiIntegrated","publisher":"qualys","publisherDisplayName":"Qualys, | ||
Inc.","template":"qualys/qualysAgent","templateAdministrationExpression":"http://www.qualys.com/"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/locations/centralus/securitySolutionsReferenceData/microsoft.ApplicationGateway-ARM","name":"microsoft.ApplicationGateway-ARM","type":"Microsoft.Security/locations/securitySolutionsReferenceData","properties":{"alertVendorName":"Microsoft","securityFamily":"SaasWaf","packageInfoUrl":"www.azure.com","productName":"Web | ||
Application Firewall","provisionType":"SemiIntegrated","publisher":"microsoft","publisherDisplayName":"Microsoft | ||
Inc.","template":"microsoft/ApplicationGateway-ARM","templateAdministrationExpression":"https://portal.azure.com#resource/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/applicationGateways/{name}/overview"}}]}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-length: | ||
- '1903' | ||
content-type: | ||
- application/json; charset=utf-8 | ||
date: | ||
- Tue, 26 Jul 2022 14:35:43 GMT | ||
expires: | ||
- '-1' | ||
pragma: | ||
- no-cache | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains | ||
vary: | ||
- Accept-Encoding | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-original-request-ids: | ||
- '' | ||
- '' | ||
- '' | ||
x-ms-ratelimit-remaining-subscription-resource-requests: | ||
- '749' | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
CommandName: | ||
- security security_solutions_reference_data list | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python/3.7.8rc1 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.3 | ||
azure-mgmt-security/0.6.0 Azure-SDK-For-Python AZURECLI/2.20.0 | ||
accept-language: | ||
- en-US | ||
method: GET | ||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/securitySolutionsReferenceData?api-version=2020-01-01 | ||
response: | ||
body: | ||
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/locations/centralus/securitySolutionsReferenceData/rapid7.insightplatform","name":"rapid7.insightplatform","type":"Microsoft.Security/locations/securitySolutionsReferenceData","properties":{"alertVendorName":"Rapid7","securityFamily":"Va","packageInfoUrl":"www.azure.com","productName":"Vulnerability | ||
Assessment","provisionType":"SemiIntegrated","publisher":"rapid7","publisherDisplayName":"Rapid7 | ||
Inc.","template":"rapid7/insightplatform"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/locations/centralus/securitySolutionsReferenceData/qualys.qualysAgent","name":"qualys.qualysAgent","type":"Microsoft.Security/locations/securitySolutionsReferenceData","properties":{"alertVendorName":"Qualys | ||
VA","securityFamily":"Va","packageInfoUrl":"http://www.qualys.com/","productName":"Vulnerability | ||
Assessment","provisionType":"SemiIntegrated","publisher":"qualys","publisherDisplayName":"Qualys, | ||
Inc.","template":"qualys/qualysAgent","templateAdministrationExpression":"http://www.qualys.com/"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/locations/centralus/securitySolutionsReferenceData/microsoft.ApplicationGateway-ARM","name":"microsoft.ApplicationGateway-ARM","type":"Microsoft.Security/locations/securitySolutionsReferenceData","properties":{"alertVendorName":"Microsoft","securityFamily":"SaasWaf","packageInfoUrl":"www.azure.com","productName":"Web | ||
Application Firewall","provisionType":"SemiIntegrated","publisher":"microsoft","publisherDisplayName":"Microsoft | ||
Inc.","template":"microsoft/ApplicationGateway-ARM","templateAdministrationExpression":"https://portal.azure.com#resource/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/applicationGateways/{name}/overview"}}]}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-length: | ||
- '1903' | ||
content-type: | ||
- application/json; charset=utf-8 | ||
date: | ||
- Tue, 26 Jul 2022 14:35:44 GMT | ||
expires: | ||
- '-1' | ||
pragma: | ||
- no-cache | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains | ||
vary: | ||
- Accept-Encoding | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-original-request-ids: | ||
- '' | ||
- '' | ||
- '' | ||
x-ms-ratelimit-remaining-subscription-resource-requests: | ||
- '749' | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
18 changes: 18 additions & 0 deletions
18
...li/azure/cli/command_modules/security/tests/latest/test_securitySolutionsReferenceData.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from azure.cli.testsdk import ScenarioTest | ||
from azure.cli.testsdk.scenario_tests import AllowLargeResponse | ||
|
||
|
||
class securitySolutionsReferenceDataTests(ScenarioTest): | ||
|
||
def test_security_securitySolutionsReferenceData(self): | ||
|
||
SolutionsReferenceData = self.cmd('az security security_solutions_reference_data list').get_output_in_json() | ||
|
||
assert len(SolutionsReferenceData) >= 0 | ||
|
||
self.cmd('az security security_solutions_reference_data list') |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use '_' to separate command name