The „analyze“ command
The Analyze command is at the heart of NDM. It performs dynamic analysis via a sandbox server.
In short, you can provide a package name and version; this data will be sent to the NDM servers. There, the package will be executed in a sandbox. The sandbox will take logs, analyze them, and then display the results. Based on this information, a behavioral profile of the package is created and clearly displayed in the terminal. A timeline is also generated to aid in the behavioral analysis.
How to run it?
You first need to install NDM and than run the analyze command:
ndm analyze
You will be asked for a package name. After entering a valid name, NDM will ask you which version you would like to analyze. You can choose the most recent version too. After that, the package information will be displayed in the terminal, and you will have to confirm that it is the correct package.
If everything is correct, NDM will send the package name and version to the NDM servers. The package will then be analyzed there.
You can also choose a custom server to which NDM should send the request. More on that in the config command.
use
ndm analyze <package> <version>
as a shortcut
Health Option
We have implemented a --health option to check the health of the server.
The NDM backend has an API endpoint called /health. When the health option is used, this endpoint is requested and the user is provided with information about the state of the server.
To use this feature, you need to run:
ndm analyze --health
It is important to note that your server must support the health endpoint. The standard NDM endpoint does this automatically.