Static Application Security Testing (SAST), also known as “white-box” testing, is a methodology used to identify security vulnerabilities by analyzing an application’s source code, bytecode, or binaries while at rest (not running).

In your Obsidian vault, SAST tools serve as the “early warning system” in the Software Development Life Cycle (SDLC).

Why SAST Matters (The “Shift Left” Concept)

The primary goal of SAST is to “Shift Left”, meaning security is integrated as early as possible in the development process.

  • Early Detection: It finds vulnerabilities during the coding and build phases, long before the application is deployed.

  • Cost Efficiency: Fixing a bug during development is significantly cheaper and faster than fixing it after it has reached production.

  • Full Coverage: Unlike dynamic testing, SAST can scan 100% of the codebase, including paths that might not be easily triggered during runtime.

How SAST Works

SAST tools do not execute the code; instead, they analyze it like a document.

  • Code Parsing: The tool breaks down the code into an Abstract Syntax Tree (AST) to understand its structure and logic.

  • Data Flow Analysis: It traces how data moves from a “source” (like user input) to a “sink” (a sensitive function).

  • Taint Analysis: Specifically checks if user input is properly sanitized or validated before it reaches a dangerous sink, such as a SQL query.

Common Vulnerabilities Caught by SAST

  • Injection Flaws: SQL Injection, Command Injection, and LDAP Injection.

  • Insecure Data Handling: Hardcoded credentials (API keys, passwords) and unencrypted sensitive data.

  • Buffer Overflows: Identifying risky memory management in languages like C/C++.

  • Cross-Site Scripting (XSS): Finding unsanitized inputs that could be reflected back to users.


SAST vs. DAST: A Quick Comparison

FeatureSAST (Static)DAST (Dynamic)
PerspectiveInside-Out (White-Box)Outside-In (Black-Box)
StateAt Rest (Code)Running (Execution)
PhaseEarly SDLC (Dev)Late SDLC (Test/Prod)
IdentifiesRoot cause in specific code linesRuntime and config issues

ToolKey Features
SonarQubeSupports 30+ languages; tracks “code smells” and technical debt alongside security.
Snyk CodeDeveloper-centric with real-time scanning and AI-powered remediation advice.
SemgrepFast, rule-based engine that doesn’t require code compilation; highly customizable.
GitHub CodeQLNative to GitHub; uses a query-based model to find complex semantic vulnerabilities.
CheckmarxEnterprise-grade platform that identifies the “best fix location” for remediation.
SAST AppSec ShiftLeft CodeAnalysis WhiteBox SDLC PenTestPlus CLItool