18F / tts-bug-bounty-dashboard

A prototype dashboard for the TTS bug bounty program.
Other
6 stars 4 forks source link

h1sync doesn't properly sync when structured scopes are changed internally #31

Open toolness opened 7 years ago

toolness commented 7 years ago

As described in https://github.com/18F/tts-bug-bounty-dashboard/pull/21#issuecomment-311340592:

So I'm running into some issues w/ structured scopes... I thought Alex said in our last meeting that they were immutable--or at least their asset type and identifier were--but from the admin UI it seems only their asset type is immutable.

When I change the asset identifier in the admin UI, this doesn't trigger any changes in the last_activity_at timestamps of the reports associated with the scope/asset, so the h1sync command, which filters based on last_activity_at doesn't actually capture changes to the scope's identifier. (The same thing goes for eligible_for_bounty, the other scope-related field we're interested in.)

Current workarounds are to run manage.py h1sync --all or manually clear the last synced at field from the SingletonMetadata/dashboard settings admin in the admin UI (#28).

Alex has told me they're working on a fix in their API for this, so hopefully this problem will be easy to fix soon (or it could just go away entirely, depending on the nature of the API change).

jacobian commented 7 years ago

As a workaround, I'm debating just making the sync a full sync every time, and making it happen less often (an hourly sync would be fine, even more than enough). Even with a few hundred issues now, a full sync takes less than a minute.