packetchaos / navi

A Command-line tool which leverages the Tenable.io API to reduce the time it takes to get information that is common during remediation or a troubleshooting event
GNU General Public License v3.0
72 stars 26 forks source link

can't add keys or run any navi command on macOS #39

Closed DBorGe closed 10 months ago

DBorGe commented 10 months ago

Hi,

I've been trying to use navi on macOS without success.

Installed using: pip3 install navi-pro

However, when run navi keys I get the following error:

`% navi keys Traceback (most recent call last): File "/opt/homebrew/lib/python3.10/site-packages/navi/plugins/api_wrapper.py", line 28, in tenb_connection cur.execute("SELECT * from url;") sqlite3.OperationalError: no such table: url

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/homebrew/bin/navi", line 5, in from navi.cli import cli File "/opt/homebrew/lib/python3.10/site-packages/navi/cli.py", line 2, in from .plugins import plugin_loader File "/opt/homebrew/lib/python3.10/site-packages/navi/plugins/init.py", line 1, in from .ip import ip File "/opt/homebrew/lib/python3.10/site-packages/navi/plugins/ip.py", line 7, in tio = tenb_connection() File "/opt/homebrew/lib/python3.10/site-packages/navi/plugins/api_wrapper.py", line 34, in tenb_connection tio = TenableIO(access_key, secret_key, vendor='Casey Reid', product='navi', build=navi_version()) UnboundLocalError: local variable 'access_key' referenced before assignment`

Anyone can help me here?

packetchaos commented 10 months ago

Delete the navi.db file.

Then run the 'navi keys' command again.

This can happen after upgrading navi; in this case the current navi.db doesn't have the URL table because in older versions It wasn't available.

If it doesn't resolve the issue; please upgrade to the latest version: navi-pro 7.5.7

DBorGe commented 10 months ago

this worked. after deleted the navi.db I could run the navi keys.

Thank you.