forked from Checkmarx/kics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Checkmarx#6717 from Checkmarx/kics-937
fix(query): openapi Maximum Length Undefined
- Loading branch information
Showing
7 changed files
with
283 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
assets/queries/openAPI/general/maximum_length_undefined/test/negative7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API Overview", | ||
"version": "1.0.0", | ||
"contact": { | ||
"name": "contact", | ||
"url": "https://www.google.com/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"paths": { | ||
"/": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"schema": { | ||
"discriminator": "petType", | ||
"additionalProperties": false, | ||
"properties": { | ||
"code": { | ||
"type": "string", | ||
"format": "int32", | ||
"pattern": "[a-z0-9-]" | ||
}, | ||
"message": { | ||
"type": "string", | ||
"pattern": "[a-z]{3}" | ||
} | ||
}, | ||
"required": [ | ||
"petType" | ||
], | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
assets/queries/openAPI/general/maximum_length_undefined/test/negative8.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API Overview", | ||
"version": "1.0.0", | ||
"contact": { | ||
"name": "contact", | ||
"url": "https://www.google.com/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"paths": { | ||
"/": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"schema": { | ||
"discriminator": "petType", | ||
"additionalProperties": false, | ||
"properties": { | ||
"code": { | ||
"type": "string", | ||
"format": "int32", | ||
"pattern": "[a-z0-9-]?" | ||
}, | ||
"message": { | ||
"type": "string", | ||
"pattern": "[a-z]\\{2,\\}" | ||
} | ||
}, | ||
"required": [ | ||
"petType" | ||
], | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
assets/queries/openAPI/general/maximum_length_undefined/test/positive7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API Overview", | ||
"version": "1.0.0", | ||
"contact": { | ||
"name": "contact", | ||
"url": "https://www.google.com/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"paths": { | ||
"/": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"schema": { | ||
"discriminator": "petType", | ||
"additionalProperties": false, | ||
"properties": { | ||
"code": { | ||
"type": "string", | ||
"format": "int32", | ||
"pattern": "[a-z0-9-]*" | ||
}, | ||
"message": { | ||
"type": "string", | ||
"pattern": "[a-z]{3,}" | ||
} | ||
}, | ||
"required": [ | ||
"petType" | ||
], | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
assets/queries/openAPI/general/maximum_length_undefined/test/positive8.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API Overview", | ||
"version": "1.0.0", | ||
"contact": { | ||
"name": "contact", | ||
"url": "https://www.google.com/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"paths": { | ||
"/": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"schema": { | ||
"discriminator": "petType", | ||
"additionalProperties": false, | ||
"properties": { | ||
"code": { | ||
"type": "string", | ||
"format": "int32", | ||
"pattern": "[a-z0-9-]{2,3}" | ||
}, | ||
"message": { | ||
"type": "string", | ||
"pattern": "[a-z]+" | ||
} | ||
}, | ||
"required": [ | ||
"petType" | ||
], | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
assets/queries/openAPI/general/maximum_length_undefined/test/positive9.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"components": { | ||
"securitySchemes": { | ||
"Basic1": { | ||
"scheme": "basic", | ||
"type": "http" | ||
}, | ||
"JWT1": { | ||
"scheme": "basic", | ||
"type": "http" | ||
}, | ||
"JWT1-1": { | ||
"bearerFormat": "JWT", | ||
"scheme": "bearer", | ||
"type": "http" | ||
} | ||
} | ||
}, | ||
"info": { | ||
"description": "Swagger auto-generated from learnt schema for ves-io-demo-app-waap-sentence-api", | ||
"title": "ves-io-demo-app-waap-sentence-api", | ||
"version": "2023-06-21 13:26:46" | ||
}, | ||
"openapi": "3.0.3", | ||
"paths": { | ||
"/api/adjectives": { | ||
"get": { | ||
"description": "Swagger auto-generated from learnt schema", | ||
"parameters": [ | ||
{ | ||
"description": "IPv4 Address", | ||
"in": "header", | ||
"name": "xff", | ||
"schema": { | ||
"pattern": "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", | ||
"type": "string", | ||
"x-pii": {} | ||
} | ||
}, | ||
{ | ||
"description": "Word", | ||
"in": "header", | ||
"name": "x-f5-request-id", | ||
"schema": { | ||
"pattern": "[a-z0-9-]+", | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"description": "Word", | ||
"in": "cookie", | ||
"name": "_imp_apg_r_", | ||
"schema": { | ||
"pattern": "[a-z0-9-]+", | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"default": { | ||
"description": "" | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"JWT1": [] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"servers": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters