From c7e0f0bf273e462cba3cb922091346cadc57e039 Mon Sep 17 00:00:00 2001 From: VijayKesharwani <122533719+VijayKesharwani@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:44:37 +0530 Subject: [PATCH] Update .spectral-oas.yml --- .spectral-oas.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.spectral-oas.yml b/.spectral-oas.yml index af61d631f5..dea1b7845f 100644 --- a/.spectral-oas.yml +++ b/.spectral-oas.yml @@ -1,6 +1,7 @@ extends: [[spectral:oas, off]] functions: - camara-language-avoid-telco + - camara-security-no-secrets-in-path-or-query-parameters functionsDir: "./lint_function" rules: # Built-in OpenAPI Specification ruleset. Each rule then can be enabled individually. @@ -45,6 +46,15 @@ rules: oas3-server-variables: true # Custome rules + check-sensitive-data-in-paths-and-query-params: + message: "Sensitive data found in path: {{error}} Consider avoiding the use of Sesentive data " + severity: warn + description: | + This rule checks for sensitive data ('MSISDN' and 'IMSI') in API paths and suggests avoiding their use. + given: + - "$.paths" + then: + function: camara-security-no-secrets-in-path-or-query-parameters camara-language-avoid-telco: message: "{{error}}" severity: hint