Skip to content

can't retrieve function apps #72

Description

@rt-tdf

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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions