Skip to content

Commit

Permalink
✨ Schema for BQ table for raw results (#1762)
Browse files Browse the repository at this point in the history
* Fix schemas

* updates

* updates

* Schema for BQ table of raw result

* update

* updates

* create utility function only

* update

* updates

* updates

* manifest
  • Loading branch information
laurentsimon authored Apr 15, 2022
1 parent 9532e55 commit f99e1a1
Show file tree
Hide file tree
Showing 10 changed files with 680 additions and 67 deletions.
6 changes: 2 additions & 4 deletions checks/cii_best_practices.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ const (
// CheckCIIBestPractices is the registered name for CIIBestPractices.
CheckCIIBestPractices = "CII-Best-Practices"
silverScore = 7
// Note: if this value is changed, please update the action's threshold score
// https://github.com/ossf/scorecard-action/blob/main/policies/template.yml#L61.
passingScore = 5
inProgressScore = 2
passingScore = 5
inProgressScore = 2
)

//nolint:gochecknoinits
Expand Down
340 changes: 340 additions & 0 deletions cron/format/bq.raw.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,340 @@
[
{
"description": "",
"mode": "NULLABLE",
"name": "date",
"type": "DATE"
},
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "name",
"type": "STRING"
},
{
"description": "",
"mode": "NULLABLE",
"name": "commit",
"type": "STRING"
}
],
"mode": "NULLABLE",
"name": "repo",
"type": "RECORD"
},
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "version",
"type": "STRING"
},
{
"description": "",
"mode": "NULLABLE",
"name": "commit",
"type": "STRING"
}
],
"mode": "NULLABLE",
"name": "scorecard",
"type": "RECORD"
},
{
"description": "",
"mode": "REPEATED",
"name": "metadata",
"type": "STRING"
},
{
"description": "",
"fields": [
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "id",
"type": "STRING"
}
],
"mode": "REPEATED",
"name": "databaseVulnerabilities",
"type": "RECORD"
},
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "path",
"type": "STRING"
},
{
"description": "",
"mode": "NULLABLE",
"name": "offset",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "binaries",
"type": "RECORD"
},
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "path",
"type": "STRING"
},
{
"description": "",
"mode": "NULLABLE",
"name": "offset",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "securityPolicies",
"type": "RECORD"
},
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "name",
"type": "STRING"
},
{
"description": "",
"mode": "NULLABLE",
"name": "url",
"type": "STRING"
},
{
"description": "",
"mode": "NULLABLE",
"name": "desc",
"type": "STRING"
},
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "path",
"type": "STRING"
},
{
"description": "",
"mode": "NULLABLE",
"name": "offset",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "files",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "dependencyUpdateTools",
"type": "RECORD"
},
{
"description": "",
"fields": [
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "requiredReviewerCount",
"type": "INTEGER"
},
{
"description": "",
"mode": "NULLABLE",
"name": "allowsDeletions",
"type": "BOOLEAN"
},
{
"description": "",
"mode": "NULLABLE",
"name": "allowsForcePushes",
"type": "BOOLEAN"
},
{
"description": "",
"mode": "NULLABLE",
"name": "requiresCodeOwnerReview",
"type": "BOOLEAN"
},
{
"description": "",
"mode": "NULLABLE",
"name": "requiredLinearHistory",
"type": "BOOLEAN"
},
{
"description": "",
"mode": "NULLABLE",
"name": "dismissesStaleReviews",
"type": "BOOLEAN"
},
{
"description": "",
"mode": "NULLABLE",
"name": "enforcesAdmin",
"type": "BOOLEAN"
},
{
"description": "",
"mode": "NULLABLE",
"name": "requiresStatusChecks",
"type": "BOOLEAN"
},
{
"description": "",
"mode": "NULLABLE",
"name": "requiresUpdatedBranchesToMerge",
"type": "BOOLEAN"
},
{
"description": "",
"mode": "REPEATED",
"name": "statusChecksContexts",
"type": "STRING"
}
],
"mode": "NULLABLE",
"name": "protection",
"type": "RECORD"
},
{
"description": "",
"mode": "NULLABLE",
"name": "name",
"type": "STRING"
}
],
"mode": "REPEATED",
"name": "branchProtections",
"type": "RECORD"
},
{
"description": "",
"fields": [
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "login",
"type": "STRING"
}
],
"mode": "NULLABLE",
"name": "committer",
"type": "RECORD"
},
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "number",
"type": "INTEGER"
},
{
"description": "",
"mode": "REPEATED",
"name": "labels",
"type": "STRING"
},
{
"description": "",
"fields": [
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "login",
"type": "STRING"
}
],
"mode": "NULLABLE",
"name": "reviewer",
"type": "RECORD"
},
{
"description": "",
"mode": "NULLABLE",
"name": "state",
"type": "STRING"
}
],
"mode": "REPEATED",
"name": "reviews",
"type": "RECORD"
},
{
"description": "",
"fields": [
{
"description": "",
"mode": "NULLABLE",
"name": "login",
"type": "STRING"
}
],
"mode": "NULLABLE",
"name": "author",
"type": "RECORD"
}
],
"mode": "NULLABLE",
"name": "mergeRequest",
"type": "RECORD"
},
{
"description": "",
"mode": "NULLABLE",
"name": "commitMessage",
"type": "STRING"
},
{
"description": "",
"mode": "NULLABLE",
"name": "sha",
"type": "STRING"
}
],
"mode": "REPEATED",
"name": "defaultBranchCommits",
"type": "RECORD"
}
],
"mode": "NULLABLE",
"name": "results",
"type": "RECORD"
}
]
Loading

0 comments on commit f99e1a1

Please sign in to comment.