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
8 changes: 8 additions & 0 deletions src/firmwareanalysis/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

1.0.0
++++++
* Initial release.
147 changes: 147 additions & 0 deletions src/firmwareanalysis/README.md
Original file line number Diff line number Diff line change
@@ -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
```
42 changes: 42 additions & 0 deletions src/firmwareanalysis/azext_firmwareanalysis/__init__.py
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions src/firmwareanalysis/azext_firmwareanalysis/_help.py
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions src/firmwareanalysis/azext_firmwareanalysis/_params.py
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions src/firmwareanalysis/azext_firmwareanalysis/aaz/__init__.py
Original file line number Diff line number Diff line change
@@ -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
# --------------------------------------------------------------------------------------------
10 changes: 10 additions & 0 deletions src/firmwareanalysis/azext_firmwareanalysis/aaz/latest/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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"]
Original file line number Diff line number Diff line change
@@ -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 *
Original file line number Diff line number Diff line change
@@ -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"]
Original file line number Diff line number Diff line change
@@ -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 *
Loading