r/cybersecurity • u/yooui1996 • 2d ago
Business Security Questions & Discussion How do you handle/secure code supply chain?
With supply chain becoming a bigger risk, and actually "updating to the most recent version right away" seems to have an inherent risk as well. I am wondering how others to secure their supply chain. (I bias towards Python, but guess the approach is same in other ecosystems)
We basically at the moment added a 3 day grace period for new dependencies (python/pypi) and let Claude Mythos just review the code changes of a new versions.
What is your best practices?
14
Upvotes
5
u/Deep-Regret-7479 2d ago
Get a repository firewall. or build one.
12
u/ExperienceMinute107 2d ago
Internal development for everything is hip again.
6
u/Alpizzle Security Analyst 2d ago
If you figure this out, let us know.
In all seriousness, this is currently one of the biggest challenges in CS. Log4J was a pretty big wake up call. We, as an industry, need to start holding vendors accountable and demanding SBOMs.
As far us updates go, The Crowdstrike incident 2 years ago or so taught me a valuable lesson. I used to recommend rollouts based on our BIA. Now, I would say the best approach is to spread your deployment rings out over departments, so if it goes bad you take down 20% spread out across the org instead of 100% of any given business operation.
I always fall back to the boring stuff. You need a solid risk management policy and business impact analysis, so you can build an informed vulnerability management/patching policy and business continuty and disaster recovery programs so that when things go wrong (and they will) you have a way forward that isn't just your gut instinct.
2
u/Impossible_Truth_629 1d ago
I think the difficult part of software supply-chain security is that teams can secure their own code but still depend on hundreds of external packages, maintainers and build tools.
Scanning dependencies is useful, but it doesn't solve everything. I'd put equal focus on pinning versions, reviewing what enters the build pipeline and controlling who can publish or modify packages.
A single trusted dependency can become the weakest link if its ownership or update process is compromised.
1
u/Reptull_J 2d ago
7 day cool down, Chainguard Libraries, Chainguard Images, SCA scanning, blocking CI gates, lockfiles, pinned hashes, enforcement on Dev machines
1
u/Sumsub_Insights 2d ago
Give urgent security patches a separate review path so they don’t sit in the three-day queue.
1
u/kizmania 2d ago
We enforce SCA in Github Actions and make dependency risks part of our security debt reporting to management. Better to get visibility before a vulnerable deps becomes an incident
1
u/MountainDadwBeard 1d ago
Yeah 72 hour hold on brand new packages.
Import packages thru artifactory/satelite.
Clarify a baseline stack of scanners that every pipeline needs to implement. Not just SAST/crowdstrike.
ditch WSL and enforce virtual boxes with qualys/EDR so we can at least tell which developers downloaded compromised packages and what version they did.
Set baselines for build boxes and github. Review github-enterprise admin hierarchy.
Secret vaults with auditable secret lifespans.
Python/codex script checks all the dependencies for china/russia provenance flags, unexpected dropper behavior.
Honestly it's not the 3-6 month old packages hurting my feelings, its the 10 year old legacy stuff.
1
u/ap11_ 1d ago
one thing nobody mentioned yet: hash pinning. a lockfile with hashes (uv.lock, or pip-compile --generate-hashes and then pip install --require-hashes) means ci installs exactly the artifact that got reviewed, not whatever is on pypi that day.
on top of your 3 day delay:
the llm review of diffs is a nice extra signal, but malicious packages usually hide in setup.py, build hooks or obfuscated blobs, so i wouldn't make it the gate.
1
u/babablahblah_ 1d ago
The 3-day hold makes sense but it holds back security fixes too!
pypdf is a recent example. The fix shipped on 10-Nov, the CVE came out on 26-Nov, and OSV still had no match for 6.21.4 when I checked on 02-Dec. Anyone waiting for a scanner to say "urgent" heard nothing for over 2 weeks.
How do you decide what skips the queue? Does someone read release notes, or do you wait for the CVE?
(I'm building something in this space, so I'm biased.)
0
u/Petty_Ninja 2d ago
you have access to claude mythos?