Technical topic hubs

Secure Code Review: Scope, OWASP ASVS and Remediation

Learn how to scope a secure code review, select relevant OWASP ASVS requirements and combine source analysis with testing of the running application.

Secure code review examines how an application's source code enforces security decisions. It can help explain why a weakness occurs, identify related instances and assess paths that are difficult to reach through the running interface.

The security code audit scope should name the repositories, components and versions included. A promise to review a repository gives little information about the attention paid to sensitive features, generated files or dependencies.

What should a secure code review examine?

Start with the architecture and the data or actions you need to protect. Trace how identity, permissions and untrusted input move through the application.

AreaQuestions for the review
Access decisionsIs each sensitive action checked against the right user, record and tenant?
Authentication and sessionsAre framework features integrated safely across login, recovery and account changes?
Input and outputAre data, queries, templates and system commands kept separate?
Secrets and configurationHow are credentials introduced, stored, used and revoked?
Files and integrationsAre uploads, paths, callbacks and external responses constrained?
Sensitive workflowsCan approvals, transaction limits or state transitions be bypassed?

Include background jobs, administrative functions and shared libraries where they affect those decisions. They may enforce different controls from the public interface.

Use OWASP ASVS to define requirements

OWASP ASVS provides a structured set of application security verification requirements. Agree the version, applicable requirements, verification level and evidence expected for your system.

A review described as aligned with ASVS does not establish that every applicable requirement has been verified. Some requirements need deployment evidence, configuration review or testing of runtime behaviour. Record the coverage and any unverified elements explicitly.

Combine automated analysis with manual investigation

Automated analysis can help identify patterns and prioritise code for investigation. Manual review is needed to understand the application's intended rules, trust boundaries and the conditions in which a suspicious path can run.

A pattern match is a lead, rather than a complete finding. Reviewers should trace the relevant input, controls and sensitive operation before explaining the impact. Similarly, the absence of tool alerts does not establish that permission logic is correct.

Prepare the repositories and build information

Provide a fixed commit or release tag, architecture notes, dependency manifests, configuration examples and instructions for building or running the relevant components.

Explain which code is maintained by your team, generated automatically or supplied by third parties. Include the repositories that implement shared authentication, authorisation and deployment behaviour if those controls are part of the objective.

Arrange a technical discussion with developers who understand important workflows. A role matrix and a description of exceptional states can prevent reviewers from having to infer the business rules from code alone.

Why runtime testing adds value

Source code can show a potentially unsafe path while the deployed configuration prevents it. Conversely, a safe-looking function may be called in an unexpected context or affected by infrastructure settings.

Testing the running application can validate relevant findings and establish practical consequences. A combined engagement should explain which findings were reproduced, which were supported by code analysis and what limitations remain.

Make remediation useful across the codebase

Ask for repository paths, affected functions or lines, the reviewed commit and clear reasoning. Findings should explain the root cause and recommend a suitable control, rather than provide a replacement snippet without context.

After a fix, investigate related patterns and add meaningful regression checks. Retesting should identify the new commit and deployed build where runtime verification is needed. A time-limited review should describe its coverage honestly; it cannot promise that every defect has been found.

Read our Testing methodology to discuss coverage, or Book a demo with the systems and objectives you have in mind.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo