<?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>DEV Community: FABRICIO FARID EDMILSON RAMOS ATAHUACHI</title>
    <description>The latest articles on DEV Community by FABRICIO FARID EDMILSON RAMOS ATAHUACHI (@fabricio_ramos).</description>
    <link>https://dev.to/fabricio_ramos</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3889403%2F9fe9a4cf-5072-4b57-acc3-7d2afb49eb74.png</url>
      <title>DEV Community: FABRICIO FARID EDMILSON RAMOS ATAHUACHI</title>
      <link>https://dev.to/fabricio_ramos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fabricio_ramos"/>
    <language>en</language>
    <item>
      <title>How to Talk to Any Database Using AI: Building a Text-to-SQL App</title>
      <dc:creator>FABRICIO FARID EDMILSON RAMOS ATAHUACHI</dc:creator>
      <pubDate>Sat, 27 Jun 2026 04:37:09 +0000</pubDate>
      <link>https://dev.to/fabricio_ramos/how-to-talk-to-any-database-using-ai-building-a-text-to-sql-app-3e6f</link>
      <guid>https://dev.to/fabricio_ramos/how-to-talk-to-any-database-using-ai-building-a-text-to-sql-app-3e6f</guid>
      <description>&lt;p&gt;In today’s data-driven world, getting information out of a database usually requires knowing SQL. But what if you could just ask your database a question in plain English and get the answer instantly? Thanks to Large Language Models (LLMs) and Artificial Intelligence, this is no longer science fiction.&lt;/p&gt;

&lt;p&gt;In this article, I will show you a real-world example of how to build a Text-to-SQL Query Generator using Python, Streamlit, and Hugging Face.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Magic of Text-to-SQL&lt;/strong&gt;&lt;br&gt;
Text-to-SQL is a natural language processing (NLP) task where an AI model translates a human-readable question into a structured SQL query. This bridges the gap between non-technical users (like business analysts or managers) and complex databases.&lt;/p&gt;

&lt;p&gt;Instead of writing:&lt;br&gt;
&lt;code&gt;SELECT Salary FROM employees WHERE Name = 'Bob';&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A user can simply ask: &lt;em&gt;"What is the salary of Bob?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building the App (Code Example)&lt;/strong&gt;&lt;br&gt;
To demonstrate this, I have created a lightweight web application. We will use Streamlit for the frontend, SQLite for a temporary local database, and the Hugging Face Inference API to access an open-source Text-to-SQL model (t5-base-finetuned-wikiSQL).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Setting up the Database&lt;/strong&gt;&lt;br&gt;
First, we create a temporary in-memory database using sqlite3 and populate it with some dummy employee data. (You can check the full source code in my GitHub repository linked below).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The Hugging Face Connection&lt;/strong&gt;&lt;br&gt;
We use a simple HTTP POST request to send our natural language question to the Hugging Face API. The model processes the text and returns the SQL equivalent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;API_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api-inference.huggingface.co/models/mrm8488/t5-base-finetuned-wikiSQL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_sql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inputs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;translate English to SQL: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;API_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;generated_text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. The Streamlit Interface&lt;/strong&gt;&lt;br&gt;
With Streamlit, creating the UI takes just a few lines of code. We take the user's input, pass it to our generate_sql function, display the generated SQL on the screen, and then immediately execute that query against our SQLite database to show the results in a table!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it Yourself!&lt;/strong&gt;&lt;br&gt;
The integration of AI into database management is transforming how we interact with data, democratizing data access across entire organizations.&lt;/p&gt;

&lt;p&gt;You can find the complete, runnable code in my public repository here: &lt;a href="https://github.com/FabricioRams/Research-Team-Work-N-01-SQL-AI-Database-Solutions.git" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://github.com/FabricioRams/Research-Team-Work-N-01-SQL-AI-Database-Solutions.git" rel="noopener noreferrer"&gt;https://github.com/FabricioRams/Research-Team-Work-N-01-SQL-AI-Database-Solutions.git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clone it, run &lt;code&gt;pip install -r requirements.txt&lt;/code&gt;, and start talking to your database today!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>sql</category>
      <category>python</category>
    </item>
    <item>
      <title>Demystifying SAST for IaC: How Does Checkov Actually Work Under the Hood?</title>
      <dc:creator>FABRICIO FARID EDMILSON RAMOS ATAHUACHI</dc:creator>
      <pubDate>Tue, 21 Apr 2026 05:42:19 +0000</pubDate>
      <link>https://dev.to/fabricio_ramos/demystifying-sast-for-iac-how-does-checkov-actually-work-under-the-hood-16fk</link>
      <guid>https://dev.to/fabricio_ramos/demystifying-sast-for-iac-how-does-checkov-actually-work-under-the-hood-16fk</guid>
      <description>&lt;p&gt;&lt;strong&gt;Abstract&lt;/strong&gt;&lt;br&gt;
This article dives deep into the internal architecture of Static Application Security Testing (SAST) tools focused on Infrastructure as Code (IaC). We break down step-by-step how Checkov parses source code, builds dependency graphs, and evaluates security policies to detect complex vulnerabilities before deployment.&lt;/p&gt;

&lt;p&gt;In previous articles, we explored how to integrate tools like Checkov into our CI/CD pipelines using GitHub Actions. We know that if we feed it a Terraform or Kubernetes file, it magically returns a list of vulnerabilities.&lt;/p&gt;

&lt;p&gt;But as engineers, we don't like magic. How exactly does Checkov know that an S3 bucket is misconfigured? Does it just look for the string "public-read" using Regular Expressions (Regex)?&lt;/p&gt;

&lt;p&gt;The short answer is: no. Using Regex to analyze infrastructure would be a complete disaster due to the complex relationships between resources. Let's look at how modern Static Analysis actually works under the hood.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Static Analysis Process (Step-by-Step)&lt;/strong&gt;&lt;br&gt;
The engine powering Checkov (and most advanced SAST tools) is written in Python and operates in three main phases: Parsing, Graph Construction, and Policy Evaluation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Parsing and the AST (Abstract Syntax Tree)&lt;/strong&gt;&lt;br&gt;
Checkov's first challenge is that Infrastructure as Code comes in many "flavors": HCL (Terraform), YAML (Kubernetes/CloudFormation), JSON, etc.&lt;/p&gt;

&lt;p&gt;Checkov takes your source code and uses language-specific parsers. The goal of this parser is not to look for errors just yet, but to transform your plain text code into a standardized data structure in memory—typically a Python dictionary or an Abstract Syntax Tree (AST).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# Original Terraform Code&lt;br&gt;
resource "aws_s3_bucket" "my_bucket" {&lt;br&gt;
bucket = "sensitive-data"&lt;br&gt;
acl = "public-read"&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;2. Resource Graph Construction (Graph Database)&lt;/strong&gt;&lt;br&gt;
This is where the tool truly shines. In the cloud, resources are almost never isolated. A Security Group connects to an EC2 instance, and that instance connects to a Database.&lt;/p&gt;

&lt;p&gt;If Checkov evaluated files line by line, it would lose all this context. To solve this, it uses a Python library called NetworkX to build a directed graph in memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nodes:&lt;/strong&gt; Represent the resources (e.g., the S3 bucket, the IAM user).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edges:&lt;/strong&gt; Represent the relationships between them (e.g., "User X has permissions on Bucket Y").&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Policy Evaluation&lt;/strong&gt;&lt;br&gt;
Once the code has been converted into a comprehensible graph, Checkov begins running its "Policies" against it.&lt;/p&gt;

&lt;p&gt;Policies in Checkov are small scripts written in Python (or defined in YAML). These rules scan the node attributes in the graph looking for specific risk patterns.&lt;/p&gt;

&lt;p&gt;For example, the internal logic of a Checkov policy for AWS S3 would conceptually look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fhpu07vdc63q4gu4wj0g1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fhpu07vdc63q4gu4wj0g1.png" alt=" " width="766" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Graph-Based Engine: Why is it crucial?&lt;/strong&gt;&lt;br&gt;
Imagine a complex scenario: You have an S3 bucket that is set to private, but in a completely different file in your project, you create an IAM policy that grants public access to that specific bucket.&lt;/p&gt;

&lt;p&gt;If Checkov used Regex or read files in isolation, it would report the bucket as secure. However, because it built a graph connecting the IAM policy to the Bucket via cross-references, the analysis engine can traverse the nodes and detect the compounded vulnerability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
SAST tools like Checkov are much more than simple linters looking for keywords. They are fully-fledged code analysis engines that build relational models of our infrastructure in memory to apply logical rules.&lt;/p&gt;

&lt;p&gt;Understanding this workflow doesn't just help you appreciate the engineering behind DevSecOps tools; it opens the door to the next level: writing your own custom Python policies to audit specific business rules your team needs to enforce.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>devops</category>
      <category>security</category>
      <category>testing</category>
    </item>
    <item>
      <title>Implementing SAST in Python: Detecting Vulnerabilities with Bandit</title>
      <dc:creator>FABRICIO FARID EDMILSON RAMOS ATAHUACHI</dc:creator>
      <pubDate>Mon, 20 Apr 2026 18:21:07 +0000</pubDate>
      <link>https://dev.to/fabricio_ramos/implementing-sast-in-python-detecting-vulnerabilities-with-bandit-19de</link>
      <guid>https://dev.to/fabricio_ramos/implementing-sast-in-python-detecting-vulnerabilities-with-bandit-19de</guid>
      <description>&lt;p&gt;&lt;strong&gt;Abstract&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article explores the implementation of Static Application Security Testing (SAST) using Bandit for Python applications. We demonstrate how to identify common security flaws like hardcoded passwords and insecure function usage, integrating the tool into a CI/CD pipeline using GitHub Actions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Bandit?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since I needed a lightweight and fast tool for Python without the complexity of enterprise platforms, Bandit was the perfect choice. It’s an open-source tool designed to find common security issues in Python code by analyzing the AST (Abstract Syntax Tree).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Vulnerable Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I created a sample script &lt;code&gt;app.py&lt;/code&gt; with intentional flaws:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hardcoded secrets&lt;/strong&gt;: Storing passwords in plain text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insecure Deserialization&lt;/strong&gt;: Using functions that could lead to Remote Code Execution (RCE).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Local Execution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To run it locally, I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;bandit
bandit app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The image below demonstrates the local execution of Bandit. As shown, the tool scanned 6 lines of code and identified 3 security issues: two of Low severity (importing the pickle module and a hardcoded password string) and one of Medium severity (using pickle.loads for deserialization). This immediate feedback allows developers to fix vulnerabilities during the development phase, long before the code is merged.&lt;br&gt;
&lt;em&gt;"Figure 1: Local Bandit Scan Results"&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.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%2F6aoiez3668yr070kp0f8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6aoiez3668yr070kp0f8.png" alt="VSCode Results" width="765" height="875"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automation with GitHub Actions&lt;/strong&gt;&lt;br&gt;
To comply with modern DevSecOps practices, I automated the scan. Every time I push code, GitHub Actions runs Bandit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;YAML&lt;/strong&gt;&lt;br&gt;
My workflow configuration&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Figure 2: Yml configuration"&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.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%2Fnyenkr32d0wf3x3dnpm2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fnyenkr32d0wf3x3dnpm2.png" alt="Yml configuration" width="413" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This image displays the output of the automated security pipeline. By integrating Bandit into GitHub Actions, the scan runs automatically on every 'push'. As observed in the logs, the process completed with an exit code 1, effectively breaking the build. This is a crucial security gate: it prevents code with known vulnerabilities (like the insecure yaml.load call shown in line 13) from moving forward in the development lifecycle. The report highlights a Medium severity issue with High confidence, providing the exact CWE reference for remediation.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Figure 3: Automated SAST Scan via GitHub Actions"&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.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%2Fw46usi6cunx2hgptmbog.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fw46usi6cunx2hgptmbog.png" alt="Github actions working" width="800" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Using SAST tools like Bandit is a fundamental step in the SDLC to catch "low-hanging fruit" vulnerabilities before they reach production.&lt;/p&gt;

</description>
      <category>python</category>
      <category>security</category>
      <category>testing</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
