Skip to content

Commit a7e7859

Browse files
fix(container-pull): add missing account param in registry token URL
The /v2/token endpoint URL was missing the `account` query parameter name, producing `?=username` instead of `?account=username`. The laggar registry (us-gov-1) rejects this malformed URL with a 500 error while commercial registries silently ignore it.
1 parent a6fd3d6 commit a7e7859

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

bash/containers/falcon-container-sensor-pull/falcon-container-sensor-pull.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ curl_command() {
288288

289289
fetch_tags() {
290290
bearer_result=$(echo "-u $ART_USERNAME:$ART_PASSWORD" |
291-
curl -s -L "https://$cs_registry/v2/token?=$ART_USERNAME&scope=repository:$registry_opts/$repository_name:pull&service=$cs_registry" -K-)
291+
curl -s -L "https://$cs_registry/v2/token?account=$ART_USERNAME&scope=repository:$registry_opts/$repository_name:pull&service=$cs_registry" -K-)
292292
handle_curl_error $?
293293
registry_bearer=$(echo "$bearer_result" | json_value "token" | sed 's/ *$//g' | sed 's/^ *//g')
294294
# Check if registry_bearer is not empty
@@ -859,9 +859,9 @@ if [ "${ERROR}" = "true" ]; then
859859
fi
860860

861861
#Get latest sensor version
862-
set +e # Temporarily disable exit-on-error for version matching
862+
set +e # Temporarily disable exit-on-error for version matching
863863
LATESTSENSOR=$(match_sensor_version "$SENSOR_VERSION")
864-
set -e # Re-enable exit-on-error
864+
set -e # Re-enable exit-on-error
865865

866866
# Check if version matching was successful
867867
if [ -z "$LATESTSENSOR" ]; then

0 commit comments

Comments
 (0)