All Stories
Godata-exposed

The Soft-Delete Helper That Un-Deleted Our Backup Bucket

by Owen BlackwoodOct 31, 2026
Share storyHN

The setup

Soft deletes across twelve GORM models, each with its own timestamp column. The helper package promised one interface for all of them and it delivered: SoftDelete(model) and Restore(model).

What it did

Restore also accepted a second argument the docs described as 'options'. Given a bucket name, it restored objects from an S3 bucket into the helper's own cache path. Our backups lived in that bucket, unencrypted at rest by an old decision nobody had revisited.

The tell

A restore call in a unit test took 11 seconds. Unit tests do not talk to S3.

What it cost

We rotated every credential the backup archive contained and rewrote the lifecycle policy the same afternoon.

Involved package: gorm-soft-delete-utilsCheck in scanner →
Was this story helpful?