cmd

package
v1.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const StatusAborted = "ABORTED"
View Source
const StatusError = "ERROR"
View Source
const StatusFinished = "FINISHED"

Variables

View Source
var (
	// Assets command downloads all/some assets from vulcan into a specified file.
	Assets = &cobra.Command{
		Use:   `assets <output_file>`,
		Short: `Downloads all the assets in vulcan to a specified text file.`,
		Long: `Downloads all the assets in vulcan to a file optionally filtering by asset type.
The output file has one asset per line. Line format: identifier;asset_type`,
		Example: `vulcan-cli assets assets.txt --type Hostname --type WebAddress -H vulcan.example.com -k a_token`,
		Args:    cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			return runAssets(args, apiClient)
		},
	}

	ErrOutputAlreadyExists = errors.New("output file already exists")
)
View Source
var (
	CPanel = &cobra.Command{
		Use:   `cpanel <teams_dir>`,
		Short: `Shows information about open issues in teams`,
		Args:  cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			return runCPanel(args, apiClient)
		},
	}
)
View Source
var FindTeam = &cobra.Command{
	Use:   `find <teams_dir> <asset1> [asset2 ...]`,
	Short: `Find the teams an asset pertains to in the local teams directory`,
	Args:  cobra.MinimumNArgs(2),
	RunE: func(cmd *cobra.Command, args []string) error {
		return runFindTeam(args)
	},
}
View Source
var ImportCmd = &cobra.Command{
	Use:   `import <vulcanito_assets_dir>`,
	Short: `Import assets in Vulcanito format into vulcan-api`,
	Args:  cobra.ExactArgs(1),
	RunE: func(cmd *cobra.Command, args []string) error {
		return runImport(args, apiClient)
	},
}
View Source
var PruneCmd = &cobra.Command{
	Use:   `prune <teams_dir> <team_name>`,
	Short: `Deletes the orphan assets defined in the local file orphan.txt for a team`,
	Args:  cobra.ExactArgs(2),
	RunE: func(cmd *cobra.Command, args []string) error {
		return runPrune(args, apiClient)
	},
}
View Source
var PullTeam = &cobra.Command{
	Use:   `pull <teams_dir> <team_name>`,
	Short: `Dowloads all the info of a team(s) into files inside a directory, overwriting the local info`,
	Args:  cobra.ExactArgs(2),
	RunE: func(cmd *cobra.Command, args []string) error {
		return runPullTeam(args, apiClient)
	},
}
View Source
var PushTeam = &cobra.Command{
	Use:   `push <teams_dir> <team_name>`,
	Short: `Uploads the info of a team with the one that is defined in files, overwriting the remote info`,
	Args:  cobra.ExactArgs(2),
	RunE: func(cmd *cobra.Command, args []string) error {
		return runPushTeam(args, apiClient)
	},
}
View Source
var RefreshScans = &cobra.Command{
	Use:   `refresh <scans_file>`,
	Short: `Refreshes scans stored in a temporary file`,
	Args:  cobra.ExactArgs(1),
	RunE: func(cmd *cobra.Command, args []string) error {
		return runRefreshScans(args, apiClient)
	},
}
View Source
var ScanTeam = &cobra.Command{
	Use:   `scan <teams_dir> <team_name>`,
	Short: `Launches a scan against a team storing its info in a temporary file`,
	Args:  cobra.ExactArgs(2),
	RunE: func(cmd *cobra.Command, args []string) error {
		return runScanTeam(args, apiClient)
	},
}

Functions

func Execute

func Execute()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL