Skip to content

Commit

Permalink
Update .spectral-oas.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
VijayKesharwani authored Nov 21, 2023
1 parent 12daf7c commit c7e0f0b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .spectral-oas.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c7e0f0b

Please sign in to comment.