Part 3 recap · Systems
Systems: the short version
You can’t clean up every copy. You can make every copy useless.
Take the full lesson Part 4 recap: Agents
Where the copies are
Issued by the payment service, then 5 copies:
- Service settings
- Container image on the build machine
- Container registry
- Central log platform
- Cloud storage backup
The day, step by step
- Meet the key · Day 1, 9:00 AM Meet the key.
- Environment · Day 1, 9:30 AM Set as an environment variable.
- Container image · Day 1, 10:00 AM Baked into a container image.
- Registry · Day 1, 10:05 AM Pushed to a registry many teams pull from.
- Logs · Day 1, 10:30 AM Printed in the logs and shipped to a log platform.
- Storage · Day 2, 2:00 AM Backed up to cloud storage overnight.
- Sprawl · Day 30 Nobody chose to share it. It’s in five places.
- Detect · Day 30, 9:00 AM TruffleHog reads the registry, logs, and backups.
- Verify · Day 30, 9:05 AM Is it still live?
- Analyze and notify · Day 30, 9:20 AM Sized by what the key can do, then sent to its owner.
- Rotate · Day 30, 11:00 AM Swap in a new key.
- Confirm · Day 30, 11:15 AM Confirmed: the old key is dead.
How it ended
Swap in a new key. Every step before this found the problem. This step removes it, for every copy at once.
Confirmed: the old key is dead. The copies are harmless now, because their key is off.
Try it with TruffleHog open source
Install TruffleHog first; its README lists the options. Run these only on folders, images and buckets you’re allowed to scan.
-
Settings. Scans a folder and the files in it, such as the service’s settings file.
trufflehog filesystem ./checkout -
Image. Scans a container image on the build machine.
trufflehog docker --image docker://example/checkout:latest --results=verified -
Registry. Scans an image straight from a registry, the same copy other teams pull.
trufflehog docker --image example/checkout:latest --results=verified -
Storage. Scans an S3 bucket with the credentials already set on the machine.
trufflehog s3 --bucket=example-checkout-backups --results=verified,unknown
Keep going
- Try TruffleHog open source Scan a repository or a folder on your laptop.
- See TruffleHog Enterprise Continuous scanning, routing to owners, and re-checks.
- Talk to the team Ask how this would work in your environment.