Skip to content

Commit

Permalink
fixes #21. Updating deprecation message (#27)
Browse files Browse the repository at this point in the history
* fixes #21. Updating deprecation message

* update README documentation, use click interface to mark function as deprecated, document why crypto command still exists for older firmware uploads

* fixed bad copy paste in README
  • Loading branch information
eacmen authored Jun 30, 2020
1 parent 3356f84 commit 9052fba
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 9 deletions.
34 changes: 30 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,27 @@ You can see the available commands by viewing the help output:
$ centrifuge report --help
Usage: centrifuge report [OPTIONS] COMMAND [ARGS]...
Options:
--ufid ID Centrifuge report ID [required]
--help Show this message and exit.
Commands:
binary-hardening
certificates
check-policy
code-emulated
code-static
code-summary
crypto
crypto deprecated (use certificates, public-keys, and...
delete
guardian
info
passhash
private-keys
public-keys
sbom
security-checklist
Get basic information about the report (User, Make, Model, Version, filename, etc):
Expand All @@ -139,11 +145,23 @@ Get Password Hashes:
$ centrifuge report --ufid=<REPORT_ID> passhash
Get Crypto Keys:
Get Certificates:
.. code-block:: bash
$ centrifuge report --ufid=<REPORT_ID> crypto
$ centrifuge report --ufid=<REPORT_ID> certificates
Get Public Keys:
.. code-block:: bash
$ centrifuge report --ufid=<REPORT_ID> public-keys
Get Private Keys:
.. code-block:: bash
$ centrifuge report --ufid=<REPORT_ID> private-keys
Get SBOM Results:
Expand All @@ -157,6 +175,14 @@ Get Security Checklist Results:
$ centrifuge report --ufid=<REPORT_ID> security-checklist
Get Legacy Crypto Results (firmware uploaded before September 30th 2019). Refer to
``certificates``, ``public-key``, and ``private-key`` now.
.. code-block:: bash
$ centrifuge report --ufid=<REPORT_ID> crypto
The code analysis section is a little bit more complicated, since the data is
more structured. To understand how to access this data you need to understand
that when we process a firmware we must extract it first, each time we extract a
Expand Down
2 changes: 1 addition & 1 deletion centrifuge_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.6.0'
__version__ = '0.6.1'
5 changes: 2 additions & 3 deletions centrifuge_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,10 @@ def info(cli):
return(result)


@report.command()
@report.command(deprecated=True)
@pass_cli
def crypto(cli):
click.echo('crypto is a deprecated endpoint and will be removed in future releases, please migrate to certificates and privatekeys',
err=True)
"""deprecated (use certificates, public-keys, and private-keys)"""
result = cli.do_GET(f'/api/report/crypto/{cli.ufid}', query_list=['sorters[0][field]=path',
'sorters[0][dir]=asc'])
cli.echo(result)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "centrifuge-cli"
version = "0.6.0"
version = "0.6.1"
description = "A command line utility for interacting with the Centrifuge Firmware Analysis Platform's REST API."
authors = ["Peter Eacmen <[email protected]>"]
readme = 'README.rst'
Expand Down

0 comments on commit 9052fba

Please sign in to comment.