Documentation Index
Fetch the complete documentation index at: https://threatbasis.io/llms.txt
Use this file to discover all available pages before exploring further.
Application security testing represents a comprehensive system of complementary techniques that identify vulnerabilities throughout the software development lifecycle. Security engineers design testing programs that balance coverage breadth with signal quality, providing fast feedback to developers while maintaining rigorous security assurance for production deployments.
Effective application security testing requires moving beyond tool-centric approaches toward integrated programs that combine static analysis, dynamic testing, composition analysis, and manual assessment. Each testing technique provides unique visibility into different vulnerability classes, with optimal security outcomes achieved through layered testing strategies that leverage the strengths of multiple approaches.
Testing Technique Comparison
| Testing Type | Analysis Method | Coverage Scope | False Positive Rate | Integration Point | Best For |
|---|
| SAST | Static code analysis | Source/binary code | Medium-High | Pre-commit, PR checks | Code-level vulnerabilities, compliance |
| DAST | Black-box runtime testing | Running application | Low-Medium | CI/CD, staging | Runtime vulnerabilities, configuration issues |
| IAST | Instrumented runtime analysis | Test execution paths | Low | Integration tests | Accurate vulnerability detection with context |
| SCA | Dependency analysis | Third-party components | Low | Build pipeline, continuous monitoring | Known vulnerabilities in dependencies |
| Fuzzing | Input mutation testing | Input handlers, parsers | Very Low | Continuous, pre-release | Memory corruption, parser bugs |
| Pentesting | Manual security assessment | Application-specific threats | Very Low | Pre-production, periodic | Complex business logic, chained exploits |
Program Design and Strategy
Asset Classification and Risk-Based Testing
Not all applications warrant identical security testing rigor. Security engineers classify applications based on multiple risk factors to optimize testing investment:
Risk Classification Criteria:
- Data Sensitivity: PII, financial data, healthcare records, intellectual property
- Business Criticality: Revenue impact, operational dependencies, customer-facing systems
- Threat Exposure: Internet-facing, partner integrations, internal-only
- Regulatory Requirements: PCI DSS, HIPAA, SOC 2, GDPR
Testing Rigor by Risk Level:
| Risk Level | Testing Scope | Quality Gates | Frequency |
|---|
| Critical | SAST + DAST + IAST + SCA + Pentesting | Zero high-severity findings | Every release + continuous monitoring |
| High | SAST + DAST + SCA + Annual pentest | No critical, limited high-severity | Every release |
| Medium | SAST + SCA | No critical findings | Major releases |
| Low | SCA + Periodic SAST | Critical vulnerabilities only | Quarterly or on-demand |
Coverage Mapping and Critical Path Analysis
Effective testing programs map security testing coverage to application architecture, identifying critical paths that require comprehensive validation:
Critical Security Sinks:
- Database query construction (SQL injection risk)
- Command execution interfaces (command injection risk)
- File system operations (path traversal risk)
- Template rendering (XSS, SSTI risk)
- Deserialization operations (remote code execution risk)
- Authentication and session management
- Authorisation decision points
Critical Security Sources:
- User input fields and parameters
- HTTP headers and cookies
- File uploads and multipart data
- External API responses
- Message queue payloads
- Configuration files and environment variables
Threat model outputs inform testing priorities, ensuring that testing focuses on attack vectors most relevant to each application’s threat landscape as defined by frameworks like STRIDE or PASTA.
Shift-Left Integration
Security testing should occur as early in the development lifecycle as possible, providing rapid feedback when remediation costs are lowest.
Shift-Left Testing Stages:
- IDE Integration: Real-time linting and security hints during development
- Pre-Commit Hooks: Fast security checks before code reaches version control
- Pull Request Checks: Automated SAST and SCA scans blocking merges on high-confidence issues
- Build Pipeline: Comprehensive scanning with broader rule sets
- Pre-Production: DAST, IAST, and penetration testing before release
Tiered Scanning Strategy:
| Scan Tier | Execution Trigger | Duration Target | Scope | Action on Findings |
|---|
| Tier 1 | Every commit | < 2 minutes | High-confidence rules, changed files only | Block merge |
| Tier 2 | Nightly builds | < 30 minutes | Full rule set, differential scan | Create tickets |
| Tier 3 | Release candidates | < 2 hours | All techniques, full codebase | Block release |
| Tier 4 | Production monitoring | Continuous | Runtime protection, anomaly detection | Alert + auto-remediate |
Threat Model Integration
Security testing should be informed by threat models that identify application-specific attack vectors and security requirements. Organizations using OWASP Threat Dragon, Microsoft Threat Modeling Tool, or IriusRisk can export threat scenarios directly into test case requirements.
Threat Model to Test Case Mapping:
- Identify Threats: Use STRIDE, PASTA, or attack trees to enumerate threats
- Define Security Controls: Map controls to identified threats
- Generate Test Cases: Create abuse cases and negative test scenarios
- Automate Validation: Incorporate into regression test suites
- Continuous Validation: Ensure controls remain effective as code evolves
Abuse cases derived from threat models should be incorporated into regression test suites, ensuring that security requirements remain validated as applications evolve. This integration ensures that security testing remains aligned with actual application risks rather than theoretical vulnerability catalogs from sources like the OWASP Top 10 or CWE Top 25.
Static Application Security Testing (SAST)
Fast, Tuned Rule Sets
SAST tools analyze source code or compiled binaries to identify potential vulnerabilities without executing applications. Effective SAST implementation requires careful rule tuning to balance detection coverage with false positive rates.
Popular SAST Tools by Language:
| Language/Platform | Commercial Tools | Open Source Tools |
|---|
| Java | Checkmarx, Veracode, Fortify | SpotBugs, SonarQube, Semgrep |
| JavaScript/TypeScript | Checkmarx, Snyk Code | ESLint security plugins, Semgrep, NodeJsScan |
| Python | Checkmarx, Veracode | Bandit, Semgrep, Pylint |
| C/C++ | Coverity, Fortify | Clang Static Analyzer, Cppcheck, Flawfinder |
| C#/.NET | Fortify, Checkmarx | Security Code Scan, SonarQube, Semgrep |
| Go | Checkmarx, Snyk Code | Gosec, Semgrep, StaticCheck |
Rule Tuning Strategy:
Out-of-the-box rule sets generate excessive noise that overwhelms developers and erodes trust in security tooling. Security engineers tune SAST rules based on:
- Technology Stack: Enable rules relevant to frameworks and libraries in use
- Coding Patterns: Suppress false positives from established safe patterns
- Risk Tolerance: Adjust severity thresholds based on application risk classification
- Developer Feedback: Continuously refine rules based on false positive reports
Rule Confidence Levels:
| Confidence Level | Build Action | Review Process | Example Vulnerabilities |
|---|
| High | Block merge | Automated ticket creation | SQL injection with unsanitized user input, hardcoded credentials |
| Medium | Warning only | Manual security review | Potential XSS with context-dependent risk, weak cryptography |
| Low | Informational | Periodic bulk review | Code quality issues with security implications |
Differential Scanning
Differential scanning analyzes only code changes rather than entire codebases, dramatically reducing scan times and focusing developer attention on newly introduced issues. This approach enables SAST integration into pull request workflows without unacceptable latency.
Scanning Strategy:
- Pull Request Scans: Differential analysis of changed files only (< 2 minutes)
- Nightly Scans: Full codebase analysis with complete rule set (30-60 minutes)
- Release Scans: Comprehensive analysis with maximum sensitivity (1-2 hours)
- Baseline Scans: Periodic full scans to detect issues missed by differential analysis
Differential scanning should be complemented by periodic full codebase scans that identify issues in existing code and validate that incremental scanning hasn’t missed vulnerabilities through incomplete analysis.
Build Blocking for High-Confidence Issues
SAST findings should be triaged by confidence level, with only high-confidence, high-severity issues blocking builds.
Build-Blocking Vulnerability Classes:
- SQL Injection: Unsanitized user input in database queries
- Command Injection: User-controlled data in system command execution
- Path Traversal: Unvalidated file paths from user input
- Hardcoded Secrets: API keys, passwords, tokens in source code
- Insecure Deserialization: Untrusted data deserialization without validation
- LDAP Injection: User input in LDAP queries without sanitization
Lower-confidence findings require manual review to distinguish true positives from false positives. Blocking builds on low-confidence findings creates developer friction without proportional security benefit. These findings should be tracked in security debt backlogs and addressed during dedicated security improvement sprints.
Software Composition Analysis (SCA)
Dependency Vulnerability Management
Modern applications incorporate numerous third-party dependencies, each potentially containing known vulnerabilities. SCA tools analyze dependency manifests and lock files, identifying components with published vulnerabilities and providing remediation guidance.
Leading SCA Tools:
| Tool | Strengths | Vulnerability Database | License Compliance |
|---|
| Snyk Open Source | Developer-friendly, IDE integration, auto-fix PRs | Proprietary + NVD | Yes |
| Dependabot | Native GitHub integration, automated PRs | GitHub Advisory Database | Limited |
| OWASP Dependency-Check | Open source, multi-language support | NVD, OSS Index | Yes |
| Sonatype Nexus Lifecycle | Policy enforcement, repository integration | Proprietary + NVD | Yes |
| WhiteSource/Mend | Comprehensive coverage, remediation guidance | Proprietary + multiple sources | Yes |
| JFrog Xray | Artifact repository integration, impact analysis | VulnDB + NVD | Yes |
Vulnerability Database Sources:
Effective SCA implementation requires integration with vulnerability databases that provide timely, accurate vulnerability information. False positives occur when vulnerabilities affect dependency code paths not used by the application, requiring reachability analysis to determine actual risk.
Emergency Patch Playbooks
Critical vulnerabilities in widely-used dependencies require rapid response. Security engineers develop emergency patch playbooks that define processes for evaluating vulnerability impact, testing dependency updates, and deploying patches across application portfolios.
Emergency Patch Response Process:
-
Vulnerability Assessment (< 2 hours)
- Verify affected versions in production
- Assess exploitability and business impact
- Determine if vulnerable code paths are reachable
-
Patch Evaluation (< 4 hours)
- Identify available patches or workarounds
- Review patch compatibility and breaking changes
- Assess regression risk
-
Testing & Validation (< 8 hours)
- Execute automated test suites
- Perform targeted security testing
- Validate in staging environment
-
Deployment (< 24 hours from disclosure)
- Deploy to production with rollback plan
- Monitor for issues and exploitation attempts
- Document remediation for compliance
Severity-Based Response SLAs:
| CVSS Score | Severity | Response Time | Remediation SLA |
|---|
| 9.0-10.0 | Critical | < 2 hours | < 24 hours |
| 7.0-8.9 | High | < 8 hours | < 7 days |
| 4.0-6.9 | Medium | < 24 hours | < 30 days |
| 0.1-3.9 | Low | < 1 week | Next release cycle |
Automated dependency update processes with comprehensive test coverage enable rapid patching when critical vulnerabilities emerge. Dependency pinning in lock files ensures reproducible builds while enabling controlled updates when security issues require dependency changes.
SBOM Generation and Drift Detection
Software Bill of Materials (SBOM) documents provide comprehensive inventories of application components, enabling vulnerability tracking and license compliance. Automated SBOM generation during build processes ensures that component inventories remain current as dependencies evolve.
SBOM Standards and Tools:
SBOM Generation Tools:
- Syft: CLI tool for generating SBOMs from container images and filesystems
- CycloneDX CLI: Language-specific SBOM generators
- SPDX Tools: Official SPDX generation and validation tools
SBOM drift detection identifies unauthorized dependency changes that could introduce vulnerabilities or licensing issues. Comparing SBOMs across deployments validates that production systems contain expected components without unauthorized modifications.
Dynamic Application Security Testing (DAST)
Authenticated Scanning in Ephemeral Environments
DAST tools test running applications by simulating attacks against deployed instances. Effective DAST requires authenticated scanning that exercises functionality behind authentication, where most business logic and sensitive data reside.
Popular DAST Tools:
| Tool | Type | Strengths | Best For |
|---|
| OWASP ZAP | Open Source | Extensible, API support, CI/CD integration | Web applications, APIs |
| Burp Suite Enterprise | Commercial | Advanced scanning, authenticated testing | Complex web applications |
| Acunetix | Commercial | Fast scanning, comprehensive coverage | Large application portfolios |
| Netsparker/Invicti | Commercial | Low false positives, proof-based scanning | Enterprise web applications |
| Nuclei | Open Source | Template-based, fast, customizable | API testing, custom vulnerability checks |
| StackHawk | Commercial | Developer-focused, modern APIs | GraphQL, REST APIs, microservices |
Ephemeral test environments created for each build or pull request enable DAST integration into CI/CD pipelines without impacting shared environments. Containerized applications and infrastructure-as-code make ephemeral environment creation practical and cost-effective.
API Contract Seeding
DAST scanners benefit from API specifications that describe endpoints, parameters, and authentication requirements. Contract-driven DAST testing achieves better coverage than crawling-based discovery, particularly for APIs that require specific parameter combinations or multi-step workflows to reach vulnerable code paths.
Supported API Specification Formats:
Integration with Functional Tests
DAST tools can leverage existing functional test suites to achieve application coverage, recording test traffic to identify endpoints and workflows. This integration ensures that DAST testing exercises realistic application usage patterns rather than generic attack scenarios.
Traffic Recording Approaches:
- Proxy-based recording: Route functional tests through DAST proxy to capture traffic
- HAR file import: Import HTTP Archive files from browser developer tools or test frameworks
- Selenium/Playwright integration: Automated browser testing with security scanning
- API test integration: Import requests from API testing tools (Postman, REST Assured, etc.)
Interactive Application Security Testing (IAST)
Runtime Instrumentation
IAST combines static and dynamic analysis through runtime instrumentation that monitors application behavior during testing. Instrumentation agents track data flow from sources through application logic to sinks, identifying vulnerabilities with high accuracy and low false positive rates.
Leading IAST Solutions:
| Tool | Language Support | Integration Method | Deployment Model |
|---|
| Contrast Security | Java, .NET, Node.js, Python, Ruby | Runtime agent | SaaS / On-premise |
| Synopsys Seeker | Java, .NET, Python | Runtime agent | On-premise |
| Hdiv Detection | Java, .NET | Runtime agent | SaaS / On-premise |
| Checkmarx CxIAST | Java, .NET | Runtime agent | SaaS |
IAST Advantages:
- High Accuracy: Observes actual data flow, reducing false positives
- Contextual Information: Provides exact vulnerable code location and data flow path
- Framework Awareness: Understands security controls provided by frameworks
- Zero Configuration: Automatically discovers application structure and endpoints
- Reachability Analysis: Only reports vulnerabilities in executed code paths
IAST integration during integration test execution provides deep vulnerability coverage without the performance overhead of production instrumentation. Test coverage directly translates to security testing coverage, incentivizing comprehensive functional testing.
Accurate Vulnerability Detection
IAST’s runtime visibility enables accurate vulnerability detection that accounts for actual application behavior, including framework protections, input validation, and output encoding. This accuracy reduces false positives compared to static analysis while providing more detailed vulnerability information than black-box dynamic testing.
Vulnerability Classes Detected by IAST:
- SQL Injection and NoSQL Injection
- Cross-Site Scripting (XSS)
- Command Injection
- Path Traversal
- LDAP Injection
- XML External Entity (XXE)
- Insecure Deserialization
- Server-Side Request Forgery (SSRF)
- Authentication and session management flaws
Fuzzing
Parser and Protocol Testing
Fuzzing generates malformed, unexpected, or random inputs to identify crashes, hangs, and security vulnerabilities. Fuzzing excels at testing parsers, protocol implementations, and input handling code where unexpected inputs could trigger memory corruption or logic errors.
Fuzzing Tools and Frameworks:
| Tool | Type | Best For | Key Features |
|---|
| AFL++ | Coverage-guided | C/C++ binaries | Fast, instrumentation-based, mutation strategies |
| libFuzzer | Coverage-guided | C/C++ libraries | In-process fuzzing, LLVM integration |
| OSS-Fuzz | Continuous fuzzing | Open source projects | Google infrastructure, free for OSS |
| Jazzer | Coverage-guided | Java/JVM | libFuzzer-inspired, JVM bytecode instrumentation |
| Atheris | Coverage-guided | Python | Native Python fuzzing, libFuzzer integration |
| go-fuzz | Coverage-guided | Go | Go-specific fuzzing, corpus management |
| Peach Fuzzer | Generation-based | Protocols, file formats | Model-based, commercial support |
Sanitizer Integration:
Coverage-guided fuzzing uses code coverage feedback to generate inputs that exercise new code paths, systematically exploring application behavior. Integration with sanitizers detects memory safety issues that might not cause immediate crashes:
Continuous Fuzzing
Continuous fuzzing runs indefinitely, generating and testing inputs to discover vulnerabilities in long-running campaigns. Cloud-based fuzzing services provide scalable infrastructure for continuous fuzzing without dedicated hardware.
Continuous Fuzzing Platforms:
- OSS-Fuzz: Free continuous fuzzing for open source projects
- Mayhem: Commercial continuous fuzzing platform
- Fuzzit: Continuous fuzzing as a service
- ClusterFuzz: Scalable fuzzing infrastructure (open source)
Fuzzing corpus management preserves interesting inputs that trigger new code paths or behaviors, enabling regression testing and accelerating future fuzzing campaigns.
Penetration Testing
Threat Model-Driven Scoping
Penetration testing should be scoped based on threat models that identify high-risk attack vectors and security controls requiring validation. Generic penetration tests that apply standard methodologies without application-specific context provide limited value compared to targeted assessments focused on identified risks.
Penetration Testing Methodologies:
| Methodology | Focus | Documentation | Best For |
|---|
| OWASP WSTG | Web application testing | Comprehensive testing checklist | Web applications, APIs |
| OWASP MASTG | Mobile application testing | iOS and Android security testing | Mobile applications |
| PTES | Full penetration testing | End-to-end pentest framework | Enterprise assessments |
| NIST SP 800-115 | Technical security testing | Government standard | Federal/regulated environments |
| OSSTMM | Operational security | Scientific methodology | Comprehensive security analysis |
Team Exercise Types:
- Red Team: Adversary simulation testing detection and response capabilities
- Blue Team: Defensive operations and security monitoring
- Purple Team: Collaborative exercises between red and blue teams for knowledge transfer
- White Box Testing: Full knowledge of application internals and source code
- Black Box Testing: No prior knowledge, simulating external attacker
- Gray Box Testing: Partial knowledge, simulating insider threat or authenticated user
Red team exercises complement penetration testing by simulating realistic adversary campaigns that test detection and response capabilities alongside preventive controls. Purple team collaboration between red team attackers and blue team defenders maximizes learning and capability improvement.
Pre-Production Quality Gates
Penetration testing findings should inform release decisions, with critical vulnerabilities requiring remediation or documented risk acceptance before production deployment. Quality gates based on penetration test results ensure that applications meet security standards before customer exposure.
Penetration Test Quality Gates:
| Finding Severity | Action Required | Timeline | Approval Authority |
|---|
| Critical | Must remediate before release | Immediate | CISO / Security Director |
| High | Remediate or document risk acceptance | < 7 days | Security Manager |
| Medium | Track in backlog, remediate in next sprint | < 30 days | Product Owner |
| Low | Track in backlog, prioritize with other work | Next quarter | Development Team |
Finding Operationalization
Penetration testing provides maximum value when findings are operationalized into automated checks that prevent regression. Vulnerabilities identified through manual testing should be translated into linter rules, unit tests, or automated security tests that validate fixes and prevent reintroduction.
Operationalization Process:
- Document Finding: Capture vulnerability details, reproduction steps, and impact
- Create Automated Test: Write unit test, integration test, or security test case
- Implement Fix: Remediate vulnerability with code changes
- Validate Fix: Verify automated test catches the vulnerability
- Add to CI/CD: Integrate test into continuous integration pipeline
- Monitor for Regression: Ensure test runs on every code change
Automation Targets:
- SAST Rules: Custom rules for application-specific vulnerability patterns
- Unit Tests: Security-focused test cases for business logic flaws
- Integration Tests: End-to-end security validation scenarios
- DAST Configurations: Custom attack payloads and test cases
- Policy as Code: Security policies enforced in infrastructure and configuration
Metrics and Continuous Improvement
Time to triage and time to remediate measure security testing program efficiency and developer responsiveness. Long triage times suggest that findings lack sufficient context or contain excessive false positives. Extended remediation times may indicate that findings are discovered too late in the development cycle or that remediation guidance is insufficient.
Key Remediation Metrics:
| Metric | Target | Measurement | Indicates |
|---|
| Mean Time to Triage (MTTT) | < 24 hours | Time from finding creation to severity assignment | Finding quality and context sufficiency |
| Mean Time to Remediate (MTTR) | < 7 days (Critical) < 30 days (High) | Time from triage to fix deployment | Developer responsiveness and remediation complexity |
| Fix Rate | > 95% (Critical) > 85% (High) | Percentage of findings remediated vs. accepted risk | Security posture and risk tolerance |
| Reopen Rate | < 5% | Percentage of findings that recur after remediation | Fix quality and regression testing effectiveness |
Escaped Defects
Vulnerabilities discovered in production that should have been caught by security testing represent escaped defects that indicate testing gaps. Escaped defect analysis identifies testing blind spots and informs testing program improvements.
Escaped Defect Analysis Process:
- Categorize Defect: Determine vulnerability class and severity
- Root Cause Analysis: Identify why existing testing didn’t catch the issue
- Gap Assessment: Determine if gap is in coverage, rules, or process
- Remediation: Update testing tools, rules, or processes to prevent recurrence
- Validation: Verify that updated testing would catch similar issues
Common Escape Reasons:
- Coverage Gaps: Code paths not exercised by testing
- Rule Gaps: Vulnerability patterns not covered by detection rules
- Configuration Issues: Testing tools not properly configured
- Timing Issues: Vulnerability introduced after security testing completed
- False Negative: Tool failed to detect known vulnerability pattern
Coverage Metrics
Security testing coverage should be measured against critical sinks and sources, not just code coverage percentages. Ensuring that all SQL query construction, command execution, and file operations receive appropriate testing provides more meaningful security assurance than generic code coverage metrics.
Security-Focused Coverage Metrics:
| Coverage Type | Measurement | Target | Purpose |
|---|
| Sink Coverage | % of security-critical sinks tested | 100% | Ensure all dangerous operations are validated |
| Source Coverage | % of untrusted inputs validated | 100% | Ensure all external data is tested |
| Authentication Path Coverage | % of auth flows tested | 100% | Validate all authentication mechanisms |
| Authorisation Coverage | % of access control decisions tested | 100% | Ensure proper authorisation enforcement |
| API Endpoint Coverage | % of endpoints scanned by DAST | > 90% | Comprehensive API security testing |
False Positive Rates and Developer Experience
False positive rates directly impact developer trust and security testing program effectiveness. High false positive rates train developers to ignore security findings, undermining program value. Security engineers continuously tune testing tools and rules to minimize false positives while maintaining vulnerability detection.
Developer Experience Metrics:
| Metric | Target | Impact |
|---|
| False Positive Rate | < 20% | Developer trust and engagement |
| Time to Understand Finding | < 10 minutes | Developer productivity |
| Developer Time per True Positive | < 2 hours | Program efficiency |
| Developer Satisfaction Score | > 7/10 | Program adoption and effectiveness |
| Security Finding Dismissal Rate | < 10% | Finding quality and relevance |
Developer time cost per true positive measures the efficiency of security testing programs. Tools that require extensive manual triage or generate findings with insufficient remediation guidance impose high developer costs that may not justify security benefits.
Optimization Strategies:
- Contextual Remediation Guidance: Provide code examples and fix suggestions
- IDE Integration: Surface findings where developers work
- Automated Fix Suggestions: Generate pull requests with proposed fixes
- Incremental Rollout: Introduce new rules gradually to avoid overwhelming developers
- Developer Training: Educate on common vulnerability patterns and secure coding practices
Conclusion
Application security testing requires integrated programs that combine multiple testing techniques, each providing unique visibility into different vulnerability classes. Security engineers design testing strategies that balance comprehensive coverage with developer experience, providing fast feedback on high-confidence issues while maintaining rigorous security assurance for production deployments.
Success requires treating security testing as a continuous improvement system rather than a static tool deployment. Regular analysis of testing effectiveness, escaped defects, and developer feedback drives ongoing optimization that improves both security outcomes and developer productivity.
Key Success Factors:
- Layered Defense: Combine multiple testing techniques for comprehensive coverage
- Risk-Based Prioritization: Focus intensive testing on high-risk applications
- Developer Integration: Embed security testing into developer workflows
- Continuous Tuning: Regularly optimize rules and configurations to reduce false positives
- Metrics-Driven Improvement: Use data to identify gaps and measure program effectiveness
- Automation First: Operationalize manual findings into automated regression tests
References
Standards and Frameworks
Vulnerability Databases and Resources