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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/firmwareanalysis/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
Release History
===============

2.0.0
+++++
* Updating version for 2025-08-02 swagger release
* Added workspace usage-metric command
* Deprecated generate filesystem download url command

1.0.0
++++++
* Initial release.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
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 *
from ._update import *
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class BinaryHardening(AAZCommand):
"""

_aaz_info = {
"version": "2024-01-10",
"version": "2025-08-02",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/binaryhardeningresults", "2024-01-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}/binaryhardeningresults", "2025-08-02"],
]
}

Expand All @@ -49,6 +49,9 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--firmware-id"],
help="The id of the firmware.",
required=True,
fmt=AAZStrArgFormat(
pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$",
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
Expand Down Expand Up @@ -133,7 +136,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-01-10",
"api-version", "2025-08-02",
required=True,
),
}
Expand Down Expand Up @@ -170,7 +173,7 @@ def _build_schema_on_200(cls):
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"read_only": True},
flags={"required": True},
)

value = cls._schema_on_200.value
Expand All @@ -183,9 +186,7 @@ def _build_schema_on_200(cls):
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.properties = AAZObjectType()
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
Expand All @@ -195,36 +196,40 @@ def _build_schema_on_200(cls):
)

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.executable_architecture = AAZStrType(
serialized_name="executableArchitecture",
)
properties.features = AAZObjectType(
flags={"client_flatten": True},
properties.executable_class = AAZStrType(
serialized_name="executableClass",
)
properties.file_path = AAZStrType(
serialized_name="filePath",
nullable=True,
)
properties.rpath = AAZStrType(
nullable=True,
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.runpath = AAZStrType(
nullable=True,
properties.rpath = AAZStrType()
properties.runpath = AAZStrType()
properties.security_hardening_features = AAZObjectType(
serialized_name="securityHardeningFeatures",
)

features = cls._schema_on_200.value.Element.properties.features
features.canary = AAZBoolType()
features.nx = AAZBoolType()
features.pie = AAZBoolType()
features.relro = AAZBoolType()
features.stripped = AAZBoolType()
security_hardening_features = cls._schema_on_200.value.Element.properties.security_hardening_features
security_hardening_features.canary = AAZBoolType()
security_hardening_features.no_execute = AAZBoolType(
serialized_name="noExecute",
)
security_hardening_features.position_independent_executable = AAZBoolType(
serialized_name="positionIndependentExecutable",
)
security_hardening_features.relocation_read_only = AAZBoolType(
serialized_name="relocationReadOnly",
)
security_hardening_features.stripped = AAZBoolType()

system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# flake8: noqa

from azure.cli.core.aaz import *
import uuid


@register_command(
Expand All @@ -19,13 +18,13 @@ 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']
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}
"""

_aaz_info = {
"version": "2024-01-10",
"version": "2025-08-02",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}", "2024-01-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.iotfirmwaredefense/workspaces/{}/firmwares/{}", "2025-08-02"],
]
}

Expand All @@ -48,8 +47,10 @@ def _build_arguments_schema(cls, *args, **kwargs):
_args_schema.firmware_id = AAZStrArg(
options=["-n", "--name", "--firmware-id"],
help="The id of the firmware.",
default=str(uuid.uuid4()),
required=False,
required=True,
fmt=AAZStrArgFormat(
pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]*$",
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
Expand Down Expand Up @@ -80,7 +81,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--file-size"],
arg_group="Properties",
help="File size of the uploaded firmware image.",
nullable=True,
)
_args_schema.model = AAZStrArg(
options=["--model"],
Expand All @@ -91,7 +91,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
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(
Expand Down Expand Up @@ -172,7 +171,7 @@ def url_parameters(self):
parameters = {
**self.serialize_url_param(
"firmwareId", self.ctx.args.firmware_id,
required=False,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
Expand All @@ -193,7 +192,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-01-10",
"api-version", "2025-08-02",
required=True,
),
}
Expand All @@ -218,13 +217,13 @@ def content(self):
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("properties", AAZObjectType)

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("fileSize", AAZIntType, ".file_size")
properties.set_prop("model", AAZStrType, ".model")
properties.set_prop("status", AAZStrType, ".status")
properties.set_prop("statusMessages", AAZListType, ".status_messages")
Expand Down Expand Up @@ -266,9 +265,7 @@ def _build_schema_on_200_201(cls):
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
Expand All @@ -284,7 +281,6 @@ def _build_schema_on_200_201(cls):
)
properties.file_size = AAZIntType(
serialized_name="fileSize",
nullable=True,
)
properties.model = AAZStrType()
properties.provisioning_state = AAZStrType(
Expand Down
Loading
Loading