<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nathan</title>
    <description>The latest articles on Forem by Nathan (@nathan20).</description>
    <link>https://forem.com/nathan20</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F830451%2F47bb0993-7d6b-4c6b-a03e-adcb27c95bc5.png</url>
      <title>Forem: Nathan</title>
      <link>https://forem.com/nathan20</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nathan20"/>
    <language>en</language>
    <item>
      <title>Shadow API Adoption Skyrockets 900%! 🚀</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Thu, 07 Sep 2023 12:39:29 +0000</pubDate>
      <link>https://forem.com/nathan20/shadow-api-adoption-skyrockets-900-3827</link>
      <guid>https://forem.com/nathan20/shadow-api-adoption-skyrockets-900-3827</guid>
      <description>&lt;p&gt;In the API world, there's a buzz around a mysterious term: &lt;strong&gt;Shadow APIS&lt;/strong&gt;. These hidden APIs are undocumented or unofficial application programming interfaces (APIs) within web services. While the visible web is like the tip of an iceberg, Shadow APIs are the hidden bulk beneath.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Do They Matter?
&lt;/h2&gt;

&lt;p&gt;Shadow APIs are crucial because they drive innovation and interoperability. Developers use them to create unofficial integrations and features, enhancing user experiences and enabling automation. But their use raises ethical concerns, as they can skirt privacy and security boundaries. The term "Shadow API" extend from unofficial or undocumented APIs to official APIs that are hidden or even forgotten  due to growth of micro-services. &lt;br&gt;
(The growing problem of shadow apis check this &lt;a href="https://cyberprotection-magazine.com/the-growing-problem-of-shadow-apis"&gt;article&lt;/a&gt; )&lt;br&gt;
According to researches, in the latter part of 2022, to staggering 45 billion shadow API search queries were initiated, revealing a jaw-dropping 900% surge compared to the mere 5 billion attempts seen in the first half of the year.&lt;br&gt;
In the New &lt;a href="https://owasp.org/API-Security/editions/2023/en/0x11-t10/"&gt;OWASP TOP 10 API&lt;/a&gt;  a new categorize appears &lt;a href="https://owasp.org/API-Security/editions/2023/en/0xa9-improper-inventory-management/"&gt;API Improper Inventory Management 09&lt;/a&gt;.&lt;br&gt;
According to OWASP Maintaining a comprehensive host and deployed API version inventory is crucial for addressing concerns like deprecated API versions and the inadvertent exposure of debug endpoints or shadow API.&lt;br&gt;
Shadow APIs pose a unique challenge for organizations like every organization, as they can be hard to detect and trace, potentially compromising data security and privacy. &lt;/p&gt;

&lt;h2&gt;
  
  
  Some Tips to reduce improper management
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Inventory and Documentation:Documenting and Documenting &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Educate and Raise Awareness: Educate your teams about the importance of using official, documented APIs whenever possible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Establish API Governance: Implement a clear API governance framework &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Managing and Discovery: &lt;br&gt;
&lt;a href="http://blstsecurity.com"&gt;Blst&lt;/a&gt; can assist you in managing all your APIs, including shadow ones, API Security Platform offers a single, comprehensive view of your data sources, both on-premise and in the cloud. It can monitor load balancers, API gateways, and web application firewalls, helping you discover and categorize various types of APIs, such as HTTP, RESTful, GraphQL, SOAP, XML-RPC, JSON-RPC, and gRPC.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Secure Official APIs: Prioritize the security of official APIs by implementing proper authentication, authorization, encryption, and access controls. Make official APIs more attractive and functional to discourage the use of shadow alternatives.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Review Third-Party Integrations: Examine third-party integrations and vendor relationships. Ensure that external partners and vendors are using official APIs and following security best practices. Refer to &lt;a href="https://owasp.org/API-Security/editions/2023/en/0xaa-unsafe-consumption-of-apis/"&gt;OWASP&lt;/a&gt; for more info.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regular Audits and Assessments: Conduct regular audits and security assessments of your API ecosystem, including both official and shadow APIs. Identify vulnerabilities and address them promptly.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Shadow APIs offer a glimpse into the web's hidden power. They represent both innovation and ethical dilemmas, making responsible exploration essential in this digital frontier.&lt;/p&gt;

&lt;p&gt;If you are interested to hear more about the subject &lt;br&gt;
join our webinar.&lt;br&gt;
Register at the  link bellow  👇 - &lt;br&gt;
 &lt;a href="https://blstsecurity.com/how-to-discover-your-hidden-apis-webinar"&gt;https://blstsecurity.com/how-to-discover-your-hidden-apis-webinar&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>api</category>
      <category>productivity</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>How to make your Rust project management successful?</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Tue, 14 Feb 2023 16:34:58 +0000</pubDate>
      <link>https://forem.com/nathan20/how-to-make-your-rust-project-management-successfully-57m3</link>
      <guid>https://forem.com/nathan20/how-to-make-your-rust-project-management-successfully-57m3</guid>
      <description>&lt;p&gt;The module system in Rust provides a range of features for organizing your code, such as controlling what details are public or private and managing the scope and names of items within your programs. This system comprises several features, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Packages&lt;/li&gt;
&lt;li&gt;Crates&lt;/li&gt;
&lt;li&gt;Modules &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why do we need crates?
&lt;/h3&gt;

&lt;p&gt;Crates provide a way to modularize code. This means that code can be organized into smaller pieces that can be used independently of each other. This is especially important for large projects, where it can be difficult to keep track of all the code in one place.&lt;br&gt;
Crates also provide a way to share code between different projects. This is important for two reasons. First, it allows different projects to reuse code that has already been written, which saves time and effort. Second, it allows different projects to use the same code base, which makes it easier to maintain and update the code.&lt;/p&gt;

&lt;p&gt;Crates are the key to successful Rust project management. By keeping your project's dependencies isolated in crates, you can ensure that your project will build and run correctly on any platform. Crates also allow you to manage your project's dependencies more effectively, by allowing you to specify exactly which versions of each crate your project depends on.&lt;br&gt;
 Crates allow you to modularize your code, and they provide a way for you to manage dependencies between different parts of your codebase. &lt;br&gt;
 We need to distanguish two types of crates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;binary crates can be compiled to executables program.&lt;/li&gt;
&lt;li&gt;library crates are simply libraries as other programming language&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What are packages?
&lt;/h3&gt;

&lt;p&gt;Package is a group of crates that do things.&lt;br&gt;
A package may contain one or more crates.&lt;br&gt;
A package is declared in cargo.toml.&lt;br&gt;
Packages allow you to divide your code into logical units that you can reuse in other projects.&lt;br&gt;
This can help to organize and maintain your code.&lt;br&gt;
It also allows you to easily share code with other developers.&lt;br&gt;
Cargo will generate a new project including the cargo.toml &lt;br&gt;
file for you when you create it.&lt;br&gt;
create a new package:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flx6al0muesxnvnanpy3t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flx6al0muesxnvnanpy3t.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This cargo.toml contains information about your project, including its dependencies (packages that your project needs to compile). You can edit this file to add new dependencies or remove existing ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are modules?
&lt;/h3&gt;

&lt;p&gt;Modules in Rust are a way to organise related code in a hierarchical fashion, similar to how folders organise files on your computer. &lt;br&gt;
Modules enable you to break down your codebase into smaller, more manageable chunks, making it easier to find and reason about your code.&lt;/p&gt;

&lt;p&gt;Modules in Rust also aid in code encapsulation and privacy by limiting the visibility of code elements to other parts of the programme. They also facilitate code reuse by allowing you to use the use keyword to bring functionality from other modules into your own code.&lt;/p&gt;

&lt;p&gt;Modules in code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

 my_module.rs

mod my_module {
    // define functions and variables here
    pub fn hello_world() {
        println!("Hello, world!");
    }
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the above code, we defined a module named my_module and added a function called hello_world to it. We also added the pub keyword before the function name to make it public and accessible from outside the module.&lt;/p&gt;

&lt;p&gt;To use this module in another file, you can use the use keyword followed by the path to the module. Here's an example:&lt;/p&gt;

&lt;p&gt;file mains.rs&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

mod my_module;

fn main() {
    my_module::hello_world();
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In conclusion, in Rust you can organise your code into smaller parts called "crates" and "modules". This allows you to better structure your code and refer to code defined in one section from another. Crates are like standalone libraries that can be used in multiple projects, whereas modules are like crate sub-sections that contain related code. Modules allow you to divide your code into smaller, more manageable chunks and refer to functions or variables defined in one module from another.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>rust</category>
    </item>
    <item>
      <title>Should you learn Rust as Web Developer?</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Sun, 25 Dec 2022 08:34:18 +0000</pubDate>
      <link>https://forem.com/nathan20/should-you-learn-rust-as-web-developer-106f</link>
      <guid>https://forem.com/nathan20/should-you-learn-rust-as-web-developer-106f</guid>
      <description>&lt;p&gt;As a web developer, you are constantly looking for ways to improve your skills and stay up-to-date with the latest technologies. One language that has gained a lot of attention in recent years is Rust, a statically-typed systems programming language known for its focus on safety and performance. But is Rust a good fit for web development, and should web developers consider learning it?&lt;/p&gt;

&lt;p&gt;One key benefit of Rust for web development is its emphasis on safety. The language includes a borrow checker and other safety features that can help prevent common programming errors, which is especially important when building secure web applications. In addition, Rust's static typing can help catch errors at compile-time rather than runtime, leading to more reliable code.&lt;/p&gt;

&lt;p&gt;Another advantage of Rust is its high performance. The language is designed to be fast and efficient, and it can often match or exceed the performance of other languages, including C++. This can be beneficial for web applications that need to handle a lot of data or perform complex calculations.&lt;/p&gt;

&lt;p&gt;Rust's support for concurrent programming can also be a major benefit for web developers. The language makes it easy to write programs that can take advantage of modern multi-core processors, allowing you to build web applications that can scale to meet the demands of your users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which framework to use for Building Web site?
&lt;/h2&gt;

&lt;p&gt;There are a number of frameworks available for building web applications in Rust, each with its own set of features and capabilities. Some popular options include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Actix Web: A lightweight, async web framework that is designed to be fast and easy to use. It supports a variety of features, including routing, middleware, and templates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rocket: A web framework that is designed to be simple and easy to use, with an emphasis on security. It includes features such as routing, templates, and request/response handling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tide: A framework for building async web applications with a focus on simplicity and flexibility. It includes features such as routing, request/response handling, and middleware support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Nickel: A lightweight, modular web framework that is designed to be easy to use and flexible. It includes features such as routing, templates, and request/response handling.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ultimately, the best framework for building a web application in Rust will depend on your specific needs and goals. It's a good idea to research and compare the different options to see which one best meets your requirements.&lt;/p&gt;

&lt;p&gt;Finally, Rust has a growing ecosystem of libraries and tools that can make it easier to build web applications. This includes libraries for building web servers, working with databases, and more.&lt;/p&gt;

&lt;p&gt;All of these factors make Rust a strong choice for web development, especially if you are interested in building high-performance or secure web applications. That being said, whether or not you should learn Rust as a web developer will ultimately depend on your specific goals and interests. &lt;br&gt;
If you are looking to expand your skill set and are interested in building web applications with Rust, then it could be a valuable addition to your toolkit.&lt;/p&gt;

&lt;p&gt;However, if you are more focused on other aspects of web development, such as front-end development or working with specific frameworks, then Rust might not be as relevant to your needs.&lt;/p&gt;

&lt;p&gt;Star our &lt;a href="https://bit.ly/3QFgAUf"&gt;Rust repo!&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>programming</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why companies are migrating to Rust?</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Wed, 21 Dec 2022 06:52:32 +0000</pubDate>
      <link>https://forem.com/nathan20/why-companies-migrating-to-rust-18o7</link>
      <guid>https://forem.com/nathan20/why-companies-migrating-to-rust-18o7</guid>
      <description>&lt;p&gt;As a statically-typed systems programming language, Rust has gained a lot of traction in recent years for its focus on safety and performance. This has led many companies to consider migrating from C++, a similarly popular systems language, to Rust.&lt;/p&gt;

&lt;p&gt;One key reason for this migration is Rust's emphasis on safety. The language includes a borrow checker, which helps prevent common programming errors such as null or dangling pointer references. This can lead to more reliable and secure code, which is especially important for companies that rely on their software for mission-critical applications.&lt;/p&gt;

&lt;p&gt;In addition to its safety features, Rust is also known for its high performance. It is designed to be a fast and efficient language, and it can often match or exceed the performance of C++. This makes it an attractive choice for companies looking to build software that needs to handle a lot of data or perform complex calculations.&lt;/p&gt;

&lt;p&gt;Another advantage of Rust is its support for concurrency. The language makes it easy to write programs that can take advantage of modern multi-core processors, allowing companies to build software that can scale to meet the demands of their users.&lt;/p&gt;

&lt;p&gt;Finally, Rust has a growing ecosystem of libraries and tools that make it easier for developers to get started with the language and build software more efficiently. This can be a major benefit for companies looking to reduce the time and resources needed to develop and maintain their software.&lt;/p&gt;

&lt;p&gt;Some examples of companies that have migrated from C++ to Rust include Firefox, which uses Rust to build its Gecko rendering engine, and Dropbox, which has been using Rust to build a number of its core infrastructure components. These companies have found that Rust's safety, performance, and concurrency features make it a strong choice for their needs.&lt;/p&gt;

&lt;p&gt;In conclusion, there are a number of reasons why companies might consider migrating from C++ to Rust, including its emphasis on safety, high performance, support for concurrency, and growing ecosystem. While the decision to migrate will depend on the specific needs and goals of each company, Rust is increasingly being seen as a viable alternative to C++ for building reliable and efficient software.&lt;/p&gt;

&lt;p&gt;Star our &lt;a href="https://bit.ly/3QFgAUf" rel="noopener noreferrer"&gt;Github repo! &lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How open sources tool can help you to secure your website api?</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Sun, 18 Dec 2022 14:33:11 +0000</pubDate>
      <link>https://forem.com/nathan20/how-open-sources-tool-can-help-you-to-secure-your-website-api-588g</link>
      <guid>https://forem.com/nathan20/how-open-sources-tool-can-help-you-to-secure-your-website-api-588g</guid>
      <description>&lt;p&gt;API security is an increasingly important concern for businesses as more and more organizations rely on APIs to exchange data and enable functionality between different systems. &lt;br&gt;
In order to ensure the security of their APIs, businesses need to take a number of steps, including implementing authentication and authorization mechanisms, implementing secure communication protocols, and regularly testing and monitoring their APIs for vulnerabilities.&lt;/p&gt;

&lt;p&gt;One way to help secure your website APIs is by using open source tools.&lt;br&gt;
Open source tools are software programs that are freely available for anyone to use, modify, and distribute. &lt;br&gt;
Many open source tools are developed and maintained by communities of volunteers, and they offer a range of features and capabilities that can be leveraged to help secure your APIs.&lt;/p&gt;

&lt;p&gt;Here are a few ways that open source tools can help you secure your website APIs:&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing authentication and authorization
&lt;/h2&gt;

&lt;p&gt;One of the key ways to secure your APIs is by implementing authentication and authorization mechanisms. This involves verifying the identity of users who are accessing your APIs and controlling which users are allowed to access which resources.&lt;/p&gt;

&lt;p&gt;There are a number of open source tools that can help you implement authentication and authorization for your APIs. For example, OAuth is a popular open source framework that allows users to authenticate and authorize access to APIs by using a third-party service. Other options include JSON Web Tokens (JWTs) and SAML (Security Assertion Markup Language).&lt;/p&gt;

&lt;h2&gt;
  
  
  Ensuring secure communication
&lt;/h2&gt;

&lt;p&gt;Another important aspect of API security is ensuring that communication between different systems is secure. This involves using secure protocols such as HTTPS (Hypertext Transfer Protocol Secure) to encrypt data as it is transmitted between systems.&lt;/p&gt;

&lt;p&gt;There are a number of open source tools that can help you implement secure communication protocols for your APIs. For example, OpenSSL is an open source library that provides a range of encryption algorithms and tools that can be used to secure communication between systems. Other options include Transport Layer Security (TLS) and Secure Sockets Layer (SSL).&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing and monitoring for vulnerabilities
&lt;/h2&gt;

&lt;p&gt;Testing and monitoring your APIs for vulnerabilities is an important part of maintaining API security. This involves regularly scanning your APIs for potential vulnerabilities and addressing any issues that are discovered.&lt;/p&gt;

&lt;p&gt;There are a number of open source tools that can help you test and monitor your APIs . For example Postman and SoapUI, which are open source tools that can be used to test and monitor APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing for API Logic Vulnerabilities
&lt;/h2&gt;

&lt;p&gt;Testing against Business logic vulnerabilities: These occur when there are weaknesses in the way that business processes are implemented in an application. For example, an online shopping site might have a flaw in its checkout process that allows users to add items to their cart without paying for them.&lt;/p&gt;

&lt;p&gt;Input validation vulnerabilities: These occur when an application does not properly validate or sanitize input data, allowing attackers to inject malicious code or data into the system.&lt;/p&gt;

&lt;p&gt;Access control vulnerabilities: These occur when there are weaknesses in the way that an application controls access to sensitive data or functionality. For example, an application might allow users to access resources that they are not authorized to view.&lt;/p&gt;

&lt;p&gt;By validating your API &lt;a href="https://swagger.io/specification" rel="noopener noreferrer"&gt;specifications&lt;/a&gt; and running API security tests, the CLI tool &lt;a href="//ttps://github.com/blst-security/cherrybomb"&gt;Cherrybomb&lt;/a&gt; assists you in preventing undesired user behavior. &lt;br&gt;
 The tool is totaly free and super easy to use. &lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;Open source tools can be an effective way to help secure your website APIs. &lt;br&gt;
By implementing authentication and authorization mechanisms, ensuring secure communication, and regularly testing and monitoring for vulnerabilities, you can help protect your APIs and the data and functionality they enable.&lt;/p&gt;

&lt;p&gt;Our &lt;a href="https://bit.ly/3QFgAUf" rel="noopener noreferrer"&gt;Github repo! &lt;/a&gt;&lt;br&gt;
Check us at &lt;a href="https://www.blstsecurity.com/?promo=blst&amp;amp;domain=nathan/The_4_best_resources_to_learn_Rust_programming!" rel="noopener noreferrer"&gt;BLST &lt;/a&gt;&lt;/p&gt;

</description>
      <category>website</category>
      <category>discuss</category>
    </item>
    <item>
      <title>The 5 best resources to learn Rust !</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Wed, 14 Dec 2022 10:22:17 +0000</pubDate>
      <link>https://forem.com/nathan20/the-4-best-resources-to-learn-rust--3238</link>
      <guid>https://forem.com/nathan20/the-4-best-resources-to-learn-rust--3238</guid>
      <description>&lt;p&gt;Rust is a popular programming language known for its performance and reliability. It is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. If you're looking to learn Rust, there are many great resources available to help you get started.&lt;/p&gt;

&lt;p&gt;One of the best places to start learning Rust is the official Rust website, which offers comprehensive documentation, tutorials, and other resources to help you get up and running quickly. The website also features an active community forum where you can ask questions and get help from experienced Rust developers.&lt;/p&gt;

&lt;p&gt;Another great resource for learning Rust is the Rust Book, which is available for free online. This book provides a thorough introduction to Rust and covers everything from the basics of the language to advanced concepts and features. It also includes numerous examples and exercises to help you practice and solidify your knowledge.&lt;/p&gt;

&lt;p&gt;In the case where you want to quick approach to rust, I suggest you two places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learnxinyminutes.com/docs/rust/"&gt;https://learnxinyminutes.com/docs/rust/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fasterthanli.me/articles/a-half-hour-to-learn-rust"&gt;https://fasterthanli.me/articles/a-half-hour-to-learn-rust&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition  there are many other online resources available to help you learn Rust. For example, the Rustonomicon is a more advanced resource that covers advanced topics such as unsafe code, concurrency, and more.&lt;br&gt;
If you are interested in building website check this &lt;a href="https://github.com/steadylearner/Rust-Full-Stack"&gt;repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you prefer to learn by watching videos, there are also many great Rust tutorials and courses available on platforms such as YouTube and Udemy. Some popular ones to check out include "Lets get rusty" by &lt;a href="https://www.youtube.com/@letsgetrusty"&gt;Bogdan&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hands-on Ressources
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Are you searching for more hands-on approach? Here is the top five resources.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/rust-lang/rustlings"&gt;Rustlings&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://exercism.org/tracks/rust"&gt;Exercism&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://codewars.com"&gt;Codewars&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.codingame.com/ide/puzzle/onboarding"&gt;Coding Game&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://app.codecrafters.io/join?via=DeliciousBounty"&gt;codecrafter&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, if you want to dive deeper into Rust and learn from experienced developers, there are many online communities and forums where you can connect with other Rust developers and learn from them. Some popular ones to check out include the Rust subreddit, the Rust users forum, and the Rust programming language Discord server.&lt;/p&gt;

&lt;p&gt;In summary, if you want to learn Rust, there are many great resources available to help you get started. Whether you prefer books, videos, or online forums, there is something out there for everyone. With the right resources and a bit of practice, you'll be writing high-performance, reliable Rust code in no time.&lt;/p&gt;

&lt;p&gt;Star our &lt;a href="https://bit.ly/3QFgAUf"&gt;Github repo! &lt;/a&gt;&lt;br&gt;
Check us at &lt;a href="https://www.blstsecurity.com/?promo=blst&amp;amp;domain=nathan/The_4_best_resources_to_learn_Rust_programming!"&gt;BLST &lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>rust</category>
    </item>
    <item>
      <title>How to Handle Errors in Rust: A Comprehensive Guide</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Fri, 02 Dec 2022 13:18:39 +0000</pubDate>
      <link>https://forem.com/nathan20/how-to-handle-errors-in-rust-a-comprehensive-guide-1cco</link>
      <guid>https://forem.com/nathan20/how-to-handle-errors-in-rust-a-comprehensive-guide-1cco</guid>
      <description>&lt;p&gt;Rust community constantly discusses about error handling.. In this article I will try to explain  what is it then why, and how  we should use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Purpose of Error Handling
&lt;/h2&gt;

&lt;p&gt;Error handling is a process that helps to identify, debug, and resolve errors that occur during the execution of a program. &lt;br&gt;
It helps to ensure the smooth functioning of the program by preventing errors from occurring and allows the program to continue running in an optimal state. &lt;br&gt;
Error handling also allows users to be informed of any problems that may arise and take corrective action to prevent the errors from happening again in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Result?
&lt;/h2&gt;

&lt;p&gt;Result is a built-in &lt;a href="https://doc.rust-lang.org/book/ch06-01-defining-an-enum.html" rel="noopener noreferrer"&gt;enum&lt;/a&gt; in the Rust standard library.&lt;br&gt;
It has two variants Ok(T) and Err(E).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fppuqcc9014437vkvvpdz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fppuqcc9014437vkvvpdz.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Result should be used as a return type for a function that can encounter error situations.&lt;br&gt;
Ok value is return in case of success or an Err value in case of an error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation of Result in a function.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzd4uzu6q9uew1rva0b6s.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzd4uzu6q9uew1rva0b6s.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Error Handling
&lt;/h2&gt;

&lt;p&gt;Sometimes we are using functions that can fail, for example calling an endpoint from an API or searching a file. These type of function can encounter errors (in our case the API is not reachable or the file is not existing).&lt;br&gt;
There are similar scenarios where we are using Error Handling.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsoo79ebw8ue4j39idgf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsoo79ebw8ue4j39idgf.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explained Step by Step&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Result is the result of the read username from file function.
It follows that the function's returned value will either be an Ok that contains a String or an Err that contains an instance of io::Error.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is a call to "File::open" inside of read username from file, which returns a Result type. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It can return an Ok&lt;/li&gt;
&lt;li&gt;It can return an Err&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then the code calls a match to check the result of the function and return the value inside the ok in the case the function was successful or return the Error value.&lt;/p&gt;

&lt;p&gt;In the second function read_to_string, the same principle is applied, but in this case we did not use the keyword return as you can see, and we finally return either an OK or an Err.&lt;/p&gt;

&lt;p&gt;So you may ask:  On every result type I have to write all these Match block?&lt;/p&gt;

&lt;p&gt;So hopefully there is a shortcut :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrburuebo85tf0ggr3ty.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrburuebo85tf0ggr3ty.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Question Mark- Propagation Error?
&lt;/h2&gt;

&lt;p&gt;According to the &lt;a href="https://doc.rust-lang.org/reference/expressions/operator-expr.html" rel="noopener noreferrer"&gt;rust lang&lt;/a&gt; book: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The question mark operator (?) unwraps valid values or returns erroneous values, propagating them to the calling function. It is a unary postfix operator that can only be applied to the types Result and Option.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Let's me explain it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Question mark (?) in Rust is used to indicate a Result type. It is used to return an error value if the operation cannot be completed. &lt;br&gt;
For example, in our function that reads a file, it can return a Result type, where the question mark indicates that an error might be returned if the file cannot be read, or in the other hand  the final result.&lt;br&gt;
In other words, used to short-circuit a chain of computations and return early if a condition is not met. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

fn read_username_from_file() -&amp;gt; Result&amp;lt;String, io::Error&amp;gt; {
    let mut f = File::open("username.txt")?;
    let mut s = String::new();
    f.read_to_string(&amp;amp;mut s)?;
    Ok(s)
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Every time you see a ?, that’s a possible early  return from the function in case of Error, else , f will hold the file handle the Ok contained and execution of the function continues (similary to unwrap function).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use crates for Handle errors?
&lt;/h2&gt;

&lt;p&gt;Standard library does not provide all solutions for Error Handling..&lt;br&gt;
In fact, different errors may be returned by the same function, making it increasingly difficult to handle them precisely. &lt;br&gt;
Personal anecdote, in our company we developed &lt;a href="https://github.com/blst-security/cherrybomb" rel="noopener noreferrer"&gt;Cherrybomb&lt;/a&gt; an API security tool written in Rust, and we need to re-write a good part of it to have a better errors handling.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9bh21ityq1szpwwdfvds.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9bh21ityq1szpwwdfvds.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or the same message error can be displayed multiples times.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fof0e8khzy9bwd2lo0ux5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fof0e8khzy9bwd2lo0ux5.jpeg" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This is why we need to define our own custom Error enum. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo9c2fzx3wlgqagtux049.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo9c2fzx3wlgqagtux049.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then our function will look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfmq5gmpjzsxlpqe1k0l.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfmq5gmpjzsxlpqe1k0l.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Customize Errors
&lt;/h2&gt;

&lt;p&gt;Thiserror focuses on creating structured errorsand has only  one trait that can be used to define new errors: &lt;/p&gt;

&lt;p&gt;Thiserror is an error-handling library for Rust that provides a powerful yet concise syntax to create custom error types.&lt;/p&gt;

&lt;p&gt;In the cargo toml:&lt;br&gt;
&lt;code&gt;&lt;br&gt;
[dependencies]&lt;br&gt;
thiserror = "1.0"&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It allows developers to create custom error types and handlers without having to write a lot of boilerplate code. &lt;/p&gt;

&lt;p&gt;Thank to &lt;a href="https://crates.io/crates/thiserror" rel="noopener noreferrer"&gt;thiserror&lt;/a&gt; crate, we can customize our error messages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsen64wpc13dh53nxcboa.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsen64wpc13dh53nxcboa.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It also provides features to automatically convert between custom error types and the standard error type. We will see it in the next Chapter with Dynamic Error.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create new errors through #[derive(Error)].&lt;/li&gt;
&lt;li&gt;Enums, structs with named fields, tuple structs, and unit structs are all possible.&lt;/li&gt;
&lt;li&gt;A Display impl is generated for your error if you provide #[error("...")] messages on the struct or each variant of your enum and support string interpolation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example taken from &lt;a href="https://docs.rs/thiserror/latest/thiserror/" rel="noopener noreferrer"&gt;docs.rs&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9x6oj5pwpaww9s0sgzqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9x6oj5pwpaww9s0sgzqb.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Dealing Dynamic Errors handling
&lt;/h2&gt;

&lt;p&gt;If you want to be able to use?, your Error type must implement the From trait for the error types of your dependencies. Your program or library may use many dependencies, each of which has its own error you have two different structs of custom error, and we call a function that return one specific type.&lt;br&gt;
For example:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmyivur7e6jajhbb2p94g.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmyivur7e6jajhbb2p94g.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So when we call our main function that return a &lt;code&gt;ErrorA&lt;/code&gt; type, we encounter the following error:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm7mvg1yefr8r78sv0ptk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm7mvg1yefr8r78sv0ptk.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So one of the solution is to implement the trait &lt;code&gt;From&amp;lt;ErrorB&amp;gt;&lt;/code&gt; for the struct &lt;code&gt;ErrorA&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Our code looks like this now: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fwpocv129fd3ajkrus4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fwpocv129fd3ajkrus4.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another solution to this problem is to return dynamic errors.&lt;br&gt;
To handle dynamic errors in Rust, in the case of an Err value, you can use the box operator to return the error as a Box (a trait object of the Error trait). This allows the error type to be determined at runtime, rather than at compile time,  making it easier to work with errors of different types. &lt;/p&gt;

&lt;p&gt;The Box can then be used to store any type of Error, including those from external libraries or custom errors. The Box can then be used to propagate the Error up the call stack, allowing for appropriate handling of the error at each stage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18b2kenm8eef2q54upah.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18b2kenm8eef2q54upah.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Thiserror crate
&lt;/h2&gt;

&lt;p&gt;In order to have a code clearer and soft let's use thiserror crate.&lt;br&gt;
The &lt;code&gt;thiserror&lt;/code&gt; crate can help handle dynamic errors in Rust by allowing the user to define custom error types. It does this through the &lt;code&gt;#[derive(thiserror::Error)]&lt;/code&gt; macro. This macro allows the user to define a custom error type with a specific set of parameters, such as an error code, a message, and the source of the error. The user can then use this error type to return an appropriate error value in the event of a dynamic error. Additionally, the &lt;code&gt;thiserror&lt;/code&gt; crate also provides several helpful methods, such as &lt;code&gt;display_chain&lt;/code&gt;, which can be used to chain together multiple errors into a single error chain.&lt;br&gt;
In the following  we have created our error type &lt;code&gt;ErrorB&lt;/code&gt; , then  we used the From trait to convert from &lt;code&gt;ErrorB&lt;/code&gt; errors into our custom  &lt;code&gt;ErrorA&lt;/code&gt; error type. If a dynamic error occurs, you can create a new instance of your error type and return it to the caller. See function &lt;code&gt;returns_error_a()&lt;/code&gt; in line 13.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuo4vzlccwdev55itija0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuo4vzlccwdev55itija0.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Anyhow crate
&lt;/h2&gt;

&lt;p&gt;anyhow was written by the same author, dtolnay, and released in the same week as thiserror.&lt;br&gt;
The &lt;a href="https://crates.io/crates/anyhow" rel="noopener noreferrer"&gt;anyhow&lt;/a&gt; can be used to return errors of any type that implement the &lt;code&gt;std::error::Error&lt;/code&gt; trait and will display a nicely formatted error message if the program crashes.&lt;br&gt;
The most common way to use the crate is to wrap your code in a Result type. This type is an alias for the &lt;code&gt;std::result::Result&amp;lt;T, E&amp;gt;&lt;/code&gt;  type, and it allows you to handle success or failure cases separately. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvegdox4f58x27sf0dta.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvegdox4f58x27sf0dta.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When an error occurs,for example you can use the &lt;code&gt;context()&lt;/code&gt; method to provide more information about the error, or use the with_chain() method to chain multiple errors together. &lt;br&gt;
 The anyhow crate provides several convenient macros to simplify the process of constructing and handling errors. These macros include the &lt;code&gt;bail!()&lt;/code&gt; and &lt;code&gt;try_with_context!()&lt;/code&gt;macros.&lt;br&gt;
 The former can be used to quickly construct an error value, while the latter can be used to wrap a function call and automatically handle any errors that occur.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison
&lt;/h2&gt;

&lt;p&gt;The main difference between anyhow and the Thiserror crate in Rust is the way in which errors are handled. Anyhow allows for error handling using any type that implements the Error trait, whereas Thiserror requires you to explicitly define the error types using macros. &lt;/p&gt;

&lt;p&gt;Anyhow is an error-handling library for Rust that provides an easy way to convert errors into a uniform type. It allows  to write concise and powerful error-handling code by automatically converting many different types of errors into a single, common type.&lt;/p&gt;

&lt;p&gt;In conclusion,in &lt;a href="https://github.com/blst-security/cherrybomb" rel="noopener noreferrer"&gt;Cherrybomb&lt;/a&gt; we choose to  combining the two, in order to  create a custom error type with thiserror and  managed it by the anyhow crate.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Did you know you could use OpenAPI for security?</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Sun, 09 Oct 2022 09:35:04 +0000</pubDate>
      <link>https://forem.com/nathan20/did-you-know-you-could-use-openapi-for-security-1hke</link>
      <guid>https://forem.com/nathan20/did-you-know-you-could-use-openapi-for-security-1hke</guid>
      <description>&lt;h2&gt;
  
  
  What is openapi?
&lt;/h2&gt;

&lt;p&gt;Openapi is a set of tools and standards for creating, managing, and securing APIs. It includes a specification for describing APIs, a runtime for executing APIs, and a set of tools for managing APIs. &lt;br&gt;
The goal of the OpenAPI Initiative is to standardize how APIs are described and to make it easier for developers to create, use, and manage APIs. &lt;/p&gt;

&lt;p&gt;API supports, the parameters that each operation requires, the data types that are used by the API, and other information. I already wrote an &lt;a href="https://dev.to/nathan20/openapi-specification-the-complete-guide-3do"&gt;article&lt;/a&gt; about it, you can check it before continue to read.&lt;/p&gt;
&lt;h2&gt;
  
  
  How can openapi be used for security?
&lt;/h2&gt;

&lt;p&gt;OpenAPI can be used to secure access to APIs by requiring authentication and authorization for all API calls.&lt;br&gt;
OpenAPI can  also be used to validate input and output data, ensuring that data is valid and properly formatted. By using OpenAPI, developers can be sure that their APIs are secure and reliable.&lt;br&gt;
I want to  talk about these two type of vulnerabilities.&lt;/p&gt;
&lt;h3&gt;
  
  
  Lack of Authentication.
&lt;/h3&gt;

&lt;p&gt;API often suffer of authentication problem.&lt;br&gt;
For example in this &lt;a href="https://medium.com/techiepedia/password-reset-to-admin-access-3b2a649bdc3"&gt;bug report &lt;/a&gt;.&lt;br&gt;
A user has the possibility to get Admin permission with a simple endpoint that used to reset password.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsi412874qwy7o9pvsx8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsi412874qwy7o9pvsx8a.png" alt="Image description" width="333" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So how we can avoid this type of Vulnerability?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using an Specification can help to have more structure about your permissions level.&lt;/p&gt;

&lt;p&gt;In this example the security definition which apply to this endpoint API operations is "pestore_auth" which include "write and read".&lt;br&gt;
We can see, each operation has a scope of defined permissions.&lt;br&gt;
Having a permissions like this type can help to have a better understanding of permissions for an specific operation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;path: "/pet/findByStatus": {
      "get": {
    ....},
        "security": [
          {
            "petstore_auth": [
              "write:pets",
              "read:pets"
            ]
          }
        ]
      },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Insecure Direct Object Reference (IDOR).
&lt;/h3&gt;

&lt;p&gt;Another important common vulnerability occurs when unvalidated user input can be used for unauthorized access to resources or operations.&lt;br&gt;
In this &lt;a href="https://hackerone.com/reports/404797"&gt;bug report&lt;/a&gt; the researcher succeed to delete images from others by simply changing id of the image. &lt;/p&gt;

&lt;p&gt;Here we are facing an coding error, the lack of verification from the back-end leads to a high vulnerability. &lt;/p&gt;

&lt;p&gt;Back-end be like:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjjeekpvijrx37ahlaycx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjjeekpvijrx37ahlaycx.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using OAS here won't necessarily solve the problem, but can detect the problem more easily and earlier (I will explain in the next section).&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the benefits of using openapi for security?
&lt;/h2&gt;

&lt;p&gt;OpenAPI is a great tool for security because it allows you to easily and quickly understand your API. This makes it easy for Pentester to understand what your API does and how they can exploit it.&lt;br&gt;
Additionally OpenAPI is a great tool for automation not only to generate code but also to &lt;strong&gt;automated your security testing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using API security tool like &lt;a href="https://github.com/blst-security/cherrybomb"&gt;Cherrrybomb&lt;/a&gt; in earlier stage of development helps you to detect vulnerabilities before the production! &lt;/p&gt;

&lt;p&gt;If you're looking for a new way to understand and manage your API, consider using &lt;a href="https://swagger.io/specification"&gt;OpenAPI&lt;/a&gt;, and if you want to secure it consider using &lt;a href="https://github.com/blst-security/cherrybomb"&gt;CherryBomb&lt;/a&gt; to automate your security test. &lt;br&gt;
Managing and Testing it's the key,now your can keep your API safe :)&lt;/p&gt;

&lt;p&gt;Star our &lt;a href="https://bit.ly/3QFgAUf"&gt;Github repo&lt;/a&gt; and join the discussion in our &lt;a href="https://bit.ly/3HQtlYo"&gt;Discord channel&lt;/a&gt;!&lt;br&gt;
Test your API for free now at &lt;a href="https://www.blstsecurity.com/?promo=blst&amp;amp;domain=nathan/Did_you_know_you_could_use_openapi_for_security?"&gt;BLST&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>api</category>
      <category>security</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Learning a Programming Language? Is Not Enough.</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Thu, 22 Sep 2022 13:32:02 +0000</pubDate>
      <link>https://forem.com/nathan20/learning-a-programming-language-is-not-enough-32h0</link>
      <guid>https://forem.com/nathan20/learning-a-programming-language-is-not-enough-32h0</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;“To become really good at anything,you have to practice and repeat, practice and repeat, until the technique becomes intuitive”- Paulo Coelho&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Today, learning a new programming language is offered to everyone, but it is not enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Competences to adopt
&lt;/h2&gt;

&lt;p&gt;One of the most important skills for a developer is the ability to &lt;strong&gt;think abstractly&lt;/strong&gt;. This means being able to see the big picture and understand how the various pieces of a system fit together.&lt;br&gt;
It also means being able to see beyond the code and understand how the system as a whole works. &lt;br&gt;
This is a critical skill for developers, because it allows them to see problems that are not immediately apparent and to find creative solutions.&lt;br&gt;
Another important skill for developers is the ability to &lt;a href="https://dev.to/nathan20/how-to-develop-strong-problem-solving-skills-as-a-software-developer-25nb"&gt;&lt;strong&gt;solve problems&lt;/strong&gt;&lt;/a&gt;.&lt;br&gt;
This includes both the ability to find and fix errors in code and the ability to design new systems or features. &lt;br&gt;
Developers need to be able to identify problems and then use their creativity and technical expertise to come up with solutions that work. &lt;br&gt;
This is a difficult skill to learn, but it is essential for anyone who wants to be a developer.&lt;br&gt;
The last skill that we will discuss is &lt;strong&gt;communication&lt;/strong&gt;. Developers need to be able to communicate effectively with other developers, users, and other stakeholders. &lt;br&gt;
They need to be able to explain their ideas clearly and concisely. &lt;br&gt;
Also developers need to be able to understand the needs of others and work collaboratively towards a common goal. Communication is a difficult skill, but it is essential for anyone who wants to be a developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The different between a programmer and developer
&lt;/h2&gt;

&lt;p&gt;A programmer can write code, but a developer is someone who can create applications. A developer is someone who can take a problem and create a solution.&lt;br&gt;
A programmer is someone who is able to write code that a computer can understand. They understand how to use different programming languages and how to structure code so that it is effective. &lt;br&gt;
A developer is someone who can take a problem and create a solution. Developers have a broad skillset that goes beyond programming. They might be responsible for designing applications, managing databases, or working with user experience. &lt;br&gt;
Developers need to be able to communicate with other members of a team in order to create an effective solution.&lt;br&gt;
The terms “programmer” and “developer” are often used interchangeably, but they are not the same thing. &lt;/p&gt;

&lt;h2&gt;
  
  
  What else is needed to be a developer?
&lt;/h2&gt;

&lt;p&gt;It is important for developers to have a strong foundation in computer science. This means understanding algorithms, data structures, and software design principles. Developers should also be able to apply these concepts when building applications. In addition, developers need to be able to work with teams and manage projects.&lt;br&gt;
While there are many different skills that are needed to be a developer, these are some of the most important ones. By having a strong foundation in computer science and being able to problem solve, developers can build amazing applications that make our lives easier.&lt;/p&gt;

&lt;p&gt;If you want to be a developer, you need to do more than just learn a programming language. You need to be able to code, debug, and troubleshoot. You also need to be able to work with other developers. Learning a programming language is a good start, but it's not enough.&lt;/p&gt;

&lt;p&gt;Star our &lt;a href="https://bit.ly/3QFgAUf"&gt;Github repo&lt;/a&gt; and join the discussion in our &lt;a href="https://bit.ly/3HQtlYo"&gt;Discord channel&lt;/a&gt;!&lt;br&gt;
Test your API for free now at &lt;a href="https://www.blstsecurity.com/?promo=nathan&amp;amp;domain=https://dev.to/Why_Learning_a_Programming_Language_Is_Not_Enough_to_Be_a_Developer"&gt;BLST&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Cherrybomb for OWASP Conference 😁 🥳</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Thu, 22 Sep 2022 09:09:49 +0000</pubDate>
      <link>https://forem.com/blst-security/cherrybomb-for-owasp-conference-402g</link>
      <guid>https://forem.com/blst-security/cherrybomb-for-owasp-conference-402g</guid>
      <description>&lt;h2&gt;
  
  
  API Security Testing into your CI Pipeline
&lt;/h2&gt;

&lt;p&gt;Right now, your web app is most likely vulnerable to an attack.&lt;br&gt;
According to a recent survey, 9 out of 10 web applications were vulnerable to attack in recent years, with 45% of production apps exhibiting "high risk" vulnerabilities.&lt;br&gt;
That is a significant number.&lt;br&gt;
&lt;a href="https://github.com/blst-security/cherrybomb"&gt;CherryBomb&lt;/a&gt; can help you run automatic security checks right in your CI/CD pipeline, which is outstanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  OWASP-CherryBomb
&lt;/h2&gt;

&lt;p&gt;We are glad to announce that we will present CherryBomb at an &lt;a href="https://owasp.org"&gt;OWASP&lt;/a&gt; conference.&lt;br&gt;
The Open Web Application Security Project (OWASP) is a nonprofit foundation that works to improve the security of software.&lt;br&gt;
This OWASP Conference is open to the entire community, and if you're keen on being ahead of the curve, let's have a chat! But you should surely attend.&lt;/p&gt;

&lt;p&gt;It will be shown how the OpenAPI spec and Cherrybomb can be used in the real world.&lt;/p&gt;

&lt;h2&gt;
  
  
  Points we are going to talk about
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;OpenAPI specifications concepts and how important and simple they are to generate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;API security testing in the CI pipeline, as well as a demonstration of Cherrybomb's functionality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Demo Time 😋 We'll use &lt;a href="https://github.com/blst-security/cherrybomb"&gt;Cherrybomb&lt;/a&gt; to find a set of vulnerabilities on a live API. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Link for the conference: &lt;a href="https://www.meetup.com/owasp-msp-meetup/events/288608767/"&gt;https://www.meetup.com/owasp-msp-meetup/events/288608767/&lt;/a&gt;&lt;br&gt;
Test your API for free now at &lt;a href="https://www.blstsecurity.com/?promo=nasi&amp;amp;domain=https://dev.to/The_Benefits_of_Taking_Breaks_Why_Pausing_Can_Help_You_Be_More_Productive"&gt;BLST&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>api</category>
      <category>security</category>
      <category>rust</category>
    </item>
    <item>
      <title>Why I stopped writing articles</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Tue, 13 Sep 2022 08:51:56 +0000</pubDate>
      <link>https://forem.com/nathan20/why-i-stopped-writing-articles-420k</link>
      <guid>https://forem.com/nathan20/why-i-stopped-writing-articles-420k</guid>
      <description>&lt;p&gt;It’s no secret that the world today is a fastpaced, highstress environment. We’re constantly bombarded with stimuli and expected to be available 24/7. &lt;br&gt;
It’s no wonder that so many of us feel like we’re running on empty all the time.&lt;br&gt;
But what if there was a way to be more productive by taking a break? &lt;/p&gt;

&lt;h3&gt;
  
  
  The Benefits of Taking Breaks
&lt;/h3&gt;

&lt;p&gt;There are many benefits to taking breaks during your workday. Pausing can help refresh your mind, reduce stress, and boost your overall productivity. &lt;br&gt;
If you’re feeling stuck, taking a break may be just what you need to get back on track.&lt;br&gt;
When you’re working on a task, it can be easy to get bogged down and lose focus. &lt;br&gt;
If this happens, taking a break can be helpful. Breaks give your mind a chance to rest and refocus, which can help you come back to your work with fresh energy and new ideas. Additionally, taking breaks can help reduce stress, which can lead to more productive work in the long run.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lja537kcfx4t0u1at4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lja537kcfx4t0u1at4p.png" alt="Image description" width="400" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re feeling like you need a break, there are many different ways to take one. You could step away from your work for a few minutes and take a walk or stretch. &lt;br&gt;
Or, if you have some time, you could take a longer break and do something relaxing, like reading or listening to music. Taking breaks doesn’t have to be complicated – just do what feels best for you in the moment.&lt;br&gt;
The next time you’re feeling stuck, try taking a break. It just might help you boost your productivity and find some new ideas.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Use Pauses to Boost Productivity
&lt;/h3&gt;

&lt;p&gt;When it comes to productivity, pauses are just as important as the work itself. By taking a few minutes to step away from our work, we can come back feeling refreshed and ready to tackle whatever is next. So next time you feel yourself getting overwhelmed, take a break and see how much better you feel afterwards.&lt;/p&gt;

&lt;h3&gt;
  
  
  My personal experience
&lt;/h3&gt;

&lt;p&gt;So I decided to take a break from work to travel in Greece, and these are my personal feelings after it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dj7fqfh1wojkl6los78.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dj7fqfh1wojkl6los78.png" alt="Image description" width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-I felt more relaxed and less stressed&lt;br&gt;
-I had more time to enjoy my hobbies and interests&lt;br&gt;
-I felt more connected to my family and friends&lt;br&gt;
-I had more time to focus on my health and fitness&lt;br&gt;
-I felt more productive when I returned to work&lt;br&gt;
-helps me to come back to work with fresh ideas and a new perspective.&lt;/p&gt;

&lt;p&gt;However,you don't need to travel in order to take a break from work. Other ways like disconnecting from electronic devices, taking a walk outside, or using relaxation techniques such as meditation or yoga are good ways to disconnect.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Science Behind the Break
&lt;/h3&gt;

&lt;p&gt;There is a science behind taking a break from work. Numerous studies have shown that taking regular breaks can increase productivity, improve mental and physical health, and reduce stress.&lt;/p&gt;

&lt;p&gt;One of the most popular studies on the subject was conducted by the University of Illinois in 2014. The study found that workers who took regular breaks were more productive than those who did not. The study also found that workers who took breaks were less likely to experience burnout.&lt;/p&gt;

&lt;p&gt;Numerous other studies have shown similar results. A study conducted by the University of Toronto found that workers who took breaks were less likely to experience fatigue and more likely to be productive. Another study, conducted by the University of Michigan, found that workers who took breaks had lower levels of stress and anxiety.&lt;/p&gt;

&lt;p&gt;When it comes to being productive, pausing can actually help you achieve your goals. &lt;br&gt;
In conclusion, by taking breaks, you can refresh your mind and body, which can lead to improved focus and productivity. So next time you feel like you need a break, don't hesitate to take one!&lt;/p&gt;

&lt;p&gt;Join the discussion in our &lt;a href="https://bit.ly/3HQtlYo"&gt;Discord channel&lt;/a&gt;&lt;br&gt;
Test your API for free now at &lt;a href="https://www.blstsecurity.com/?promo=nasi&amp;amp;domain=https://dev.to/The_Benefits_of_Taking_Breaks_Why_Pausing_Can_Help_You_Be_More_Productive"&gt;BLST&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>journey</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The first Open-Sourced API security testing tool CI/CD integrated.</title>
      <dc:creator>Nathan</dc:creator>
      <pubDate>Mon, 22 Aug 2022 18:04:00 +0000</pubDate>
      <link>https://forem.com/nathan20/the-first-open-sourced-api-security-testing-tool-cicd-integrated-59m9</link>
      <guid>https://forem.com/nathan20/the-first-open-sourced-api-security-testing-tool-cicd-integrated-59m9</guid>
      <description>&lt;p&gt;Hello Community!&lt;br&gt;
Looking forward to hear your thoughts and get your feedback about this. 🙏&lt;br&gt;
Today we released v0.7 of &lt;a href="https://github.com/blst-security/cherrybomb"&gt;Cherrybomb&lt;/a&gt; and I want to tell you about all the new features, and the new integrations we have.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Cherrybomb? And how does it work?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/blst-security/cherrybomb"&gt;CherryBomb&lt;/a&gt; is our opensource tool that validate your &lt;a href="https://dev.to/nathan20/openapi-specification-the-complete-guide-3do"&gt;OpenAPI specification&lt;/a&gt;, it is designed for use with popular CI/CD tools such as Jenkins and Travis CI.&lt;br&gt;
 It is easy to use, and it integrates with these tools to provide a complete API security testing solution.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Active Check&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4zr59qnn7hjgvod34e3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4zr59qnn7hjgvod34e3.png" alt="Image description" width="445" height="271"&gt;&lt;/a&gt;&lt;br&gt;
The active module takes our API testing to a new level. By providing not only static testing and auditing of your OAS file (with the passive module), but a test that tests the API itself by sending requests and analyzing the responses. The Active module tests APIs by verifying that the API follows the specifications dictated in the OAS file and by testing the API for common security vulnerabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Passive Check&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ao91hq9yc1uakzm1hs8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ao91hq9yc1uakzm1hs8.png" alt="Image description" width="800" height="499"&gt;&lt;/a&gt;&lt;br&gt;
Cherrybomb reads your API spec file (Open API Specification) and validates it for best practices and discovers common API design flaws.&lt;/p&gt;

&lt;p&gt;There are also the Endpoint and Parameter tables, which sort out and inventory your entire API, using different keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use it?
&lt;/h2&gt;

&lt;p&gt;API Security Testing can save you time and money by helping you to find and fix vulnerabilities in your code before they are exploited, I wrote an &lt;a href="https://dev.to/blst-security/shift-left-within-api-security-c1l"&gt;article&lt;/a&gt; about it.&lt;br&gt;
By using API Security Testing, you can also ensure that your API is compliant with industry standards and best practices.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I get started?
&lt;/h2&gt;

&lt;p&gt;There are two ways you can use Cherrybomb:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can embed it into your CI pipeline, and If you plan on doing that I would recommend that you go to our &lt;a href="https://www.blstsecurity.com/"&gt;website&lt;/a&gt;, sign up, go through the &lt;a href="https://www.blstsecurity.com/CICD"&gt;CI pipeline integration builder&lt;/a&gt;, and copy the groovy/GitHub actions snippet built for you. Example:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fakg0xpm5nc64q9da1oww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fakg0xpm5nc64q9da1oww.png" alt="Image description" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can download it for some tryouts and testing using curl:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://cherrybomb.blstsecurity.com/install    | /bin/bash &amp;amp;&amp;amp; cherrybomb oas -f "home/Documents/file_openapi.json"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What this means for the future of API development?
&lt;/h2&gt;

&lt;p&gt;This is a good thing, as it will help to raise the level of security for all APIs. In the longer term, we can expect to see more APIs being developed with security builtin from the start. This will help to ensure that APIs are more secure, and will help to protect the data and systems that they interact with.&lt;/p&gt;

&lt;p&gt;So I hope that you enjoy to read my article, if you have ideas or question, feel free to ask in the comments :)&lt;/p&gt;

&lt;p&gt;💪 We are looking for contributors for &lt;a href="https://github.com/blst-security/cherrybomb"&gt;Cherrybomb&lt;/a&gt;, together we can make API security easier and affordable for everyone.&lt;/p&gt;

&lt;p&gt;If you're looking for a new open-sourced API security testing tool for CI/CD, look no further! We've got just the thing.&lt;br&gt;
Star &lt;a href="https://github.com/blst-security/cherrybomb"&gt;Cherrybomb&lt;/a&gt; and if you have questions or ideas Join our &lt;a href="https://discord.gg/WdHhv4DqwU"&gt;Discord server&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>api</category>
      <category>opensource</category>
      <category>rust</category>
    </item>
  </channel>
</rss>
