Static analysis meaning, in plain words

Static analysis reads source code for holes without running it. How it works, what it misses, why false positives occur, and how it pairs with dynamic testing.

Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated

Static analysis is a way of finding holes by reading source code without running the program. OWASP explains that tools which examine source code or compiled code to find security flaws are also called SAST. Some tools can be built into the middle of development.

How does static analysis work?

It resembles checking the plans before a house is built. Even without walking around the finished building, the plans can show that a pillar is not strong enough or that a window has no lock. Static analysis is the work of a tool reading the program, which is the plan, and checking it.

The tool looks for dangerous patterns of writing. For each place it finds, it shows the file name and line number, and sometimes part of the code concerned. The person fixing it does not have to spend effort locating it. It can also be repeated, as in an automatic build that runs every night.

What it does well are well-known kinds of problems, such as buffer overflow and SQL injection. OWASP lists as hard to find authentication problems, access control flaws, wrong use of cryptography, and configuration problems, because many of these do not show up in the code. The scope of an assessment that reads code can be seen in source code assessment.

Why does static analysis matter?

Because finding holes while you are still building reduces the work and time needed to fix them. OWASP also says that finding problems during development reduces effort and time. It suits companies that develop their own systems or that had a member site built by an outside firm.

You also need to know its limits. OWASP says that what static analysis finds automatically is a relatively small share of an application's flaws. False positives are many, and worries about misses remain.

Our Cyber Shield Scan uses Semgrep and an AI deep dive for static analysis of source code, and AI judgment of exploitability to cut false positives. We look for holes across the whole, together with dynamic testing, which actually runs the site, and a check of dependencies. A person confirms results before we report them. To understand the whole of an assessment, OWASP's published Web Security Testing Guide is also a help.

When should you consider it?

  1. You develop your own system or had one built for you.
  2. You want holes found before release, not after.
  3. You can accept that a person must sort the tool's results.

To check whether it fits your system, contact us.

Static analysis works best as a regular habit, not a one-time event. Because a tool can be run again on every build, a hole introduced last week can be caught while the developer still remembers the change. Pair it with a person who reads the output, and the noise becomes manageable.

Related terms

Frequently asked questions

Is static analysis alone enough for a vulnerability assessment?

No. OWASP says static analysis has trouble finding authentication problems, access control flaws, wrong use of cryptography, and configuration problems. Combining it with dynamic testing, which actually runs the site and tries things, widens what you can see.

I hear static analysis gives many false positives. How should I treat them?

False positives cannot be avoided. OWASP also says there are many, and that it is often hard to prove whether a finding is a real vulnerability. Do not trust the tool's output as it is. Have a person check it and put in order only the holes that can really be abused.

I am uneasy about handing over my source code. How does it go?

We sign a nondisclosure agreement before any assessment or work. For an assessment we also need a consent form in which you agree the targets, period, and method. We take the code only after the scope is settled.

Next step

The free URL check shows only what is visible from outside, so it cannot tell you whether your system needs a code review. The scope of an assessment that reads code is in source code assessment. To talk through how to proceed, contact us.

Frequently asked questions

Is static analysis alone enough for a vulnerability assessment?

No. OWASP says static analysis has trouble finding authentication problems, access control flaws, wrong use of cryptography, and configuration problems. Combining it with dynamic testing, which actually runs the site and tries things, widens what you can see.

I hear static analysis gives many false positives. How should I treat them?

False positives cannot be avoided. OWASP also says there are many, and that it is often hard to prove whether a finding is a real vulnerability. Do not trust the tool's output as it is. Have a person check it and put in order only the holes that can really be abused.

I am uneasy about handing over my source code. How does it go?

We sign a nondisclosure agreement before any assessment or work. For an assessment we also need a consent form in which you agree the targets, period, and method. We take the code only after the scope is settled.

See what an attacker can see, today

The free URL check returns a grade in under a minute. For costs and next steps, book a free consultation.