-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugprovider/azureIssues/PRs related with the Azure providerIssues/PRs related with the Azure providerseverity/highBug capable of collapsing large parts of the execution.Bug capable of collapsing large parts of the execution.
Description
Steps to Reproduce
prowler azure --check app_function_application_insights_enabled
Expected behavior
check is only looking for APPINSIGHTS_INSTRUMENTATIONKEY environment variable and not APPLICATIONINSIGHTS_CONNECTION_STRING, either or both means Application Insights is enabled, currently if only APPLICATIONINSIGHTS_CONNECTION_STRING exists Prowler will report it as a FAIL when it is actually a PASS.
Actual Result with Screenshots or Logs
n/a
How did you install Prowler?
Cloning the repository from github.com (git clone)
Environment Resource
workstation
OS used
Windows
Prowler version
5.4.0
Pip version
24.0
Context
suggested updates:
prowler\providers\azure\services\app\app_service.py
...
instrumentation_key=getattr(
component, "instrumentation_key", "Not Found"
),
connection_string=getattr(
component, "connection_string", "Not Found"
),
...
...
class Component(BaseModel):
resource_id: str
resource_name: str
location: str
instrumentation_key: str
connection_string: str
...
prowler\providers\azure\services\app\app_function_application_insights_enabled\app_function_application_insights_enabled.py
...
if function.enviroment_variables.get(
"APPINSIGHTS_INSTRUMENTATIONKEY", ""
) in [
component.instrumentation_key
for component in appinsights_client.components[
subscription_name
].values()
] or function.enviroment_variables.get(
"APPLICATIONINSIGHTS_CONNECTION_STRING", ""
) in [
component.connection_string
for component in appinsights_client.components[
subscription_name
].values()
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugprovider/azureIssues/PRs related with the Azure providerIssues/PRs related with the Azure providerseverity/highBug capable of collapsing large parts of the execution.Bug capable of collapsing large parts of the execution.