cartography icon indicating copy to clipboard operation
cartography copied to clipboard

Github intel module cleanup jobs are destructive when syncing multiple organizations

Open ryan-lane opened this issue 3 years ago • 1 comments

Description:

The github intel module has the cleanup jobs for users and repos sync inside of the individual functions, and the cleanup jobs aren't specific to the github organization being synced. When running a new sync, cleanup jobs are run numerous times, and data is deleted for organizations until the sync fully finishes.

To Reproduce:

Run a sync against multiple organizations, and add a failure after the first organization run.

ryan-lane avatar May 09 '22 06:05 ryan-lane

Thanks for reporting - this is an oversight. Similar to how AWS account cleanups use the AWS_ID parameter, the github cleanup jobs will need to accept an organization id as a parameter and each query in the cleanup job must be tied to the given organization.

achantavy avatar Jun 02 '22 06:06 achantavy