Skip to content

fix(azure): read cors.supportCredentials in accessControlAllowCredential - #2212

Closed
Anmol7091 wants to merge 67 commits into
aquasecurity:masterfrom
accuknox:fix/CSPM-cors-support-credentials
Closed

Anmol7091 wants to merge 67 commits into
aquasecurity:masterfrom
accuknox:fix/CSPM-cors-support-credentials

Conversation

@Anmol7091

Copy link
Copy Markdown

Summary

accessControlAllowCredential read cors.supportedCredentials, but the Azure API returns
cors.supportCredentials. The check therefore always failed, even when
"Enable Access-Control-Allow-Credentials" was turned on (false positive).

Changes

  • plugins/azure/appservice/accessControlAllowCredential.js: read cors.supportCredentials (line 49)
  • plugins/azure/appservice/accessControlAllowCredential.spec.js: use the real Azure property name in mock data

Testing

  • Azure API response for a Function App with "Enable Access-Control-Allow-Credentials" turned on,
    using the same API version as the collector (2019-08-01):
az rest --method get \
  --url "https://management.azure.com/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Web/sites/<function_app>/config/web?api-version=2019-08-01" \
  --query properties.cors
{
  "allowedOrigins": [
    "https://portal.azure.com"
  ],
  "supportCredentials": true
}

The property is supportCredentials; supportedCredentials is not present in the response.

  • Live scan (accuknox/cloudsploit master vs this branch):
App Service CORS master this branch
Function App Enabled FAIL PASS
App Service A Not enabled FAIL FAIL

seswarrajan and others added 30 commits August 14, 2023 12:12
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
Fix for cloudsploit crash when action is * for iam:*
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
Pinned the aws sdk minor version as an update on Aug 23, 2024 broke everything
[CNAPP-19580]: Rename Aqua ref to AccuKnox & official Microsoft docum…
Add mx-central region to aws region file
[Cloudsploit] Read Requests are exceeding for database scanning
[CNAPP-24185] : BE | Public Disk access still coming up need to confirm on check
remove mx-region from services that are not available for that region
adding region support to cloudsploit
shivam-accuknox-dt and others added 29 commits August 13, 2026 09:05
Fix backend instance count logging for load balancer
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
Fix missing newline at end of file.
@Anmol7091 Anmol7091 closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants