- 24 Aug 2023
- 5 Minutes to read
- Print
- DarkLight
- PDF
Ion Connect CLI
- Updated on 24 Aug 2023
- 5 Minutes to read
- Print
- DarkLight
- PDF
Ion-Connect is a CLI (Command-Line Interface) tool that allows you to interact with the Ion Channel API.
Installation
- Email support@exiger.com with a request to be provided the tool.
- Run the executable from the folder matching your operating system. Supported operating systems include Windows, Linux, and Darwin (includes macOS).
Running Ion Connect
To run Ion Connect, you will need to provide an API token to obtain access. Steps to obtain a token can be found here.
To prevent the need to provide the API token each time you run Ion Connect, it is recommended to run the configure command.
ion-connect configure
Alternatively, the API token can be provided via an environment variable:
IONCHANNEL_SECRET_KEY=<token> ion-connect [command]
Usage
All Ion Connect commands use the following format. See the section below for each command's flags and arguments.
ion-connect [global flags] <command> [command flags] [arguments...]
Commands
Analysis
The analysis commands allow you to access analysis data.
get-analysis
ion-connect analysis get-analysis [flags] ANALYSISID
Flags:
-h, --help: Help for get-analysis
-p, --project-id string: ID of the project (required)
-t, --team-id string: ID of the team for the project (required)
get-latest-analysis
ion-connect analysis get-latest-analysis [flags]
Flags:
-h, --help: Help for get-latest-analysis
-p, --project-id string: ID of the project (required)
-t, --team-id string: ID of the team for the project (required)
Community
The community commands allow you to access a GitHub repository and actor data.
get-repo
ion-connect community get-repo NAME [flags]
Flags:
-h, --help: Help for get-repo
get-repos-for-actor
ion-connect community get-repos-for-actor NAME [flags]
Flags:
-h, --help: Help for get-repos-for-actor
Configure
ion-connect configure [flags]
Flags:
-h, --help: Help for configure
Delivery
Access data related to delivery destinations.
create-destination
ion-connect delivery create-destination [flags] PATHTOJSON
Flags:
-h, --help: Help for create-destination
--print: Print an example create destination json skeleton
delete-destination
ion-connect delivery delete-destination [flags]
Flags:
-d, --delivery-id string: ID of the destination to be deleted (required)
-h, --help: Help for delete-destination
get-destinations
ion-connect delivery get-destinations [flags]
Flags:
-h, --help: Help for get-destinations
-t, --team-id string: ID of the team for the deliveries (required)
Dependency
Access data related to dependencies.
resolve-dependencies-in-file
ion-connect dependency resolve-dependencies-in-file [flags] PATHTODEPFILE
Flags:
--flag: Feature flag for experimental usage
-f, --flatten: Return the list in a flattened array
-h, --help: Help for resolve-dependencies-in-file
-t, --type string: Type of ecosystem or file for parsing (required)
Java: java, maven, pom.xml
Ruby: ruby, rubygems, gem, gemfile, gemspec
Javascript: javascript, npm, npmjs, package.json, package, json
Python: python, pip, pipfile, pypi, requirements
Go: glide, go, golang
Project
Access data relating to projects.
add-alias
ion-connect project add-alias NAME VERSION [ORG] [flags]
Flags:
-h, --help: Help for add-alias
-p, --project-id string: ID of the project (required)
-t, --team-id string: ID of the team for the project (required)
create-project
ion-connect project create-project [flags] PATHTOJSON
Flags:
-h, --help: Help for create-project
--print: Print an example create project json skeleton
create-project-spdx
ion-connect project create-projects-spdx [flags] PATHTOSPDX
Flags:
-h, --help: Help for create-projects-spdx
-d, --include-dependencies: True if dependency packages should be imported as projects (default: true) (default true)
--poc-email string: Point of Contact (PoC) email to be used for the project
--poc-name string: Point of Contact (PoC) name to be used for the project
-r, --ruleset-id string: ID of the ruleset for the project (required)
--spdx-version string: SPDX version 2.1 or 2.2 to import (default: 2.1)
-t, --team-id string: ID of the team for the project (required)
create-projects-csv
ion-connect project create-projects-csv [flags] PATHTOCSV
Flags:
-h, --help: Help for create-projects-csv
-t, --team-id string: ID of the team for the project (required)
get-project
ion-connect project get-project [flags]
Flags:
-h, --help: Help for get-project
-p, --project-id string: ID of the project (required)
-t, --team-id string: ID of the team for the project (required)
get-projects
ion-connect project get-projects [flags]
Flags:
-h, --help: Help for get-projects
--limit int: Maximum count of projects (default 10)
--offset int: Beginning index for project set
-t, --team-id string: ID of the team for the project (required)
set-source
ion-connect project set-source LOCATION [flags]
Flags:
-h, --help: Help for set-source
-p, --project-id string: ID of the project (required)
set-type
ion-connect project set-type TYPE [SOURCE] [BRANCH] [flags]
Flags:
-h, --help: Help for set-type
-p, --project-id string: ID of the project (required)
-b, --source-branch-name string: Source branch of project
-s, --source-location string: Source location of project (required except for source_unavailable type)
Report
Access data relating to analyses, evaluations, and their associations.
export-data
Flags:
-h, --help: Help for export-data
--print: Print an example export data json skeleton. ids is 1-n project ids.
get-analysis
Flags:
-h, --help: Help for get-analysis
-p, --project-id string: ID of the project (required)
-t, --team-id string: ID of the team for the project (required)
Example:
ion-connect report get-analysis -p <project_id> -t <team_id> <analysis_id>
Scanner
Initiate analyses and get results.
analyze-project
Flags:
-h, --help: Help for analyze-project
-p, --project-id string: ID of the project (required)
-t, --team-id string: ID of the team for the project (required)
-b, --branch string: Name of the branch if the project maps to a repository
Example:
ion-connect scanner analyze-project -p <project_id> -t <team_id>
get-analysis-status
Flags:
-h, --help: Help for get-analysis-status
-p, --project-id string: ID of the project (required)
-t, --team-id string: ID of the team containing the project (required)
Example:
ion-connect scanner get-analysis-status -p <project_id> -t <team_id> <analysis_id>
Search
Flags:
-h, --help: Help for search
-q, --query string: String text to search for known software artifacts.
-t, --tbs string: Requests that the search is performed against the provided resource type (default "products").
Example:
ion-connect search -q ruby -t products
Version
Flags:
-h, --help: Help for version
Vulnerability
Access data relating to vulnerabilities and their associations.
get-vulnerabilities
Flags:
-h, --help: Help for get-vulnerabilities
Current up to version 0.31.0