Software Securityhome
Fix a findingSearch
Phase 4 of 6

Testing

Prove the controls work: security regression tests, static and dynamic testing, fuzzing, ASVS verification and outside testing.

Does the running software resist what the threat model predicted?

Start here: Test an application

Security practices in this phase

  1. Automated security tests

    Test authorization for each role and tenant, rejected inputs, limits and error handling, and add a regression test for every vulnerability you fix.

    Done when: Security tests run in CI with the other tests and fail the build when a control regresses.

  2. SAST and DAST

    Tune static analysis to your own code, scan a deployed test build as a logged-in user, and confirm each finding with a request that reproduces it before fixing it.

    Done when: Confirmed findings have a reproducing test, and suppressed false positives have a recorded reason.

  3. Fuzzing

    Fuzz code that parses untrusted files, archives and protocols, and keep every crashing input as a regression test.

    Done when: Fuzzing runs on a schedule, and each crash it finds becomes a test.

  4. ASVS verification

    Choose the ASVS level that fits the application and record, for each requirement in scope, the test or review that shows it is met.

    Done when: Every requirement in scope has evidence another engineer can repeat.

  5. Penetration testing

    Scope penetration tests with the threat model for major releases and new attack surface, and track their findings like any other bug.

    Done when: Each test has a written scope, and its findings are fixed or accepted with an owner.

Guides

28 guides

Also part of this phase

  • Enforce authorization for every object actionGuide · Application security

    Authorize the authenticated subject, requested operation, and specific resource together; a valid login or unpredictable identifier is insufficient.

  • Authorize functions and fields as well as objectsGuide · Application security

    Prevent mass assignment, sensitive-field exposure and administrative actions that a valid object lookup alone cannot protect.

  • Preserve business invariants under concurrent requestsGuide · Application security

    Make a balance, reservation or approval rule hold when requests overlap, retry and fail halfway through.

  • Review a code change through its trust boundariesGuide · Application security

    Turn a pull request into a small set of security claims that can be checked against the surrounding system and tests.

  • Bound background jobs and make retries safeGuide · Runtime, cloud & APIs

    Keep queues, workers and paid dependencies within a defined budget when clients retry, cancel or disappear.

  • ASVS 5.0 verification records: requirement, test and evidence another engineer can repeatGuide · Governance & frameworks

    Scope edition-qualified requirements, connect them to implementation and tests, and separate a passing check from an unsupported assurance claim.

  • Protect training and retrieval data from targeted poisoningGuide · AI security

    Track who can influence datasets, keep evaluation independent and investigate targeted behavior changes without relying on aggregate accuracy.

  • Test smart contracts through state invariantsGuide · Application security

    Define the properties funds and privileges must preserve, then exercise callbacks, transaction sequences and exceptional conditions locally.

  • Prevent business-logic flaws with server-side invariantsGuide · Application security

    Recompute prices on the server, run workflows as state machines, build reset links from configuration, limit valuable flows, and turn each business rule into an invariant that the database and the tests both check.

  • Find, fix and contain memory-safety bugs in C and C++Guide · Application security

    Recognize out-of-bounds access, use after free, NULL dereference and integer overflow in C and C++, fix them with checked lengths and single ownership, harden release builds, catch the rest with sanitizers and fuzzing, and plan new code in a memory-safe language.

  • Start with a VDP, then add bug bounties and penetration testsGuide · Application security

    Publish a vulnerability disclosure policy and security.txt first, add a bug bounty only when you can triage and fix at the pace rewards bring, and buy penetration tests with a written scope, rules of engagement and a retest.

  • Protect the source repository: rulesets, reviews and signed commitsGuide · Software supply chain

    Configure the controls every repository that ships software needs: protected branches and tags, required review with CODEOWNERS, signed commits, secret push protection and account security, mapped to the SLSA Source track, the OpenSSF OSPS Baseline and Scorecard.

  • Choose cloud security posture tools and apply zero trustGuide · Runtime, cloud & APIs

    What CSPM, CWPP, CIEM, CNAPP, DSPM and ASPM each find and miss, how they overlap, how to evaluate one on your own accounts, and how zero trust as defined in NIST SP 800-207 uses what they measure.

  • Run a security champions program with protected time and outcome metricsGuide · Governance & frameworks

    Put a trained engineer with protected hours in every in-scope team, write the role into a one-page charter, route sensitive changes and findings through champions and AppSec, and judge the program by coverage and outcomes instead of attendance.

  • Write testable security requirements and a security Definition of DoneGuide · Application security

    Derive security requirements from OWASP ASVS 5.0, abuse cases and the threat model, write them as acceptance criteria a test can fail, trace each one to a test or evidence, and close stories against a short security Definition of Done.

  • Abuse case library: tests and controls by featureReference · Application security

    Recurring abuse cases for sign-up and login, password reset, MFA enrolment, invites, file upload, payments and coupons, webhooks, search, export, admin and AI chat or agents: the attacker goal, preconditions, a concrete test and the control, each linked to CWE and CAPEC.

  • Create temporary files safely: mkstemp, O_EXCL and private directoriesGuide · Application security

    Stop symlink, hardlink and pre-created-file attacks on the temporary files your code writes in shared directories such as /tmp: create each file atomically with O_EXCL and owner-only permissions through mkstemp or its equivalent in shell, Python, Java, Node.js, Go, .NET and Rust, keep related files in a private directory, and treat the Linux protected_* sysctls and systemd PrivateTmp as a backstop.

  • Contain LLM misinformation (OWASP LLM07:2026)Guide · AI security

    Stop plausible but wrong model output from driving decisions and actions: ground answers in sources, verify every citation, separate generation from execution with a claim-check-act pattern, gate consequential actions on a human, and evaluate factuality on your own domain.

  • DeFi attack patterns: oracles, flash loans, proxies and signaturesGuide · Application security

    The four smart-contract attack classes beyond reentrancy: price-oracle manipulation, flash-loan amplification, upgradeable-proxy storage collisions and uninitialized implementations, and signature replay, each with vulnerable and fixed Solidity, Foundry tests and verified incidents.

  • Case study: the Amazon Q Developer extension compromise (2025)Case study · AI security

    How an over-scoped GitHub token, extracted from an AWS CodeBuild pull request build, let a threat actor commit code to the Amazon Q Developer extension for VS Code that shipped in version 1.84.0 in July 2025, why the injected code aimed at the Q Developer CLI failed, and the CI and AI-agent controls the incident argues for.

  • Case study: First American's EaglePro document exposure (2019)Case study · Application security

    How sequential IDs in unauthenticated links exposed First American's title documents in 2019, after its own penetration test found the flaw and a clerical error let it go unfixed.

Find your next answer

Type to search. Search runs in your browser.

Searches run in your browser, but the host can infer them from the index files they load. The address shows your search so you can bookmark or share it.