Documentation ¶
Index ¶
- Constants
- func GetFiles(workdir string, fuzzyPath []string, pathList []string) []string
- type ActionHandler
- type AffectedFile
- type AffectedFiles
- type ArtifactoryAction
- type BaseEntity
- type CQAffectedFile
- type CQJson
- type CheckAggregationAction
- type Choices
- type CreateProjectRes
- type Detail
- type DockerEnv
- type End
- type EslintAction
- type EslintCheckResult
- type EslintCheckResultMessage
- type EthGasReporterAction
- type FormatMalwareWorkflowEngine
- type FormatSecurityAnalyzerResult
- type GitAction
- func (a *GitAction) ExecuteCommand(commands []string) (string, error)
- func (a *GitAction) ExecuteCommandDirect(commands []string) (string, error)
- func (a *GitAction) ExecuteStringCommand(command string) (string, error)
- func (a *GitAction) Hook() (*model2.ActionResult, error)
- func (a *GitAction) Post() error
- func (a *GitAction) Pre() error
- type Highlights
- type ICPDeployAction
- type ImageBuildAction
- type ImagePushAction
- type Impact
- type InkAction
- type IpfsAction
- type IpfsGatewayCloudReq
- type Issue
- type K8sDeployAction
- type K8sIngressAction
- type MalwareWorkflowEngine
- type MetaProjectRes
- type MetaProjectsData
- type MetaScanCheckAction
- type MetaScanProject
- type MoveProverAction
- type MythRilAction
- type OpenAiChatMessage
- type OpenAiChatRequestBody
- type OpenAiChatResponseBody
- type OpenAiRequestBody
- type OpenAiResponseBody
- type OpenaiAction
- type PinataIpfsAction
- type PinataIpfsPinReq
- type Poc
- type Range
- type RemoteAction
- type Repo
- type ResultOverview
- type SPAffectedFiles
- type SPDetail
- type SPIssue
- type SPJson
- type SecurityAnalyzerResponse
- type SecurityAnalyzerResult
- type SecurityProverResponse
- type SecurityProverResults
- type ShellAction
- type SlitherAction
- type SolHintAction
- type SolProfilerAction
- type Start
- type StartTaskRes
- type SummaryData
- type SummaryDataRes
- type TaskData
- type TaskEnv
- type TaskResult
- type TaskResultRes
- type TaskScan
- type TaskStatus
- type TaskStatusRes
- type Usage
- type WorkdirAction
Constants ¶
View Source
const STACK = "stack"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionHandler ¶
type ActionHandler interface { // Pre 执行前准备 Pre() error // Hook 执行 Hook() (*model.ActionResult, error) // Post 执行后清理 (无论执行是否成功,都应该有Post的清理) Post() error }
ActionHandler 执行动作钩子
type AffectedFile ¶ added in v1.0.3
type AffectedFiles ¶ added in v1.0.3
type AffectedFiles struct { FilePath string `json:"filePath"` Text string `json:"text"` Range Range `json:"range"` Highlights []Highlights `json:"highlights"` }
type ArtifactoryAction ¶
type ArtifactoryAction struct {
// contains filtered or unexported fields
}
ArtifactoryAction Storage building
func NewArtifactoryAction ¶
func (*ArtifactoryAction) ExecuteCommand ¶ added in v1.0.3
func (a *ArtifactoryAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*ArtifactoryAction) Hook ¶
func (a *ArtifactoryAction) Hook() (*model2.ActionResult, error)
func (*ArtifactoryAction) Post ¶
func (a *ArtifactoryAction) Post() error
func (*ArtifactoryAction) Pre ¶
func (a *ArtifactoryAction) Pre() error
type BaseEntity ¶ added in v1.0.3
type BaseEntity struct {
Id string `json:"id"`
}
type CQAffectedFile ¶ added in v1.0.3
type CheckAggregationAction ¶
type CheckAggregationAction struct {
// contains filtered or unexported fields
}
CheckAggregationAction 合约聚合
func (*CheckAggregationAction) Hook ¶
func (a *CheckAggregationAction) Hook() (*model.ActionResult, error)
func (*CheckAggregationAction) Post ¶
func (a *CheckAggregationAction) Post() error
func (*CheckAggregationAction) Pre ¶
func (a *CheckAggregationAction) Pre() error
type CreateProjectRes ¶ added in v1.0.3
type CreateProjectRes struct { Message string `json:"message"` Data MetaScanProject `json:"data"` Code int64 `json:"code"` }
type Detail ¶ added in v1.0.3
type Detail struct { Code string Category string Severity string Title string Description string AffectedFiles CQAffectedFile }
Detail 具体出现的问题
type DockerEnv ¶
type DockerEnv struct { Image string // contains filtered or unexported fields }
func NewDockerEnv ¶
type EslintAction ¶ added in v1.0.2
type EslintAction struct {
// contains filtered or unexported fields
}
EslintAction 前端代码检查
func NewEslintAction ¶ added in v1.0.2
func (*EslintAction) ExecuteCommand ¶ added in v1.0.2
func (a *EslintAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*EslintAction) Hook ¶ added in v1.0.2
func (a *EslintAction) Hook() (*model.ActionResult, error)
func (*EslintAction) Post ¶ added in v1.0.2
func (a *EslintAction) Post() error
func (*EslintAction) Pre ¶ added in v1.0.2
func (a *EslintAction) Pre() error
type EslintCheckResult ¶ added in v1.0.2
type EslintCheckResult struct { FilePath string `json:"filePath"` Messages []EslintCheckResultMessage `json:"messages"` SuppressedMessages []interface{} `json:"suppressedMessages"` ErrorCount int `json:"errorCount"` FatalErrorCount int `json:"fatalErrorCount"` WarningCount int `json:"warningCount"` FixableErrorCount int `json:"fixableErrorCount"` FixableWarningCount int `json:"fixableWarningCount"` UsedDeprecatedRules []interface{} `json:"usedDeprecatedRules"` }
type EslintCheckResultMessage ¶ added in v1.0.2
type EthGasReporterAction ¶ added in v1.0.3
type EthGasReporterAction struct {
// contains filtered or unexported fields
}
EthGasReporterAction EthGasReporter合约检查
func NewEthGasReporterAction ¶ added in v1.0.3
func (*EthGasReporterAction) ExecuteCommand ¶ added in v1.0.3
func (a *EthGasReporterAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*EthGasReporterAction) Hook ¶ added in v1.0.3
func (a *EthGasReporterAction) Hook() (*model.ActionResult, error)
func (*EthGasReporterAction) Post ¶ added in v1.0.3
func (a *EthGasReporterAction) Post() error
func (*EthGasReporterAction) Pre ¶ added in v1.0.3
func (a *EthGasReporterAction) Pre() error
type FormatMalwareWorkflowEngine ¶ added in v1.0.3
type FormatMalwareWorkflowEngine struct { MalwareWorkflowEngine ShowTitle string `json:"showTitle"` Hightlights []int `json:"hightlights"` LineStart int `json:"lineStart"` LineEnd int `json:"lineEnd"` }
type FormatSecurityAnalyzerResult ¶ added in v1.0.3
type FormatSecurityAnalyzerResult struct { Filepath string `json:"filepath"` Mwe []FormatMalwareWorkflowEngine `json:"mwe"` FileKey string `json:"fileKey"` }
type GitAction ¶
type GitAction struct {
// contains filtered or unexported fields
}
GitAction git clone
func NewGitAction ¶
func (*GitAction) ExecuteCommand ¶
func (*GitAction) ExecuteCommandDirect ¶
func (*GitAction) ExecuteStringCommand ¶
type Highlights ¶ added in v1.0.3
type ICPDeployAction ¶ added in v1.0.3
type ICPDeployAction struct {
// contains filtered or unexported fields
}
ICPDeployAction Upload files/directories to ipfs
func NewICPDeployAction ¶ added in v1.0.3
func NewICPDeployAction(ac ctx.ActionContext) *ICPDeployAction
func (*ICPDeployAction) Hook ¶ added in v1.0.3
func (a *ICPDeployAction) Hook() (*model.ActionResult, error)
func (*ICPDeployAction) Post ¶ added in v1.0.3
func (a *ICPDeployAction) Post() error
func (*ICPDeployAction) Pre ¶ added in v1.0.3
func (a *ICPDeployAction) Pre() error
type ImageBuildAction ¶ added in v1.0.3
type ImageBuildAction struct {
// contains filtered or unexported fields
}
func NewImageBuildAction ¶ added in v1.0.3
func (*ImageBuildAction) ExecuteCommand ¶ added in v1.0.3
func (i *ImageBuildAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*ImageBuildAction) Hook ¶ added in v1.0.3
func (i *ImageBuildAction) Hook() (*model.ActionResult, error)
func (*ImageBuildAction) Post ¶ added in v1.0.3
func (i *ImageBuildAction) Post() error
func (*ImageBuildAction) Pre ¶ added in v1.0.3
func (i *ImageBuildAction) Pre() error
type ImagePushAction ¶ added in v1.0.3
type ImagePushAction struct {
// contains filtered or unexported fields
}
func NewImagePushAction ¶ added in v1.0.3
func (*ImagePushAction) ExecuteCommand ¶ added in v1.0.3
func (i *ImagePushAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*ImagePushAction) Hook ¶ added in v1.0.3
func (i *ImagePushAction) Hook() (*model.ActionResult, error)
func (*ImagePushAction) Post ¶ added in v1.0.3
func (i *ImagePushAction) Post() error
func (*ImagePushAction) Pre ¶ added in v1.0.3
func (i *ImagePushAction) Pre() error
type InkAction ¶
type InkAction struct {
// contains filtered or unexported fields
}
func NewInkAction ¶
func (*InkAction) ExecuteCommand ¶
func (*InkAction) ExecuteStringCommand ¶
type IpfsAction ¶
type IpfsAction struct {
// contains filtered or unexported fields
}
IpfsAction Upload files/directories to ipfs
func NewIpfsAction ¶
func (*IpfsAction) Hook ¶
func (a *IpfsAction) Hook() (*model.ActionResult, error)
func (*IpfsAction) Post ¶
func (a *IpfsAction) Post() error
func (*IpfsAction) Pre ¶
func (a *IpfsAction) Pre() error
type IpfsGatewayCloudReq ¶
type IpfsGatewayCloudReq struct { UploadID string `json:"uploadID"` UploadFileType string `json:"upload_file_type"` UploadType string `json:"upload_type"` Cid string `json:"cid"` Filename string `json:"filename"` ContentType string `json:"content_type"` Size int `json:"size"` Url string `json:"url"` Status string `json:"status"` Pin string `json:"pin"` Dht string `json:"dht"` }
type K8sDeployAction ¶ added in v1.0.3
type K8sDeployAction struct {
// contains filtered or unexported fields
}
func NewK8sDeployAction ¶ added in v1.0.3
func (*K8sDeployAction) Hook ¶ added in v1.0.3
func (k *K8sDeployAction) Hook() (*model.ActionResult, error)
func (*K8sDeployAction) Post ¶ added in v1.0.3
func (k *K8sDeployAction) Post() error
func (*K8sDeployAction) Pre ¶ added in v1.0.3
func (k *K8sDeployAction) Pre() error
type K8sIngressAction ¶ added in v1.0.3
type K8sIngressAction struct {
// contains filtered or unexported fields
}
func NewK8sIngressAction ¶ added in v1.0.3
func (*K8sIngressAction) Hook ¶ added in v1.0.3
func (k *K8sIngressAction) Hook() (*model.ActionResult, error)
func (*K8sIngressAction) Post ¶ added in v1.0.3
func (k *K8sIngressAction) Post() error
func (*K8sIngressAction) Pre ¶ added in v1.0.3
func (k *K8sIngressAction) Pre() error
type MalwareWorkflowEngine ¶ added in v1.0.3
type MetaProjectRes ¶ added in v1.0.3
type MetaProjectRes struct { Data MetaProjectsData `json:"data"` Message string `json:"message"` }
type MetaProjectsData ¶ added in v1.0.3
type MetaProjectsData struct { Total int `json:"total"` TotalPages int `json:"totalPages"` Items []MetaScanProject `json:"items"` }
type MetaScanCheckAction ¶ added in v1.0.3
type MetaScanCheckAction struct {
// contains filtered or unexported fields
}
func NewMetaScanCheckAction ¶ added in v1.0.3
func (*MetaScanCheckAction) Hook ¶ added in v1.0.3
func (m *MetaScanCheckAction) Hook() (*model.ActionResult, error)
func (*MetaScanCheckAction) Post ¶ added in v1.0.3
func (m *MetaScanCheckAction) Post() error
func (*MetaScanCheckAction) Pre ¶ added in v1.0.3
func (m *MetaScanCheckAction) Pre() error
type MetaScanProject ¶ added in v1.0.3
type MoveProverAction ¶ added in v1.0.3
type MoveProverAction struct {
// contains filtered or unexported fields
}
MoveProverAction MoveProver 合约检查
func NewMoveProverAction ¶ added in v1.0.3
func (*MoveProverAction) ExecuteCommand ¶ added in v1.0.3
func (a *MoveProverAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*MoveProverAction) Hook ¶ added in v1.0.3
func (a *MoveProverAction) Hook() (*model.ActionResult, error)
func (*MoveProverAction) Post ¶ added in v1.0.3
func (a *MoveProverAction) Post() error
func (*MoveProverAction) Pre ¶ added in v1.0.3
func (a *MoveProverAction) Pre() error
type MythRilAction ¶
type MythRilAction struct {
// contains filtered or unexported fields
}
MythRilAction mythRil 合约检查
func NewMythRilAction ¶
func (*MythRilAction) ExecuteCommand ¶
func (a *MythRilAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*MythRilAction) Hook ¶
func (a *MythRilAction) Hook() (*model.ActionResult, error)
func (*MythRilAction) Post ¶
func (a *MythRilAction) Post() error
func (*MythRilAction) Pre ¶
func (a *MythRilAction) Pre() error
type OpenAiChatMessage ¶ added in v1.0.3
type OpenAiChatRequestBody ¶ added in v1.0.3
type OpenAiChatRequestBody struct { Model string `json:"model"` Messages []OpenAiChatMessage `json:"messages"` }
type OpenAiChatResponseBody ¶ added in v1.0.3
type OpenAiChatResponseBody struct { Id string `json:"id"` Object string `json:"object"` Created uint `json:"created"` Model string `json:"model"` Usage struct { PromptTokens uint `json:"prompt_tokens"` CompletionTokens uint `json:"completion_tokens"` TotalTokens uint `json:"total_tokens"` } `json:"usage"` Choices []struct { Message struct { Role string `json:"role"` Content string `json:"content"` } `json:"message"` FinishReason string `json:"finish_reason"` Index uint `json:"index"` } `json:"choices"` }
type OpenAiRequestBody ¶ added in v1.0.3
type OpenAiRequestBody struct { Model string `json:"model"` Prompt string `json:"prompt"` Temperature uint `json:"temperature"` MaxTokens uint `json:"max_tokens"` TopP float32 `json:"top_p"` FrequencyPenalty float32 `json:"frequency_penalty"` PresencePenalty float32 `json:"presence_penalty"` Stop []string `json:"stop"` }
type OpenAiResponseBody ¶ added in v1.0.3
type OpenaiAction ¶ added in v1.0.3
type OpenaiAction struct {
// contains filtered or unexported fields
}
func NewOpenaiAction ¶ added in v1.0.3
func (*OpenaiAction) Hook ¶ added in v1.0.3
func (a *OpenaiAction) Hook() (*model.ActionResult, error)
Hook 执行
func (*OpenaiAction) Post ¶ added in v1.0.3
func (a *OpenaiAction) Post() error
Post 执行后清理 (无论执行是否成功,都应该有 Post 的清理)
type PinataIpfsAction ¶
type PinataIpfsAction struct {
// contains filtered or unexported fields
}
PinataIpfsAction Upload files/directories to ipfs
func NewPinataIpfsAction ¶
func (*PinataIpfsAction) Hook ¶
func (a *PinataIpfsAction) Hook() (*model.ActionResult, error)
func (*PinataIpfsAction) Post ¶
func (a *PinataIpfsAction) Post() error
func (*PinataIpfsAction) Pre ¶
func (a *PinataIpfsAction) Pre() error
type PinataIpfsPinReq ¶
type PinataIpfsPinReq struct { IpfsHash string `json:"IpfsHash"` //This is the IPFS multi-hash provided back for your content PinSize string `json:"PinSize"` //This is how large (in bytes) the content you just pinned is Timestamp string `json:"timestamp"` //This is the timestamp for your content pinning (represented in ISO 8601 format) }
type RemoteAction ¶
type RemoteAction struct {
// contains filtered or unexported fields
}
RemoteAction 执行远程命令
func NewRemoteAction ¶
func NewRemoteAction(step model2.Step, ctx context.Context) *RemoteAction
func (*RemoteAction) Hook ¶
func (a *RemoteAction) Hook() (*model2.ActionResult, error)
func (*RemoteAction) Post ¶
func (a *RemoteAction) Post() error
func (*RemoteAction) Pre ¶
func (a *RemoteAction) Pre() error
type ResultOverview ¶ added in v1.0.3
type SPAffectedFiles ¶ added in v1.0.3
type SPAffectedFiles struct { Text string `json:"text"` Range Range `json:"range"` Highlights []Highlights `json:"highlights"` }
type SecurityAnalyzerResponse ¶ added in v1.0.3
type SecurityAnalyzerResponse struct { Success bool `json:"success"` Error string `json:"error"` Results []SecurityAnalyzerResult `json:"results"` FileMapping map[string]string `json:"file_mapping"` }
type SecurityAnalyzerResult ¶ added in v1.0.3
type SecurityAnalyzerResult struct { Mwe MalwareWorkflowEngine `json:"mwe"` ShowTitle string `json:"show_title"` AffectedFiles []AffectedFile `json:"affected_files"` }
type SecurityProverResponse ¶ added in v1.0.3
type SecurityProverResults ¶ added in v1.0.3
type ShellAction ¶
type ShellAction struct {
// contains filtered or unexported fields
}
ShellAction 命令工作
func NewShellAction ¶
func (*ShellAction) Hook ¶
func (a *ShellAction) Hook() (*model2.ActionResult, error)
func (*ShellAction) Post ¶
func (a *ShellAction) Post() error
func (*ShellAction) Pre ¶
func (a *ShellAction) Pre() error
type SlitherAction ¶
type SlitherAction struct {
// contains filtered or unexported fields
}
SlitherAction slither合约检查
func NewSlitherAction ¶
func (*SlitherAction) ExecuteCommand ¶
func (a *SlitherAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*SlitherAction) Hook ¶
func (a *SlitherAction) Hook() (*model.ActionResult, error)
func (*SlitherAction) Post ¶
func (a *SlitherAction) Post() error
func (*SlitherAction) Pre ¶
func (a *SlitherAction) Pre() error
type SolHintAction ¶
type SolHintAction struct {
// contains filtered or unexported fields
}
SolHintAction SolHint 合约检查
func NewSolHintAction ¶
func (*SolHintAction) ExecuteCommand ¶
func (a *SolHintAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*SolHintAction) Hook ¶
func (a *SolHintAction) Hook() (*model.ActionResult, error)
func (*SolHintAction) Post ¶
func (a *SolHintAction) Post() error
func (*SolHintAction) Pre ¶
func (a *SolHintAction) Pre() error
type SolProfilerAction ¶
type SolProfilerAction struct {
// contains filtered or unexported fields
}
SolProfilerAction SolProfiler 合约检查
func NewSolProfilerAction ¶
func (*SolProfilerAction) ExecuteCommand ¶
func (a *SolProfilerAction) ExecuteCommand(commands []string, workdir string) (string, error)
func (*SolProfilerAction) Hook ¶
func (a *SolProfilerAction) Hook() (*model.ActionResult, error)
func (*SolProfilerAction) Post ¶
func (a *SolProfilerAction) Post() error
func (*SolProfilerAction) Pre ¶
func (a *SolProfilerAction) Pre() error
type StartTaskRes ¶ added in v1.0.3
type SummaryData ¶ added in v1.0.3
type SummaryData struct {
ResultOverview ResultOverview `json:"resultOverview"`
}
type SummaryDataRes ¶ added in v1.0.3
type SummaryDataRes struct { Data SummaryData `json:"data"` Message string `json:"message"` }
type TaskData ¶ added in v1.0.3
type TaskData struct { Id string `json:"id"` TaskState string `json:"taskState"` EngineTasks []BaseEntity `json:"engineTasks"` }
type TaskResult ¶ added in v1.0.3
type TaskResultRes ¶ added in v1.0.3
type TaskResultRes struct { Data TaskResult `json:"data"` Message string `json:"message"` }
type TaskStatus ¶ added in v1.0.3
type TaskStatus struct {
State string `json:"state"`
}
type TaskStatusRes ¶ added in v1.0.3
type TaskStatusRes struct { Data TaskStatus `json:"data"` Message string `json:"message"` }
type WorkdirAction ¶
type WorkdirAction struct {
// contains filtered or unexported fields
}
func NewWorkdirAction ¶
func (*WorkdirAction) Post ¶
func (a *WorkdirAction) Post() error
Post 执行后清理 (无论执行是否成功,都应该有 Post 的清理)
func (*WorkdirAction) Pre ¶
func (a *WorkdirAction) Pre() error
Source Files ¶
- action_artifactory.go
- action_check_aggregation.go
- action_eslint.go
- action_eth_gas_reporter.go
- action_git.go
- action_icp_deploy.go
- action_image_build.go
- action_image_push.go
- action_ink.go
- action_ipfs.go
- action_ipfs_bak.go
- action_k8s_deploy.go
- action_k8s_ingress.go
- action_metascan_check.go
- action_move_prover.go
- action_mythril.go
- action_openai.go
- action_pinata_ipfs.go
- action_remote.go
- action_shell.go
- action_slither.go
- action_sol_profiler.go
- action_solhint.go
- action_workdir.go
- env_docker.go
- hander.go
Click to show internal directories.
Click to hide internal directories.