diff --git a/src/firmwareanalysis/HISTORY.rst b/src/firmwareanalysis/HISTORY.rst new file mode 100644 index 00000000000..8d148b37488 --- /dev/null +++ b/src/firmwareanalysis/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +1.0.0 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/firmwareanalysis/README.md b/src/firmwareanalysis/README.md new file mode 100644 index 00000000000..c35b4d7ced3 --- /dev/null +++ b/src/firmwareanalysis/README.md @@ -0,0 +1,147 @@ +# Azure CLI Firmwareanalysis Extension # +This is an extension to Azure CLI to manage Firmwareanalysis resources. + +## How to use ## +Install this extension using the below CLI command +``` +az extension add --name firmwareanalysis +``` + +### Included Features +##### Create a workspace. +``` +az firmwareanalysis workspace create \ + --resource-group my-rg \ + --name my-workspace \ + --location westus \ + --tags {key:value} +``` + +##### Show a workspace. +``` +az firmwareanalysis workspace show \ + --resource-group my-rg \ + --workspace-name my-workspace +``` + +##### List all workspaces. +``` +az firmwareanalysis workspace list \ + --resource-group my-rg +``` + +##### Delete a workspace. +``` +az firmwareanalysis workspace delete \ + --resource-group my-rg \ + --workspace-name my-workspace +``` + +##### Generate an url for file upload. +``` +az firmwareanalysis workspace generate-upload-url \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### Create a firmware. +``` +az firmwareanalysis firmware create \ + --resource-group my-rg \ + --name my-workspace \ + --file-name file-name \ + --file-size file-size \ + --vendor vendor \ + --version version \ + --description description \ + --model model +``` + +##### Show a firmware. +``` +az firmwareanalysis firmware show \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### List all firmwares. +``` +az firmwareanalysis firmware list \ + --resource-group my-rg \ + --workspace-name my-workspace +``` + +##### Delete a firmware. +``` +az firmwareanalysis firmware delete \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### List cryptographic certificate analysis results found in a firmware. +``` +az firmwareanalysis firmware crypto-certificate \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### List cryptographic key analysis results found in a firmware. +``` +az firmwareanalysis firmware crypto-key \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### List cve analysis results found in a firmware. +``` +az firmwareanalysis firmware cve \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### List password hash analysis results found in a firmware. +``` +az firmwareanalysis firmware password-hash \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### List binaryhardening analysis results found in a firmware. +``` +az firmwareanalysis firmware binary-hardening \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### List sbom component analysis results found in a firmware. +``` +az firmwareanalysis firmware sbom-component \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### Get a url for tar file download. +``` +az firmwareanalysis firmware generate-filesystem-download-url \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id +``` + +##### Get an analysis result summary of a firmware by name. +``` +az firmwareanalysis firmware summary \ + --resource-group my-rg \ + --workspace-name my-workspace \ + --firmware-id firmware-id \ + --n type +``` \ No newline at end of file diff --git a/src/firmwareanalysis/azext_firmwareanalysis/__init__.py b/src/firmwareanalysis/azext_firmwareanalysis/__init__.py new file mode 100644 index 00000000000..bf81b8e32ca --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/__init__.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_firmwareanalysis._help import helps # pylint: disable=unused-import + + +class FirmwareanalysisCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + custom_command_type = CliCommandType( + operations_tmpl='azext_firmwareanalysis.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) + + def load_command_table(self, args): + from azext_firmwareanalysis.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_firmwareanalysis._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = FirmwareanalysisCommandsLoader diff --git a/src/firmwareanalysis/azext_firmwareanalysis/_help.py b/src/firmwareanalysis/azext_firmwareanalysis/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/_help.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/firmwareanalysis/azext_firmwareanalysis/_params.py b/src/firmwareanalysis/azext_firmwareanalysis/_params.py new file mode 100644 index 00000000000..cfcec717c9c --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/_params.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/__init__.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/__init__.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/__init__.py new file mode 100644 index 00000000000..f6acc11aa4e --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/__init__.py @@ -0,0 +1,10 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/__cmd_group.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/__cmd_group.py new file mode 100644 index 00000000000..7955719eab2 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "firmwareanalysis", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage firmware analysis. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/__init__.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/__cmd_group.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/__cmd_group.py new file mode 100644 index 00000000000..19ae0ed9619 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "firmwareanalysis firmware", +) +class __CMDGroup(AAZCommandGroup): + """Commands to perform operation on a particular firmware. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/__init__.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/__init__.py new file mode 100644 index 00000000000..51c5cb55b10 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/__init__.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._binary_hardening import * +from ._create import * +from ._crypto_certificate import * +from ._crypto_key import * +from ._cve import * +from ._delete import * +from ._generate_filesystem_download_url import * +from ._list import * +from ._password_hash import * +from ._sbom_component import * +from ._show import * +from ._summary import * diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_binary_hardening.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_binary_hardening.py new file mode 100644 index 00000000000..5f8cc7a5f79 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_binary_hardening.py @@ -0,0 +1,256 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware binary-hardening", +) +class BinaryHardening(AAZCommand): + """List binary hardening analysis results of a firmware. + + :example: List binary hardening analysis results of a firmware. + az firmwareanalysis firmware binary-hardening --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/binaryhardeningresults", "2024-01-10"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + help="The id of the firmware.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.BinaryHardeningListByFirmware(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class BinaryHardeningListByFirmware(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/binaryHardeningResults", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.architecture = AAZStrType( + nullable=True, + ) + properties.binary_hardening_id = AAZStrType( + serialized_name="binaryHardeningId", + nullable=True, + ) + properties["class"] = AAZStrType( + nullable=True, + ) + properties.features = AAZObjectType( + flags={"client_flatten": True}, + ) + properties.file_path = AAZStrType( + serialized_name="filePath", + nullable=True, + ) + properties.rpath = AAZStrType( + nullable=True, + ) + properties.runpath = AAZStrType( + nullable=True, + ) + + features = cls._schema_on_200.value.Element.properties.features + features.canary = AAZBoolType() + features.nx = AAZBoolType() + features.pie = AAZBoolType() + features.relro = AAZBoolType() + features.stripped = AAZBoolType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _BinaryHardeningHelper: + """Helper class for BinaryHardening""" + + +__all__ = ["BinaryHardening"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_create.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_create.py new file mode 100644 index 00000000000..1c743222cf8 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_create.py @@ -0,0 +1,337 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * +import uuid + + +@register_command( + "firmwareanalysis firmware create", +) +class Create(AAZCommand): + """Create a new firmware. + + :example: Create a new firmware. + az firmwareanalysis firmware create --resource-group {resourceGroupName} --workspace-name {workspaceName} --description {description} --file-name {fileName} --file-size {fileSize} --vendor {vendorName} --model {model} --version {version} --status {status} --status-messages ['hi','message'] + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["-n", "--name", "--firmware-id"], + help="The id of the firmware.", + default=str(uuid.uuid4()), + required=False, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="User-specified description of the firmware.", + ) + _args_schema.file_name = AAZStrArg( + options=["--file-name"], + arg_group="Properties", + help="File name for a firmware that user uploaded.", + ) + _args_schema.file_size = AAZIntArg( + options=["--file-size"], + arg_group="Properties", + help="File size of the uploaded firmware image.", + nullable=True, + ) + _args_schema.model = AAZStrArg( + options=["--model"], + arg_group="Properties", + help="Firmware model.", + ) + _args_schema.status = AAZStrArg( + options=["--status"], + arg_group="Properties", + help="The status of firmware scan.", + default="Pending", + enum={"Analyzing": "Analyzing", "Error": "Error", "Extracting": "Extracting", "Pending": "Pending", "Ready": "Ready"}, + ) + _args_schema.status_messages = AAZListArg( + options=["--status-messages"], + arg_group="Properties", + help="A list of errors or other messages generated during firmware analysis", + ) + _args_schema.vendor = AAZStrArg( + options=["--vendor"], + arg_group="Properties", + help="Firmware vendor.", + ) + _args_schema.version = AAZStrArg( + options=["--version"], + arg_group="Properties", + help="Firmware version.", + ) + + status_messages = cls._args_schema.status_messages + status_messages.Element = AAZObjectArg() + + _element = cls._args_schema.status_messages.Element + _element.error_code = AAZIntArg( + options=["error-code"], + help="The error code", + ) + _element.message = AAZStrArg( + options=["message"], + help="The error or status message", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirmwaresCreate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirmwaresCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=False, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("fileName", AAZStrType, ".file_name") + properties.set_prop("fileSize", AAZIntType, ".file_size", typ_kwargs={"nullable": True}) + properties.set_prop("model", AAZStrType, ".model") + properties.set_prop("status", AAZStrType, ".status") + properties.set_prop("statusMessages", AAZListType, ".status_messages") + properties.set_prop("vendor", AAZStrType, ".vendor") + properties.set_prop("version", AAZStrType, ".version") + + status_messages = _builder.get(".properties.statusMessages") + if status_messages is not None: + status_messages.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.statusMessages[]") + if _elements is not None: + _elements.set_prop("errorCode", AAZIntType, ".error_code") + _elements.set_prop("message", AAZStrType, ".message") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.description = AAZStrType() + properties.file_name = AAZStrType( + serialized_name="fileName", + ) + properties.file_size = AAZIntType( + serialized_name="fileSize", + nullable=True, + ) + properties.model = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.status_messages = AAZListType( + serialized_name="statusMessages", + ) + properties.vendor = AAZStrType() + properties.version = AAZStrType() + + status_messages = cls._schema_on_200_201.properties.status_messages + status_messages.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.status_messages.Element + _element.error_code = AAZIntType( + serialized_name="errorCode", + ) + _element.message = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_crypto_certificate.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_crypto_certificate.py new file mode 100644 index 00000000000..89850da162e --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_crypto_certificate.py @@ -0,0 +1,348 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware crypto-certificate", +) +class CryptoCertificate(AAZCommand): + """List cryptographic certificate analysis results found in a firmware. + + :example: List cryptographic certificate analysis results found in a firmware. + az firmwareanalysis firmware crypto-certificate --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/cryptocertificates", "2024-01-10"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + help="The id of the firmware.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CryptoCertificatesListByFirmware(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class CryptoCertificatesListByFirmware(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoCertificates", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.crypto_cert_id = AAZStrType( + serialized_name="cryptoCertId", + nullable=True, + ) + properties.encoding = AAZStrType( + nullable=True, + ) + properties.expiration_date = AAZStrType( + serialized_name="expirationDate", + nullable=True, + ) + properties.file_paths = AAZListType( + serialized_name="filePaths", + nullable=True, + flags={"read_only": True}, + ) + properties.fingerprint = AAZStrType( + nullable=True, + ) + properties.is_expired = AAZBoolType( + serialized_name="isExpired", + nullable=True, + ) + properties.is_self_signed = AAZBoolType( + serialized_name="isSelfSigned", + nullable=True, + ) + properties.is_short_key_size = AAZBoolType( + serialized_name="isShortKeySize", + nullable=True, + ) + properties.is_weak_signature = AAZBoolType( + serialized_name="isWeakSignature", + nullable=True, + ) + properties.issued_date = AAZStrType( + serialized_name="issuedDate", + nullable=True, + ) + properties.issuer = AAZObjectType( + nullable=True, + ) + properties.key_algorithm = AAZStrType( + serialized_name="keyAlgorithm", + nullable=True, + ) + properties.key_size = AAZIntType( + serialized_name="keySize", + nullable=True, + ) + properties.name = AAZStrType( + nullable=True, + ) + properties.paired_key = AAZObjectType( + serialized_name="pairedKey", + nullable=True, + ) + properties.role = AAZStrType( + nullable=True, + ) + properties.serial_number = AAZStrType( + serialized_name="serialNumber", + nullable=True, + ) + properties.signature_algorithm = AAZStrType( + serialized_name="signatureAlgorithm", + nullable=True, + ) + properties.subject = AAZObjectType( + nullable=True, + ) + properties.usage = AAZListType( + nullable=True, + ) + + file_paths = cls._schema_on_200.value.Element.properties.file_paths + file_paths.Element = AAZStrType() + + issuer = cls._schema_on_200.value.Element.properties.issuer + issuer.common_name = AAZStrType( + serialized_name="commonName", + nullable=True, + ) + issuer.country = AAZStrType( + nullable=True, + ) + issuer.organization = AAZStrType( + nullable=True, + ) + issuer.organizational_unit = AAZStrType( + serialized_name="organizationalUnit", + nullable=True, + ) + issuer.state = AAZStrType( + nullable=True, + ) + + paired_key = cls._schema_on_200.value.Element.properties.paired_key + paired_key.id = AAZStrType() + paired_key.type = AAZStrType() + + subject = cls._schema_on_200.value.Element.properties.subject + subject.common_name = AAZStrType( + serialized_name="commonName", + nullable=True, + ) + subject.country = AAZStrType( + nullable=True, + ) + subject.organization = AAZStrType( + nullable=True, + ) + subject.organizational_unit = AAZStrType( + serialized_name="organizationalUnit", + nullable=True, + ) + subject.state = AAZStrType( + nullable=True, + ) + + usage = cls._schema_on_200.value.Element.properties.usage + usage.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _CryptoCertificateHelper: + """Helper class for CryptoCertificate""" + + +__all__ = ["CryptoCertificate"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_crypto_key.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_crypto_key.py new file mode 100644 index 00000000000..5fa23b4e6ef --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_crypto_key.py @@ -0,0 +1,268 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware crypto-key", +) +class CryptoKey(AAZCommand): + """List cryptographic key analysis results found in a firmware. + + :example: List cryptographic key analysis results found in a firmware. + az firmwareanalysis firmware crypto-key --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/cryptokeys", "2024-01-10"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + help="The id of the firmware.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CryptoKeysListByFirmware(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class CryptoKeysListByFirmware(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoKeys", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.crypto_key_id = AAZStrType( + serialized_name="cryptoKeyId", + nullable=True, + ) + properties.file_paths = AAZListType( + serialized_name="filePaths", + nullable=True, + flags={"read_only": True}, + ) + properties.is_short_key_size = AAZBoolType( + serialized_name="isShortKeySize", + nullable=True, + ) + properties.key_algorithm = AAZStrType( + serialized_name="keyAlgorithm", + nullable=True, + ) + properties.key_size = AAZIntType( + serialized_name="keySize", + nullable=True, + ) + properties.key_type = AAZStrType( + serialized_name="keyType", + nullable=True, + ) + properties.paired_key = AAZObjectType( + serialized_name="pairedKey", + nullable=True, + ) + properties.usage = AAZListType( + nullable=True, + ) + + file_paths = cls._schema_on_200.value.Element.properties.file_paths + file_paths.Element = AAZStrType() + + paired_key = cls._schema_on_200.value.Element.properties.paired_key + paired_key.id = AAZStrType() + paired_key.type = AAZStrType() + + usage = cls._schema_on_200.value.Element.properties.usage + usage.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _CryptoKeyHelper: + """Helper class for CryptoKey""" + + +__all__ = ["CryptoKey"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_cve.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_cve.py new file mode 100644 index 00000000000..dfc3f79656f --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_cve.py @@ -0,0 +1,277 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware cve", +) +class Cve(AAZCommand): + """List CVE analysis results of a firmware. + + :example: List CVE analysis results of a firmware. + az az firmwareanalysis firmware cve --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/cves", "2024-01-10"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + help="The id of the firmware.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CvesListByFirmware(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class CvesListByFirmware(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cves", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.component = AAZObjectType( + nullable=True, + ) + properties.cve_id = AAZStrType( + serialized_name="cveId", + nullable=True, + ) + properties.cvss_score = AAZStrType( + serialized_name="cvssScore", + nullable=True, + ) + properties.cvss_v2_score = AAZStrType( + serialized_name="cvssV2Score", + nullable=True, + ) + properties.cvss_v3_score = AAZStrType( + serialized_name="cvssV3Score", + nullable=True, + ) + properties.cvss_version = AAZStrType( + serialized_name="cvssVersion", + nullable=True, + ) + properties.description = AAZStrType( + nullable=True, + ) + properties.links = AAZListType( + flags={"read_only": True}, + ) + properties.name = AAZStrType() + properties.severity = AAZStrType( + nullable=True, + ) + + component = cls._schema_on_200.value.Element.properties.component + component.component_id = AAZStrType( + serialized_name="componentId", + ) + component.name = AAZStrType() + component.version = AAZStrType() + + links = cls._schema_on_200.value.Element.properties.links + links.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.links.Element + _element.href = AAZStrType( + nullable=True, + ) + _element.label = AAZStrType( + nullable=True, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _CveHelper: + """Helper class for Cve""" + + +__all__ = ["Cve"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_delete.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_delete.py new file mode 100644 index 00000000000..340199053ae --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_delete.py @@ -0,0 +1,152 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a firmware. + + :example: Delete a firmware. + az firmwareanalysis firmware delete --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["-n", "--name", "--firmware-id"], + help="The id of the firmware.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirmwaresDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class FirmwaresDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_generate_filesystem_download_url.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_generate_filesystem_download_url.py new file mode 100644 index 00000000000..beff1cdcbf8 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_generate_filesystem_download_url.py @@ -0,0 +1,180 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware generate-filesystem-download-url", +) +class GenerateFilesystemDownloadUrl(AAZCommand): + """Get a url for tar file download. + + :example: Get a url for tar file download. + az firmwareanalysis firmware generate-filesystem-download-url --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/generatefilesystemdownloadurl", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + help="The id of the firmware.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirmwaresGenerateFilesystemDownloadUrl(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirmwaresGenerateFilesystemDownloadUrl(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateFilesystemDownloadUrl", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.url = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _GenerateFilesystemDownloadUrlHelper: + """Helper class for GenerateFilesystemDownloadUrl""" + + +__all__ = ["GenerateFilesystemDownloadUrl"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_list.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_list.py new file mode 100644 index 00000000000..d47896a7f9b --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_list.py @@ -0,0 +1,245 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware list", +) +class List(AAZCommand): + """List all the firmware images inside a workspace. + + :example: List all the firmware images inside a workspace. + az firmwareanalysis firmware show --resource-group {ResourceGroupName} --workspace-name {workspaceName} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares", "2024-01-10"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirmwaresListByWorkspace(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class FirmwaresListByWorkspace(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.description = AAZStrType() + properties.file_name = AAZStrType( + serialized_name="fileName", + ) + properties.file_size = AAZIntType( + serialized_name="fileSize", + nullable=True, + ) + properties.model = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.status_messages = AAZListType( + serialized_name="statusMessages", + ) + properties.vendor = AAZStrType() + properties.version = AAZStrType() + + status_messages = cls._schema_on_200.value.Element.properties.status_messages + status_messages.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.status_messages.Element + _element.error_code = AAZIntType( + serialized_name="errorCode", + ) + _element.message = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_password_hash.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_password_hash.py new file mode 100644 index 00000000000..e721bca71f4 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_password_hash.py @@ -0,0 +1,249 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware password-hash", +) +class PasswordHash(AAZCommand): + """List password hash analysis results of a firmware. + + :example: List password hash analysis results of a firmware. + az firmwareanalysis firmware password-hash --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/passwordhashes", "2024-01-10"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + help="The id of the firmware.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PasswordHashesListByFirmware(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class PasswordHashesListByFirmware(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/passwordHashes", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.algorithm = AAZStrType( + nullable=True, + ) + properties.context = AAZStrType( + nullable=True, + ) + properties.file_path = AAZStrType( + serialized_name="filePath", + nullable=True, + ) + properties.hash = AAZStrType( + nullable=True, + ) + properties.password_hash_id = AAZStrType( + serialized_name="passwordHashId", + nullable=True, + ) + properties.salt = AAZStrType( + nullable=True, + ) + properties.username = AAZStrType( + nullable=True, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _PasswordHashHelper: + """Helper class for PasswordHash""" + + +__all__ = ["PasswordHash"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_sbom_component.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_sbom_component.py new file mode 100644 index 00000000000..1f5545afbe1 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_sbom_component.py @@ -0,0 +1,243 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware sbom-component", +) +class SbomComponent(AAZCommand): + """List SBOM analysis results of a firmware. + + :example: List SBOM analysis results of a firmware. + az firmwareanalysis firmware sbom-component --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/sbomcomponents", "2024-01-10"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + help="The id of the firmware.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SbomComponentsListByFirmware(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class SbomComponentsListByFirmware(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.component_id = AAZStrType( + serialized_name="componentId", + nullable=True, + ) + properties.component_name = AAZStrType( + serialized_name="componentName", + ) + properties.file_paths = AAZListType( + serialized_name="filePaths", + ) + properties.license = AAZStrType( + nullable=True, + ) + properties.version = AAZStrType() + + file_paths = cls._schema_on_200.value.Element.properties.file_paths + file_paths.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _SbomComponentHelper: + """Helper class for SbomComponent""" + + +__all__ = ["SbomComponent"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_show.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_show.py new file mode 100644 index 00000000000..b44e07057ff --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_show.py @@ -0,0 +1,243 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware show", +) +class Show(AAZCommand): + """Get a firmware. + + :example: Get a firmware. + az firmwareanalysis firmware show --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["-n", "--name", "--firmware-id"], + help="The id of the firmware.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirmwaresGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirmwaresGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.description = AAZStrType() + properties.file_name = AAZStrType( + serialized_name="fileName", + ) + properties.file_size = AAZIntType( + serialized_name="fileSize", + nullable=True, + ) + properties.model = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.status_messages = AAZListType( + serialized_name="statusMessages", + ) + properties.vendor = AAZStrType() + properties.version = AAZStrType() + + status_messages = cls._schema_on_200.properties.status_messages + status_messages.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.status_messages.Element + _element.error_code = AAZIntType( + serialized_name="errorCode", + ) + _element.message = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_summary.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_summary.py new file mode 100644 index 00000000000..5b91f496fef --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/firmware/_summary.py @@ -0,0 +1,340 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis firmware summary", +) +class Summary(AAZCommand): + """Get an analysis result summary of a firmware by name. + + :example: Get an analysis result summary of a firmware by name. + az firmwareanalysis firmware summary --resource-group {resourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} -n {analysisType} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/summaries/{}", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + help="The id of the firmware.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.summary_name = AAZStrArg( + options=["-n", "--name", "--summary-name"], + help="The Firmware analysis summary name describing the type of summary.", + required=True, + id_part="child_name_2", + enum={"BinaryHardening": "BinaryHardening", "CVE": "CVE", "CryptoCertificate": "CryptoCertificate", "CryptoKey": "CryptoKey", "Firmware": "Firmware"}, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9]*$", + max_length=63, + min_length=3, + ), + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SummariesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SummariesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firmwareId", self.ctx.args.firmware_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "summaryName", self.ctx.args.summary_name, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"read_only": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.summary_type = AAZStrType( + serialized_name="summaryType", + flags={"required": True}, + ) + + disc_binary_hardening = cls._schema_on_200.properties.discriminate_by("summary_type", "BinaryHardening") + disc_binary_hardening.canary = AAZIntType( + nullable=True, + ) + disc_binary_hardening.nx = AAZIntType( + nullable=True, + ) + disc_binary_hardening.pie = AAZIntType( + nullable=True, + ) + disc_binary_hardening.relro = AAZIntType( + nullable=True, + ) + disc_binary_hardening.stripped = AAZIntType( + nullable=True, + ) + disc_binary_hardening.total_files = AAZIntType( + serialized_name="totalFiles", + ) + + disc_cve = cls._schema_on_200.properties.discriminate_by("summary_type", "CVE") + disc_cve.critical = AAZIntType( + nullable=True, + ) + disc_cve.high = AAZIntType( + nullable=True, + ) + disc_cve.low = AAZIntType( + nullable=True, + ) + disc_cve.medium = AAZIntType( + nullable=True, + ) + disc_cve.unknown = AAZIntType( + nullable=True, + ) + + disc_crypto_certificate = cls._schema_on_200.properties.discriminate_by("summary_type", "CryptoCertificate") + disc_crypto_certificate.expired = AAZIntType() + disc_crypto_certificate.expiring_soon = AAZIntType( + serialized_name="expiringSoon", + ) + disc_crypto_certificate.paired_keys = AAZIntType( + serialized_name="pairedKeys", + ) + disc_crypto_certificate.self_signed = AAZIntType( + serialized_name="selfSigned", + ) + disc_crypto_certificate.short_key_size = AAZIntType( + serialized_name="shortKeySize", + ) + disc_crypto_certificate.total_certificates = AAZIntType( + serialized_name="totalCertificates", + ) + disc_crypto_certificate.weak_signature = AAZIntType( + serialized_name="weakSignature", + ) + + disc_crypto_key = cls._schema_on_200.properties.discriminate_by("summary_type", "CryptoKey") + disc_crypto_key.paired_keys = AAZIntType( + serialized_name="pairedKeys", + ) + disc_crypto_key.private_keys = AAZIntType( + serialized_name="privateKeys", + ) + disc_crypto_key.public_keys = AAZIntType( + serialized_name="publicKeys", + ) + disc_crypto_key.short_key_size = AAZIntType( + serialized_name="shortKeySize", + ) + disc_crypto_key.total_keys = AAZIntType( + serialized_name="totalKeys", + ) + + disc_firmware = cls._schema_on_200.properties.discriminate_by("summary_type", "Firmware") + disc_firmware.analysis_time_seconds = AAZIntType( + serialized_name="analysisTimeSeconds", + nullable=True, + ) + disc_firmware.binary_count = AAZIntType( + serialized_name="binaryCount", + nullable=True, + ) + disc_firmware.component_count = AAZIntType( + serialized_name="componentCount", + nullable=True, + ) + disc_firmware.extracted_file_count = AAZIntType( + serialized_name="extractedFileCount", + nullable=True, + ) + disc_firmware.extracted_size = AAZIntType( + serialized_name="extractedSize", + nullable=True, + ) + disc_firmware.file_size = AAZIntType( + serialized_name="fileSize", + nullable=True, + ) + disc_firmware.root_file_systems = AAZIntType( + serialized_name="rootFileSystems", + nullable=True, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _SummaryHelper: + """Helper class for Summary""" + + +__all__ = ["Summary"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/__cmd_group.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/__cmd_group.py new file mode 100644 index 00000000000..b56ea2199c0 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "firmwareanalysis workspace", +) +class __CMDGroup(AAZCommandGroup): + """Commands to perform operation on a particular workspace of the firmware. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/__init__.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/__init__.py new file mode 100644 index 00000000000..89d464d0444 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._generate_upload_url import * +from ._list import * +from ._show import * diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_create.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_create.py new file mode 100644 index 00000000000..8ad5aa722dd --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_create.py @@ -0,0 +1,254 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis workspace create", +) +class Create(AAZCommand): + """create or update a firmware analysis workspace. + + :example: create or update a firmware analysis workspace. + az firmwareanalysis workspace create --resource-group {resourceGroupName} --workspace-name {workspaceName} --location {location} --tags {:, :,..} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["-n", "--name", "--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + + # define Arg Group "Workspace" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Workspace", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Workspace", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkspacesCreate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkspacesCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_delete.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_delete.py new file mode 100644 index 00000000000..38f79683455 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_delete.py @@ -0,0 +1,142 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis workspace delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a firmware analysis workspace. + + :example: Delete a firmware analysis workspace. + az firmwareanalysis workspace delete --resource-group {resourceGroupName} --workspace-name {workspaceName} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["-n", "--name", "--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkspacesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkspacesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_generate_upload_url.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_generate_upload_url.py new file mode 100644 index 00000000000..2455dac0c9e --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_generate_upload_url.py @@ -0,0 +1,193 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis workspace generate-upload-url", +) +class GenerateUploadUrl(AAZCommand): + """Get a url for file upload. + + :example: Get a url for file upload. + az firmwareanalysis workspace generate-upload-url --resource-group {ResourceGroupName} --workspace-name {workspaceName} --firmware-id {firmwareId} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/generateuploadurl", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + + # define Arg Group "GenerateUploadUrl" + + _args_schema = cls._args_schema + _args_schema.firmware_id = AAZStrArg( + options=["--firmware-id"], + arg_group="GenerateUploadUrl", + help="A unique ID for the firmware to be uploaded.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkspacesGenerateUploadUrl(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkspacesGenerateUploadUrl(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("firmwareId", AAZStrType, ".firmware_id") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.url = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _GenerateUploadUrlHelper: + """Helper class for GenerateUploadUrl""" + + +__all__ = ["GenerateUploadUrl"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_list.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_list.py new file mode 100644 index 00000000000..3ae0e2f1ce6 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_list.py @@ -0,0 +1,356 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis workspace list", +) +class List(AAZCommand): + """List all of the firmware analysis workspaces in the specified subscription. + + :example: List all of the firmware analysis workspaces in the specified subscription. + az firmwareanalysis workspace list --resource-group {ResourceGroupName} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.iotfirmwaredefense/workspaces", "2024-01-10"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces", "2024-01-10"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.WorkspacesListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.WorkspacesListBySubscription(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkspacesListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class WorkspacesListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTFirmwareDefense/workspaces", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_show.py b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_show.py new file mode 100644 index 00000000000..f613a2238be --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/firmwareanalysis/workspace/_show.py @@ -0,0 +1,216 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "firmwareanalysis workspace show", +) +class Show(AAZCommand): + """Get firmware analysis workspace. + + :example: Get firmware analysis workspace. + az firmwareanalysis workspace show --resource-group {ResourceGroupName} --workspace-name {workspaceName} + """ + + _aaz_info = { + "version": "2024-01-10", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}", "2024-01-10"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["-n", "--name", "--workspace-name"], + help="The name of the firmware analysis workspace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkspacesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkspacesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-01-10", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/firmwareanalysis/azext_firmwareanalysis/azext_metadata.json b/src/firmwareanalysis/azext_firmwareanalysis/azext_metadata.json new file mode 100644 index 00000000000..9f7b09a19e1 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.55.0" +} \ No newline at end of file diff --git a/src/firmwareanalysis/azext_firmwareanalysis/commands.py b/src/firmwareanalysis/azext_firmwareanalysis/commands.py new file mode 100644 index 00000000000..a41d167dcfd --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/commands.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +# from azure.cli.core.commands import CliCommandType + + +from .custom import CryptoCertificate +from .custom import Cve + + +def load_command_table(self, _): # pylint: disable=unused-argument + self.command_table["firmwareanalysis firmware crypto-certificate"] = CryptoCertificate(loader=self) + self.command_table["firmwareanalysis firmware cve"] = Cve(loader=self) diff --git a/src/firmwareanalysis/azext_firmwareanalysis/custom.py b/src/firmwareanalysis/azext_firmwareanalysis/custom.py new file mode 100644 index 00000000000..d52aefa9d8b --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/custom.py @@ -0,0 +1,52 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +from knack.log import get_logger +from .aaz.latest.firmwareanalysis.firmware import CryptoCertificate as _CryptoCertificate +from .aaz.latest.firmwareanalysis.firmware import Cve as _Cve + + +logger = get_logger(__name__) + + +class CryptoCertificate(_CryptoCertificate): + def _output(self, *args, **kwargs): + from azure.cli.core.aaz import AAZUndefined + from azure.cli.core.aaz import has_value + + # resolve flatten conflict + # when the type field conflicts, the type in inner layer is ignored and the outer layer is applied + for item in self.ctx.vars.instance.value: + props = item.properties + if has_value(props.name): + props.name = AAZUndefined + + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + + return result, next_link + + +class Cve(_Cve): + def _output(self, *args, **kwargs): + from azure.cli.core.aaz import AAZUndefined + from azure.cli.core.aaz import has_value + + # resolve flatten conflict + # when the type field conflicts, the type in inner layer is ignored and the outer layer is applied + for item in self.ctx.vars.instance.value: + props = item.properties + if has_value(props.name): + props.name = AAZUndefined + + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + + return result, next_link diff --git a/src/firmwareanalysis/azext_firmwareanalysis/tests/__init__.py b/src/firmwareanalysis/azext_firmwareanalysis/tests/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/tests/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/firmwareanalysis/azext_firmwareanalysis/tests/latest/__init__.py b/src/firmwareanalysis/azext_firmwareanalysis/tests/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/tests/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/firmwareanalysis/azext_firmwareanalysis/tests/latest/recordings/test_analyser_commands.yaml b/src/firmwareanalysis/azext_firmwareanalysis/tests/latest/recordings/test_analyser_commands.yaml new file mode 100644 index 00000000000..1d903b7ad2b --- /dev/null +++ b/src/firmwareanalysis/azext_firmwareanalysis/tests/latest/recordings/test_analyser_commands.yaml @@ -0,0 +1,6782 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - firmwareanalysis firmware binary-hardening + Connection: + - keep-alive + ParameterSetName: + - --resource-group --workspace-name --firmware-id + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22635-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults?api-version=2024-01-10 + response: + body: + string: "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/44735028-3367-40e0-8152-dfa47e9e6c0c\"\ + ,\"name\":\"44735028-3367-40e0-8152-dfa47e9e6c0c\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"44735028-3367-40e0-8152-dfa47e9e6c0c\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/ext2.extracted/EXTExtractor/1/ext-root/bin/dnsmasq\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/95217dd9-6374-41ed-8c92-ce51b7c28bf3\"\ + ,\"name\":\"95217dd9-6374-41ed-8c92-ce51b7c28bf3\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"95217dd9-6374-41ed-8c92-ce51b7c28bf3\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/usr/local/sbin/pppd\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/91edb194-2f5c-49c1-b1d6-4143b0a75d6c\"\ + ,\"name\":\"91edb194-2f5c-49c1-b1d6-4143b0a75d6c\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"91edb194-2f5c-49c1-b1d6-4143b0a75d6c\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit64\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/bin/busybox\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":true,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":false}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/e7d68758-4d71-46da-92e0-57b1d77a78a9\"\ + ,\"name\":\"e7d68758-4d71-46da-92e0-57b1d77a78a9\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"e7d68758-4d71-46da-92e0-57b1d77a78a9\"\ + ,\"architecture\":\"AMD64\",\"class\":\"Bit64\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/usr/sbin/httpd\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":true,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/8ca11555-0033-415a-8e8f-71780a4c2241\"\ + ,\"name\":\"8ca11555-0033-415a-8e8f-71780a4c2241\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"8ca11555-0033-415a-8e8f-71780a4c2241\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/htdocs/cgibin\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/8f0306fa-5589-41ac-b3c6-66a5e9723226\"\ + ,\"name\":\"8f0306fa-5589-41ac-b3c6-66a5e9723226\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"8f0306fa-5589-41ac-b3c6-66a5e9723226\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/usr/sbin/openssl\"\ + ,\"rpath\":\"yes\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/61628ea6-b53f-4a45-8599-0aad931d1800\"\ + ,\"name\":\"61628ea6-b53f-4a45-8599-0aad931d1800\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"61628ea6-b53f-4a45-8599-0aad931d1800\"\ + ,\"architecture\":\"AMD64\",\"class\":\"Bit64\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/usr/bin/bzip2\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":true,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/51a8e901-4406-49df-8c4d-5471f6c52e98\"\ + ,\"name\":\"51a8e901-4406-49df-8c4d-5471f6c52e98\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"51a8e901-4406-49df-8c4d-5471f6c52e98\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/usr/lib/libxyssl.so\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":true,\"relro\":false,\"\ + canary\":false,\"stripped\":false}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/fd0b00b1-0d4a-4a1b-a174-060a4edbb35c\"\ + ,\"name\":\"fd0b00b1-0d4a-4a1b-a174-060a4edbb35c\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"fd0b00b1-0d4a-4a1b-a174-060a4edbb35c\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/usr/sbin/tc\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":false}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/8e760f30-3043-4cd9-8451-5725aff0cbae\"\ + ,\"name\":\"8e760f30-3043-4cd9-8451-5725aff0cbae\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"8e760f30-3043-4cd9-8451-5725aff0cbae\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/usr/sbin/radvd\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/2fc70406-c549-4e75-be79-6ac4860944be\"\ + ,\"name\":\"2fc70406-c549-4e75-be79-6ac4860944be\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"2fc70406-c549-4e75-be79-6ac4860944be\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/usr/sbin/pppd\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/e2c41401-29ec-46cf-8b44-7df6ace0daa3\"\ + ,\"name\":\"e2c41401-29ec-46cf-8b44-7df6ace0daa3\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"e2c41401-29ec-46cf-8b44-7df6ace0daa3\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/etc/registration.d/01_init\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/232cb00e-0857-4e6f-b3cc-2b94333a2261\"\ + ,\"name\":\"232cb00e-0857-4e6f-b3cc-2b94333a2261\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"232cb00e-0857-4e6f-b3cc-2b94333a2261\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/bin/busybox\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/4e3be1ae-5831-48a5-9d56-e27e838b6b44\"\ + ,\"name\":\"4e3be1ae-5831-48a5-9d56-e27e838b6b44\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"4e3be1ae-5831-48a5-9d56-e27e838b6b44\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/zip/keys-certs.zip.extracted/ZipArchiveExtractor/1/zip-root/keys-certs/ntgr_ra_aws\"\ + ,\"rpath\":\"no\",\"features\":{\"nx\":true,\"pie\":false,\"relro\":false,\"\ + canary\":false,\"stripped\":true}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/binaryHardeningResults/43cd7fa4-937e-4f8a-8996-0de1ec0660ce\"\ + ,\"name\":\"43cd7fa4-937e-4f8a-8996-0de1ec0660ce\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults\"\ + ,\"properties\":{\"binaryHardeningId\":\"43cd7fa4-937e-4f8a-8996-0de1ec0660ce\"\ + ,\"architecture\":\"MIPS\",\"class\":\"Bit32\",\"filePath\":\"/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/jffs2.img.extracted/JFFS2Extractor/1/jffs2-root/home/peter/tns/utf8/super\xE9\ + \xBB\x92squid\",\"rpath\":\"no\",\"features\":{\"nx\":false,\"pie\":false,\"\ + relro\":false,\"canary\":false,\"stripped\":true}}}]}" + headers: + cache-control: + - no-cache + content-length: + - '11433' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 15 Feb 2024 19:37:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '59' + x-ms-providerhub-traffic: + - 'True' + x-msedge-ref: + - 'Ref A: DC6106E92F2846769E5E5EAB320F4212 Ref B: CO6AA3150220045 Ref C: 2024-02-15T19:37:59Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - firmwareanalysis firmware sbom-component + Connection: + - keep-alive + ParameterSetName: + - --resource-group --workspace-name --firmware-id + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22635-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents?api-version=2024-01-10 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"jquery:1.11.3","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"jquery:1.11.3","componentName":"jquery","version":"1.11.3","license":"MIT","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/var/www/js/jquery-1.11.3.js"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"apache:2.4.28","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"apache:2.4.28","componentName":"apache","version":"2.4.28","license":"Apache-2.0","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/usr/sbin/httpd"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"pppd:2.4.2-b3","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"pppd:2.4.2-b3","componentName":"pppd","version":"2.4.2-b3","license":"BSD-3-Clause-Attribution","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/usr/local/sbin/pppd","/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/usr/sbin/pppd"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"jquery:3.1.1","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"jquery:3.1.1","componentName":"jquery","version":"3.1.1","license":"MIT","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/var/www/js/jquery-3.1.1.min.js"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"jquery:1.11.0","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"jquery:1.11.0","componentName":"jquery","version":"1.11.0","license":"MIT","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/var/www/js/jquery-1.11.0.min.js"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"radvd:1.8.0","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"radvd:1.8.0","componentName":"radvd","version":"1.8.0","license":"BSD-4-Clause","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/usr/sbin/radvd"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"dnsmasq:1.10.0","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"dnsmasq:1.10.0","componentName":"dnsmasq","version":"1.10.0","license":"GPL-2.0-or-later","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/ext2.extracted/EXTExtractor/1/ext-root/bin/dnsmasq"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"busybox:1.14.1","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"busybox:1.14.1","componentName":"busybox","version":"1.14.1","license":"GPL-2.0-only","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/filesystem.sqsh.extracted/SquashFSExtractor/1/squashfs-root/bin/busybox"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"lodash:4.17.0","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"lodash:4.17.0","componentName":"lodash","version":"4.17.0","license":"MIT","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/var/www/js/lodash-4.17.0/lodash.min.js"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"busybox:1.22.1","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"busybox:1.22.1","componentName":"busybox","version":"1.22.1","license":"GPL-2.0-only","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/bin/busybox"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"jquery:3.2.1","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"jquery:3.2.1","componentName":"jquery","version":"3.2.1","license":"MIT","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/var/www/js/jquery-3.2.1.min.js"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"lodash:4.17.13","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"lodash:4.17.13","componentName":"lodash","version":"4.17.13","license":"MIT","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/var/www/js/lodash-4.17.13/lodash.min.js"]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/sbomComponents/","name":"jquery:1.10.2","type":"Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents","properties":{"componentId":"jquery:1.10.2","componentName":"jquery","version":"1.10.2","license":"MIT","filePaths":["/GzipExtractor/1/decompressed.bin.extracted/TarballExtractor/1/tar-root/Centrifuge-exemplar/fakefs_root/var/www/js/jquery-1.10.2.min.js"]}}]}' + headers: + cache-control: + - no-cache + content-length: + - '7683' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 15 Feb 2024 19:38:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '75' + x-ms-providerhub-traffic: + - 'True' + x-msedge-ref: + - 'Ref A: 89D1580FE4D34840ADEC0604A7C4835B Ref B: CO6AA3150218035 Ref C: 2024-02-15T19:38:00Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - firmwareanalysis firmware cve + Connection: + - keep-alive + ParameterSetName: + - --resource-group --workspace-name --firmware-id + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22635-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves?api-version=2024-01-10 + response: + body: + string: "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/55053259-c289-418e-86b0-2eba1b7642d4\"\ + ,\"name\":\"55053259-c289-418e-86b0-2eba1b7642d4\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"55053259-c289-418e-86b0-2eba1b7642d4\",\"component\"\ + :{\"name\":\"pppd\",\"version\":\"2.4.2-b3\"},\"severity\":\"High\",\"name\"\ + :\"CVE-2006-2194\",\"cvssV2Score\":\"7.2\",\"cvssV3Score\":\"\",\"links\"\ + :[{\"label\":\"http://secunia.com/advisories/20963\",\"href\":\"http://secunia.com/advisories/20963\"\ + },{\"label\":\"http://secunia.com/advisories/20967\",\"href\":\"http://secunia.com/advisories/20967\"\ + },{\"label\":\"http://secunia.com/advisories/20987\",\"href\":\"http://secunia.com/advisories/20987\"\ + },{\"label\":\"http://secunia.com/advisories/20996\",\"href\":\"http://secunia.com/advisories/20996\"\ + },{\"label\":\"http://www.debian.org/security/2006/dsa-1106\",\"href\":\"\ + http://www.debian.org/security/2006/dsa-1106\"},{\"label\":\"http://www.mandriva.com/security/advisories?name=MDKSA-2006:119\"\ + ,\"href\":\"http://www.mandriva.com/security/advisories?name=MDKSA-2006:119\"\ + },{\"label\":\"http://www.osvdb.org/26994\",\"href\":\"http://www.osvdb.org/26994\"\ + },{\"label\":\"http://www.securityfocus.com/bid/18849\",\"href\":\"http://www.securityfocus.com/bid/18849\"\ + },{\"label\":\"http://www.ubuntu.com/usn/usn-310-1\",\"href\":\"http://www.ubuntu.com/usn/usn-310-1\"\ + }],\"description\":\"The winbind plugin in pppd for ppp 2.4.4 and earlier\ + \ does not check the return code from the setuid function call, which might\ + \ allow local users to gain privileges by causing setuid to fail, such as\ + \ exceeding PAM limits for the maximum number of user processes, which prevents\ + \ the winbind NTLM authentication helper from dropping privileges.\",\"cvssScore\"\ + :\"7.2\",\"cvssVersion\":\"2\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/3069e14a-4199-4033-b904-ed8ac6a4a367\"\ + ,\"name\":\"3069e14a-4199-4033-b904-ed8ac6a4a367\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"3069e14a-4199-4033-b904-ed8ac6a4a367\",\"component\"\ + :{\"name\":\"pppd\",\"version\":\"2.4.2-b3\"},\"severity\":\"High\",\"name\"\ + :\"CVE-2014-3158\",\"cvssV2Score\":\"7.5\",\"cvssV3Score\":\"\",\"links\"\ + :[{\"label\":\"http://advisories.mageia.org/MGASA-2014-0368.html\",\"href\"\ + :\"http://advisories.mageia.org/MGASA-2014-0368.html\"},{\"label\":\"http://lists.fedoraproject.org/pipermail/package-announce/2014-August/136932.html\"\ + ,\"href\":\"http://lists.fedoraproject.org/pipermail/package-announce/2014-August/136932.html\"\ + },{\"label\":\"http://marc.info/?l=linux-ppp&m=140764978420764\",\"href\"\ + :\"http://marc.info/?l=linux-ppp&m=140764978420764\"},{\"label\":\"http://www.debian.org/security/2014/dsa-3079\"\ + ,\"href\":\"http://www.debian.org/security/2014/dsa-3079\"},{\"label\":\"\ + http://www.mandriva.com/security/advisories?name=MDVSA-2015:135\",\"href\"\ + :\"http://www.mandriva.com/security/advisories?name=MDVSA-2015:135\"},{\"\ + label\":\"http://www.oracle.com/technetwork/topics/security/bulletinapr2015-2511959.html\"\ + ,\"href\":\"http://www.oracle.com/technetwork/topics/security/bulletinapr2015-2511959.html\"\ + },{\"label\":\"http://www.ubuntu.com/usn/USN-2429-1\",\"href\":\"http://www.ubuntu.com/usn/USN-2429-1\"\ + },{\"label\":\"https://bugzilla.redhat.com/show_bug.cgi?id=1128748\",\"href\"\ + :\"https://bugzilla.redhat.com/show_bug.cgi?id=1128748\"},{\"label\":\"https://github.com/paulusmack/ppp/commit/7658e8257183f062dc01f87969c140707c7e52cb\"\ + ,\"href\":\"https://github.com/paulusmack/ppp/commit/7658e8257183f062dc01f87969c140707c7e52cb\"\ + }],\"description\":\"Integer overflow in the getword function in options.c\ + \ in pppd in Paul's PPP Package (ppp) before 2.4.7 allows attackers to \\\"\ + access privileged options\\\" via a long word in an options file, which triggers\ + \ a heap-based buffer overflow that \\\"[corrupts] security-relevant variables.\\\ + \"\",\"cvssScore\":\"7.5\",\"cvssVersion\":\"2\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/587b0394-68a0-41e6-b437-eb76e39db7a9\"\ + ,\"name\":\"587b0394-68a0-41e6-b437-eb76e39db7a9\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"587b0394-68a0-41e6-b437-eb76e39db7a9\",\"component\"\ + :{\"name\":\"pppd\",\"version\":\"2.4.2-b3\"},\"severity\":\"Medium\",\"name\"\ + :\"CVE-2015-3310\",\"cvssV2Score\":\"4.3\",\"cvssV3Score\":\"\",\"links\"\ + :[{\"label\":\"http://advisories.mageia.org/MGASA-2015-0173.html\",\"href\"\ + :\"http://advisories.mageia.org/MGASA-2015-0173.html\"},{\"label\":\"http://lists.opensuse.org/opensuse-updates/2015-11/msg00147.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-updates/2015-11/msg00147.html\"\ + },{\"label\":\"http://www.debian.org/security/2015/dsa-3228\",\"href\":\"\ + http://www.debian.org/security/2015/dsa-3228\"},{\"label\":\"http://www.mandriva.com/security/advisories?name=MDVSA-2015:222\"\ + ,\"href\":\"http://www.mandriva.com/security/advisories?name=MDVSA-2015:222\"\ + },{\"label\":\"http://www.securityfocus.com/bid/74163\",\"href\":\"http://www.securityfocus.com/bid/74163\"\ + },{\"label\":\"http://www.ubuntu.com/usn/USN-2595-1\",\"href\":\"http://www.ubuntu.com/usn/USN-2595-1\"\ + },{\"label\":\"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782450\"\ + ,\"href\":\"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782450\"},{\"\ + label\":\"https://security.gentoo.org/glsa/201701-50\",\"href\":\"https://security.gentoo.org/glsa/201701-50\"\ + }],\"description\":\"Buffer overflow in the rc_mksid function in plugins/radius/util.c\ + \ in Paul's PPP Package (ppp) 2.4.6 and earlier, when the PID for pppd is\ + \ greater than 65535, allows remote attackers to cause a denial of service\ + \ (crash) via a start accounting message to the RADIUS server.\",\"cvssScore\"\ + :\"4.3\",\"cvssVersion\":\"2\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/4b45357b-8ca7-4bd2-8757-e24ce62e211a\"\ + ,\"name\":\"4b45357b-8ca7-4bd2-8757-e24ce62e211a\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"4b45357b-8ca7-4bd2-8757-e24ce62e211a\",\"component\"\ + :{\"name\":\"pppd\",\"version\":\"2.4.2-b3\"},\"severity\":\"Critical\",\"\ + name\":\"CVE-2018-11574\",\"cvssV2Score\":\"7.5\",\"cvssV3Score\":\"9.8\"\ + ,\"links\":[{\"label\":\"http://www.openwall.com/lists/oss-security/2018/06/11/1\"\ + ,\"href\":\"http://www.openwall.com/lists/oss-security/2018/06/11/1\"},{\"\ + label\":\"https://usn.ubuntu.com/3810-1/\",\"href\":\"https://usn.ubuntu.com/3810-1/\"\ + }],\"description\":\"Improper input validation together with an integer overflow\ + \ in the EAP-TLS protocol implementation in PPPD may cause a crash, information\ + \ disclosure, or authentication bypass. This implementation is distributed\ + \ as a patch for PPPD 0.91, and includes the affected eap.c and eap-tls.c\ + \ files. Configurations that use the `refuse-app` option are unaffected.\"\ + ,\"cvssScore\":\"9.8\",\"cvssVersion\":\"3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/db963674-a4bf-4182-84b5-b7141f8a4c2c\"\ + ,\"name\":\"db963674-a4bf-4182-84b5-b7141f8a4c2c\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"db963674-a4bf-4182-84b5-b7141f8a4c2c\",\"component\"\ + :{\"name\":\"lodash\",\"version\":\"4.17.0\"},\"severity\":\"Medium\",\"name\"\ + :\"CVE-2018-16487\",\"cvssV2Score\":\"6.8\",\"cvssV3Score\":\"5.6\",\"links\"\ + :[{\"label\":\"https://hackerone.com/reports/380873\",\"href\":\"https://hackerone.com/reports/380873\"\ + },{\"label\":\"https://security.netapp.com/advisory/ntap-20190919-0004/\"\ + ,\"href\":\"https://security.netapp.com/advisory/ntap-20190919-0004/\"}],\"\ + description\":\"A prototype pollution vulnerability was found in lodash <4.17.11\ + \ where the functions merge, mergeWith, and defaultsDeep can be tricked into\ + \ adding or modifying properties of Object.prototype.\",\"cvssScore\":\"5.6\"\ + ,\"cvssVersion\":\"3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/1074fe01-68de-40b4-a3e0-5ac40b6b79b2\"\ + ,\"name\":\"1074fe01-68de-40b4-a3e0-5ac40b6b79b2\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"1074fe01-68de-40b4-a3e0-5ac40b6b79b2\",\"component\"\ + :{\"name\":\"lodash\",\"version\":\"4.17.0\"},\"severity\":\"Medium\",\"name\"\ + :\"CVE-2018-3721\",\"cvssV2Score\":\"4\",\"cvssV3Score\":\"6.5\",\"links\"\ + :[{\"label\":\"https://github.com/lodash/lodash/commit/d8e069cc3410082e44eb18fcf8e7f3d08ebe1d4a\"\ + ,\"href\":\"https://github.com/lodash/lodash/commit/d8e069cc3410082e44eb18fcf8e7f3d08ebe1d4a\"\ + },{\"label\":\"https://hackerone.com/reports/310443\",\"href\":\"https://hackerone.com/reports/310443\"\ + },{\"label\":\"https://security.netapp.com/advisory/ntap-20190919-0004/\"\ + ,\"href\":\"https://security.netapp.com/advisory/ntap-20190919-0004/\"}],\"\ + description\":\"lodash node module before 4.17.5 suffers from a Modification\ + \ of Assumed-Immutable Data (MAID) vulnerability via defaultsDeep, merge,\ + \ and mergeWith functions, which allows a malicious user to modify the prototype\ + \ of \\\"Object\\\" via __proto__, causing the addition or modification of\ + \ an existing property that will exist on all objects.\",\"cvssScore\":\"\ + 6.5\",\"cvssVersion\":\"3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/72b869fe-2dee-4c4d-951a-4edee04697a4\"\ + ,\"name\":\"72b869fe-2dee-4c4d-951a-4edee04697a4\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"72b869fe-2dee-4c4d-951a-4edee04697a4\",\"component\"\ + :{\"name\":\"lodash\",\"version\":\"4.17.0\"},\"severity\":\"Medium\",\"name\"\ + :\"CVE-2019-1010266\",\"cvssV2Score\":\"4\",\"cvssV3Score\":\"6.5\",\"links\"\ + :[{\"label\":\"https://github.com/lodash/lodash/issues/3359\",\"href\":\"\ + https://github.com/lodash/lodash/issues/3359\"},{\"label\":\"https://github.com/lodash/lodash/wiki/Changelog\"\ + ,\"href\":\"https://github.com/lodash/lodash/wiki/Changelog\"},{\"label\"\ + :\"https://security.netapp.com/advisory/ntap-20190919-0004/\",\"href\":\"\ + https://security.netapp.com/advisory/ntap-20190919-0004/\"},{\"label\":\"\ + https://snyk.io/vuln/SNYK-JS-LODASH-73639\",\"href\":\"https://snyk.io/vuln/SNYK-JS-LODASH-73639\"\ + }],\"description\":\"lodash prior to 4.17.11 is affected by: CWE-400: Uncontrolled\ + \ Resource Consumption. The impact is: Denial of service. The component is:\ + \ Date handler. The attack vector is: Attacker provides very long strings,\ + \ which the library attempts to match using a regular expression. The fixed\ + \ version is: 4.17.11.\",\"cvssScore\":\"6.5\",\"cvssVersion\":\"3\"}},{\"\ + id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/1654a90c-a1f5-4d8e-93c2-d668eab070d9\"\ + ,\"name\":\"1654a90c-a1f5-4d8e-93c2-d668eab070d9\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"1654a90c-a1f5-4d8e-93c2-d668eab070d9\",\"component\"\ + :{\"name\":\"lodash\",\"version\":\"4.17.0\"},\"severity\":\"Critical\",\"\ + name\":\"CVE-2019-10744\",\"cvssV2Score\":\"6.4\",\"cvssV3Score\":\"9.1\"\ + ,\"links\":[{\"label\":\"https://access.redhat.com/errata/RHSA-2019:3024\"\ + ,\"href\":\"https://access.redhat.com/errata/RHSA-2019:3024\"},{\"label\"\ + :\"https://security.netapp.com/advisory/ntap-20191004-0005/\",\"href\":\"\ + https://security.netapp.com/advisory/ntap-20191004-0005/\"},{\"label\":\"\ + https://snyk.io/vuln/SNYK-JS-LODASH-450202\",\"href\":\"https://snyk.io/vuln/SNYK-JS-LODASH-450202\"\ + },{\"label\":\"https://support.f5.com/csp/article/K47105354?utm_source=f5support&utm_medium=RSS\"\ + ,\"href\":\"https://support.f5.com/csp/article/K47105354?utm_source=f5support&utm_medium=RSS\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujan2021.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujan2021.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpuoct2020.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuoct2020.html\"\ + }],\"description\":\"Versions of lodash lower than 4.17.12 are vulnerable\ + \ to Prototype Pollution. The function defaultsDeep could be tricked into\ + \ adding or modifying properties of Object.prototype using a constructor payload.\"\ + ,\"cvssScore\":\"9.1\",\"cvssVersion\":\"3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/7bd97294-9af8-4772-9602-5e00eb8ef254\"\ + ,\"name\":\"7bd97294-9af8-4772-9602-5e00eb8ef254\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"7bd97294-9af8-4772-9602-5e00eb8ef254\",\"component\"\ + :{\"name\":\"lodash\",\"version\":\"4.17.0\"},\"severity\":\"Medium\",\"name\"\ + :\"CVE-2020-28500\",\"cvssV2Score\":\"5\",\"cvssV3Score\":\"5.3\",\"links\"\ + :[{\"label\":\"https://github.com/lodash/lodash/blob/npm/trimEnd.js%23L8\"\ + ,\"href\":\"https://github.com/lodash/lodash/blob/npm/trimEnd.js%23L8\"},{\"\ + label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074896\",\"href\"\ + :\"https://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074896\"},{\"label\":\"\ + https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074893\",\"href\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074893\"\ + },{\"label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074895\"\ + ,\"href\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074895\"\ + },{\"label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074894\",\"href\"\ + :\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074894\"},{\"label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074892\"\ + ,\"href\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074892\"},{\"\ + label\":\"https://snyk.io/vuln/SNYK-JS-LODASH-1018905\",\"href\":\"https://snyk.io/vuln/SNYK-JS-LODASH-1018905\"\ + },{\"label\":\"https://github.com/lodash/lodash/pull/5065\",\"href\":\"https://github.com/lodash/lodash/pull/5065\"\ + },{\"label\":\"https://security.netapp.com/advisory/ntap-20210312-0006/\"\ + ,\"href\":\"https://security.netapp.com/advisory/ntap-20210312-0006/\"},{\"\ + label\":\"https://www.oracle.com//security-alerts/cpujul2021.html\",\"href\"\ + :\"https://www.oracle.com//security-alerts/cpujul2021.html\"},{\"label\":\"\ + https://www.oracle.com/security-alerts/cpuoct2021.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuoct2021.html\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujan2022.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujan2022.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpujul2022.html\",\"href\":\"https://www.oracle.com/security-alerts/cpujul2022.html\"\ + }],\"description\":\"Lodash versions prior to 4.17.21 are vulnerable to Regular\ + \ Expression Denial of Service (ReDoS) via the toNumber, trim and trimEnd\ + \ functions.\",\"cvssScore\":\"5.3\",\"cvssVersion\":\"3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/66cacaa3-5373-4fbc-ba86-448394e96829\"\ + ,\"name\":\"66cacaa3-5373-4fbc-ba86-448394e96829\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"66cacaa3-5373-4fbc-ba86-448394e96829\",\"component\"\ + :{\"name\":\"lodash\",\"version\":\"4.17.0\"},\"severity\":\"High\",\"name\"\ + :\"CVE-2020-8203\",\"cvssV2Score\":\"5.8\",\"cvssV3Score\":\"7.4\",\"links\"\ + :[{\"label\":\"https://hackerone.com/reports/712065\",\"href\":\"https://hackerone.com/reports/712065\"\ + },{\"label\":\"https://security.netapp.com/advisory/ntap-20200724-0006/\"\ + ,\"href\":\"https://security.netapp.com/advisory/ntap-20200724-0006/\"},{\"\ + label\":\"https://github.com/lodash/lodash/issues/4874\",\"href\":\"https://github.com/lodash/lodash/issues/4874\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpuApr2021.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpuApr2021.html\"},{\"label\"\ + :\"https://www.oracle.com//security-alerts/cpujul2021.html\",\"href\":\"https://www.oracle.com//security-alerts/cpujul2021.html\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpuoct2021.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpuoct2021.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpujan2022.html\",\"href\":\"https://www.oracle.com/security-alerts/cpujan2022.html\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpuapr2022.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpuapr2022.html\"}],\"description\"\ + :\"Prototype pollution attack when using _.zipObjectDeep in lodash before\ + \ 4.17.20.\",\"cvssScore\":\"7.4\",\"cvssVersion\":\"3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/aee26f95-ac00-4922-8ee8-acc763fac9ce\"\ + ,\"name\":\"aee26f95-ac00-4922-8ee8-acc763fac9ce\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"aee26f95-ac00-4922-8ee8-acc763fac9ce\",\"component\"\ + :{\"name\":\"lodash\",\"version\":\"4.17.0\"},\"severity\":\"High\",\"name\"\ + :\"CVE-2021-23337\",\"cvssV2Score\":\"6.5\",\"cvssV3Score\":\"7.2\",\"links\"\ + :[{\"label\":\"https://snyk.io/vuln/SNYK-JS-LODASH-1040724\",\"href\":\"https://snyk.io/vuln/SNYK-JS-LODASH-1040724\"\ + },{\"label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074931\"\ + ,\"href\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074931\"\ + },{\"label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074929\",\"href\"\ + :\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074929\"},{\"label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074932\"\ + ,\"href\":\"https://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074932\"},{\"\ + label\":\"https://github.com/lodash/lodash/blob/ddfd9b11a0126db2302cb70ec9973b66baec0975/lodash.js%23L14851\"\ + ,\"href\":\"https://github.com/lodash/lodash/blob/ddfd9b11a0126db2302cb70ec9973b66baec0975/lodash.js%23L14851\"\ + },{\"label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074930\",\"href\"\ + :\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074930\"},{\"label\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074928\"\ + ,\"href\":\"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074928\"},{\"\ + label\":\"https://security.netapp.com/advisory/ntap-20210312-0006/\",\"href\"\ + :\"https://security.netapp.com/advisory/ntap-20210312-0006/\"},{\"label\"\ + :\"https://www.oracle.com//security-alerts/cpujul2021.html\",\"href\":\"https://www.oracle.com//security-alerts/cpujul2021.html\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpuoct2021.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpuoct2021.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpujan2022.html\",\"href\":\"https://www.oracle.com/security-alerts/cpujan2022.html\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujul2022.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujul2022.html\"}],\"description\"\ + :\"Lodash versions prior to 4.17.21 are vulnerable to Command Injection via\ + \ the template function.\",\"cvssScore\":\"7.2\",\"cvssVersion\":\"3\"}},{\"\ + id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/05176029-1eda-4fb4-9a0c-8536266e0d8f\"\ + ,\"name\":\"05176029-1eda-4fb4-9a0c-8536266e0d8f\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"05176029-1eda-4fb4-9a0c-8536266e0d8f\",\"component\"\ + :{\"name\":\"jquery\",\"version\":\"3.1.1\"},\"severity\":\"Medium\",\"name\"\ + :\"CVE-2019-11358\",\"cvssV2Score\":\"4.3\",\"cvssV3Score\":\"6.1\",\"links\"\ + :[{\"label\":\"https://www.drupal.org/sa-core-2019-006\",\"href\":\"https://www.drupal.org/sa-core-2019-006\"\ + },{\"label\":\"https://snyk.io/vuln/SNYK-JS-JQUERY-174006\",\"href\":\"https://snyk.io/vuln/SNYK-JS-JQUERY-174006\"\ + },{\"label\":\"https://github.com/jquery/jquery/pull/4333\",\"href\":\"https://github.com/jquery/jquery/pull/4333\"\ + },{\"label\":\"https://github.com/jquery/jquery/commit/753d591aea698e57d6db58c9f722cd0808619b1b\"\ + ,\"href\":\"https://github.com/jquery/jquery/commit/753d591aea698e57d6db58c9f722cd0808619b1b\"\ + },{\"label\":\"https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/\"\ + ,\"href\":\"https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/\"},{\"\ + label\":\"https://backdropcms.org/security/backdrop-sa-core-2019-009\",\"\ + href\":\"https://backdropcms.org/security/backdrop-sa-core-2019-009\"},{\"\ + label\":\"https://www.debian.org/security/2019/dsa-4434\",\"href\":\"https://www.debian.org/security/2019/dsa-4434\"\ + },{\"label\":\"https://seclists.org/bugtraq/2019/Apr/32\",\"href\":\"https://seclists.org/bugtraq/2019/Apr/32\"\ + },{\"label\":\"http://www.securityfocus.com/bid/108023\",\"href\":\"http://www.securityfocus.com/bid/108023\"\ + },{\"label\":\"https://lists.apache.org/thread.html/b736d0784cf02f5a30fbb4c5902762a15ad6d47e17e2c5a17b7d6205@%3Ccommits.airflow.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/b736d0784cf02f5a30fbb4c5902762a15ad6d47e17e2c5a17b7d6205@%3Ccommits.airflow.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/08720ef215ee7ab3386c05a1a90a7d1c852bf0706f176a7816bf65fc@%3Ccommits.airflow.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/08720ef215ee7ab3386c05a1a90a7d1c852bf0706f176a7816bf65fc@%3Ccommits.airflow.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/88fb0362fd40e5b605ea8149f63241537b8b6fb5bfa315391fc5cbb7@%3Ccommits.airflow.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/88fb0362fd40e5b605ea8149f63241537b8b6fb5bfa315391fc5cbb7@%3Ccommits.airflow.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/6097cdbd6f0a337bedd9bb5cc441b2d525ff002a96531de367e4259f@%3Ccommits.airflow.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/6097cdbd6f0a337bedd9bb5cc441b2d525ff002a96531de367e4259f@%3Ccommits.airflow.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/5928aa293e39d248266472210c50f176cac1535220f2486e6a7fa844@%3Ccommits.airflow.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/5928aa293e39d248266472210c50f176cac1535220f2486e6a7fa844@%3Ccommits.airflow.apache.org%3E\"\ + },{\"label\":\"https://lists.debian.org/debian-lts-announce/2019/05/msg00006.html\"\ + ,\"href\":\"https://lists.debian.org/debian-lts-announce/2019/05/msg00006.html\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5IABSKTYZ5JUGL735UKGXL5YPRYOPUYI/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5IABSKTYZ5JUGL735UKGXL5YPRYOPUYI/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4UOAZIFCSZ3ENEFOR5IXX6NFAD3HV7FA/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4UOAZIFCSZ3ENEFOR5IXX6NFAD3HV7FA/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KYH3OAGR2RTCHRA5NOKX2TES7SNQMWGO/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KYH3OAGR2RTCHRA5NOKX2TES7SNQMWGO/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RLXRX23725JL366CNZGJZ7AQQB7LHQ6F/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RLXRX23725JL366CNZGJZ7AQQB7LHQ6F/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WZW27UCJ5CYFL4KFFFMYMIBNMIU2ALG5/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WZW27UCJ5CYFL4KFFFMYMIBNMIU2ALG5/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QV3PKZC3PQCO3273HAT76PAQZFBEO4KP/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QV3PKZC3PQCO3273HAT76PAQZFBEO4KP/\"\ + },{\"label\":\"https://seclists.org/bugtraq/2019/May/18\",\"href\":\"https://seclists.org/bugtraq/2019/May/18\"\ + },{\"label\":\"http://packetstormsecurity.com/files/152787/dotCMS-5.1.1-Vulnerable-Dependencies.html\"\ + ,\"href\":\"http://packetstormsecurity.com/files/152787/dotCMS-5.1.1-Vulnerable-Dependencies.html\"\ + },{\"label\":\"http://seclists.org/fulldisclosure/2019/May/13\",\"href\":\"\ + http://seclists.org/fulldisclosure/2019/May/13\"},{\"label\":\"http://seclists.org/fulldisclosure/2019/May/11\"\ + ,\"href\":\"http://seclists.org/fulldisclosure/2019/May/11\"},{\"label\":\"\ + http://seclists.org/fulldisclosure/2019/May/10\",\"href\":\"http://seclists.org/fulldisclosure/2019/May/10\"\ + },{\"label\":\"https://lists.debian.org/debian-lts-announce/2019/05/msg00029.html\"\ + ,\"href\":\"https://lists.debian.org/debian-lts-announce/2019/05/msg00029.html\"\ + },{\"label\":\"http://www.openwall.com/lists/oss-security/2019/06/03/2\",\"\ + href\":\"http://www.openwall.com/lists/oss-security/2019/06/03/2\"},{\"label\"\ + :\"http://packetstormsecurity.com/files/153237/RetireJS-CORS-Issue-Script-Execution.html\"\ + ,\"href\":\"http://packetstormsecurity.com/files/153237/RetireJS-CORS-Issue-Script-Execution.html\"\ + },{\"label\":\"https://access.redhat.com/errata/RHSA-2019:1456\",\"href\"\ + :\"https://access.redhat.com/errata/RHSA-2019:1456\"},{\"label\":\"https://www.debian.org/security/2019/dsa-4460\"\ + ,\"href\":\"https://www.debian.org/security/2019/dsa-4460\"},{\"label\":\"\ + https://seclists.org/bugtraq/2019/Jun/12\",\"href\":\"https://seclists.org/bugtraq/2019/Jun/12\"\ + },{\"label\":\"https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html\"\ + ,\"href\":\"https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html\"\ + },{\"label\":\"https://www.privacy-wise.com/mitigating-cve-2019-11358-in-old-versions-of-jquery/\"\ + ,\"href\":\"https://www.privacy-wise.com/mitigating-cve-2019-11358-in-old-versions-of-jquery/\"\ + },{\"label\":\"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00006.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00006.html\"\ + },{\"label\":\"https://access.redhat.com/errata/RHBA-2019:1570\",\"href\"\ + :\"https://access.redhat.com/errata/RHBA-2019:1570\"},{\"label\":\"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00025.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00025.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/ba79cf1658741e9f146e4c59b50aee56656ea95d841d358d006c18b6@%3Ccommits.roller.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/ba79cf1658741e9f146e4c59b50aee56656ea95d841d358d006c18b6@%3Ccommits.roller.apache.org%3E\"\ + },{\"label\":\"https://access.redhat.com/errata/RHSA-2019:2587\",\"href\"\ + :\"https://access.redhat.com/errata/RHSA-2019:2587\"},{\"label\":\"https://security.netapp.com/advisory/ntap-20190919-0001/\"\ + ,\"href\":\"https://security.netapp.com/advisory/ntap-20190919-0001/\"},{\"\ + label\":\"https://access.redhat.com/errata/RHSA-2019:3023\",\"href\":\"https://access.redhat.com/errata/RHSA-2019:3023\"\ + },{\"label\":\"https://access.redhat.com/errata/RHSA-2019:3024\",\"href\"\ + :\"https://access.redhat.com/errata/RHSA-2019:3024\"},{\"label\":\"https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html\"\ + ,\"href\":\"https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3E\"\ + },{\"label\":\"https://www.synology.com/security/advisory/Synology_SA_19_19\"\ + ,\"href\":\"https://www.synology.com/security/advisory/Synology_SA_19_19\"\ + },{\"label\":\"https://lists.apache.org/thread.html/bcce5a9c532b386c68dab2f6b3ce8b0cc9b950ec551766e76391caa3@%3Ccommits.nifi.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/bcce5a9c532b386c68dab2f6b3ce8b0cc9b950ec551766e76391caa3@%3Ccommits.nifi.apache.org%3E\"\ + },{\"label\":\"https://www.tenable.com/security/tns-2019-08\",\"href\":\"\ + https://www.tenable.com/security/tns-2019-08\"},{\"label\":\"https://www.oracle.com/security-alerts/cpujan2020.html\"\ + ,\"href\":\"https://www.oracle.com/security-alerts/cpujan2020.html\"},{\"\ + label\":\"https://lists.apache.org/thread.html/rca37935d661f4689cb4119f1b3b224413b22be161b678e6e6ce0c69b@%3Ccommits.nifi.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rca37935d661f4689cb4119f1b3b224413b22be161b678e6e6ce0c69b@%3Ccommits.nifi.apache.org%3E\"\ + },{\"label\":\"https://lists.debian.org/debian-lts-announce/2020/02/msg00024.html\"\ + ,\"href\":\"https://lists.debian.org/debian-lts-announce/2020/02/msg00024.html\"\ + },{\"label\":\"http://packetstormsecurity.com/files/156743/OctoberCMS-Insecure-Dependencies.html\"\ + ,\"href\":\"http://packetstormsecurity.com/files/156743/OctoberCMS-Insecure-Dependencies.html\"\ + },{\"label\":\"https://www.tenable.com/security/tns-2020-02\",\"href\":\"\ + https://www.tenable.com/security/tns-2020-02\"},{\"label\":\"https://www.oracle.com/security-alerts/cpuapr2020.html\"\ + ,\"href\":\"https://www.oracle.com/security-alerts/cpuapr2020.html\"},{\"\ + label\":\"https://lists.apache.org/thread.html/r38f0d1aa3c923c22977fe7376508f030f22e22c1379fbb155bf29766@%3Cdev.syncope.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r38f0d1aa3c923c22977fe7376508f030f22e22c1379fbb155bf29766@%3Cdev.syncope.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r7aac081cbddb6baa24b75e74abf0929bf309b176755a53e3ed810355@%3Cdev.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r7aac081cbddb6baa24b75e74abf0929bf309b176755a53e3ed810355@%3Cdev.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rac25da84ecdcd36f6de5ad0d255f4e967209bbbebddb285e231da37d@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rac25da84ecdcd36f6de5ad0d255f4e967209bbbebddb285e231da37d@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r2041a75d3fc09dec55adfd95d598b38d22715303f65c997c054844c9@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r2041a75d3fc09dec55adfd95d598b38d22715303f65c997c054844c9@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r7e8ebccb7c022e41295f6fdb7b971209b83702339f872ddd8cf8bf73@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r7e8ebccb7c022e41295f6fdb7b971209b83702339f872ddd8cf8bf73@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r41b5bfe009c845f67d4f68948cc9419ac2d62e287804aafd72892b08@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r41b5bfe009c845f67d4f68948cc9419ac2d62e287804aafd72892b08@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r2baacab6e0acb5a2092eb46ae04fd6c3e8277b4fd79b1ffb7f3254fa@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r2baacab6e0acb5a2092eb46ae04fd6c3e8277b4fd79b1ffb7f3254fa@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r7d64895cc4dff84d0becfc572b20c0e4bf9bfa7b10c6f5f73e783734@%3Cdev.storm.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r7d64895cc4dff84d0becfc572b20c0e4bf9bfa7b10c6f5f73e783734@%3Cdev.storm.apache.org%3E\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujul2020.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujul2020.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpuoct2020.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuoct2020.html\"\ + },{\"label\":\"https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44601\"\ + ,\"href\":\"https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44601\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujan2021.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujan2021.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpuApr2021.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuApr2021.html\"\ + },{\"label\":\"https://www.oracle.com//security-alerts/cpujul2021.html\",\"\ + href\":\"https://www.oracle.com//security-alerts/cpujul2021.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpuoct2021.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuoct2021.html\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujan2022.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujan2022.html\"}],\"description\"\ + :\"jQuery before 3.4.0, as used in Drupal, Backdrop CMS, and other products,\ + \ mishandles jQuery.extend(true, {}, ...) because of Object.prototype pollution.\ + \ If an unsanitized source object contained an enumerable __proto__ property,\ + \ it could extend the native Object.prototype.\",\"cvssScore\":\"6.1\",\"\ + cvssVersion\":\"3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/b7a7eb8d-8dd3-4c07-887f-cb442071bad8\"\ + ,\"name\":\"b7a7eb8d-8dd3-4c07-887f-cb442071bad8\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"b7a7eb8d-8dd3-4c07-887f-cb442071bad8\",\"component\"\ + :{\"name\":\"jquery\",\"version\":\"3.1.1\"},\"severity\":\"Medium\",\"name\"\ + :\"CVE-2020-11022\",\"cvssV2Score\":\"4.3\",\"cvssV3Score\":\"6.1\",\"links\"\ + :[{\"label\":\"https://github.com/jquery/jquery/security/advisories/GHSA-gxr4-xjj5-5px2\"\ + ,\"href\":\"https://github.com/jquery/jquery/security/advisories/GHSA-gxr4-xjj5-5px2\"\ + },{\"label\":\"https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/\"\ + ,\"href\":\"https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/\"},{\"\ + label\":\"https://jquery.com/upgrade-guide/3.5/\",\"href\":\"https://jquery.com/upgrade-guide/3.5/\"\ + },{\"label\":\"https://github.com/jquery/jquery/commit/1d61fd9407e6fbe82fe55cb0b938307aa0791f77\"\ + ,\"href\":\"https://github.com/jquery/jquery/commit/1d61fd9407e6fbe82fe55cb0b938307aa0791f77\"\ + },{\"label\":\"https://security.netapp.com/advisory/ntap-20200511-0006/\"\ + ,\"href\":\"https://security.netapp.com/advisory/ntap-20200511-0006/\"},{\"\ + label\":\"https://www.drupal.org/sa-core-2020-002\",\"href\":\"https://www.drupal.org/sa-core-2020-002\"\ + },{\"label\":\"https://www.debian.org/security/2020/dsa-4693\",\"href\":\"\ + https://www.debian.org/security/2020/dsa-4693\"},{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VOE7P7APPRQKD4FGNHBKJPDY6FFCOH3W/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VOE7P7APPRQKD4FGNHBKJPDY6FFCOH3W/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QPN2L2XVQGUA2V5HNQJWHK3APSK3VN7K/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QPN2L2XVQGUA2V5HNQJWHK3APSK3VN7K/\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujul2020.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujul2020.html\"},{\"label\"\ + :\"http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00067.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00067.html\"\ + },{\"label\":\"https://security.gentoo.org/glsa/202007-03\",\"href\":\"https://security.gentoo.org/glsa/202007-03\"\ + },{\"label\":\"http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00085.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00085.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rdf44341677cf7eec7e9aa96dcf3f37ed709544863d619cca8c36f133@%3Ccommits.airflow.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rdf44341677cf7eec7e9aa96dcf3f37ed709544863d619cca8c36f133@%3Ccommits.airflow.apache.org%3E\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AVKYXLWCLZBV2N7M46KYK4LVA5OXWPBY/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AVKYXLWCLZBV2N7M46KYK4LVA5OXWPBY/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SFP4UK4EGP4AFH2MWYJ5A5Z4I7XVFQ6B/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SFP4UK4EGP4AFH2MWYJ5A5Z4I7XVFQ6B/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SAPQVX3XDNPGFT26QAQ6AJIXZZBZ4CD4/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SAPQVX3XDNPGFT26QAQ6AJIXZZBZ4CD4/\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpuoct2020.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpuoct2020.html\"},{\"label\"\ + :\"https://lists.apache.org/thread.html/rbb448222ba62c430e21e13f940be4cb5cfc373cd3bce56b48c0ffa67@%3Cdev.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rbb448222ba62c430e21e13f940be4cb5cfc373cd3bce56b48c0ffa67@%3Cdev.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r706cfbc098420f7113968cc377247ec3d1439bce42e679c11c609e2d@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r706cfbc098420f7113968cc377247ec3d1439bce42e679c11c609e2d@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"http://lists.opensuse.org/opensuse-security-announce/2020-11/msg00039.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-security-announce/2020-11/msg00039.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r49ce4243b4738dd763caeb27fa8ad6afb426ae3e8c011ff00b8b1f48@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r49ce4243b4738dd763caeb27fa8ad6afb426ae3e8c011ff00b8b1f48@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://www.tenable.com/security/tns-2020-10\",\"href\":\"\ + https://www.tenable.com/security/tns-2020-10\"},{\"label\":\"https://www.tenable.com/security/tns-2020-11\"\ + ,\"href\":\"https://www.tenable.com/security/tns-2020-11\"},{\"label\":\"\ + https://www.oracle.com/security-alerts/cpujan2021.html\",\"href\":\"https://www.oracle.com/security-alerts/cpujan2021.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r8f70b0f65d6bedf316ecd899371fd89e65333bc988f6326d2956735c@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r8f70b0f65d6bedf316ecd899371fd89e65333bc988f6326d2956735c@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r564585d97bc069137e64f521e68ba490c7c9c5b342df5d73c49a0760@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r564585d97bc069137e64f521e68ba490c7c9c5b342df5d73c49a0760@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://www.tenable.com/security/tns-2021-02\",\"href\":\"\ + https://www.tenable.com/security/tns-2021-02\"},{\"label\":\"https://lists.debian.org/debian-lts-announce/2021/03/msg00033.html\"\ + ,\"href\":\"https://lists.debian.org/debian-lts-announce/2021/03/msg00033.html\"\ + },{\"label\":\"http://packetstormsecurity.com/files/162159/jQuery-1.2-Cross-Site-Scripting.html\"\ + ,\"href\":\"http://packetstormsecurity.com/files/162159/jQuery-1.2-Cross-Site-Scripting.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/ree3bd8ddb23df5fa4e372d11c226830ea3650056b1059f3965b3fce2@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/ree3bd8ddb23df5fa4e372d11c226830ea3650056b1059f3965b3fce2@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rede9cfaa756e050a3d83045008f84a62802fc68c17f2b4eabeaae5e4@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rede9cfaa756e050a3d83045008f84a62802fc68c17f2b4eabeaae5e4@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/re4ae96fa5c1a2fe71ccbb7b7ac1538bd0cb677be270a2bf6e2f8d108@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/re4ae96fa5c1a2fe71ccbb7b7ac1538bd0cb677be270a2bf6e2f8d108@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r54565a8f025c7c4f305355fdfd75b68eca442eebdb5f31c2e7d977ae@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r54565a8f025c7c4f305355fdfd75b68eca442eebdb5f31c2e7d977ae@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://www.tenable.com/security/tns-2021-10\",\"href\":\"\ + https://www.tenable.com/security/tns-2021-10\"},{\"label\":\"https://www.oracle.com/security-alerts/cpuApr2021.html\"\ + ,\"href\":\"https://www.oracle.com/security-alerts/cpuApr2021.html\"},{\"\ + label\":\"https://www.oracle.com//security-alerts/cpujul2021.html\",\"href\"\ + :\"https://www.oracle.com//security-alerts/cpujul2021.html\"},{\"label\":\"\ + https://www.oracle.com/security-alerts/cpuoct2021.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuoct2021.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r0483ba0072783c2e1bfea613984bfb3c86e73ba8879d780dc1cc7d36@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r0483ba0072783c2e1bfea613984bfb3c86e73ba8879d780dc1cc7d36@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujan2022.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujan2022.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpuapr2022.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuapr2022.html\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujul2022.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujul2022.html\"}],\"description\"\ + :\"In jQuery versions greater than or equal to 1.2 and before 3.5.0, passing\ + \ HTML from untrusted sources - even after sanitizing it - to one of jQuery's\ + \ DOM manipulation methods (i.e. .html(), .append(), and others) may execute\ + \ untrusted code. This problem is patched in jQuery 3.5.0.\",\"cvssScore\"\ + :\"6.1\",\"cvssVersion\":\"3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/80ac3a57-b985-888b-ae28-b6eb8c8393a4/cves/657286b2-a96d-4f78-9a7a-51bb68f0890d\"\ + ,\"name\":\"657286b2-a96d-4f78-9a7a-51bb68f0890d\",\"type\":\"Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves\"\ + ,\"properties\":{\"cveId\":\"657286b2-a96d-4f78-9a7a-51bb68f0890d\",\"component\"\ + :{\"name\":\"jquery\",\"version\":\"3.1.1\"},\"severity\":\"Medium\",\"name\"\ + :\"CVE-2020-11023\",\"cvssV2Score\":\"4.3\",\"cvssV3Score\":\"6.1\",\"links\"\ + :[{\"label\":\"https://jquery.com/upgrade-guide/3.5/\",\"href\":\"https://jquery.com/upgrade-guide/3.5/\"\ + },{\"label\":\"https://github.com/jquery/jquery/security/advisories/GHSA-jpcq-cgw6-v4j6\"\ + ,\"href\":\"https://github.com/jquery/jquery/security/advisories/GHSA-jpcq-cgw6-v4j6\"\ + },{\"label\":\"https://blog.jquery.com/2020/04/10/jquery-3-5-0-released\"\ + ,\"href\":\"https://blog.jquery.com/2020/04/10/jquery-3-5-0-released\"},{\"\ + label\":\"https://security.netapp.com/advisory/ntap-20200511-0006/\",\"href\"\ + :\"https://security.netapp.com/advisory/ntap-20200511-0006/\"},{\"label\"\ + :\"https://www.drupal.org/sa-core-2020-002\",\"href\":\"https://www.drupal.org/sa-core-2020-002\"\ + },{\"label\":\"https://www.debian.org/security/2020/dsa-4693\",\"href\":\"\ + https://www.debian.org/security/2020/dsa-4693\"},{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QPN2L2XVQGUA2V5HNQJWHK3APSK3VN7K/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QPN2L2XVQGUA2V5HNQJWHK3APSK3VN7K/\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujul2020.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujul2020.html\"},{\"label\"\ + :\"http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00067.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00067.html\"\ + },{\"label\":\"https://security.gentoo.org/glsa/202007-03\",\"href\":\"https://security.gentoo.org/glsa/202007-03\"\ + },{\"label\":\"http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00085.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00085.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/ra3c9219fcb0b289e18e9ec5a5ebeaa5c17d6b79a201667675af6721c@%3Cgitbox.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/ra3c9219fcb0b289e18e9ec5a5ebeaa5c17d6b79a201667675af6721c@%3Cgitbox.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r094f435595582f6b5b24b66fedf80543aa8b1d57a3688fbcc21f06ec@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r094f435595582f6b5b24b66fedf80543aa8b1d57a3688fbcc21f06ec@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r9c5fda81e4bca8daee305b4c03283dddb383ab8428a151d4cb0b3b15@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r9c5fda81e4bca8daee305b4c03283dddb383ab8428a151d4cb0b3b15@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rf661a90a15da8da5922ba6127b3f5f8194d4ebec8855d60a0dd13248@%3Cdev.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rf661a90a15da8da5922ba6127b3f5f8194d4ebec8855d60a0dd13248@%3Cdev.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/radcb2aa874a79647789f3563fcbbceaf1045a029ee8806b59812a8ea@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/radcb2aa874a79647789f3563fcbbceaf1045a029ee8806b59812a8ea@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rd38b4185a797b324c8dd940d9213cf99fcdc2dbf1fc5a63ba7dee8c9@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rd38b4185a797b324c8dd940d9213cf99fcdc2dbf1fc5a63ba7dee8c9@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r6e97b37963926f6059ecc1e417721608723a807a76af41d4e9dbed49@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r6e97b37963926f6059ecc1e417721608723a807a76af41d4e9dbed49@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rb69b7d8217c1a6a2100247a5d06ce610836b31e3f5d73fc113ded8e7@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rb69b7d8217c1a6a2100247a5d06ce610836b31e3f5d73fc113ded8e7@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r4aadb98086ca72ed75391f54167522d91489a0d0ae25b12baa8fc7c5@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r4aadb98086ca72ed75391f54167522d91489a0d0ae25b12baa8fc7c5@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/ra374bb0299b4aa3e04edde01ebc03ed6f90cf614dad40dd428ce8f72@%3Cgitbox.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/ra374bb0299b4aa3e04edde01ebc03ed6f90cf614dad40dd428ce8f72@%3Cgitbox.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rb25c3bc7418ae75cba07988dafe1b6912f76a9dd7d94757878320d61@%3Cgitbox.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rb25c3bc7418ae75cba07988dafe1b6912f76a9dd7d94757878320d61@%3Cgitbox.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/ra32c7103ded9041c7c1cb8c12c8d125a6b2f3f3270e2937ef8417fac@%3Cgitbox.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/ra32c7103ded9041c7c1cb8c12c8d125a6b2f3f3270e2937ef8417fac@%3Cgitbox.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rf1ba79e564fe7efc56aef7c986106f1cf67a3427d08e997e088e7a93@%3Cgitbox.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rf1ba79e564fe7efc56aef7c986106f1cf67a3427d08e997e088e7a93@%3Cgitbox.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AVKYXLWCLZBV2N7M46KYK4LVA5OXWPBY/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AVKYXLWCLZBV2N7M46KYK4LVA5OXWPBY/\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SFP4UK4EGP4AFH2MWYJ5A5Z4I7XVFQ6B/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SFP4UK4EGP4AFH2MWYJ5A5Z4I7XVFQ6B/\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rab82dd040f302018c85bd07d33f5604113573514895ada523c3401d9@%3Ccommits.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rab82dd040f302018c85bd07d33f5604113573514895ada523c3401d9@%3Ccommits.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/ra406b3adfcffcb5ce8707013bdb7c35e3ffc2776a8a99022f15274c6@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/ra406b3adfcffcb5ce8707013bdb7c35e3ffc2776a8a99022f15274c6@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r6c4df3b33e625a44471009a172dabe6865faec8d8f21cac2303463b1@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r6c4df3b33e625a44471009a172dabe6865faec8d8f21cac2303463b1@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r1fed19c860a0d470f2a3eded12795772c8651ff583ef951ddac4918c@%3Cgitbox.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r1fed19c860a0d470f2a3eded12795772c8651ff583ef951ddac4918c@%3Cgitbox.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r0593393ca1e97b1e7e098fe69d414d6bd0a467148e9138d07e86ebbb@%3Cissues.hive.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r0593393ca1e97b1e7e098fe69d414d6bd0a467148e9138d07e86ebbb@%3Cissues.hive.apache.org%3E\"\ + },{\"label\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SAPQVX3XDNPGFT26QAQ6AJIXZZBZ4CD4/\"\ + ,\"href\":\"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SAPQVX3XDNPGFT26QAQ6AJIXZZBZ4CD4/\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rda99599896c3667f2cc9e9d34c7b6ef5d2bbed1f4801e1d75a2b0679@%3Ccommits.nifi.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rda99599896c3667f2cc9e9d34c7b6ef5d2bbed1f4801e1d75a2b0679@%3Ccommits.nifi.apache.org%3E\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpuoct2020.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpuoct2020.html\"},{\"label\"\ + :\"https://lists.apache.org/thread.html/rbb448222ba62c430e21e13f940be4cb5cfc373cd3bce56b48c0ffa67@%3Cdev.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rbb448222ba62c430e21e13f940be4cb5cfc373cd3bce56b48c0ffa67@%3Cdev.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r706cfbc098420f7113968cc377247ec3d1439bce42e679c11c609e2d@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r706cfbc098420f7113968cc377247ec3d1439bce42e679c11c609e2d@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"http://lists.opensuse.org/opensuse-security-announce/2020-11/msg00039.html\"\ + ,\"href\":\"http://lists.opensuse.org/opensuse-security-announce/2020-11/msg00039.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r49ce4243b4738dd763caeb27fa8ad6afb426ae3e8c011ff00b8b1f48@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r49ce4243b4738dd763caeb27fa8ad6afb426ae3e8c011ff00b8b1f48@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r2c85121a47442036c7f8353a3724aa04f8ecdfda1819d311ba4f5330@%3Cdev.felix.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r2c85121a47442036c7f8353a3724aa04f8ecdfda1819d311ba4f5330@%3Cdev.felix.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r3702ede0ff83a29ba3eb418f6f11c473d6e3736baba981a8dbd9c9ef@%3Cdev.felix.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r3702ede0ff83a29ba3eb418f6f11c473d6e3736baba981a8dbd9c9ef@%3Cdev.felix.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r9e0bd31b7da9e7403478d22652b8760c946861f8ebd7bd750844898e@%3Cdev.felix.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r9e0bd31b7da9e7403478d22652b8760c946861f8ebd7bd750844898e@%3Cdev.felix.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rf0f8939596081d84be1ae6a91d6248b96a02d8388898c372ac807817@%3Cdev.felix.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rf0f8939596081d84be1ae6a91d6248b96a02d8388898c372ac807817@%3Cdev.felix.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r07ab379471fb15644bf7a92e4a98cbc7df3cf4e736abae0cc7625fe6@%3Cdev.felix.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r07ab379471fb15644bf7a92e4a98cbc7df3cf4e736abae0cc7625fe6@%3Cdev.felix.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r4dba67be3239b34861f1b9cfdf9dfb3a90272585dcce374112ed6e16@%3Cdev.felix.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r4dba67be3239b34861f1b9cfdf9dfb3a90272585dcce374112ed6e16@%3Cdev.felix.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r9006ad2abf81d02a0ef2126bab5177987e59095b7194a487c4ea247c@%3Ccommits.felix.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r9006ad2abf81d02a0ef2126bab5177987e59095b7194a487c4ea247c@%3Ccommits.felix.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r55f5e066cc7301e3630ce90bbbf8d28c82212ae1f2d4871012141494@%3Cdev.felix.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r55f5e066cc7301e3630ce90bbbf8d28c82212ae1f2d4871012141494@%3Cdev.felix.apache.org%3E\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujan2021.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujan2021.html\"},{\"label\"\ + :\"https://lists.apache.org/thread.html/r8f70b0f65d6bedf316ecd899371fd89e65333bc988f6326d2956735c@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r8f70b0f65d6bedf316ecd899371fd89e65333bc988f6326d2956735c@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r564585d97bc069137e64f521e68ba490c7c9c5b342df5d73c49a0760@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r564585d97bc069137e64f521e68ba490c7c9c5b342df5d73c49a0760@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://www.tenable.com/security/tns-2021-02\",\"href\":\"\ + https://www.tenable.com/security/tns-2021-02\"},{\"label\":\"https://lists.debian.org/debian-lts-announce/2021/03/msg00033.html\"\ + ,\"href\":\"https://lists.debian.org/debian-lts-announce/2021/03/msg00033.html\"\ + },{\"label\":\"http://packetstormsecurity.com/files/162160/jQuery-1.0.3-Cross-Site-Scripting.html\"\ + ,\"href\":\"http://packetstormsecurity.com/files/162160/jQuery-1.0.3-Cross-Site-Scripting.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/ree3bd8ddb23df5fa4e372d11c226830ea3650056b1059f3965b3fce2@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/ree3bd8ddb23df5fa4e372d11c226830ea3650056b1059f3965b3fce2@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/rede9cfaa756e050a3d83045008f84a62802fc68c17f2b4eabeaae5e4@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/rede9cfaa756e050a3d83045008f84a62802fc68c17f2b4eabeaae5e4@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/re4ae96fa5c1a2fe71ccbb7b7ac1538bd0cb677be270a2bf6e2f8d108@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/re4ae96fa5c1a2fe71ccbb7b7ac1538bd0cb677be270a2bf6e2f8d108@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r54565a8f025c7c4f305355fdfd75b68eca442eebdb5f31c2e7d977ae@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r54565a8f025c7c4f305355fdfd75b68eca442eebdb5f31c2e7d977ae@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://www.tenable.com/security/tns-2021-10\",\"href\":\"\ + https://www.tenable.com/security/tns-2021-10\"},{\"label\":\"https://www.oracle.com/security-alerts/cpuApr2021.html\"\ + ,\"href\":\"https://www.oracle.com/security-alerts/cpuApr2021.html\"},{\"\ + label\":\"https://www.oracle.com//security-alerts/cpujul2021.html\",\"href\"\ + :\"https://www.oracle.com//security-alerts/cpujul2021.html\"},{\"label\":\"\ + https://www.oracle.com/security-alerts/cpuoct2021.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuoct2021.html\"\ + },{\"label\":\"https://lists.apache.org/thread.html/r0483ba0072783c2e1bfea613984bfb3c86e73ba8879d780dc1cc7d36@%3Cissues.flink.apache.org%3E\"\ + ,\"href\":\"https://lists.apache.org/thread.html/r0483ba0072783c2e1bfea613984bfb3c86e73ba8879d780dc1cc7d36@%3Cissues.flink.apache.org%3E\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujan2022.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujan2022.html\"},{\"label\"\ + :\"https://www.oracle.com/security-alerts/cpuapr2022.html\",\"href\":\"https://www.oracle.com/security-alerts/cpuapr2022.html\"\ + },{\"label\":\"https://www.oracle.com/security-alerts/cpujul2022.html\",\"\ + href\":\"https://www.oracle.com/security-alerts/cpujul2022.html\"}],\"description\"\ + :\"In jQuery versions greater than or equal to 1.0.3 and before 3.5.0, passing\ + \ HTML containing