Skip to content

Instantly share code, notes, and snippets.

@arno-di-loreto
Last active March 26, 2022 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arno-di-loreto/451252324dcc1af6fe33f760666ece0d to your computer and use it in GitHub Desktop.
Save arno-di-loreto/451252324dcc1af6fe33f760666ece0d to your computer and use it in GitHub Desktop.
Gist in tweet thread test
rules:
security-rules-defined-oas2:
formats: ["oas2"]
recommended: true
description: Security definitions must be defined
severity: error
tags:
- security
given: $
then:
field: securityDefinitions
function: truthy
rules:
security-rules-defined-oas3:
formats: ["oas3"]
recommended: true
description: Security schemes must be defined
severity: error
tags:
- security
given: $
then:
function: schema
functionOptions:
schema:
$schema: "http://json-schema.org/draft-07/schema#"
additionalProperties: true
required:
- components
properties:
components:
additionalProperties: true
required:
- securitySchemes
properties:
securitySchemes:
type: object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment