Home / Companies / Snyk / Blog / October 2023

October 2023 Summaries

27 posts from Snyk

Filter
Month: Year:
Post Summaries Back to Blog
Dependency injection is a powerful technique for enhancing the flexibility and robustness of software applications, particularly in Python. It involves giving components or objects the ability to be provided or injected with dependencies from outside, promoting decoupling and modularity. This approach offers numerous benefits, including improved maintainability and testability of code, easy swapping of dependencies, enhanced modularity and reusability of code, support for inversion of control, and configurable application behavior. However, it also comes with its own set of challenges and limitations, such as complexity, potential for confusion, runtime errors, performance overhead, rollback challenges, and not always being necessary. When deciding which dependency injection framework to use, it's essential to evaluate the specific requirements of your project, the level of modularity and testability you desire, and the framework you're working with. Popular Python frameworks like Flask, Django, and FastAPI offer built-in or integrated support for dependency injection, making it easier to manage dependencies and achieve modularity within your application.
Oct 31, 2023 2,919 words in the original blog post.
The art of conditional rendering is a technique used in web applications to selectively render a component out of a set of candidates based on some condition, such as user authentication status, user privilege, or application state. It can also be used to implement a wide range of core React UI concepts, such as client-side routing and lazy loading. Conditional rendering offers several benefits, including faster load times and improved user experience, by enabling developers to customize their UI based on the user's properties and access privileges. Additionally, it helps to gracefully handle client-side operations, such as data fetching and communication with the backend, and can be used to implement server-side routing in single-page React apps. However, conditional rendering is different from conditional routing, which navigates the user from one route to another based on conditions. While Next.js supports both conditional rendering and routing, Remix also offers similar features. When implementing conditional rendering, developers can use various methods, such as if-else statements or ternary operators, without impacting their app's DOM and performance. However, nesting components within each other is considered an anti-pattern due to the potential for creating unnecessary re-renders. Overall, conditional rendering is a powerful technique that can improve the performance and user experience of React apps, and developers should consider its benefits when building complex web applications.
Oct 30, 2023 2,865 words in the original blog post.
Snyk welcomes Reviewpad: Code, commit, celebrate! Snyk was founded with the mission of building security products that developers actually want to use, aiming to make the code review process a true collaboration and never an imposition. With the rise of AI-powered code generation tools, more code is being created than ever before, making it difficult for teams to match the speed of code review to the speed of commits. Snyk helps to address this challenge by integrating seamlessly into developer flows, providing intuitive, actionable feedback along the way. Reviewpad's expertise and technology will further enhance Snyk's mission, enabling developers to move faster while knowing their commits are being secured by industry-leading security intelligence. The partnership aims to redefine PR checks and elevate the overall developer experience on the Snyk platform, benefiting millions of developers worldwide.
Oct 30, 2023 606 words in the original blog post.
Why developers need a security companion for AI-generated code is because the speed of GenAI-enhanced development far exceeds that of traditional testing processes, leading to a mismatch where vulnerabilities are introduced into the code and developers trust this vulnerable code more than their manually created non-secure code. A study by Stanford University researchers found that 35.8% of Copilot-generated code snippets contain instances of common weaknesses, with significant diversity in security weaknesses relating to 42 different CWEs. Furthermore, developers using GenAI coding assistants are more likely to believe they wrote secure code than those without access to the AI assistant, due to a misplaced confidence in the speed being interpreted as skill. To address this modern security problem, a holistic approach is needed, including educating developers on how GenAI works, rethinking processes, and leveraging tools that can run invisibly and keep pace with developers while performing thorough and accurate checks. Snyk is an ideal tool for this use case, offering real-time security checks, interoperability, and integration into popular tools and workflows.
Oct 25, 2023 1,834 words in the original blog post.
The discovery of a "Use of Weak Hash" vulnerability in crypto-js and crypto-es, two open-source JavaScript libraries for cryptographic standards, has been made public. The vulnerability, identified by security researcher Zemnmez, affects all previous versions of the libraries due to inadequate security settings in the PBKDF2 (Algo) class, which uses insecure SHA1 and has a low iteration count of 1. This allows attackers to perform brute-force attacks when using the default parameters. New versions of the crypto-es library have been released to address the issue, while the crypto-js library has a fix but is not actively maintained and should be considered for alternative options. To prepare for remediation, users can use Snyk to quickly find impacted projects and container images, navigate to their Dependencies view, expand the filter, type in "crypto-js" or "crypto-es", select individual versions or tick the Select all shortcut, and then click outside of the filter. Snyk Advisor can help gauge the health of packages, while enhancements to the primary project or ecosystem should be followed. Users can detect vulnerabilities using Snyk's CLI, SCM integrations, reporting, or insights, and prioritize fixes using the Risk Score. To fix vulnerabilities in open source or container base images, users can update their base image to a newer tag with a fixed vulnerability or specify the iterations parameter in their usage of PBKDF2.
Oct 25, 2023 1,509 words in the original blog post.
Snyk is a developer-first approach to security that integrates with development workflows to safeguard code and entire software development processes, ensuring comprehensive software security. Snyk's platform automatically integrates with developers' workflows and collaborates with security teams to build secure applications. The integration of Snyk security into Jira Cloud and Bitbucket Cloud allows developers to identify and prioritize security vulnerabilities directly from the interface, creating a proactive approach to building reliable and resilient applications. By integrating Snyk, developers can streamline their security workflow, automate issue creation, and facilitate collaboration between development teams and security teams. The integration provides capabilities such as project-level security reports, pull request testing, and first-party visibility for security issues in the Bitbucket interface.
Oct 25, 2023 647 words in the original blog post.
The Snyk CLI is a powerful tool that can scan and monitor applications for security vulnerabilities, making it easier to secure JavaScript projects from the command line interface (CLI). The CLI integrates seamlessly into development workflows, allowing developers to proactively address security concerns early in the development process. It provides benefits such as security scanning, early detection of vulnerabilities, remediation guidance, support for compliance requirements and best practices, language and ecosystem support, and a developer-friendly experience. To use the Snyk CLI, install it globally using npm or Yarn, authenticate with a Snyk account, and then run commands like `snyk test` to scan the project's dependencies and report any issues. The CLI also offers features like `snyk monitor`, which captures snapshots of the project and sends them to Snyk, and `snyk ignore`, which allows ignoring known issues or false positives. Additionally, it provides commands for testing and monitoring local or remote container images, such as Docker images, with `snyk container test` and `snyk container monitor`. By using the Snyk CLI, developers can improve the security, reliability, and release velocity of their projects.
Oct 24, 2023 2,412 words in the original blog post.
Query parameterization is a crucial technique for preventing SQL injection attacks, which can compromise sensitive data and gain unauthorized access to databases. By separating SQL code from user input values using placeholders (parameters), query parameterization ensures that user input is treated as data, not executable code. This approach eliminates the need for manual escaping or sanitization, making it an effective way to mitigate the risk of malicious SQL injection attacks. Prepared statements offer better security benefits than non-prepared statements, and stored procedures provide an additional layer of security when used with query parameters, allowing developers to control access. Implementing query parameterization and using tools like Snyk's vulnerability scanner can help identify potential security risks early on, reducing the chance of exposing applications to attackers.
Oct 24, 2023 2,337 words in the original blog post.
The HTTP connection was kept alive for almost 9 hours by using Server Sent Events (SSE) to send periodic updates on the status of a long-running process. The process itself was kicked off in an asynchronous manner, with a backoff/retry mechanism to handle API rate limits and other potential errors. To mitigate issues with Heroku's aggressive closure of idle connections, another asynchronous method was added to drop "heartbeat" SSE messages at regular intervals. This approach allowed the long-running process to run in the background without presenting as idle, ensuring its completion without interruption. The use of SSE also provided a way for clients to receive updates on the process's progress in real-time.
Oct 23, 2023 2,391 words in the original blog post.
Snyk has released a new integration with Slack that enables developers to view and use Snyk data on Slack channels, providing notifications within the channels your teams rely on most to address security issues in your code, open source dependencies, containers, and cloud infrastructure. The integrated value of Snyk + Slack facilitates developer security by enabling better collaboration between development, security, and operations teams, delivering secure code faster and reducing delivery noise and friction. The new Snyk App for Slack provides actionable information, context, and recommended fixes within Slack across all Snyk products, enhancing the developer experience and simplifying security, awareness, and collaboration for development, operations, and security teams.
Oct 23, 2023 271 words in the original blog post.
The article explores the security aspects of GitHub Copilot when used in a React code-base, specifically focusing on the potential for Cross-site Scripting (XSS) vulnerabilities, particularly within the context of React development. The authors examine whether the code proposed by GitHub Copilot adheres to secure coding principles and how developers can mitigate against XSS taking place in `dangerouslySetInnerHTML`. They also discuss the importance of robust security tools like Snyk, which offer real-time vulnerability assessments and auto-fixes to enhance the security of React applications. Additionally, they highlight the need for developer vigilance and caution when using `dangerouslySetInnerHTML`, emphasizing the importance of secure output encoding and sanitizing user input to prevent XSS vulnerabilities.
Oct 19, 2023 2,044 words in the original blog post.
Securing symmetric encryption algorithms in Java is crucial due to the wide spread of Java applications in various sectors, from banking to healthcare, handling sensitive data. Symmetric encryption uses the same key for both encryption and decryption, making it faster but less secure when the key needs to be shared. Asymmetric encryption uses a pair of keys (public and private), ideal for securely sharing keys over a network. It is essential to rely on services that leverage hardware security modules (HSMs) or use secure modes like AES/GCM/NoPadding, which are currently recommended by OWASP and NIST cryptographic standards and guidelines. Using outdated encryption algorithms, such as DES or 3DES, can lead to potential risks due to known vulnerabilities. It is recommended to continuously review and monitor encryption algorithms in Java applications using a static analysis security testing (SAST) tool like Snyk Code for free.
Oct 18, 2023 1,489 words in the original blog post.
This summary provides an overview of cross-site request forgery (CSRF) attacks, their impact, and strategies for protecting Node.js applications from such attacks. CSRF attacks exploit trust between a web browser and a legitimate website, allowing attackers to manipulate browsers into executing malicious actions on behalf of authenticated users. To safeguard against CSRF attacks, developers can implement robust countermeasures, including the synchronizer token pattern (STP), SameSite cookies, and the Double Submit Cookie pattern. These strategies help protect user data and prevent unauthorized actions, ensuring compliance with security standards and regulations. By regularly testing for vulnerabilities and applying best practices, such as combining multiple protection techniques and implementing a Content Security Policy, developers can build secure Node.js applications that mitigate risks and prevent malicious actors from exploiting them.
Oct 17, 2023 3,146 words in the original blog post.
Scaling a risk-based AppSec program involves adapting security practices to accommodate business growth while managing and mitigating security risks. To achieve this, organizations need to build a comprehensive asset inventory, identify coverage gaps, automate processes, enable developers to succeed, celebrate successes, and report out to stakeholders. By following these steps, organizations can develop a lean and effective AppSec program that leaves no stone unturned and no room for doubt.
Oct 13, 2023 938 words in the original blog post.
Installing Java on macOS can be a complex process, but there are several methods to simplify it. Manual installation requires navigating Oracle's website and configuring environment variables, which can be daunting for new developers. Homebrew, a popular package manager, offers a simpler solution by providing a straightforward command-line interface for installing and managing Java versions. SDKMAN!, another tool, provides versatility and automatic version management, making it easier to switch between different Java versions as needed. Understanding how to install and manage Java on macOS is crucial for developers working with Java applications, and this guide aims to provide a comprehensive solution to help navigate the process.
Oct 12, 2023 1,464 words in the original blog post.
The curl team has announced a fix for a high-severity vulnerability impacting libcurl and curl, a command-line tool widely used by developers. To update curl on various operating systems, users can follow these steps: On macOS, use Homebrew to install the latest version of curl (8.3.0) and modify the system path to prioritize the new installation. On Windows, use Winget or Chocolatey to install the latest version of curl and update environment variables accordingly. On Linux, use package managers like apt, snap, dnf, or apk to install the latest version of curl. Users can also build curl from source for the absolute latest version, but this requires more technical expertise. It is recommended to wait for official updates from Microsoft or adopt a newer version once available to ensure the latest security patch.
Oct 11, 2023 1,772 words in the original blog post.
The discovery of a novel "rapid reset" technique that leverages stream multiplexing, a feature of the widely-adopted HTTP/2 protocol, has been disclosed as a High severity vulnerability, CVE-2023-44487. This vulnerability is believed to impact every web server implementing HTTP/2 and carries the potential for extremely large volumetric DDoS attacks if exploited. To mitigate this risk, organizations are advised to check with their infrastructure and/or CDN provider to ensure they're protected, upgrade packages to remediated versions, and consider applying configuration changes and mitigations through infrastructure providers and CDNs. Snyk is not impacted by this vulnerability and offers various tools and methods to detect and remediate the HTTP/2 vulnerabilities, including testing projects locally, using the Snyk CLI, and connecting to Git repositories to raise pull requests for updates. Organizations can also use custom policies to reprioritize the severity of the vulnerability and re-test after adding custom severity policies.
Oct 11, 2023 1,225 words in the original blog post.
The global cost of software supply chain attacks is predicted to reach nearly $138 billion by 2031, with the number of affected software packages increasing from around 700 in 2019 to over 185,000 in 2022. Malicious actors are exploiting software supply chain vulnerabilities rather than targeting end users, causing some of the most notable cybersecurity incidents and data breaches in recent years. The complexity of the software supply chain makes it challenging for organizations to manage risk and prioritize security measures. The Cybersecurity Ventures Report predicts exponential costs between 2024 and 2031, emphasizing the urgent need for proactive software supply chain security. Developers play a critical role in securing the software supply chain by prioritizing security in their coding and product development processes, with tools like Snyk providing developer-first solutions to mitigate risk.
Oct 10, 2023 816 words in the original blog post.
SAS and Snyk recently discussed the future of AI for development and security teams, highlighting four key predictions: AI will become even more critical for developer productivity, teams must prioritize avoiding hallucinations in LLMs, prompt engineering poses a significant threat if not done correctly, and bias detection for AI will become more prevalent as organizations start to use these tools. Jared Peterson from SAS emphasizes the importance of exploring AI's pros and cons in specific domains, while Ravi Maira from Snyk recommends training models on smaller data sets related to team-specific use cases to avoid hallucinations. The conversation also touches on the need for caution when adopting AI technology and the importance of establishing checks and balances, such as regular code reviews, to prevent malicious prompt engineering and bias perpetuation.
Oct 09, 2023 848 words in the original blog post.
The developer role is expanding beyond writing and testing code to encompass operations and security functions. To address this, platform engineering has emerged as a concept to make software more secure by adding guardrails such as pre-vetted software components. Atlassian's Compass platform aims to enhance the development experience with a software component catalog, health scorecards, and an extensibility engine. The Snyk App for Compass integrates vulnerability data from Snyk Open Source, Code, Container, and Infrastructure as Code to provide a comprehensive view of risk, simplifying application security testing and remediation processes.
Oct 05, 2023 662 words in the original blog post.
The libwebp vulnerability, identified as CVE-2023-4863 and CVE-2023-5129, is a critical zero-day vulnerability affecting Chromium-based browsers and the webmproject/libwebp library provided by Google. The impact extends beyond just browsers to developer ecosystems, operating systems, and containers, making it crucial for developers to be aware of and address the issue. To remediate the vulnerability, developers can identify where libwebp is used in their projects, upgrade to libwebp 1.3.2 or higher, monitor projects using auto-PR support, and use tools like Snyk to detect and fix vulnerabilities. Regular monitoring and updates are necessary to stay ahead of potential new attack vectors.
Oct 05, 2023 1,282 words in the original blog post.
Snyk Partner Speak video series with HashiCorp``` The latest Snyk Partner Speak Series video showcases a partnership between Snyk and HashiCorp that enables development teams to build and deploy applications with integrated security at every stage. Snyk's proactive approach helps developers find and fix misconfigurations in infrastructure as code, improving the risk posture of deployed infrastructure and reducing rework. HashiCorp's infrastructure automation software builds, deploys, and manages cloud infrastructure, while their partnership empowers customers to apply Snyk's vulnerability scanning and remediation capabilities in Terraform Cloud workflows. This joint solution helps engineers identify and remediate liabilities in infrastructure as code, reducing the risk of security breaches before production. The partnership is also sponsoring HashiConf 2023, where attendees can connect with the team and discover how Snyk's collaborative solution enhances development and deployment security workflows.
Oct 04, 2023 180 words in the original blog post.
The libcurl and curl projects have released a new version, 8.4.0, to address a high-severity heap-based buffer overflow vulnerability (CVE-2023-38545) that could impact systems with specific configurations and preconditions. The vulnerability is present in packages from various ecosystems, including C/C++, cargo, cocoapods, npm, NuGet, pip, and pub, as well as Linux distributions such as Alpine, Debian, RHEL, and others. The exploit complexity is considered high, requiring specific scenarios to trigger the vulnerable condition. To prepare for remediation, users can use Snyk's reporting feature to find impacted projects, identify hosts with curl installed, and update packages and containers accordingly. A fixed version of libcurl will be released on October 11, 2023, at around 06:00 UTC.
Oct 04, 2023 1,104 words in the original blog post.
Snyk has been actively involved with the Open Source Security Foundation (OpenSSF) to support its mission of securing the open source ecosystem. A recent summit meeting between the OpenSSF and the US Government departments discussed the importance of securing open source software, with three top priorities emerging: providing security education, securing repositories, and enabling cross-industry incident response capabilities. Snyk has collaborated on publishing guidelines for securing open source repositories, including a Source Code Management Best Practices Guide that provides developers, maintainers, and organizations using GitHub and GitLab SCM platforms with clear guidelines on setting up and maintaining security.
Oct 04, 2023 381 words in the original blog post.
AI can significantly boost development productivity and innovation when used correctly, accelerating research, explaining complex code, and backing powerful AppSec tools. However, it's essential to be cautious of AI's inherent flaws, such as hallucination, low-quality inputs, and security concerns related to prompt injection and deceptive leading inputs. To mitigate these risks, teams should adopt a "trust, but verify" mentality, using human research and knowledge-sharing alongside AI-generated results. As AI continues to evolve, it will empower civilian coders and drive the need for strong application security tooling that leverages AI innovation while ensuring human verification and cross-referencing.
Oct 03, 2023 1,040 words in the original blog post.
Snyk has announced the early access of its Infrastructure as Code (IaC) tool, called IaC+, which aims to provide secure infrastructure configurations across the Software Development Life Cycle (SDLC) from code to cloud. IaC+ is designed to help developers and security teams address challenges in writing secure infrastructure configurations pre-deployment and maintaining them post-deployment in the cloud. The new tool offers enhanced accuracy of results, including multi-file analysis, an expanded security ruleset, and improved issues triage for misconfigurations. It also unlocks code-to-cloud use cases, providing a single source of truth for configuration security across pre- and post-deployment estates. IaC+ is available in early access via Snyk Preview starting October 3rd, 2023, for all Snyk IaC customers on the Enterprise plan.
Oct 03, 2023 686 words in the original blog post.
Modern VS Code extension development tutorial: Building a secure extension` This tutorial guides developers in creating a simple extension for Microsoft Visual Studio Code (VS Code) that incorporates essential security practices. The process begins with scaffoldng an extension project using Yeoman's VSCE generator, which sets the stage for building and publishing a secure extension. Key steps include preparing the project by ensuring compatibility with the latest VS Code engine version, validating dependencies through Snyk, and packaging the extension as a VSIX file for distribution. The tutorial also covers the importance of cybersecurity in software development, particularly with CI/CD pipelines, and introduces Snyk as a tool to alleviate concerns about falling behind industry standards. By following this tutorial, developers can create secure extensions that adhere to best practices and protect against potential vulnerabilities.
Oct 02, 2023 3,917 words in the original blog post.