Validate that deny-packages purls are complete

This commit is contained in:
Justin Holguín
2024-04-29 16:46:21 +00:00
committed by GitHub
parent fcc66c23b3
commit 5f0808ffb1
4 changed files with 27 additions and 1 deletions

View File

@@ -18,6 +18,12 @@ const PackageURL = z
message: `Error parsing package-url: ${purl.error}`
})
}
if (!purl.name) {
context.addIssue({
code: z.ZodIssueCode.custom,
message: `Error parsing package-url: name is required`
})
}
})
const PackageURLWithNamespace = z