Black-box vs grey-box vs white-box testing: which fits your code and supply chain
Start with white-box review of what your organization owns: the source repositories, CI/CD pipeline definitions and dependency manifests your teams control. Then add grey-box and black-box work where it answers a question the review cannot. Black-box testing treats the system as an outsider would, with no source, pipeline or dependency data, so it shows what is exposed but rarely why. Grey-box testing gives the tester partial knowledge, such as a test account, an architecture diagram or read-only pipeline access, and it fits when you need to check deployed behavior against a known build. Choose white-box alone when the question is about your own code and build chain. Combine all three when a pipeline weakness can only be proven by exploiting the running service.
The depth of each approach is set by the access you grant, so write that access into the statement of work. A black-box test with no source access will not reach a vulnerable dependency that never appears in the interface, and a white-box review that stops at the repository will miss an overly permissive token in the pipeline runner. Ask the provider which artifacts they will read: source for named repositories, workflow files, lockfiles, build logs and any SBOM. Control catalogs point the same way. NIST SP 800-53 control SA-11 (Developer Testing and Evaluation) covers static code analysis, manual code review and attack surface reviews, and OWASP ASVS 5.0.0 notes that many Level 2 and Level 3 requirements need source code and access to the development team, not only black-box testing. DORA Article 25(1) lists source code reviews where feasible, so confirm with your assessor or regulator how feasibility is judged.
Plan the evidence before you buy, because leadership and assessors will ask what was tested, at which access level, against which build and what changed afterward. Ask for the access level recorded in the scope, the commit or build identifier tested, the tools and manual steps used, and a retest of each fix. Use NIST SP 800-218 as the reference for whether your program covers its four practice groups: Prepare the Organization, Protect the Software, Produce Well-Secured Software and Respond to Vulnerabilities. Cost follows the scope you grant. White-box work grows with the number of repositories, pipelines and lines of code to read, grey-box work with the roles and workflows to exercise, and black-box work with the exposed surface. Ask the quote to separate one-time review from recurring scanning and retesting, and to name who supplies test accounts and pipeline access.
How black-box vs grey-box vs white-box testing compare side by side for code and supply chain
This table compares black-box, grey-box and white-box testing of code and supply chain targets across goal, access, working material, depth, evidence, main misses and staffing. Read each column as a level of access, and expect the white-box column to draw the most engineering time from your team. The main takeaway is that the less a tester can see, the more the result reflects what an outsider sees, and the less it shows about source and pipeline flaws.
| Dimension | Black-box | Grey-box | White-box |
|---|---|---|---|
| Goal | Show what an outside attacker can reach in a shipped build, public package or container image | Test a known build or pipeline with partial context on dependencies and configuration | Find code flaws, dependency risks and weak workflow permissions before release |
| Access granted | Deployed binary, published package or image, with no repository or pipeline access | Build artifacts, SBOM, pipeline logs and read-only repository access for selected components | Full source, lockfiles, CI/CD workflow definitions and build scripts, with access approved in writing |
| What the tester works from | The running or published artifact only | Partial documentation, an SBOM in CycloneDX or SPDX form and selected configuration keys | Full source and pipeline definitions, including workflow files, build steps and dependency manifests |
| Depth | Shallow on logic, stronger on exposed behavior and artifact integrity checks | Moderate, following suspected dependency or configuration paths from known inputs | Deepest, reaching unsafe code paths, dependency resolution and workflow trust boundaries |
| Evidence produced | Reproducible proof of exploitation or a mismatch between the shipped artifact and its source | Findings tied to named components, versions and configuration settings | File and line references, dependency paths and workflow fixes for developer review and retest |
| Main misses | Hardcoded secrets in source, paths that need authenticated roles and unpinned build actions | Logic flaws in code paths that documents do not describe | Runtime-only settings, drift between build and production environments and identity provider configuration |
| Who must be available | A scope owner to approve the test window and the artifacts in scope | Platform or build owners, the SBOM maintainer and someone who can pull pipeline logs | Developers, release engineers and repository admins for access, plus a contact to walk through findings and retest |
What white-box review reads in a code and supply chain
A white-box review of code and supply chain starts from the artifacts that produce the software as well as the running application. In practice the reviewer reads source code, dependency manifests and lockfiles, build and CI/CD workflow definitions, SBOM data and provenance records. These map to NIST SP 800-218, the Secure Software Development Framework (SSDF) Version 1.1 (February 2022): Protect the Software (PS) covers protecting code from unauthorized access and tampering, Produce Well-Secured Software (PW) covers reviews and testing during development, and Respond to Vulnerabilities (RV) covers responding once a weakness is found. Provenance is judged against the SLSA v1.2 Build and Source tracks, and SBOMs are checked in formats such as CycloneDX 1.7 or SPDX 3.0.0. Ask the provider which repositories, pipelines and lockfiles are in scope, and whether they will read runner configuration as well as the workflow files.
Scope follows from the assurance level you need. The OWASP ASVS 5.0.0 notes that verifying many Level 2 and Level 3 requirements needs access to documentation, source code, configuration and the development team, so black box testing alone cannot meet them. An outside-in test sees behavior, so it cannot show how session handling, input validation or secrets storage is implemented across a codebase. Regulators point the same way: DORA Article 25(1) lists source code reviews where feasible among the tests a resilience programme should include, and the CMMC Assessment Guide Level 2 notes that custom-developed software may need penetration testing or source code scanning for vulnerability scanning requirement 3.11.2. Before you sign, confirm the ASVS level in the statement of work and whether the team will get read access to repositories, CI configuration and a named engineer for questions.
An automated scanner is a useful first pass, but it is still only one input to a review because supply chain risk depends on context a tool does not have. A scanner can flag a dependency with a known vulnerability or a workflow with a risky trigger, but it cannot decide whether an untrusted pull request can reach a privileged runner, the pattern behind Poisoned Pipeline Execution (CICD-SEC-4) in the OWASP Top 10 CI/CD Security Risks. It also cannot tell whether a build really runs from the pinned lockfile or whether a provenance record names the builder you expect. OpenSSF Scorecard automates checks such as Dangerous-Workflow, Pinned-Dependencies and Token-Permissions, scoring each from 0 to 10, which gives a reviewer a starting list. Ask for the raw tool output and a written list of what the reviewer read by hand, and treat any finding the report leaves unexplained as unverified.
What each approach finds and misses in code and supply chain targets
Each approach sees a different layer of the same delivery chain: the shipped artifact, the records the pipeline emits, or the source and workflow files that produce the artifact. The cards set out what each view finds and where it stops, so you can match depth to the trust boundary you need to test. Most gaps close only when the views are combined.
Black-box: what the artifact shows
Testing the built artifact, such as a shipped binary or container image, shows what someone outside the build can reach: exposed endpoints, default credentials and vulnerable behavior that can be observed at runtime. It needs no source code, which suits intake of third-party software. Confirm whether the vendor offers a test environment, because a clean run on an unreachable component says little about the dependencies inside. A passing run does not clear the code path, since the tester never sees which functions handle untrusted input.
Black-box: build process gaps
An artifact can run cleanly while the process that produced it was weak. Black-box testing cannot see unpinned build actions, excess write permissions on a build job, or whether the release came from the reviewed commit. This matters when you deploy a vendor release without rebuilding it. Ask for build provenance and map it to the SLSA Build track levels, L0 to L3, which add guarantees that software can be traced to its source and has not been tampered with. Provenance is invisible from outside the artifact.
SLSA specificationGrey-box: dependency and configuration findings
Adding pipeline logs, a dependency list, configuration and a test account lets the tester match exact versions to advisories and check which settings weaken the running service. Ask for an SBOM in CycloneDX 1.7 or SPDX 3.0.0 so the inventory can be read by standard tooling. The inventory is only useful if it is complete, so ask whether it covers transitive dependencies and container base images. A test account also reaches authenticated functions that outside scanning cannot.
Grey-box: records that mislead
Logs and dependency lists record what the pipeline reported, and that record can be incomplete. An SBOM generator that skips one language ecosystem will show a clean inventory, and a test account covers only the roles it holds, so a privilege flaw in another role stays hidden. This matters most when one pipeline can shape all three records: the SBOM, the logs and the release. Confirm which tool generated the inventory, who can edit the pipeline and which roles the test accounts hold.
White-box: source and workflow flaws
Reading source and pipeline definitions finds flaws in the code and build files themselves, including logic errors that scanners miss. OpenSSF Scorecard runs automated checks such as Dangerous-Workflow and Pinned-Dependencies on the repository, scoring each from 0 to 10 and combining them into a weighted aggregate score. NIST SP 800-53 control SA-11 lists static analysis and manual code review among developer testing practices. Ask for read access to the repository, workflow files and branch settings before work starts.
White-box: runtime and platform gaps
Source review misses what is decided outside the repository, including runtime configuration, CI platform settings and the trust placed in external services. A workflow can look safe in its YAML while platform settings outside the repository let forks run with secrets, which is the exposure behind CICD-SEC-4 Poisoned Pipeline Execution. This matters when the repository accepts outside contributions or runs self-hosted runners. Ask who can change workflow triggers and which secrets each job can read, and confirm those settings are visible to the tester.
OWASP CI/CD risksThe decision path from access and compliance needs to an approach
The path starts with who owns the source repository and CI/CD pipeline. If the buyer does not, the path moves to the scope question and the approach relies on what the buyer can see. Next, ask whether a deployed build is the only thing in scope. A yes points to black-box testing, and a no points to grey-box testing with credentials. The last check is whether a named framework asks for source code review. DORA Article 25(1) lists source code reviews where feasible, and the CMMC Assessment Guide Level 2 says custom-developed software may need penetration testing or source code scanning for requirement 3.11.2. Confirm the exact requirement with your assessor or regulator before you buy.
Decision path from source ownership and scope to a testing approach.
What black-box vs grey-box vs white-box testing delivers to your team
This table shows what each testing approach hands your team at the end of an engagement, row by row. Read each column as the same report written from a different level of access, so the evidence depth grows from a deployed build to the commit under review. The main takeaway: the report is evidence of testing that your compliance team can review, and it is not an audit report, attestation or certification. Agree the format, severity method and retest terms in the written scope before work starts.
| Deliverable | Black-box | Grey-box | White-box |
|---|---|---|---|
| Finding location | Deployed artifact or running service, described by endpoint and observed behavior | Artifact plus supplied configuration, such as pipeline settings or dependency versions | Source file and line, workflow file or pipeline setting, tied to a reviewed commit |
| Severity | Rating with stated basis, based on observed impact and exploitability | Rating with stated basis, adding the access and configuration assumptions | Rating with stated basis, adding code path reachability and affected versions |
| Reproduction steps | Steps from outside the build pipeline, using only the public artifact or endpoint | Steps using supplied test accounts or pipeline access, with the setting values noted | Steps plus a proof of concept run on a local build or test branch |
| Remediation guidance | Fix direction for the deployed component, often a dependency update or configuration change | Named configuration or pipeline setting, with the expected value and the owner | Code-level fix naming the affected function, with a suggested patch or pull request |
| SBOM and provenance notes | Component names and versions only where the artifact exposes them | Review of SBOM content and provenance records the client supplies | Comparison of SBOM entries with lockfiles, build inputs and provenance records |
| Retest record | Retest of each closed finding on the same deployed build, with the build identifier | Retest against the agreed build and configuration, with the access used | Retest on the fixed commit, with the commit hash and result for each finding |
| Report status | Evidence of testing. It is not an audit report, attestation or certification. | Evidence of testing. It is not an audit report, attestation or certification. | Evidence of testing. It is not an audit report, attestation or certification. |
What drives the cost of black-box vs grey-box vs white-box testing
Cost in code and supply chain testing follows the amount of code, pipeline and access the tester must work through, and the testing method sets only part of that. The six drivers below show who is paid for each item and which costs recur. Ask every bidder to price them separately in the written scope so the three methods can be compared on the same inputs.
Repositories and code volume
Tester time grows with the number of repositories in scope, their size and the branches or tags to be reviewed. Your engineers spend time confirming which repositories are production, which are archived and which generated code can be excluded. This scoping work is usually one-time per engagement, but a service added later adds scope again. Ask the quote to list the repository count, size band, branches in scope and exclusions.
Languages and frameworks
Each language and framework adds reviewer time, since a tester reading a service must know where its framework handles authentication and input. Black-box work reduces source-level reading, but it also limits what the tester can confirm about those frameworks. If your team already licenses static analysis or composition tools, ask whether the tester can run them on your accounts and whether those licences cover that use. Quotes should name each language and framework in scope.
Pipelines and build environments
Every CI/CD pipeline, build runner and deployment target is a place where code can change between commit and release. Reviewing workflow definitions, runner permissions, secret injection and artifact signing takes tester time and walkthroughs from the people who own each pipeline. The OWASP Top 10 CI/CD Security Risks include Poisoned Pipeline Execution, which is why reviewers look beyond the repository. Ask for the pipeline and runner count, the hosted or self-hosted runner mix and whether build environments are tested or only described.
CI/CD risk listDependency count and triage
Software composition analysis of a large dependency tree produces many alerts, and someone must decide which are reachable, exploitable or already mitigated. That triage is mostly analyst time, paid through the tester's fixed scope or by your staff if you triage in-house. The cost recurs as dependencies update, so ask whether the quote covers one snapshot or a repeatable process. An SBOM in CycloneDX or SPDX format from your build makes the triage scope easier to state.
Time to grant access
Access is usually a buyer cost rather than a tester cost. Your staff provision read access to repositories, pipeline logs, staging environments and SSO accounts, and walk the tester through architecture and build steps. Grey-box and white-box work need more of this than black-box work, which can start from the outside. OWASP ASVS 5.0.0 notes that many Level 2 and Level 3 requirements need documentation, source code, configuration and the development team, so budget that staff time explicitly. Ask who provisions access and what must be ready before start.
ASVS 5.0.0 sourceRetest scope
Retesting after fixes is often scoped as a separate item in the written quote, and it recurs with each remediation cycle. Cost depends on how many findings change code, pipeline settings or dependency versions, and whether the tester must recheck detections as well. CIS Safeguard 18.4 asks that security measures be validated after each test, so ask whether the retest covers alerts and logging. Ask the quote to state the number of retest rounds and who confirms that each finding is closed.
How to sequence code and supply chain testing across the build
This sequence starts with inventory and automated baseline checks, then moves from white-box review of code and pipelines to grey-box testing of the built service and black-box verification of the released artifact. Each stage produces evidence that the next one relies on, and a retest closes the loop after fixes. The OWASP Web Security Testing Guide says no single technique is enough, so the order also gives more weight to early development phases.
Inventory repositories, pipelines and dependencies
Owner: the client's platform or security engineering team, with DeployOpen support if scoped. List every source repository, CI/CD pipeline, build runner, package feed and third-party action or plugin in use. Where tooling allows, generate an SBOM in CycloneDX or SPDX form for each shipped component, following the NTIA minimum elements for data fields. Done when the inventory names an owner for each repository and pipeline, and every SBOM lists direct and transitive dependencies. Gaps that cannot be generated are logged as open items for the next stage.
Run automated baseline checks with Scorecard
Run OpenSSF Scorecard against each open-source repository in scope and record the per-check scores for
Branch-Protection,Dangerous-Workflow,Pinned-DependenciesandToken-Permissions, along with the weighted aggregate. Treat these results as a baseline only. A high score does not show that a pipeline is safe, because the checks only see what the repository exposes. Done when every in-scope repository has a dated score sheet and each low check has a named owner or a documented decision to accept the risk.Review high-risk code and pipeline definitions
A white-box reviewer with source and pipeline access reads authentication, authorization, input handling and secrets use in high-risk components. The same reviewer reads the CI/CD definitions for build, release and signing steps and maps weaknesses to the OWASP Top 10 CI/CD Security Risks, such as Poisoned Pipeline Execution and Improper Artifact Integrity Validation. Check whether build provenance can be traced back to source and which SLSA Build track level the pipeline plausibly meets. Done when each high-risk component has a written review with file-level findings, and every pipeline that produces a release artifact has a documented path from source to artifact.
Test the built service in grey-box mode
Deploy the candidate build to staging and confirm its hash matches the build the pipeline produced. Give the tester a test account for each role, plus only the pipeline visibility needed to read build logs and check which environment variable names exist. Test authenticated flows, role boundaries and secrets handling against the running service, then compare the results with the white-box findings to confirm or close them. Done when each role has been tested with its own account and every white-box finding is marked confirmed, fixed or not reproducible, with the evidence attached.
Verify the released artifact from outside
The tester works without internal access and checks the published artifact the way an outside party would. Verify signatures, checksums and provenance attestations against the release record, and compare the shipped components with the SBOM from the first step. Test the public interfaces for exposed debug features and default credentials. Black-box results show what an outsider can reach, not what the code does, so they complement the earlier stages instead of replacing them. Done when the artifact verifies against the release record and every mismatch or public finding is written up with a severity rating.
Retest after fixes and close the sequence
Once fixes are merged, rebuild the artifact, rerun Scorecard, and repeat the white-box and grey-box checks for the affected components. Confirm that each fix holds and that it did not reopen a related weakness. Verify the new artifact again from outside. Store the final state in one evidence pack: SBOM, Scorecard history, review notes, test results and retest results. Done when every finding has a retest result and the evidence pack names the exact artifact version it covers. Confirm the retention period and sign-off process with your compliance team before work starts.
When DORA, CMMC and ASVS call for source code review
Four frameworks point toward code-level testing, but they set different triggers, so one review type rarely satisfies all of them. DORA Article 25(1) lists source code reviews among appropriate tests "where feasible", which obliges the financial entity to record why a review is or is not feasible for each system, including vendor software it cannot read. CMMC Level 2's Assessment Guide says custom-developed software may need penetration testing or source code scanning under requirement 3.11.2, so the question is whether your in-scope systems include custom code. NIST SP 800-53 control SA-11 lists static code analysis, manual code reviews and dynamic code analysis as enhancements. ISO/IEC 27001:2022 control A.8.29 asks for security testing processes in the development life cycle.
OWASP ASVS 5.0.0 adds a further constraint: verifying many Level 2 and Level 3 requirements needs access to source code, configuration and the development team, which black-box testing alone cannot provide. A black-box test on its own will leave those requirements without evidence, however well it is run. Before you buy, build a short table that maps each requirement to the test type your assessor accepts, the evidence it produces and the person who must grant access. Then ask the assessor, in writing, three questions: whether a source code scan satisfies 3.11.2 or a manual review of custom code is expected, whether a documented feasibility decision meets the DORA wording, and whether SA-11 evidence must come from your vendor for purchased software. Keep the answers with the scope document so the test design matches what your competent authority or auditor will accept.
What buyers ask before commissioning code and supply chain testing
How much does a code and supply chain security test cost?
DeployOpen does not publish a price list, so a quote follows from the written scope. The main cost drivers are how much code and how many repositories are in scope, whether the work includes manual code review or only automated analysis, how many build pipelines, artifact registries and dependency sources need review, and whether testers get architecture documents and developer time. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. The assessment itself is one-time work. Ongoing support, upgrades and continuous testing are available as retainers, which recur. Ask the quote to itemize effort by code area, state the retest allowance, and list any tooling or licenses you must provide.
How long does a source code or supply chain assessment take?
The timeline depends mainly on scope size and on how fast access and answers arrive, so confirm the duration in the written scope before work starts. Scope drivers include the number of repositories and languages, whether build pipelines and deployment configuration are reviewed, whether threat modeling sessions are included, and whether dynamic checks need a running test environment. Delays usually come from waiting on repository access, missing build documentation or slow answers from developers, so agree on named contacts and a start date in advance. A retest adds time after fixes are made, so ask when the retest window opens and whether the fixed scope includes it. Ask for milestones tied to deliverables so you can track progress against the plan.
What does a code security test need from our engineers?
Your engineers provide access, context and decisions, and they answer questions while the work runs. Confirm these needs in the scope:
- Read access to the repositories, branch protection settings and CI/CD configuration in scope
- Build, release and deployment documentation, plus a named owner for each pipeline and service
- A test environment or a non-production build, if dynamic checks are included
- Time to validate fixes and take part in the retest
OWASP ASVS 5.0.0 notes that verifying many Level 2 and Level 3 requirements needs documentation, source code, configuration and access to the development team, which goes beyond black box testing. Ask which of these items the provider needs before kickoff, and who signs off on access.
Can our own team run grey-box or white-box code checks?
Many teams can run automated checks in-house, and that can be a reasonable first step. Dependency and build hygiene checks can be automated with tools such as OpenSSF Scorecard, which runs automated checks on open-source repositories, including Branch-Protection, Dangerous-Workflow, Pinned-Dependencies and Token-Permissions, and scores each from 0 to 10 before combining them into a weighted aggregate score. Manual code review and attacker-style validation take trained reviewers and sound judgment, and the value of the output depends on who triages findings. Check three things: whether your team has reviewers who know your languages, whether it has capacity to triage and fix findings, and whether it can rerun checks after each release. Outside testers add the most value where your team lacks reviewers or independent judgment.
Does a scanner report count as a penetration test?
No. The PCI SSC Penetration Testing Guidance v1.1 (September 2017) describes penetration testing as essentially a manual process, and it says that simply running an automated tool does not satisfy the penetration testing requirement. Scanner output still matters. NIST SP 800-115 treats review techniques as passive and low risk, and it notes that organizations often combine techniques to reach an in-depth assessment at an acceptable level of risk. For a scanner report to count as testing in your program, check whether a qualified person validates findings, attempts exploitation where agreed, and documents the method and scope. Confirm with your assessor, in writing, which evidence they accept before you buy.
Does DeployOpen issue an audit report or certification for code testing?
No. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies issue those. In a code and supply chain program, assessors commonly ask how security testing is built into development. That connects to ISO/IEC 27001:2022 Annex A control A.8.29, Security testing in development and acceptance, and, for entities in scope of DORA, to source code reviews where feasible under Article 25(1). Ask your assessor which controls and evidence they will examine, then ask the provider for deliverables that map to those items in the quote.
How are retests scoped after developers fix the findings?
Retest scope should be written into the agreement before the first finding is delivered. Confirm which findings are re-checked, whether the retest uses the same method and environment, whether a new build must be provided, and how many retest rounds are included. Whether the retest sits inside the fixed scope or follows as a separate piece of work changes the quote, so ask for both options if you are unsure. CIS Controls v8.1 Safeguard 18.4 asks that security measures be validated after each test so that detections cover the techniques testers used. For checks after the engagement, DeployOpen offers retainers, and the quote should state the cadence and what each cycle covers.
How DeployOpen scopes and delivers code and supply chain testing
DeployOpen scopes code and supply chain work as a fixed-scope engagement, with the access level, deliverables and timeline agreed in writing before testing starts. We run security testing on applications and APIs and on cloud and infrastructure, and we prepare the evidence that compliance assessors ask for, but we do not issue audit reports or certifications.
How we scope
- The written scope names which code, repositories, pipelines and build systems are in the test, and which are out.
- The scope records the access level for each target, such as compiled artifacts only or source with pipeline configuration.
- Fixed-scope engagements agree deliverables and timelines in writing before work starts, and retainers cover continuing testing.
How we build
- Testing follows the scoped target list, with source review and pipeline checks run where the agreed access allows.
- Findings name the build, repository or pipeline stage where each issue was reproduced.
- Work on self-hosted platforms runs inside the client's own cloud accounts, data centers or air-gapped networks.
How we hand over
- Deliverables are documented in writing, covering scope, method, findings and evidence.
- Each finding includes evidence a developer can reproduce, and the report states what was tested and what was not.
- Documentation and evidence can feed compliance assessments, but auditors and certification bodies issue the actual opinion.
How we support
- Retesting after fixes can be written into the scope, so each fix is checked before the engagement closes.
- Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement.
- Ask for the written scope and deliverable list with any quote, since DeployOpen does not publish a price list.

