Skip to content

Instantly share code, notes, and snippets.

@pubudu538
Created March 15, 2025 18:04
Show Gist options
  • Select an option

  • Save pubudu538/c32e0afa9a80e05f7aaee83bcf8e4bb9 to your computer and use it in GitHub Desktop.

Select an option

Save pubudu538/c32e0afa9a80e05f7aaee83bcf8e4bb9 to your computer and use it in GitHub Desktop.
---
rules:
api-resources-security-required:
description: "Checks that security is enabled for all resources."
message: "Security is not enabled for all resources."
severity: "error"
given: "$.data.operations.*"
then:
field: "authType"
function: "pattern"
functionOptions:
notMatch: "None"
api-tags:
description: "API should have tags."
message: "API should have tags."
severity: "warn"
given: "$.data"
then:
field: "tags"
function: "truthy"
api-business-owner-email:
description: "Checks that the business owner’s email is set"
message: "Business owner email is missing or empty."
severity: "warn"
given: "$.data.businessInformation"
then:
field: "businessOwnerEmail"
function: "truthy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment