Skip to content

Commit

Permalink
Update BringBack.postman_collection.json (#26948)
Browse files Browse the repository at this point in the history
* Update BringBack.postman_collection.json

* Update BringBack.postman_collection.json

* Update BringBack.postman_collection.json

* Update BringBack.postman_collection.json

---------

Co-authored-by: Mehdi <10160868+mbiuki@users.noreply.github.com>
  • Loading branch information
2 people authored and dsolistorres committed Feb 9, 2024
1 parent 2b93454 commit 8cb46f2
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion dotCMS/src/curl-test/BringBack.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
" pm.collectionVariables.set(\"identifier\", jsonData.entity.identifier);",
" pm.collectionVariables.set(\"inode\", jsonData.entity.inode);",
"});",
"",
"pm.test(\"Input validation is applied\", function () {",
" pm.expect(pm.response.json().errors).to.be.empty; ",
"});",
"",
"",
""
],
"type": "text/javascript"
Expand Down Expand Up @@ -386,6 +392,27 @@
" pm.collectionVariables.set(\"identifier\", jsonData.entity.identifier);",
" pm.collectionVariables.set(\"inode\", jsonData.entity.inode); ",
"});",
"",
"// Check for sensitive data exposure",
"pm.test(\"No Sensitive Data Exposure\", function () {",
" var sensitiveFields = [\"password\", \"token\", \"secret\"]; // Add fields to check for sensitivity",
" var jsonData = pm.response.json();",
"",
" sensitiveFields.forEach(function (field) {",
" pm.expect(jsonData.entity[field]).to.not.be.ok;",
" });",
"});",
"",
"// Check for proper authentication and authorization",
"pm.test(\"Proper Authentication and Authorization\", function () {",
" var jsonData = pm.response.json();",
"",
" // Add checks for authentication and authorization based on your API response structure",
" pm.expect(jsonData.entity.canRead).to.be.true;",
" pm.expect(jsonData.entity.canWrite).to.be.true;",
" pm.expect(jsonData.entity.canPublish).to.be.true;",
"});",
"",
""
],
"type": "text/javascript"
Expand Down Expand Up @@ -709,6 +736,17 @@
" pm.collectionVariables.set(\"identifier\", jsonData.entity.identifier);",
" pm.collectionVariables.set(\"inode\", jsonData.entity.inode);",
"});",
"",
"// Check for sensitive data exposure",
"pm.test(\"No Sensitive Data Exposure\", function () {",
" var sensitiveFields = [\"password\", \"token\", \"secret\"]; // Add fields to check for sensitivity",
" var jsonData = pm.response.json();",
"",
" sensitiveFields.forEach(function (field) {",
" pm.expect(jsonData.entity[field]).to.not.be.ok;",
" });",
"});",
"",
""
],
"type": "text/javascript"
Expand Down Expand Up @@ -1062,4 +1100,4 @@
"value": ""
}
]
}
}

0 comments on commit 8cb46f2

Please sign in to comment.