Skip to content

Commit 4622952

Browse files
authored
✨ Raw results for dangerous workflow (#1849)
* draft * update * update * updates * comments * comments * comments
1 parent 72e2486 commit 4622952

File tree

8 files changed

+1008
-927
lines changed

8 files changed

+1008
-927
lines changed

checker/raw_result.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import "time"
2020
// is applied.
2121
//nolint
2222
type RawResults struct {
23+
DangerousWorkflowResults DangerousWorkflowData
2324
VulnerabilitiesResults VulnerabilitiesData
2425
BinaryArtifactResults BinaryArtifactData
2526
SecurityPolicyResults SecurityPolicyData
@@ -256,3 +257,36 @@ type ReleaseAsset struct {
256257
Name string
257258
URL string
258259
}
260+
261+
// DangerousWorkflowData contains raw results
262+
// for dangerous workflow check.
263+
type DangerousWorkflowData struct {
264+
ScriptInjections []ScriptInjection
265+
SecretInPullRequests []EncryptedSecret
266+
UntrustedCheckouts []UntrustedCheckout
267+
// TODO: other
268+
}
269+
270+
// UntrustedCheckout represents an untrusted checkout.
271+
type UntrustedCheckout struct {
272+
Job *WorkflowJob
273+
File File
274+
}
275+
276+
// ScriptInjection represents a script injection.
277+
type ScriptInjection struct {
278+
Job *WorkflowJob
279+
File File
280+
}
281+
282+
// EncryptedSecret represents an encrypted secret.
283+
type EncryptedSecret struct {
284+
Job *WorkflowJob
285+
File File
286+
}
287+
288+
// WorkflowJob reprresents a workflow job.
289+
type WorkflowJob struct {
290+
Name *string
291+
ID *string
292+
}

0 commit comments

Comments
 (0)