-
Notifications
You must be signed in to change notification settings - Fork 121
Description
Hi,
We found a bug in the code that doesn't retrieve Function Apps using AzureHound list function-apps.
The problem concern the API management.azure.com that return the kind "functionapp,linux" :
{
"value": [
{
"id": "/subscriptions/[subID]/resourceGroups/production/providers/Microsoft.Web/sites/myfunction",
"name": "myfunction",
"type": "Microsoft.Web/sites",
"kind": "functionapp,linux",
"location": "West Europe",
"tags": {
"hidden-link: /app-insights-resource-id": "/subscriptions/[subID]/resourceGroups/production/providers/microsoft.insights/components/AzureFuncProdAppInsights"
}
},...
]
...
}However, line 100 in file cmd/list-function-apps.go : if functionApp.Kind == "functionapp" can't match the value returned by Azure Management API.
The possible fix that we found is to search a substring that match "functionapp" :
if strings.Contains(functionApp.Kind,"functionapp"), we tested it and we could retrieve the function apps. But the fix need to import "strings".
The import and processing of data succeded using Docker BloodHound.
There is possibly more Azure Resources that are concerned by this problem. We only tested Azure Function Apps.
We will continue to contribute by testing other resources.
Best Regards,