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.

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:

Combined assessment

SAST + DAST assessment
Artifact
Findings from both pre-deployment and post-deployment testing.
Risk
Missing weaknesses that exist in only one testing stage.
Output
Broader security assessment covering both code-level and runtime weaknesses.

Evidence:

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.derscanner-sast
  2. DerScanner dynamic analysis documentationDerScanner DAST is a web-application scanner that detects vulnerabilities and backdoors by providing malformed or random inputs, using the black-box method without requiring source code. When source code is available, dynamic-analysis results can be correlated with static-analysis results for better accuracy and easier prioritization.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 2dac3d6 · 2026-09-07 06:49:25Z · system