mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 10:11:28 +00:00
Perform deep validation of VersionInfo.features
This commit is contained in:
@@ -38,7 +38,12 @@ export function isVersionInfo(x: unknown): x is VersionInfo {
|
||||
json.validateSchema(
|
||||
{
|
||||
version: json.string,
|
||||
features: json.optional(json.object),
|
||||
features: {
|
||||
validate: (obj): obj is Record<string, boolean> =>
|
||||
json.isObject(obj) &&
|
||||
Object.values(obj).every((val) => typeof val === "boolean"),
|
||||
required: false,
|
||||
},
|
||||
overlayVersion: json.optional(json.number),
|
||||
},
|
||||
x,
|
||||
|
||||
Reference in New Issue
Block a user