Skip to content

AZFW0011 reported if Azure Function environment variable passed as blobPath for BlobInputAttribute #3108

@KGergo88

Description

@KGergo88

Description

Link to AZFW0011: https://dotnet-worker-rules.azurewebsites.net/rules?ruleid=AZFW0011

Workarounds:

  • Disable analyzer
  • Use two variables, one for container directory and one for blobname and join them with /

Suggested behaviour:

  • The analyzer should not detect environment variables as containers and expect an interable as parameter type

Steps to reproduce

Create an Azure function with a BlobInputAttribute, where the blobPath is an environment variable for example:
[BlobInput($"%{AcceptedFilePathEnvironmentVariableName}%")] BlobClient blobClient

The analyzer will report: AZFW0011: The binding type 'Azure.Storage.Blobs.BlobClient' must be iterable for container path. (https://aka.ms/azfw-rules?ruleid=AZFW0011)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions