Browse Source

filter "home-assistant-config-entries": also remove access tokens

E.g. Victron Energy BLE stores the device's advertisement encryption key as data.access_token.

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

+ 1 - 1
gitconfig

@@ -43,7 +43,7 @@
 	textconv = od -t x1z --
 
 [filter "home-assistant-config-entries"]
-	clean = jq '(.data.entries[].data | select(.password != null) | .password) = \"…\"' | eval \"$(git config --get filter.truncate-mac-address-to-24-bits.clean)\"
+	clean = jq '.data.entries[].data |= with_entries(if (.key | IN(\"password\", \"access_token\")) and .value != null then .value = \"…\" else . end)' | eval \"$(git config --get filter.truncate-mac-address-to-24-bits.clean)\"
 	smudge = cat
 	required = true