helper

package
v0.0.0-...-0134d0e Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckToken

func CheckToken() (*appknox.Me, error)

CheckToken checks if access token is valid.

func GetMe

func GetMe() (*appknox.Me, error)

GetMe return current User.

func GetProxy

func GetProxy() (*url.URL, error)

GetProxy return the proxy url if proxy is set.

func PrintError

func PrintError(a ...interface{})

PrintError prints message to Stderr

func ProcessAnalyses

func ProcessAnalyses(fileID int)

ProcessAnalyses takes the list of analyses and print it to CLI.

func ProcessCiCheck

func ProcessCiCheck(fileID, riskThreshold int)

ProcessCiCheck takes the list of analyses and print it to CLI.

func ProcessCreateReport

func ProcessCreateReport(fileID int) (reportID int, err error)

func ProcessDownloadReportCSV

func ProcessDownloadReportCSV(reportID int, outputFilePath string) error

func ProcessDownloadReportExcel

func ProcessDownloadReportExcel(reportID int, outputFilePath string) error

func ProcessFiles

func ProcessFiles(projectID int, versionCode string, offset, limit int)

ProcessFiles takes the list of files and print it to CLI.

func ProcessInit

func ProcessInit()

ProcessInit initializes Appknox CLI.

func ProcessMe

func ProcessMe()

ProcessMe takes the me data and print it to CLI.

func ProcessOrganizations

func ProcessOrganizations()

ProcessOrganizations returns the list of organizations for the current user.

func ProcessOwasp

func ProcessOwasp(owaspID string)

ProcessOwasp takes the me data and print it to CLI.

func ProcessProjects

func ProcessProjects(platform, packageName, query string, offset, limit int)

ProcessProjects takes the list of files and print it to CLI.

func ProcessUpload

func ProcessUpload(file *os.File)

ProcessUpload takes the filePath and upload it to the appknox dashboard.

func ProcessVulnerability

func ProcessVulnerability(vulnerabilityID int)

ProcessVulnerability takes the vulnerabilityID and print it's details to CLI.

Types

type MeData

type MeData struct {
	ID                  int    `header:"id"`
	Username            string `header:"username"`
	Email               string `header:"email"`
	DefaultOrganization int    `header:"default-organization"`
}

MeData represents a struct which will be printed to the CLI.

type OrganizationData

type OrganizationData struct {
	ID            int    `header:"id"`
	Name          string `header:"name"`
	ProjectsCount int    `header:"projects-count"`
}

OrganizationData represents a struct which will be printed to the CLI.

type ProjectData

type ProjectData struct {
	ID          int        `header:"id"`
	CreatedOn   *time.Time `header:"created-on"`
	UpdatedOn   *time.Time `header:"updated-on"`
	PackageName string     `header:"package-name"`
	Platform    int        `header:"platform"`
	FileCount   int        `header:"file-count"`
}

ProjectData represents a struct which will be printed to the CLI.

Jump to

Keyboard shortcuts

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