Posts for: #Security

Lessons Learned from Recent Software Supply Chain Attacks

The recent npm supply chain attacks are a wake-up call for how vulnerable the software ecosystem remains. We take a deeper look at what happened and offer a thoughtful perspective on how organizations can harden their defenses against similar threats.

Key takeaways:

  • Attackers are increasingly targeting maintainers directly, using phishing to gain control and publish malicious code from trusted accounts.
  • Traditional safeguards like signing, 2FA, and automated scanning are necessary but insufficient when the human element is compromised.
  • Resilience requires layered defenses, including strict dependency pinning, hardware-backed signing, reproducible builds, and rigorous code review processes.

This isn’t just about reacting to one incident. It’s about rethinking how we build trust and security into the software supply chain.

[Read more]

Writing Extensible Configurations with Ternary Conditions

This post discusses how to write extensible configurations in Node.js using ternary conditions. It focuses on creating a flexible configuration script that prioritizes environment variables, then JSON files, and finally default values. This approach is useful for managing different environments (e.g. production, development) and allows for easy adaptability and scalability in applications. The post provides code examples to illustrate how to implement this strategy effectively, ensuring that applications can adjust their settings dynamically based on available configurations.
[Read more]