Skip to content

Commit

Permalink
✨ Raw results for dangerous workflow (#1849)
Browse files Browse the repository at this point in the history
* draft

* update

* update

* updates

* comments

* comments

* comments
  • Loading branch information
laurentsimon committed Apr 21, 2022
1 parent 72e2486 commit 4622952
Show file tree
Hide file tree
Showing 8 changed files with 1,008 additions and 927 deletions.
34 changes: 34 additions & 0 deletions checker/raw_result.go
Expand Up @@ -20,6 +20,7 @@ import "time"
// is applied.
//nolint
type RawResults struct {
DangerousWorkflowResults DangerousWorkflowData
VulnerabilitiesResults VulnerabilitiesData
BinaryArtifactResults BinaryArtifactData
SecurityPolicyResults SecurityPolicyData
Expand Down Expand Up @@ -256,3 +257,36 @@ type ReleaseAsset struct {
Name string
URL string
}

// DangerousWorkflowData contains raw results
// for dangerous workflow check.
type DangerousWorkflowData struct {
ScriptInjections []ScriptInjection
SecretInPullRequests []EncryptedSecret
UntrustedCheckouts []UntrustedCheckout
// TODO: other
}

// UntrustedCheckout represents an untrusted checkout.
type UntrustedCheckout struct {
Job *WorkflowJob
File File
}

// ScriptInjection represents a script injection.
type ScriptInjection struct {
Job *WorkflowJob
File File
}

// EncryptedSecret represents an encrypted secret.
type EncryptedSecret struct {
Job *WorkflowJob
File File
}

// WorkflowJob reprresents a workflow job.
type WorkflowJob struct {
Name *string
ID *string
}

0 comments on commit 4622952

Please sign in to comment.