.env
composer require totally-legit-package/laravel-helper
You're not just trusting the package. You're also trusting all the package's dependencies.
Situation: R&D startup with patented hardware.
Threat: Overseas factory could replicate or leak the design.
Solution: No single factory got the complete design.
Trade-off: More expensive. Far cheaper than domestic-only.
Take-home exercise: Fill this in for your app. 15 minutes.
Building 1 — Marketing site, blog, public docs Building 2 — Internal tools, staging, employee data Building 3 — Production DB, payments, user PII
Need-to-know, not nice-to-have.
If you handle production credentials — you probably should.
Having a plan is step one. Testing it is step two.
"Our CI/CD provider was just compromised. What do we do?"
Quarterly access reviews. Calendar it.
The goal isn't perfect security.It's proportionate security.
.gitignore
composer audit
Everything above, plus:
"Everyone uses the same deploy key" "We'll set up access controls later" "The contractor still has access but it's fine" "Our incident plan is 'call the CTO'" "We've never tested a backup recovery" "Only one person knows the server config"
Make sure the next one is a contained incident — not a company-wide headache.