Browse Source

filter "home-assistant-config-entries": also remove webhook ids & shorten android ids

Anyone knowing a webhook id can post to it without authentication.
Android ids are shortened for privacy, since they identify a phone persistently until it is factory reset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fabian Peter Hammerle 1 day ago
parent
commit
594dcb4be1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gitconfig

+ 1 - 1
gitconfig

@@ -58,7 +58,7 @@
 	required = true
 
 [filter "home-assistant-config-entries"]
-	clean = jq '.data.entries[].data |= with_entries(if (.key | IN(\"password\", \"access_token\", \"noise_psk\", \"token\")) and .value != null then .value = \"…\" else . end)' | eval \"$(git config --get filter.truncate-mac-address-to-24-bits.clean)\" | eval \"$(git config --get filter.truncate-dyness-battery-serial-numbers.clean)\"
+	clean = "jq '(.data.entries[].data |= with_entries(if (.key | IN(\"password\", \"access_token\", \"noise_psk\", \"token\", \"webhook_id\")) and .value != null then .value = \"…\" else . end)) | (.data.entries[].unique_id |= if . != null then sub(\"^(?<p>io[.]homeassistant[.]companion[.]android-[[:xdigit:]]{2})[[:xdigit:]]{14}$\"; \"\\(.p)…\") else . end) | ((.data.entries[] | select(.data.app_id == \"io.homeassistant.companion.android\") | .data.device_id) |= if . != null then sub(\"^(?<p>[[:xdigit:]]{2})[[:xdigit:]]{14}$\"; \"\\(.p)…\") else . end)' | eval \"$(git config --get filter.truncate-mac-address-to-24-bits.clean)\" | eval \"$(git config --get filter.truncate-dyness-battery-serial-numbers.clean)\""
 	smudge = cat
 	required = true