Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BringBack.postman_collection.json #26948

Merged
merged 6 commits into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": ""
}
]
}
}
Loading