This CLI utility calls the IriusRisk API to perform key operations on your threat model. It's available as a single JAR and a compiled Linux binary.
irius [-hV] [COMMAND]
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
help Displays help information about the specified command
product Display product related information
threat Display threats for a given product
countermeasure Display countermeasure information
configure Manage configuration
- Download the Linux binary from the releases or download the single JAR file from the releases and run it with a Java 11 JRE.
- Set the URL of your IriusRisk instance:
./irius configure url set "https://myserver.iriusrisk.com/api/v1"
- Set the API authentication token for your user to access the IriusRisk API:
./irius configure token set "my-unique-authentication-token"
These settings are stored in the file ~/.irius/credentials
This project depends on the IriusRisk Java client library: https://github.com/iriusrisk/iriusrisk-client-lib/tree/develop which is not published to Maven central. Download that library and install to your local maven repository. The current version of this CLI depends on the develop branch of the client library. Once the library is installed in maven, then build the CLI:
mvn package
This requires GraalVM for at least Java 11.
mvn package
There are a number of additional files needed by the GraalVM compiler to generate the native image, these are located in: src/main/resources/META-INF/native-image/com.iriusrisk.cli/irius-cli/
The native-image.properties file passes additional arguments to the native-image GraalVM command to locate these files. If you add new commands to the CLI then you will need to regenerate these files using the agent provided by GraalVM:
java -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image/com.iriusrisk.cli/irius-cli/
Note that an additional file from the iriusrisk-client-lib is also used to generate the binary, but that file is automatically generated when building that library.