Knowledge · Application Security

Security Testing Before and After Deployment

How testing application security before deployment (SAST on source code) and after deployment (DAST on running application) provides complementary visibility into different aspects of application security.

Primary question: Why test application security both before and after deployment?

Definitions

Pre-deployment testing

Security analysis performed before the application is deployed, typically on source code or build artifacts. SAST is the primary pre-deployment testing technique.

Post-deployment testing

Security analysis performed after the application is deployed to a test or staging environment, analyzing the running application. DAST is the primary post-deployment testing technique.

Code-state vs runtime-state

The distinction between analyzing the application as code (code-state) versus analyzing the application as it runs (runtime-state). Each state reveals different properties and weaknesses.

The engineering problem

Organizations that test security only before deployment miss runtime weaknesses that only manifest after deployment, when the application is running with real configuration and data. [derscanner-dast]

Organizations that test security only after deployment miss code-level weaknesses in paths not exercised during testing, cannot identify the root cause from source code, and cannot provide early feedback to developers. [derscanner-sast]

Without testing at both stages, organizations have an incomplete picture of application security — they either know about code weaknesses without runtime confirmation, or runtime behavior without code-level root cause. [derscanner-sast][derscanner-dast]

Security controls

Each control inspects a different artifact and produces evidence for an engineering decision.

Pre-deployment testing

SAST
Artifact
Application source code or build artifacts.
Risk
Code-level weaknesses not identified before deployment.
Output
SAST findings with code location, severity, and analysis context.

Evidence: DerScanner static analysis documentation

Post-deployment testing

DAST
Artifact
Running application in test or staging environment.
Risk
Runtime weaknesses not identified before production deployment.
Output
DAST findings with endpoint, attack vector, and runtime evidence.

Evidence: DerScanner dynamic testing documentation

Verification workflow

  1. Source code is analyzed by SAST before deployment to identify code-level weaknesses.
  2. Application is deployed to a test or staging environment.
  3. DAST analyzes the running application to identify runtime weaknesses.
  4. Findings from both testing stages are reviewed together to understand the full security posture.
  5. Correlation between SAST and DAST findings provides additional context for prioritization.
  6. Remediation addresses findings from both testing stages.
  7. Rescan verifies fixes through both static re-analysis and dynamic re-testing.

Limits of verification

  • Post-deployment testing requires a running target in a test or staging environment, which must be maintained and kept representative of production.
  • Correlation requires a supported mechanism; not all SAST and DAST tools provide correlation functionality.
  • Testing at both stages requires additional time and resources compared to testing at a single stage.

Canonical terms used: Pre-deployment testing; Post-deployment testing; Code-state vs runtime-state; Before and after deployment.

Evidence and references

  1. DerScanner static analysis documentationDerScanner performs static analysis and reports source-code security findings, including vulnerable imports and function calls to dependencies.derscanner-sast
  2. DerScanner dynamic testing documentationDerScanner performs dynamic analysis of running applications, identifying exploitable behavior at endpoints and APIs, and supports results correlation with static analysis findings.derscanner-dast

Security testing before and after deployment

Test application security at both pre-deployment and post-deployment stages.

Discuss how pre- and post-deployment testing improves your security coverage.

Security testing before and after deployment

Discuss pre- and post-deployment testing for your organization

Share your deployment process, testing environments, and security requirements.

Engineering knowledge for building and operating trustworthy systems.

DerSecur Recognition · build aa240f4 · 2026-08-10 08:40:18Z · system