logo

Database

Azure Iot Hub Connection String

Description

The source code repository contains sensitive information: Azure IoT Hub Connection String

Weakness:

009 - Sensitive information in source code

Category: Information Collection

Detection Strategy

    Matches Azure IoT Hub Connection String patterns in source code and configuration files

Vulnerable code example

HostName=my-iot-hub.azure-devices.net;DeviceId=sensor01;SharedAccessKey=8f3n2K9dLXbYqZ1oW6vT4rP0sJ7mN2cQ8hU5eR3xF9k=
HostName=ContosoHub;DeviceId=device-42;SharedAccessKey=Az9Bq2Cw5Dx8Ey1Fz4Gh7Ij0Km3Ln6Op9Qr2St5Uv8=
IOT_HUB_CONNECTION_STRING="HostName=my-iot-hub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XNBhoasdfhqRlgGnasdfhivtshcwh4bJwe7c0RIGuWsirW0="
HostName=contoso-cn-hub.azure-devices.cn;SharedAccessKeyName=service;SharedAccessKey=Bq2Cw5Dx8Ey1Fz4Gh7Ij0Km3Ln6Op9Qr2St5Uv8Az9=
HostName=contoso-gov-hub.azure-devices.us;DeviceId=gov-device1;SharedAccessKey=Uv8Az9Bq2Cw5Dx8Ey1Fz4Gh7Ij0Km3Ln6Op9Qr2St5=
HostName=contoso-hub.azure-devices.net;DeviceId=edge-device1;ModuleId=tempSensorModule;SharedAccessKey=Qr2St5Uv8Az9Bq2Cw5Dx8Ey1Fz4Gh7Ij0Km3Ln6Op9=