Skip to content

Add asyncapi-operation-security-defined lint rule — AsyncAPI operations can reference undefined security schemes with no warning #2667

@saismrutiranjan18

Description

@saismrutiranjan18

Enhancement — Add asyncapi-operation-security-defined rule for AsyncAPI security scheme cross-references

Problem

The AsyncAPI rule set has only structural rules (channels-kebab-case, no-channel-trailing-slash). There is no rule validating that security scheme names in AsyncAPI operation/server security arrays are defined in components/securitySchemes. Name mismatches are silently invalid.

Proposed Rule

rules:
  asyncapi-operation-security-defined: error

Analogous to the missing operation-security-defined rule for OpenAPI — traverses AsyncAPI operation and server security arrays and validates each referenced scheme exists in components/securitySchemes.

Labels

Type: Enhancement, p3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions