<?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: VICTOR WILLIAMS CRUZ MAMANI</title>
    <description>The latest articles on Forem by VICTOR WILLIAMS CRUZ MAMANI (@victor_williamscruzmama).</description>
    <link>https://forem.com/victor_williamscruzmama</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%2F3500650%2F9a655be2-eb63-40f1-a8eb-a6656afac473.jpg</url>
      <title>Forem: VICTOR WILLIAMS CRUZ MAMANI</title>
      <link>https://forem.com/victor_williamscruzmama</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/victor_williamscruzmama"/>
    <language>en</language>
    <item>
      <title>Securing Terraform Infrastructure with Snyk IaC: A Practical SAST Example</title>
      <dc:creator>VICTOR WILLIAMS CRUZ MAMANI</dc:creator>
      <pubDate>Thu, 04 Dec 2025 18:56:15 +0000</pubDate>
      <link>https://forem.com/victor_williamscruzmama/securing-terraform-infrastructure-with-snyk-iac-a-practical-sast-example-olp</link>
      <guid>https://forem.com/victor_williamscruzmama/securing-terraform-infrastructure-with-snyk-iac-a-practical-sast-example-olp</guid>
      <description>&lt;h2&gt;
  
  
  &lt;a href="https://github.com/Vlkair/terraform-snyk-iac-demo" rel="noopener noreferrer"&gt;https://github.com/Vlkair/terraform-snyk-iac-demo&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Infrastructure as Code (IaC) allows teams to define and provision cloud resources using code, but that code can also contain security misconfigurations that put environments at risk. This article presents a simple example of how to use Snyk Infrastructure as Code (Snyk IaC) as a SAST tool to scan Terraform files, find issues, and fix them before deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Snyk IaC and why use it?
&lt;/h2&gt;

&lt;p&gt;Snyk IaC is a static analysis tool that scans IaC configuration files such as Terraform, CloudFormation, and ARM templates to detect security and compliance issues. It analyzes the code against security best practices and policies, and provides actionable guidance on how to harden infrastructure definitions.&lt;/p&gt;

&lt;p&gt;According to the OWASP list of Source Code Analysis Tools, Snyk IaC is designed to reduce risk by automating IaC security checks and detecting misconfigurations early in the development workflow. Integrating this type of SAST tool into the development process helps teams apply DevSecOps and "shift-left" security principles for cloud infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sample Terraform project
&lt;/h2&gt;

&lt;p&gt;A very small Terraform project is enough to demonstrate this workflow. A typical configuration may define basic cloud resources but introduce insecure settings, such as security groups allowing ingress from 0.0.0.0/0 or storage resources without encryption.&lt;/p&gt;

&lt;p&gt;Although these configurations are convenient for quick tests, they can be dangerous in real environments because they expose services broadly and weaken data protection. Using Snyk IaC, these misconfigurations can be detected directly from the Terraform files before running &lt;code&gt;terraform apply&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing and running Snyk IaC
&lt;/h2&gt;

&lt;p&gt;A Snyk account and the Snyk CLI are required to execute IaC scans from the terminal. After installing the CLI and authenticating with a personal token, Snyk commands become available to analyze local projects.&lt;/p&gt;

&lt;p&gt;Snyk Infrastructure as Code can scan Terraform configuration files such as &lt;code&gt;main.tf&lt;/code&gt; directly. The basic command to analyze the current directory is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;snyk iac test .&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
This command recursively discovers Terraform &lt;code&gt;.tf&lt;/code&gt; files in the folder and evaluates them for misconfigurations.&lt;/p&gt;

&lt;p&gt;Snyk can also scan a Terraform plan output in JSON format, which represents the changes to be applied to the cloud environment. A common sequence is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;terraform plan -out=tfplan.binary&lt;br&gt;
terraform show -json tfplan.binary &amp;gt; tf-plan.json&lt;br&gt;
snyk iac test tf-plan.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;By examining the plan, Snyk gains visibility into the final state, including modules and variable resolution, before the changes are applied.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interpreting the scan results
&lt;/h2&gt;

&lt;p&gt;After running &lt;code&gt;snyk iac test&lt;/code&gt;, the CLI outputs the detected issues grouped by severity, such as high, medium, or low. For each misconfiguration, Snyk displays a rule identifier, a description of the risk, and a recommendation on how to remediate it.&lt;/p&gt;

&lt;p&gt;For example, an overly permissive security group that allows ingress from &lt;code&gt;0.0.0.0/0&lt;/code&gt; on a specific port is typically flagged as a high-severity issue because it exposes the service to the entire internet. Storage resources may also be reported if encryption is disabled or if buckets are inadvertently exposed publicly.&lt;/p&gt;

&lt;p&gt;These results highlight the exact Terraform resources and attributes that require modification before the infrastructure is provisioned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing the Terraform code
&lt;/h2&gt;

&lt;p&gt;Once misconfigurations are identified, the Terraform code can be updated according to the recommendations. In the case of security groups, instead of using &lt;code&gt;0.0.0.0/0&lt;/code&gt;, ingress rules can be restricted to a known IP range, VPN network, or bastion host.&lt;/p&gt;

&lt;p&gt;After applying these changes to the configuration, running &lt;code&gt;snyk iac test&lt;/code&gt; again verifies whether the issues have been resolved. When the problematic rules disappear from the report, it indicates that the Terraform code now complies with the security policy enforced by Snyk IaC.&lt;/p&gt;

&lt;p&gt;This iterative "scan → fix → re-scan" process illustrates how a SAST tool for IaC supports continuous improvement of infrastructure code security.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrating Snyk IaC into CI/CD
&lt;/h2&gt;

&lt;p&gt;Local scans are useful, but integrating Snyk IaC into CI/CD pipelines makes security checks consistent and automated across the entire development team. Snyk can be connected to Git repositories so that every new commit or pull request triggers an IaC scan.&lt;/p&gt;

&lt;p&gt;There is also integration with Terraform Cloud through run tasks, enabling Snyk to evaluate Terraform runs and optionally block those that introduce critical misconfigurations. Combining IaC scanning with continuous integration helps enforce security policies, reduce configuration drift, and prevent risky infrastructure changes from reaching production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Snyk IaC, used as a SAST tool for Terraform, provides an effective way to detect misconfigurations such as open security groups or unencrypted storage directly in IaC definitions. Incorporating these checks into the development and CI/CD workflow strengthens cloud security, supports DevSecOps practices, and contributes to maintaining secure and compliant infrastructure over time.&lt;/p&gt;

&lt;p&gt;A Snyk account and the Snyk CLI are required to execute IaC scans from the terminal. After installing the CLI and authenticating with a personal token, Snyk commands become available to analyze local projects.&lt;/p&gt;

&lt;p&gt;Snyk Infrastructure as Code can scan Terraform configuration files such as &lt;code&gt;main.tf&lt;/code&gt; directly. The basic command to analyze the current directory is:&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>snyk</category>
      <category>development</category>
    </item>
    <item>
      <title>Catching .NET Vulnerabilities Early: A Hands-On Guide with Puma Scan</title>
      <dc:creator>VICTOR WILLIAMS CRUZ MAMANI</dc:creator>
      <pubDate>Thu, 04 Dec 2025 18:50:22 +0000</pubDate>
      <link>https://forem.com/victor_williamscruzmama/catching-net-vulnerabilities-early-a-hands-on-guide-with-puma-scan-p2i</link>
      <guid>https://forem.com/victor_williamscruzmama/catching-net-vulnerabilities-early-a-hands-on-guide-with-puma-scan-p2i</guid>
      <description>&lt;h1&gt;
  
  
  Catching .NET Vulnerabilities Early: A Hands-On SAST Demo with Puma Scan
&lt;/h1&gt;

&lt;p&gt;Static Application Security Testing (SAST) helps developers find security flaws directly in source code—before they reach production. In this article, I demonstrate how to use &lt;strong&gt;Puma Scan&lt;/strong&gt;, a .NET-focused SAST tool listed by OWASP, to detect real vulnerabilities in a minimal C# application. The entire workflow—including code, automation script, and scan results—is publicly available on GitHub.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🔗 &lt;strong&gt;GitHub Demo Repository&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/Vlkair/dotnet-sast-pumascan-demo" rel="noopener noreferrer"&gt;https://github.com/Vlkair/dotnet-sast-pumascan-demo&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Why Puma Scan?
&lt;/h2&gt;

&lt;p&gt;From the official &lt;a href="https://owasp.org/www-community/Source_Code_Analysis_Tools" rel="noopener noreferrer"&gt;OWASP Source Code Analysis Tools list&lt;/a&gt;, many SAST tools exist—but this assignment excluded &lt;strong&gt;Sonar, Snyk, Semgrep, and Veracode&lt;/strong&gt;. Among the remaining options for &lt;strong&gt;C#/.NET&lt;/strong&gt;, &lt;strong&gt;Puma Scan&lt;/strong&gt; stood out because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s designed specifically for .NET and C#
&lt;/li&gt;
&lt;li&gt;It integrates with &lt;strong&gt;Visual Studio&lt;/strong&gt;, &lt;strong&gt;VS Code&lt;/strong&gt;, and the &lt;strong&gt;command line&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It detects common OWASP Top 10 issues like &lt;strong&gt;SQL Injection&lt;/strong&gt; and &lt;strong&gt;Cross-Site Scripting (XSS)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Community Edition&lt;/strong&gt; is available for free learning and testing&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Vulnerable Code Sample
&lt;/h2&gt;

&lt;p&gt;To keep the demo simple and reproducible, I created a minimal C# class with a classic &lt;strong&gt;SQL injection vulnerability&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// TestVuln.cs&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Data.SqlClient&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;VulnerableClass&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;UnsafeQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// ⚠️ SQL Injection: user input concatenated directly into query&lt;/span&gt;
        &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"SELECT * FROM Users WHERE Id = "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;SqlCommand&lt;/span&gt; &lt;span class="n"&gt;cmd&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;SqlCommand&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;If an attacker inputs 1 OR 1=1, the query becomes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SELECT * FROM Users WHERE Id = 1 OR 1=1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ All user records are exposed.&lt;/p&gt;

&lt;p&gt;This matches CWE-89 and OWASP Top 10: A03:2021 – Injection.&lt;/p&gt;

&lt;p&gt;Automated Detection with Puma Scan&lt;br&gt;
Step 1: Add Puma Scan to your project&lt;br&gt;
&lt;code&gt;dotnet add package Puma.Security.Rules&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I created a simple PowerShell script (scan.ps1):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# scan.ps1 - PumaScan SAST Analysis Script
Write-Host "======================================" -ForegroundColor Cyan
Write-Host " PumaScan - SAST Security Analysis" -ForegroundColor Cyan
Write-Host "======================================" -ForegroundColor Cyan
Write-Host ""

# Build the project with PumaScan analysis
Set-Location PumaScanner
dotnet clean | Out-Null
dotnet build

Write-Host ""
Write-Host "======================================" -ForegroundColor Green
Write-Host " Analysis Complete!" -ForegroundColor Green
Write-Host "======================================" -ForegroundColor Green
Write-Host ""
Write-Host "Look for security warnings above:" -ForegroundColor Yellow
Write-Host "  - SEC0107: SQL Injection vulnerability" -ForegroundColor Yellow
Write-Host ""
Set-Location ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3: See the result&lt;br&gt;
When you run &lt;code&gt;powershell -ExecutionPolicy Bypass -File .\scan.ps1&lt;/code&gt;, you get this clear warning:&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>tutorial</category>
      <category>security</category>
    </item>
    <item>
      <title>this is insane</title>
      <dc:creator>VICTOR WILLIAMS CRUZ MAMANI</dc:creator>
      <pubDate>Wed, 03 Dec 2025 22:05:53 +0000</pubDate>
      <link>https://forem.com/victor_williamscruzmama/this-is-insane-1ng9</link>
      <guid>https://forem.com/victor_williamscruzmama/this-is-insane-1ng9</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/sebastianfuentesavalos" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F3069488%2Fee89f59b-db30-4eb9-a125-23fbb8240935.jpeg" alt="sebastianfuentesavalos"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/sebastianfuentesavalos/-building-your-first-mcp-server-a-step-by-step-guide-41j4" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;🚀 Building Your First MCP Server: A Step-by-Step Guide&lt;/h2&gt;
      &lt;h3&gt;Sebastian Nicolas Fuentes Avalos ・ Dec 1&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#mcp&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#python&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>mcp</category>
      <category>python</category>
    </item>
    <item>
      <title>interesting!!</title>
      <dc:creator>VICTOR WILLIAMS CRUZ MAMANI</dc:creator>
      <pubDate>Wed, 03 Dec 2025 22:03:53 +0000</pubDate>
      <link>https://forem.com/victor_williamscruzmama/interesting-5fmp</link>
      <guid>https://forem.com/victor_williamscruzmama/interesting-5fmp</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/andy_michaelcalizayalad" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F3326143%2Ff487cc11-7b8c-442b-a5fa-87e9c6bba73c.png" alt="andy_michaelcalizayalad"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/andy_michaelcalizayalad/building-and-deploying-a-remote-mcp-server-to-google-cloud-run-in-under-10-minutes-30al" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Building and Deploying a Remote MCP Server to Google Cloud Run in Under 10 Minutes&lt;/h2&gt;
      &lt;h3&gt;ANDY MICHAEL CALIZAYA LADERA ・ Nov 28&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#google&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#serverless&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#mcp&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>google</category>
      <category>serverless</category>
      <category>tutorial</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
