Skip to content

Commit

Permalink
Merge branch 'rg/remove-test-case' of https://github.com/Ricagraca/sp…
Browse files Browse the repository at this point in the history
  • Loading branch information
philsturgeon committed Jan 21, 2024
2 parents 8785861 + 12a2b38 commit f5eed66
Show file tree
Hide file tree
Showing 7 changed files with 2,609 additions and 1,158 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ You should see some output like this:

```
/Users/phil/src/protect-earth-api/api/openapi.yaml
44:17 warning owasp:api3:2019-define-error-responses-400:400 response should be defined.. Missing responses[400] paths./upload.post.responses
44:17 warning owasp:api3:2019-define-error-responses-429:429 response should be defined.. Missing responses[429] paths./upload.post.responses
44:17 warning owasp:api3:2019-define-error-responses-500:500 response should be defined.. Missing responses[500] paths./upload.post.responses
44:17 warning owasp:api8:2023-define-error-responses-400:400 response should be defined.. Missing responses[400] paths./upload.post.responses
44:17 warning owasp:api8:2023-define-error-responses-429:429 response should be defined.. Missing responses[429] paths./upload.post.responses
44:17 warning owasp:api8:2023-define-error-responses-500:500 response should be defined.. Missing responses[500] paths./upload.post.responses
45:15 error owasp:api4:2019-rate-limit All 2XX and 4XX responses should define rate limiting headers. paths./upload.post.responses[201]
47:15 error owasp:api4:2019-rate-limit All 2XX and 4XX responses should define rate limiting headers. paths./upload.post.responses[401]
53:15 error owasp:api4:2019-rate-limit All 2XX and 4XX responses should define rate limiting headers. paths./upload.post.responses[403]
Expand Down
11 changes: 8 additions & 3 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

- Renamed `owasp:api3:2019-define-error-validation` to `owasp:api8:2023-define-error-validation`
- Renamed `owasp:api3:2019-define-error-responses-401` to `owasp:api8:2023-define-error-responses-401`
- Renamed `owasp:api3:2019-define-error-responses-500` to `owasp:api8:2023-define-error-responses-500`
- Renamed `owasp:api3:2019-define-error-validation` to `owasp:api8:2023-define-error-validation`.
- Renamed `owasp:api3:2019-define-error-responses-401` to `owasp:api8:2023-define-error-responses-401`.
- Renamed `owasp:api3:2019-define-error-responses-500` to `owasp:api8:2023-define-error-responses-500`.

- Renamed `owasp:api7:2023-security-hosts-https-oas2` to `owasp:api8:2023-security-hosts-https-oas2`.
- Renamed `owasp:api7:2023-security-hosts-https-oas3` to `owasp:api8:2023-security-hosts-https-oas3`.
- Renamed `owasp:api7:2023-define-error-validation` to `owasp:api8:2023-define-error-validation`.
- Renamed `owasp:api7:2023-define-error-responses-401` to `owasp:api8:2023-define-error-responses-401`.
- Renamed `owasp:api7:2023-define-error-responses-500` to `owasp:api8:2023-define-error-responses-500`.

- Renamed `owasp:api6:2019-no-additionalProperties` to `owasp:api3:2023-no-additionalProperties` and restricted rule to only run the `oas3_0` format.
- Renamed `owasp:api6:2019-constrained-additionalProperties` to `owasp:api3:2023-constrained-additionalProperties` and restricted rule to only run the `oas3_0` format.
Expand Down
23 changes: 0 additions & 23 deletions __tests__/owasp-api4-2019-integer-limit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,29 +120,6 @@ testRule("owasp:api4:2019-integer-limit", [
],
},

{
name: "invalid case: only maximum",
document: {
openapi: "3.1.0",
info: { version: "1.0" },
components: {
schemas: {
Foo: {
type: "integer",
maximum: 99,
},
},
},
},
errors: [
{
message: "Schema of type integer must specify minimum and maximum.",
path: ["components", "schemas", "Foo"],
severity: DiagnosticSeverity.Error,
},
],
},

{
name: "invalid case: only exclusiveMinimum",
document: {
Expand Down
73 changes: 0 additions & 73 deletions __tests__/owasp-api7-2019-security-hosts-https-oas2.test.ts

This file was deleted.

51 changes: 0 additions & 51 deletions __tests__/owasp-api7-2019-security-hosts-https-oas3.test.ts

This file was deleted.

Loading

0 comments on commit f5eed66

Please sign in to comment.