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