Using Automatic application creation with the CLI
Using Automatic application creation with the CLI
When automatic application creation is enabled, Lifecycle creates new applications when the passed Application ID is not found. This is recommended for first-time evaluation of new applications.
The automatic application creation feature creates a new application under the organization that is configured. To create an application under a different organization, you can specify the organization-id as an input parameter.
Note
The CLI evaluation will error when providing an organization ID that does not match the organization the application belongs to in Lifecycle. This prevents accidental misconfigurations where scans are made to the wrong application; corrupting the evaluation history.
Locating the Organization ID
To locate the organization-id
- Login using credentials that have access to the organization hierarchy.
- Navigate to the organization under which you want the new application to be created.
- Select the
Actionsmenu, select theOrg ID to Clipboardmenu entry.
Sample Usage
Note
- Automatic Application Creation must be enabled in Lifecycle; otherwise
-imust reference an existing application or the evaluation will fail. - If you provide
-O, use the Organization ID from the UI (not the organization name). - Ensure the token’s user has at least the Evaluate Applications permission for the relevant organization or application. For more information on CLI authentication and required permissions, see Sonatype IQ CLI – CLI Authentication.
java -jar nexus-iq-cli-<YOUR_CLI_VERSION>.jar
-s https://iq.example.com:8070 \ # Replace with your IQ Server URL
-a username:password \ # Replace with your credentials or token format
-i my-new-app-public-id \ # Application Public ID (lowercase -i).
-O 0123456789abcdef0123456789abcdef \ # Organization ID (capital -O).
./path/to/scan/target # Replace with your scan target (dir/archive/manifest)
Search results
No results found