mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-17 11:57:12 +03:00
Add schema for the raw JSON (#1758)
This commit is contained in:
parent
1c61acd325
commit
ee623e5445
255
cron/format/json.raw.schema
Normal file
255
cron/format/json.raw.schema
Normal file
@ -0,0 +1,255 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema#",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"binaries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
}
|
||||
},
|
||||
"branch-protections": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"protection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allows-deletions": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"allows-force-pushes": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"dismisses-stale-reviews": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"enforces-admin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required-linear-history": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required-reviewer-count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requires-code-owner-review": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"requires-status-checks": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"requires-updated-branches-to-merge": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status-checks-contexts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"required-reviewer-count",
|
||||
"allows-deletions",
|
||||
"allows-force-pushes",
|
||||
"requires-code-owner-review",
|
||||
"required-linear-history",
|
||||
"dismisses-stale-reviews",
|
||||
"enforces-admin",
|
||||
"requires-status-checks",
|
||||
"requires-updated-branches-to-merge",
|
||||
"status-checks-contexts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"protection",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
},
|
||||
"database-vulnerabilities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ID"
|
||||
]
|
||||
}
|
||||
},
|
||||
"default-branch-commits": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"commit-message": {
|
||||
"type": "string"
|
||||
},
|
||||
"committer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"login": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"login"
|
||||
]
|
||||
},
|
||||
"merge-request": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"author": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"login": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"login"
|
||||
]
|
||||
},
|
||||
"labels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"reviews": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"reviewer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"login": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"login"
|
||||
]
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"reviewer",
|
||||
"state"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"number",
|
||||
"labels",
|
||||
"reviews",
|
||||
"author"
|
||||
]
|
||||
},
|
||||
"sha": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"committer",
|
||||
"merge-request",
|
||||
"commit-message",
|
||||
"sha"
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependency-update-tools": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"desc": {
|
||||
"type": "string"
|
||||
},
|
||||
"files": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"url",
|
||||
"desc",
|
||||
"files"
|
||||
]
|
||||
}
|
||||
},
|
||||
"security-policies": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"database-vulnerabilities",
|
||||
"binaries",
|
||||
"security-policies",
|
||||
"dependency-update-tools",
|
||||
"branch-protections",
|
||||
"default-branch-commits"
|
||||
]
|
||||
}
|
255
pkg/json.raw.schema
Normal file
255
pkg/json.raw.schema
Normal file
@ -0,0 +1,255 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema#",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"binaries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
}
|
||||
},
|
||||
"branch-protections": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"protection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allows-deletions": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"allows-force-pushes": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"dismisses-stale-reviews": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"enforces-admin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required-linear-history": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required-reviewer-count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requires-code-owner-review": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"requires-status-checks": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"requires-updated-branches-to-merge": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status-checks-contexts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"required-reviewer-count",
|
||||
"allows-deletions",
|
||||
"allows-force-pushes",
|
||||
"requires-code-owner-review",
|
||||
"required-linear-history",
|
||||
"dismisses-stale-reviews",
|
||||
"enforces-admin",
|
||||
"requires-status-checks",
|
||||
"requires-updated-branches-to-merge",
|
||||
"status-checks-contexts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"protection",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
},
|
||||
"database-vulnerabilities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ID"
|
||||
]
|
||||
}
|
||||
},
|
||||
"default-branch-commits": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"commit-message": {
|
||||
"type": "string"
|
||||
},
|
||||
"committer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"login": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"login"
|
||||
]
|
||||
},
|
||||
"merge-request": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"author": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"login": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"login"
|
||||
]
|
||||
},
|
||||
"labels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"reviews": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"reviewer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"login": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"login"
|
||||
]
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"reviewer",
|
||||
"state"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"number",
|
||||
"labels",
|
||||
"reviews",
|
||||
"author"
|
||||
]
|
||||
},
|
||||
"sha": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"committer",
|
||||
"merge-request",
|
||||
"commit-message",
|
||||
"sha"
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependency-update-tools": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"desc": {
|
||||
"type": "string"
|
||||
},
|
||||
"files": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"url",
|
||||
"desc",
|
||||
"files"
|
||||
]
|
||||
}
|
||||
},
|
||||
"security-policies": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"database-vulnerabilities",
|
||||
"binaries",
|
||||
"security-policies",
|
||||
"dependency-update-tools",
|
||||
"branch-protections",
|
||||
"default-branch-commits"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user