~jan0sch/smederee

Showing details for patch 2c6f3d2da698ff0a6fc4a77977a60fa926f96750.
2025-04-24 (Thu), 2:32 PM - Jens Grassel - 2c6f3d2da698ff0a6fc4a77977a60fa926f96750

chore: Fix leaked api key. (>_<)

- remove api key from script
- change script and docs to define key in sourced file
- change api key on the deptrack server
Summary of changes
1 files modified with 2 lines added and 1 lines removed
  • upload_boms.sh with 2 added and 1 removed lines
diff -rN -u old-smederee/upload_boms.sh new-smederee/upload_boms.sh
--- old-smederee/upload_boms.sh	2025-05-10 05:00:36.113760711 +0000
+++ new-smederee/upload_boms.sh	2025-05-10 05:00:36.113760711 +0000
@@ -5,6 +5,7 @@
 #   - defining the variable `DEPTRACK_URL`
 # EXAMPLE `bom_project_id_mapping.sh`:
 # ```
+# DEPTRACK_KEY="XXX"
 # DEPTRACK_URL="https://deptrack.example.com/api/v1/bom"
 # function get_project_id() {
 #   readonly port=${1:?"The project name must be specified!"}
@@ -44,7 +45,7 @@
       echo "Uploading BOM from $PROJECT."
       curl --silent -X "POST" "$DEPTRACK_URL" \
         -H 'Content-Type: multipart/form-data' \
-        -H 'X-Api-Key: deptrack_U1VHEwCQ88ZpJNWdMxdxHthZWAha2Pnd' \
+        -H "X-Api-Key: $DEPTRACK_KEY" \
         -F "project=$PROJECT_ID" \
         -F "bom=@$BOM" > /dev/null
     fi