codeql

package
v0.0.0-...-40d4f7c Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommitMessageMirroringCode = "Mirroring code for revision %s from %s"
	SrcZip                     = "src.zip"
	CodeqlDatabaseYml          = "codeql-database.yml"
	OriginRemote               = "origin"
)

Variables

This section is empty.

Functions

func BuildRepoReference

func BuildRepoReference(repository, analyzedRef string) (string, error)

func CreateAndPersistToolRecord

func CreateAndPersistToolRecord(utils piperutils.FileUtils, repoInfo RepoInfo, repoReference, repoUrl, modulePath string) (string, error)

func WriteJSONReport

func WriteJSONReport(jsonReport CodeqlAudit, modulePath string) ([]piperutils.Path, error)

Types

type CodeqlAudit

type CodeqlAudit struct {
	ToolName               string           `json:"toolName"`
	RepositoryUrl          string           `json:"repositoryUrl"`
	RepositoryReferenceUrl string           `json:"repositoryReferenceUrl"` //URL of PR or Branch where scan was performed
	CodeScanningLink       string           `json:"codeScanningLink"`
	QuerySuite             string           `json:"querySuite"`
	ScanResults            []CodeqlFindings `json:"findings"`
}

type CodeqlFindings

type CodeqlFindings struct {
	ClassificationName string `json:"classificationName"`
	Total              int    `json:"total"`
	Audited            int    `json:"audited"`
}

type CodeqlSarifUploader

type CodeqlSarifUploader interface {
	GetSarifStatus() (SarifFileInfo, error)
}

type CodeqlSarifUploaderInstance

type CodeqlSarifUploaderInstance struct {
	// contains filtered or unexported fields
}

func NewCodeqlSarifUploaderInstance

func NewCodeqlSarifUploaderInstance(url, token string) CodeqlSarifUploaderInstance

func (*CodeqlSarifUploaderInstance) GetSarifStatus

func (codeqlSarifUploader *CodeqlSarifUploaderInstance) GetSarifStatus() (SarifFileInfo, error)

type CodeqlScanAudit

type CodeqlScanAudit interface {
	GetVulnerabilities(analyzedRef string, state string) error
}

type CodeqlScanAuditInstance

type CodeqlScanAuditInstance struct {
	// contains filtered or unexported fields
}

func NewCodeqlScanAuditInstance

func NewCodeqlScanAuditInstance(serverUrl, owner, repository, token string, trustedCerts []string) CodeqlScanAuditInstance

func (*CodeqlScanAuditInstance) GetVulnerabilities

func (codeqlScanAudit *CodeqlScanAuditInstance) GetVulnerabilities(analyzedRef string) ([]CodeqlFindings, error)

type GitUploader

type GitUploader interface {
	UploadProjectToGithub() (string, error)
}

type GitUploaderInstance

type GitUploaderInstance struct {
	*command.Command
	// contains filtered or unexported fields
}

func NewGitUploaderInstance

func NewGitUploaderInstance(token, ref, dbDir, sourceCommitId, sourceRepo, targetRepo string) (*GitUploaderInstance, error)

func (*GitUploaderInstance) UploadProjectToGithub

func (uploader *GitUploaderInstance) UploadProjectToGithub() (string, error)

type RepoInfo

type RepoInfo struct {
	ServerUrl string
	Repo      string
	CommitId  string
	Ref       string
	Owner     string
}

type SarifFileInfo

type SarifFileInfo struct {
	ProcessingStatus string   `json:"processing_status"`
	Errors           []string `json:"errors"`
}

Jump to

Keyboard shortcuts

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