Ask HN: Pragmatic way to avoid supply chain attacks as a developer
11–20 of 23 posts
Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#12Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#13With this in mind:
- https://qubes-os.org - Use separate VMs for separate domains. Use disposable VMs for temporary sessions.
- https://github.com/legobeat/l7-devenv - My project. Separate containers for IDE and (ephemeral) code-under-test. Transparent access to just the directories needed and nothing else, without compromising on performance and productivity. Separation of authentication token while transparent to your scripts and dev-tools. Editor add-ons are pinned via submodules and baked into the image at build-time (and easy to update on a rebuild). Feedback very welcome!
- In general, immutable distros like Fedora Silverblue and MicroOS (whatever happened to SUSE ALP?) also worth considering, to limit persistence. Couples well with a setup like the one I linked above.
- Since you seem to be in a Node.js context, I should also mention @lavamoat/allow-scripts (also affiliated via $work) as something you can consider to reel in your devDeps: https://github.com/LavaMoat/LavaMoat/tree/main/packages/allo...
Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#14In that sense, isolation for develop to solve supply chain security seems a symptom-treater not a cause-treater.
A more extreme approach is to:
minimize dependencies, built a lot in-house, don't update pre-vetted dependencies before another audit
In general, I think a big dependency chain is useful for getting to PoC quickly (and in some cases it's indeed unavoidable, eg. numpy etc), but in building many simplish web apps and client server applications it's feasible to have a very narrow dependency chain, especially back-end. You can even do this front-end if you eschew framework stuff.
Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#15A large portion of my role at $DayJob is around improving supply chain security. Some examples of how we do it: - Devs can only use hardened (by us) Docker images hosted inside our infrastructure. Policies enforce this during CI and runtime on clusters. - All Maven/PIP/NodeJS/etc. dependencies are pulled through via proxy and scanned before first use. All future CI jobs pull from this internal cache. - Only a handful…
What does the scanning process check for / which tools are used?
Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#16A large portion of my role at $DayJob is around improving supply chain security. Some examples of how we do it: - Devs can only use hardened (by us) Docker images hosted inside our infrastructure. Policies enforce this during CI and runtime on clusters. - All Maven/PIP/NodeJS/etc. dependencies are pulled through via proxy and scanned before first use. All future CI jobs pull from this internal cache. - Only a handful…
Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#17I've found an effective band-aid is 'become the supply chain' . Running your own cache, poorly, has advantages. You don't get the latest silliness by forgetting to update sometimes.
Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#18- Don't take any 3rd party dependencies. Build everything in house instead. Likely only possible in niche areas of government/defence where sky-high budgets intersect with intense scrutiny.
- Manually validate each new version of every dependency in your tree. Also very expensive, complex vulnerabilities will likely still slip through (i.e. things like SPECTRE aren't going to be caught in code review).
- Use firewalls/network security groups/VPC-equivalents to prevent any network traffic that isn't specifically related to the correct operation of your software. Increasingly hard to enforce, as our tech stacks rely on more and more SaaS offerings. Needs a properly staffed network admin to enforce and reduce the pain points on developers.
- Network isolated VMs/containers that can only talk to a dedicated container that handles all network traffic. Imposes odd constraints on software architecture, doesn't play well with SaaS dependencies.
In practice you run with whatever combination of the above you can afford, and hope for the best.
Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#19A large portion of my role at $DayJob is around improving supply chain security. Some examples of how we do it: - Devs can only use hardened (by us) Docker images hosted inside our infrastructure. Policies enforce this during CI and runtime on clusters. - All Maven/PIP/NodeJS/etc. dependencies are pulled through via proxy and scanned before first use. All future CI jobs pull from this internal cache. - Only a handful…
Re: Ask HN: Pragmatic way to avoid supply chain attacks as a developer
#20I've found an effective band-aid is 'become the supply chain' . Running your own cache, poorly, has advantages. You don't get the latest silliness by forgetting to update sometimes.
This could perhaps be done in a structured way - e.g. a pip cache/proxy with a configurable update availability delay.
It's not necessarily as easy as timely snapshots. For example, not knowing when the upstream may be syncing. Signatures, release interdependence, etc.
There is intent in my framing, however. Once the cache is made... do or don't mind the cadence - the benefit is there for the moment. Performance/availability :)
This is really just a central actor to other procedures. Scanning, eviction, and so on.