Questions tagged [static-analysis]

Static analysis is the examination of computer source code without executing it. Most commonly static analysis is used to find bugs or ensure conformance to coding guidelines. The classic example is a compiler which finds lexical, syntactic and even some semantic mistakes. A source code security analyzer examines source code to detect and report weaknesses that can lead to security vulnerabilities.

Static analysis is the process of detecting errors and defects in software's source code. Although manual code review is technically static analysis, the term is most commonly used to refer to an automated code review process. Static code analysis (aka static analysis security testing or SAST) inputs source texts of programs and give recommendations to the programmer on what code fragments he/she should consider. Although an automated tool can not completely replace manual review, SAST is seen as by many organizations to be a cost effective supplement.

The tasks solved by static code analysis software can be divided into 3 categories:

  1. Detecting errors in programs.
  2. Recommendations on code formatting. Some static analyzers check if the source code corresponds to code formatting standards of practice such as the number of indents in various constructs, use of spaces/tabs, etc.
  3. Metrics computation. Static code analyzers can generate numerical values for properties of software or its specifications.

http://stackoverflow.com/questions/49716/what-is-static-code-analysis

SAST tools can employ model checking, data-flow analysis, abstract interpretation, and heuristic analysis. See Brian Chess, Jacob West (Fortify Software) (2007). Secure Programming with Static Analysis. Addison-Wesley. ISBN 978-0-321-42477-8, and the National Institute of Standards and Technology (NIST) Software Assurance Metrics and Tool Evaluation (SAMATE) Project

57 questions
69
votes
7 answers

Does one need to be a good programmer to perform secure source code analysis?

A person has good knowledge of overall security risks, knows what OWASP Top 10 vulnerabilities are, and has certifications like CEH, CISSP, OSCP, etc. which are more black-box testing. And also he has gone through the OWASP Testing Guide, Code…
Krishna Pandey
  • 1,497
  • 1
  • 16
  • 26
31
votes
9 answers

What should a security audit report include?

Background I'm in charge of auditing a medium-scale web application. I have audited web applications several times before, but I've always written a short PDF quickly explaining what I encountered and usually I'm the one who's gonna be fixing those…
Adi
  • 43,808
  • 16
  • 135
  • 167
18
votes
4 answers

Criteria for Evaluating Static Analysis Tools

As with any tools purchase part of the outcome is in how good the evaluation criteria are, so it is important to understand the criteria people might use when assessing Security static analysis tools. Obviously the weighting on each criterion would…
Rory McCune
  • 60,923
  • 14
  • 136
  • 217
11
votes
1 answer

How do I know if a font is malicious?

There are cases of fonts being used for exploiting vulnerabilities (for ex: ThreatPost, SecureList and F-Secure). My question is if you ever get hands on such a font, how do you know that it is malicious?
TheRookierLearner
  • 4,222
  • 8
  • 24
  • 28
10
votes
1 answer

List of methods in iOS that have been deprecated for security reasons?

Is anybody on the nets keeping track of iOS methods that have been deprecated by Apple for security reasons? I have searched around but with no luck. Going through all the deprecated methods and figuring out which ones have security implications…
Paul Ivanivsky
  • 159
  • 1
  • 5
10
votes
2 answers

What applicability does the Halting Problem have to infosec?

I was reading an infosec blog recently, and I was caught off guard by the following statement: Sure you can run up to date software and firewalls and that network appliance in your data center that apparently solves the halting problem... or you…
Mark E. Haase
  • 1,902
  • 2
  • 15
  • 24
10
votes
3 answers

Safely load a pickle file?

In our Python app, we are using pickle.load to load a file named perceptron.pkl. A HP Fortify static scan raises a high vulnerability, "Dynamic Code Evaluation - Unsafe Pickle Deserialization", at the same line. How can I remediate this? Is there…
Pro
  • 241
  • 3
  • 4
8
votes
4 answers

Static code review approach

My questions is related with static code analysis approach used by Veracode vs Fortify/AppScan. Veracode – Finds security flaws in application binaries and bytecode without requiring source Fortify/AppScan - Analyzes actual source code to identify…
5
votes
0 answers

AngularJS Static Analysis Tools

I am setting up a software security initiative at a small software company. Part of this is selecting a static analysis tool for early and automated detection of security vulnerabilities. Many languages have several incumbent static analysis tools.…
akton
  • 361
  • 3
  • 9
5
votes
1 answer

can Veracode be taught to accept mitigations that it does not yet recognize

Veracode (http://www.veracode.com/) has certain parameter encoding libraries that it trusts. Others are labeled as flaws. If I'm satisfied with another method of parameter encoding that is meant to stop XSS, can I tell Veracode to stop listing uses…
mcgyver5
  • 6,807
  • 2
  • 24
  • 45
4
votes
2 answers

Security Bugs in Scala Code

I'm currently reading "Software Security: Build Security In" by Gary McGraw, and he makes the distinction between security bugs and security flaws. Security bugs being implementation errors in code, and flaws being more on the architectural/design…
Nathan
  • 249
  • 1
  • 8
4
votes
1 answer

Making SQL/HTML Injection attacks programmatically impossible

Apparently having 100% prevention of SQL Injection and XSS attacks is easier said than done, but why? Can't static code analysis tools ensure that all user supplied input vectors (including user tainted variables) are sanitized? Or enforcing it…
ansichart
  • 777
  • 4
  • 12
4
votes
3 answers

Web Application Firewall using web app source code analysis

I read this page: Category:OWASP Best Practices: Use of Web Application Firewalls, and I found that WAF cannot generally detect logical attacks. We know each web application has a number of input parameters. I think these input parameters and their…
3
votes
1 answer

Sensitive information rendered into inline static javascript object vulnerability if user saves HTML page

I am using a javascript rendering template engine with node.js. I am rendering sensitive user information into a static javascript object which is then served to the client. However I realized if the user saves the the html page and uploads it this…
ROCK
  • 96
  • 6
3
votes
5 answers

Why companies do not simply use hackers' tools to find their own vulnerabilities prior to the release of their software?

It may be a silly question, but hackers do use publicly-available tools to find vulnerabilities. So why don't companies, before releasing their products (Windows, Adobe etc...), use the same tools to find those vulnerabilities and fix them? I don't…
Nick
  • 71
  • 1
  • 2
1
2 3 4