Open Source Security: How Can Devs Keep Their Project Safe from Cybercriminals?
July 25, 2022

Dima Lazerka
VictoriaMetrics

Open source security is increasingly in the headlines, with a staggering 650% rise in open source supply chain attacks last year. New forms of attack, like "dependency confusion" are hurting organizations with alarming regularity.

Given how widespread open source is within enterprise tech, one insecure package can cause a ripple effect around the globe. Last year's Log4j vulnerability did exactly that, highlighting the need to improve open source security and the transparency of software supply chains.

Despite welcome interventions to address the situation, like Google's initiative to distribute security-vetted open-source, there is still a long way to go. If devs aren't aware of best practices to craft and maintain secure projects, all good intentions will fall flat.

So, how can developers keep their projects safe from today's cybercriminals?

With cybercriminals constantly innovating, project developers have the unenviable task of needing to audit and enhance processes to keep up with the latest attack vectors. Due to lack of resources, many open source projects don't have dedicated security teams to review every dependency, or resources to conduct audits from high-end security companies. However, there are a number of strategies available to turn the tide on the bad guys.

A Secure Core System

Selecting a language that lends itself to secure code is a must. The issue with many fast languages is that it's difficult to write secure code. For instance, C and C++ often have code issues and bugs that can lay dormant and become security issues years down the line. Buffer overflow and overreads can easily be leveraged by bad actors, as was the case with Heartbleed - which left hundreds of thousands of organisations at risk. Languages like Go, which feature automated memory management, make it far easier to write secure code, shrinking the attack surface.

Slash Dependencies to Cut Supply Chain Attacks

If developers can follow a general philosophy to remain independent and self-sufficient from other projects, policing their code for any potential vulnerabilities becomes a much easier task. For example, having a low number of dependencies, direct or indirect, that are isolated from each other vastly cuts down chances of attack.

However, this isn't always possible. In that case, it's better to make smaller copies of critical parts of external dependencies than importing big dependencies. If external libraries are too big, such as Kubernetes, developers should consider creating much smaller aspects of the library in house. Paying attention to the quality of dependencies and where they come from is also essential. If they are created from a reputable source, such as Google or Meta, the security risks are likely to be lower.

Clear Documentation, and a Strong Base

It's important that any project has clear, visible, and easy-to-find documentation that lays out everything security-related. Documentation has to be compact and concise, not bloated and difficult to search through, or people will lose interest.

However, even if people don't read documentation, having secure settings by default will keep users safe. This is down to the fact that no-one usually changes default settings unless out of necessity. If default activity exposes sensitive information, that's a security risk with real world implications. Striking the balance between usability, visibility and security is difficult, but the general rule for developers should be to hide all sensitive information unless it's absolutely critical to end users.

Mandatory Code Change Reviews

In open source environments, code changes should be heavily reviewed whenever an external contribution is made, whether that be from coworkers or community members. These reviews should be conducted from a security perspective as well as an architectural perspective. Building a team that is fond of security will help in making sure these reviews don't leave out security.

Automated Vulnerability Scanning

Finally, automated vulnerability scans are critical to constantly assess versions of dependencies and notify developers when they change, advising on whether to remove or upgrade them. Some developers running projects with many dependencies will hide or ignore these requests, treating them as unnecessary admin. In this case, reducing the frequency of these notifications will still allow developers to stay ahead of any potential vulnerabilities without impeding their work.

Today's hackers are dedicated to coming up with new and innovative ways to commit cybercrime. The above guidance will put developers in a strong position to create secure open source projects, but the sophistication of cybercriminals means staying abreast of security should be a vital part of any developer's day-to-day routine.

Dzmitry "Dima" Lazerka is Co-Founder at VictoriaMetrics
Share this

Industry News

May 02, 2024

Parasoft announces the opening of its new office in Northeast Ohio.

May 02, 2024

Postman released v11, a significant update that speeds up development by reducing collaboration friction on APIs.

May 02, 2024

Sysdig announced the launch of the company’s Runtime Insights Partner Ecosystem, recognizing the leading security solutions that combine with Sysdig to help customers prioritize and respond to critical security risks.

May 02, 2024

Nokod Security announced the general availability of the Nokod Security Platform.

May 02, 2024

Drata has acquired oak9, a cloud native security platform, and released a new capability in beta to seamlessly bring continuous compliance into the software development lifecycle.

May 01, 2024

Amazon Web Services (AWS) announced the general availability of Amazon Q, a generative artificial intelligence (AI)-powered assistant for accelerating software development and leveraging companies’ internal data.

May 01, 2024

Red Hat announced the general availability of Red Hat Enterprise Linux 9.4, the latest version of the enterprise Linux platform.

May 01, 2024

ActiveState unveiled Get Current, Stay Current (GCSC) – a continuous code refactoring service that deals with breaking changes so enterprises can stay current with the pace of open source.

May 01, 2024

Lineaje released Open-Source Manager (OSM), a solution to bring transparency to open-source software components in applications and proactively manage and mitigate associated risks.

May 01, 2024

Synopsys announced the availability of Polaris Assist, an AI-powered application security assistant on the Synopsys Polaris Software Integrity Platform®.

April 30, 2024

Backslash Security announced the findings of its GPT-4 developer simulation exercise, designed and conducted by the Backslash Research Team, to identify security issues associated with LLM-generated code. The Backslash platform offers several core capabilities that address growing security concerns around AI-generated code, including open source code reachability analysis and phantom package visibility capabilities.

April 30, 2024

Azul announced that Azul Intelligence Cloud, Azul’s cloud analytics solution -- which provides actionable intelligence from production Java runtime data to dramatically boost developer productivity -- now supports Oracle JDK and any OpenJDK-based JVM (Java Virtual Machine) from any vendor or distribution.

April 30, 2024

F5 announced new security offerings: F5 Distributed Cloud Services Web Application Scanning, BIG-IP Next Web Application Firewall (WAF), and NGINX App Protect for open source deployments.

April 29, 2024

Code Intelligence announced a new feature to CI Sense, a scalable fuzzing platform for continuous testing.

April 29, 2024

WSO2 is adding new capabilities for WSO2 API Manager, WSO2 API Platform for Kubernetes (WSO2 APK), and WSO2 Micro Integrator.