Skip to content

Bug: Bad input to SetGroupSecretPushProtectionService

The SetGroupSecretPushProtectionWorker is experiencing a high error rate due to bad input propagating into the SetGroupSecretPushProtectionService. Specifically, when the API call to GroupSecuritySettings is made without projects_to_exclude, nil is being used as its value. This nil value then propagates into the SetGroupSecretPushProtectionService subject_project_ids.

The issue arises because the & operator, intended to be used between arrays, is instead applied between nil and an array. This results in an unintended false value, which is then added to the existing array. Since false cannot be implicitly converted into an array, this causes a TypeError: no implicit conversion of false into Array, leading to the failure of the worker.

pry(main)> test = nil & [1,2,3]
=> false
Edited by Gal Katz