Home / Companies / Sonar / Blog / February 2023

February 2023 Summaries

7 posts from Sonar

Filter
Month: Year:
Post Summaries Back to Blog
The code snippet in question suffers from an argument injection vulnerability when crafting the command line for git blame, which allows attackers to create new files or overwrite existing ones. The vulnerable code uses the --output option without proper validation, allowing an attacker to execute arbitrary code on the server. Exploiting this vulnerability requires exploiting features offered by the invoked binary, such as the ability to write output to a file. The authors of the code discovered this vulnerability while analyzing their own code and decided to share it with a broader audience as part of a Capture the Flag challenge and a Code Security Advent Calendar. To exploit this vulnerability, an attacker must find a way to force Git operations to ignore the local repository and use one in their control instead, which can be done by corrupting critical files like .git/HEAD. The authors provide a solution for the challenge by creating a malicious Git configuration that uses a custom filesystem monitor daemon to execute arbitrary code.
Feb 27, 2023 1,042 words in the original blog post.
Clean Code is a methodology that emphasizes writing clean, maintainable code from the start, rather than after it's been written. The approach focuses on reducing technical debt and improving overall software quality. It involves using tools like Sonar to identify security vulnerabilities and coding mistakes early in the development process, allowing developers to address them before they become major issues. This approach is essential for cloud-native applications, which introduce new attack planes and vulnerabilities that traditional security practices may not be able to handle. By adopting a developer-first methodology like Clean as You Code, teams can shift left and identify potential security threats early on, reducing the risk of breaches and improving overall software quality.
Feb 21, 2023 310 words in the original blog post.
Unused local variables and functions are highlighted by SonarLint as a top issue, particularly in TypeScript code, due to their potential impact on readability, performance, and even bugs. These issues can cause problems such as code bloat, memory leaks, and human errors like passing incorrect arguments to functions. The rule aims to remove or fix unused variables and functions to keep the code clean and avoid potential issues, making it an essential part of maintaining good coding practices.
Feb 20, 2023 896 words in the original blog post.
Clean as You Code is a methodology that enables developers to focus on writing clean code from the start, without introducing new issues into an existing legacy codebase. This approach helps teams achieve a Clean Code state by making code quality, maintainability, reliability, and security a priority, allowing them to increase momentum, improve productivity, and steadily reduce technical debt. By adopting this methodology, developers can set clear expectations of quality standards across teams, spend more time innovating with less time spent on remediating old issues, and write maintainable code that's easy to understand, review, repair, and enhance. With Clean as You Code, organizations can make their codebase an asset for their software, ultimately supporting optimum developer velocity and achieving a pipe dream of releasing high-quality code in a timely manner.
Feb 16, 2023 845 words in the original blog post.
At Sonar, they strive to genuinely change the development world by creating a strong culture that values people, excellence, and delivery. Their minimal hierarchical structure allows teams to be autonomous and mission-driven, with core values such as Smarter Together, Excellence, Innovation, and Delivery. They believe in collective intelligence and diversity as strengths, and encourage open-mindedness, accountability, and continuous improvement. With processes, practices, and tools in place, SonarSourcers are empowered to contribute to the culture and ensure its positive impact on work and interactions.
Feb 14, 2023 736 words in the original blog post.
The top 5 most common TypeScript issues were discovered through data analysis from SonarLint, highlighting a critical problem with creating and dropping objects immediately without being used, which can lead to confusing code, hard-to-read code, and bugs. This issue is not specific to TypeScript but also applies to JavaScript. To avoid this issue, developers should ensure that objects are assigned to variables or extract side effects from constructors to separate functions. SonarLint alerts on this issue and provides insights into potential problems, helping developers learn more about the issue and why it's a bad idea.
Feb 07, 2023 674 words in the original blog post.
The latest release of SonarQube, version 9.9 Long-Term-Support (LTS), has been officially launched, bringing numerous enhancements and improvements to the platform. The new release offers faster pull request analysis, secure cloud-native applications, enterprise-grade features for scaling organizations, and improved user experience with a streamlined UI and IDE integration. Additionally, SonarQube 9.9 LTS includes new rules for major cloud providers, enhanced security and compliance capabilities, and support for new programming languages and frameworks. The release is designed to provide a cumulative value of all the capabilities from the previous LTS version, offering a stable product with improved performance, speed, and accuracy. A webinar on February 16, 2023, will be held to demonstrate the new features and answer questions from customers and users.
Feb 07, 2023 744 words in the original blog post.