A scenario worth testing
A frontend update introduces an unfamiliar transitive dependency just before a release. This scenario is an invented teaching example, not a description of an actual breach or test of a named organisation.
OWASP Top 10:2025 lists Broken Access Control as A01 and treats software security as a combination of design, implementation and operational risk. In this guide, the purpose is to evaluate a specific decision and its evidence. It does not follow that the scenario is likely in every environment, or that any untested product is vulnerable.
Red team perspective: define the risk
Question to test. Could a compromised or malicious package reach production through routine builds?
Blue team perspective: define the boundary
Defensive decision. Review lockfile changes, trusted publisher signals, permissions and available advisories.
Safe experiment: make the question measurable
Scope: synthetic records or an explicitly authorised, disposable test environment only. No customer records, live exploit payloads or third-party probing.
- State the decision. Describe the asset, who should be authorised, and which fact would refute the initial hypothesis.
- Create a safe fixture. Construct the example. Compare two invented dependency diffs and decide when to approve, request review or defer the release.
- Evaluate three cases. Use the fictional cases below; identify the permitted case, an adverse case and a plausible exception. Record what evidence distinguishes them.
- Write an outcome. Decide whether to allow, deny, escalate or ask for more information. Record the policy owner and one measurable follow-up. Never equate a planned test with a completed live test.
Worked example and expected observations
Illustrative result, not a measured finding: A review record listing package, version, origin, maintainer signals, advisory status and rollback plan.
| Case | Fictional input | Decision to justify |
|---|---|---|
| Expected activity | Known version update passes tests and publisher provenance check | Explain the precise reason it is permitted or expected. |
| Boundary challenge | Unreviewed dependency executes install script during CI | Identify the policy, detection or approval that should respond. |
| Lookalike or exception | Emergency security patch follows documented expedited review | Identify the missing context before making an accusation. |
Interpret this example
Start with the expected case: known version update passes tests and publisher provenance check. Compare the relevant boundary with the adverse case: unreviewed dependency executes install script during CI. The distinction depends on Package identity, lockfile diff, provenance, tests and approver, not the alarming appearance of an isolated event.
The third case deliberately resists a snap conclusion: emergency security patch follows documented expedited review. Record which additional fact would change the decision. Make the server-side decision independent of the user interface. Client-side validation can improve usability but cannot substitute for authoritative enforcement.
Download the three-case CSV exercise (illustrative inputs, not collected production evidence).
Evaluate evidence and failure modes
False confidence to avoid: A package with zero known advisories is not necessarily safe or maintained. A mock application is useful for a regression test but cannot prove security in a complete production system.
Authentication, authorisation, input validation and monitoring solve different problems; one successful test cannot substitute for the others. When a log source is missing or a sample is ambiguous, mark the conclusion unverified rather than estimating a success rate from fictional data.
Decide what to improve
Recommended next action: Automate inventory but keep human approval for high-impact dependency changes. Use intentionally local mock data and negative tests, including cases the application must reject.
- Which exact asset and named owner does this decision concern?
- Would your evidence include Package identity, lockfile diff, provenance, tests and approver?
- Does the adverse case need blocking, investigation or both?
- What one controlled follow-up would distinguish the lookalike case from abuse?
Official references and limitations
Primary references explain the underlying control or framework; they do not validate the fictional cases above.
Try the related offline practice workbook, with runnable Python standard-library examples and marked limitations.