<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sast on Shivasurya</title><link>http://shivasurya.me/categories/sast/</link><description>Recent content in Sast on Shivasurya</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 03 Oct 2025 00:00:00 +0000</lastBuildDate><atom:link href="http://shivasurya.me/categories/sast/feed.xml" rel="self" type="application/rss+xml"/><item><title>Claude Code for Security Analysis: Introducing SecureFlow CLI to Hunt Security Vulnerabilities</title><link>http://shivasurya.me/2025/10/03/introducing-secureflow-cli-to-hunt-vulnerabilities-claude-code-for-security-analysis/</link><pubDate>Fri, 03 Oct 2025 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2025/10/03/introducing-secureflow-cli-to-hunt-vulnerabilities-claude-code-for-security-analysis/</guid><description>&lt;h2 id="ai-powered-security-vulnerability-hunting-at-scale">AI-Powered Security Vulnerability Hunting at Scale&lt;/h2>
&lt;p>SecureFlow CLI is an open-source agentic SAST security tool that uses AI-powered loops to autonomously hunt for vulnerabilities in codebases. Built on the same principles as Cline/Cursor/Windsurf/Claude-Code for Security Analysis, it leverages LLMs and tools to navigate code, gather context, and identify security issues.&lt;/p>
&lt;h3 id="example-wordpress-plugin-scanning-results">Example: WordPress Plugin Scanning Results&lt;/h3>
&lt;p>The WordPress plugin ecosystem is often overlooked for security scanning despite serving millions of users. Scanning 600+ WordPress plugins with SecureFlow yielded impressive results:&lt;/p></description></item><item><title>CodeQL: Eindhoven Quantifier Notation</title><link>http://shivasurya.me/2024/09/10/codeql-eindhoven-quantifier-notation/</link><pubDate>Tue, 10 Sep 2024 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2024/09/10/codeql-eindhoven-quantifier-notation/</guid><description>&lt;h3 id="introduction">Introduction&lt;/h3>
&lt;p>Recently, I have been thinking about aggregate functionality design for &lt;a href="https://codepathfinder.dev/">Code PathFinder&lt;/a>, &lt;a href="https://github.com/shivasurya/code-pathfinder">opensource alternative to GitHub CodeQL&lt;/a>. SQL aggregate functions such as &lt;code>SUM&lt;/code>, &lt;code>AVG&lt;/code>, &lt;code>MIN&lt;/code>, &lt;code>MAX&lt;/code> are combined with &lt;code>WHERE&lt;/code> and &lt;code>GROUP BY&lt;/code> to generate aggregate queries. However, I was wondering if there is a way to generate aggregate queries without using &lt;code>WHERE&lt;/code> and &lt;code>GROUP BY&lt;/code>. While going through &lt;a href="https://codeql.github.com/publications/ql-for-source-code-analysis.pdf">CodeQL design research paper&lt;/a>, I came across Eindhoven Quantifier Notation which is quite interesting, easy to understand and can be used to generate aggregate queries. This blog post will discuss about Eindhoven Quantifier Notation adopted by CodeQL.&lt;/p></description></item><item><title>Sherlock: Automate security code reviews with Cody AI</title><link>http://shivasurya.me/2024/06/27/automate-security-code-reviews-with-cody-ai/</link><pubDate>Thu, 27 Jun 2024 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2024/06/27/automate-security-code-reviews-with-cody-ai/</guid><description>&lt;h3 id="intro">Intro&lt;/h3>
&lt;h3 id="need-for-semi-autonomous-security-code-reviews">Need for semi-autonomous security code reviews&lt;/h3>
&lt;p>My job as a security engineer (application security context) is to read source code and perform security reviews. Most of the time, mainly corelate the source code with frameworks &amp;amp; libraries, understand context where the code executes and enumerate all security risks. While there are lot of second generation SAST scanning tools in the market which is good at identifying patterns, eliminate false positive, executes and brings up results in minutes. I believe,&lt;/p></description></item><item><title>Defining Boundaries &amp; Sinks for Inter-procedural Source Sink Analysis - Part 3</title><link>http://shivasurya.me/2024/03/08/building-inter-procedural-source-sink-analysis-from-scratch-part-3/</link><pubDate>Fri, 08 Mar 2024 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2024/03/08/building-inter-procedural-source-sink-analysis-from-scratch-part-3/</guid><description>&lt;p>This is the third part of the blog post series on building inter-procedural source sink analysis from scratch. In the first part, we have built the &lt;a href="https://shivasurya.me/static-analysis/sast/2023/08/27/building-simple-source-sink-analysis-from-scratch-part-1.html">intra-procedural source sink analysis&lt;/a>. In this blog post, I&amp;rsquo;ll discuss about defining boundaries, configs and sinks for inter-procedural analysis. ✨ This idea of defining boundaries and sinks is inspired from the &lt;a href="https://codeql.github.com/">CodeQL&lt;/a> library and while discussing with my colleague at &lt;a href="https://www.swag.uwaterloo.ca/">SWAG lab @ uwaterloo&lt;/a>.&lt;/p>
&lt;h3 id="plan">Plan&lt;/h3>
&lt;p>While tools like CodeQL has well-defined support for libraries and framework such as &lt;a href="https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/frameworks/android/Android.qll/module.Android.html">Android CodeQL&lt;/a> these libraries has predefined boundaries and sinks. But, start from scratch, we need to define our own boundaries and sinks. The boundaries are the entry points and sinks are the exit points.&lt;/p></description></item><item><title>Building Inter-procedural Source Sink Analysis from Scratch - Part 2</title><link>http://shivasurya.me/2023/09/01/building-inter-procedural-source-sink-analysis-from-scratch-part-2/</link><pubDate>Fri, 01 Sep 2023 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2023/09/01/building-inter-procedural-source-sink-analysis-from-scratch-part-2/</guid><description>&lt;p>This is the second part of the blog post series on building inter-procedural source sink analysis from scratch. In the first part, we have built the &lt;a href="https://shivasurya.me/static-analysis/sast/2023/08/27/building-simple-source-sink-analysis-from-scratch-part-1.html">intra-procedural source sink analysis&lt;/a>. In this blog post, we will be building the inter-procedural source sink analysis.&lt;/p>
&lt;h3 id="plan">Plan&lt;/h3>
&lt;p>We&amp;rsquo;ll be parsing whole java project source code and generate AST using JavaParser. While traversing the AST, we will be collecting the method declaration and method invocation. We will be using graph theory algorithm to find the path from source to sink. The source is the method declaration and the sink is the method invocation. The method declaration is the node and the method invocation is the edge. While classes may contain duplicate method names with different signatures, we will be using the fully qualified method name to uniquely identify the method. The fully qualified method name is the class name + method name + method arguments. The method arguments are used to differentiate the method overloading. The method declaration is the key and method invocation is the value in the hashmap. The hashmap is used to build the graph and find the path from source to sink.&lt;/p></description></item><item><title>Building A Simple Source-Sink Analysis in Java from Scratch - Part 1</title><link>http://shivasurya.me/2023/08/27/building-simple-source-sink-analysis-from-scratch-part-1/</link><pubDate>Sun, 27 Aug 2023 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2023/08/27/building-simple-source-sink-analysis-from-scratch-part-1/</guid><description>&lt;h3 id="overview-of-source-sink-analysis">Overview of Source Sink Analysis&lt;/h3>
&lt;p>Source Sink Analysis is a type of basic static analysis that detects the flow of information from a source to a sink. A source is a place where the information is coming from and a sink is a place where the information is going to. For example, a source can be a user input and a sink can be a database query. If the user input is not sanitized, it can lead to SQL Injection. Apart from source sink techniques, there are other techniques like taint analysis, control flow graph, data flow analysis, etc. which are used to detect vulnerabilities in the code. In this blog post, we will be building a simple source sink analysis in Java from scratch.&lt;/p></description></item></channel></rss>