Static application security testing: Difference between revisions

Content deleted Content added
"long out" does not mean anything
m Minor writing enhancements and linking
 
(One intermediate revision by one other user not shown)
Line 1:
{{Short description|Software securing application}}
'''Static application security testing''' ('''SAST''') is used to secure [[software]] by reviewing theits [[source code of the software]] to identify sources ofsecurity vulnerabilities. Although the process of [[Informal methods of validation and verification#Desk checking|checking programs by reading their code ]] (modernly known as [[Static program analysis|static program analysis]]) has existed as long as computers have existed, the technique spread to security in the late 90s and the first public discussion of [[SQL injection]] in 1998 when [[Web application|web applications]] integrated new technologies like [[JavaScript]] and [[Adobe Flash Player|Flash]].
 
Unlike [[dynamic application security testing]] (DAST) tools for [[black-box testing]] of application functionality, SAST tools focus on the code content of the application, [[white-box testing]]. A SAST tool scans the source code of applications and their components to identify potential security vulnerabilities in their software and architecture. Static analysis tools can detect an estimated 50% of existing security vulnerabilities in tested applications.<ref>
A SAST tool scans the source code of applications and its components to identify potential security vulnerabilities in their software and architecture.
Static analysis tools can detect an estimated 50% of existing security vulnerabilities.<ref>
{{Cite book
|last1=Okun|first1=V.
Line 37 ⟶ 35:
|publisher=IEEE
|doi=10.1109/MS.2008.130
}}</ref> even if the many resulting [[False positives and false negatives#False positive error|false-positive positives]] impede its adoption by developers.<ref name="ReferenceA">{{Cite book
|last1=Johnson|first1=Brittany
|last2=Song|first2=Yooki
Line 60 ⟶ 58:
|pages=86–103
|publisher=Springer
}}</ref> SAST tools, like other security tools, focus on reducing the risk of downtime of applications or that private information stored in applications willis not be compromised.
}}</ref>
SAST tools, like other security tools, focus on reducing the risk of downtime of applications or that private information stored in applications will not be compromised.
 
For the year of 2018, the Privacy Rights Clearinghouse database<ref>{{Cite web|url=https://privacyrights.org/data-breaches|title=Data Breaches &#124; Privacy Rights Clearinghouse|website=privacyrights.org}}</ref> shows that more than 612 million records in the [[United States]] have been compromised by hacking.
 
==Overview==
 
Application security tests ofconducted applicationsbefore their release: include static application security testing (SAST), [[dynamic application security testing]] (DAST), and [[interactive application security testing]] (IAST), which is a combination of the two.<ref name="auto1">
{{Cite book
|last1=Parizi|first1=R. M.
Line 84 ⟶ 81:
}}</ref>
 
Static analysis tools examine the text of a program syntactically. They look for a fixed set of patterns or rules in the source code. Theoretically, they can also examine a compiled form of the software. This technique relies on [[instrumentation]] of the code to do the mapping between compiled components and source code components to identify issues. Static analysis can be done manually as a [[code review]] or [[Software audit review|auditing]] of the code for different purposes, including security, but it is time-consuming.<ref>
Static analysis can be done manually as a [[code review]] or [[Software audit review|auditing]] of the code for different purposes, including security, but it is time-consuming.<ref>
{{Cite journal
|last1=Chess|first1=B.
Line 99 ⟶ 95:
}}</ref>
 
The precision of SAST tooltools is determined by itstheir scope of analysis and the specific techniques used to identify vulnerabilities. Different levels of analysis include the following:
* [[Subroutine|functionFunction level]]: - sequencesSequences of instruction.
* [[Class (computer programming)|fileFile or class- level]]: - anAn extensible program-code-template for object creation.
* [[Application software|applicationApplication level]]: - aA program or group of programs that interact.
The scope of the analysis determines its accuracy and capacity to detect vulnerabilities using contextual information.<ref>
{{Cite journal
Line 116 ⟶ 112:
|doi=10.1109/MSP.2004.55
|doi-access=free
}}</ref> SAST tools, unlike [[Dynamic application security testing|DAST]] givestools, thegive developers real-time feedback, and help them secure flaws before they move the code to the next level.
 
At a function level, a common technique is the construction of an [[Abstract syntax tree]] to control the flow of data within the function.<ref>
Line 135 ⟶ 131:
}}</ref>
 
Since the late 90s, the need to adapt to business challenges has transformed software development with componentization<ref>
{{Cite journal
|last1=Booch |first1=Grady
Line 159 ⟶ 155:
|journal=Information Systems Management
|doi=10.1201/1078.10580530/46108.23.3.20060601/93704.3
}}</ref> Following the flow of data between all the components of an application or group of applications allows validation of required calls to dedicated procedures for [[Code injection#Preventing problems|sanitization]] and that proper actions are taken to taint data in specific pieces of code.<ref>
}}</ref>
Following the flow of data between all the components of an application or group of applications allows validation of required calls to dedicated procedures for [[Code injection#Preventing problems|sanitization]] and that proper actions are taken to taint data in specific pieces of code.<ref>
{{Cite journal
|last1=Livshits|first1=V.B.
Line 184 ⟶ 179:
}}</ref>
 
The rise of web applications entailed testing them: Verizon Data Breach reportsreported in 2016 that 40% of all data breaches use web application vulnerabilities.<ref name=DBI_1>{{cite web| title=2016 Data Breach Investigations Report| url=https://www.verizon.com/business/resources/Ta80/reports/DBIR_2016_Report.pdf| publisher=[[Verizon]]| date=2016| access-date=8 January 2016}}</ref> Both external security validations and a focus on internal threats have risen. The Clearswift Insider Threat Index (CITI) has reported that 92% of their respondents in a 2015 survey said they had experienced IT or security incidents in the previous 12 months and that 74% of these breaches were originated by insiders.<ref name=CITI_2>{{cite web| title=Clearswift report: 40 percent of firms expect a data breach in the Next Year| url=https://www.securityinfowatch.com/cybersecurity/information-security/press-release/12141612/clearview-clearswift-report-40-percent-of-firms-expect-a-data-breach-in-the-next-year| publisher=Endeavor Business Media| date=20 November 2015| access-date=8 January 2024}}</ref><ref name=CITI_1>{{cite web| title=The Ticking Time Bomb: 40% of Firms Expect an Insider Data Breach in the Next 12 Months| url=https://www.clearswift.com/resources/press-releases/ticking-time-bomb-40-firms-expect-insider-data-breach-next-12-months| publisher=Fortra| date=18 November 2015| access-date=8 January 2024}}</ref> Lee Hadlington categorized internal threats in 3 categories: malicious, accidental, and unintentional. Mobile applications' explosive growth implies securing applications earlier in the development process to reduce malicious code development.<ref>
As well as external security validations, there is a rise in focus on internal threats. The Clearswift Insider Threat Index (CITI) has reported that 92% of their respondents in a 2015 survey said they had experienced IT or security incidents in the previous 12 months and that 74% of these breaches were originated by insiders.<ref name=CITI_2>{{cite web| title=Clearswift report: 40 percent of firms expect a data breach in the Next Year| url=https://www.securityinfowatch.com/cybersecurity/information-security/press-release/12141612/clearview-clearswift-report-40-percent-of-firms-expect-a-data-breach-in-the-next-year| publisher=Endeavor Business Media| date=20 November 2015| access-date=8 January 2024}}</ref><ref name=CITI_1>{{cite web| title=The Ticking Time Bomb: 40% of Firms Expect an Insider Data Breach in the Next 12 Months| url=https://www.clearswift.com/resources/press-releases/ticking-time-bomb-40-firms-expect-insider-data-breach-next-12-months| publisher=Fortra| date=18 November 2015| access-date=8 January 2024}}</ref> Lee Hadlington categorized internal threats in 3 categories: malicious, accidental, and unintentional. Mobile applications' explosive growth implies securing applications earlier in the development process to reduce malicious code development.<ref>
{{Cite book
|last1=Xianyong|first1=Meng
Line 212 ⟶ 206:
|pages=35–50
|url=https://computerresearch.org/index.php/computer/article/view/1780
}}</ref> SAST tools run automatically, either at the code level or application-level and do not require interaction. When integrated into a [[CI/CD]] context, SAST tools can be used to automatically stop the integration process if critical vulnerabilities are identified.<ref>
}}</ref>
SAST tools run automatically, either at the code level or application-level and do not require interaction. When integrated into a CI/CD context, SAST tools can be used to automatically stop the integration process if critical vulnerabilities are identified.<ref>
{{Cite book
|last1=Okun|first1=V.
Line 230 ⟶ 223:
}}</ref>
 
BecauseAnother theadvantage toolover scansother thetypes entireof source-code,testing itis canthat coverSAST 100%tools ofscan itthe entire source code, while [[dynamic application security testing]] coverstools cover its execution, possibly missing part of the application,<ref name="auto1"/> or unsecured configuration in configuration files.
 
SAST tools can offer extended functionalities such as quality and architectural testing. There is a direct correlation between thesoftware quality and the security. Bad quality software is also poorly secured software.<ref>
<ref>
{{Cite conference
|last1=Siavvas|first1=M.
Line 251 ⟶ 243:
 
==SAST weaknesses==
Even though developers are positive about the usage of SAST tools, there are different challenges to thetheir adoption of SAST tools by developers.<ref name="auto"/> TheAs usabilityan of the output generated by these tools may challenge how much developers can make use of these tools.example, Researchresearch shows that despite the long output generated by these tools, they may lack usability.<ref>{{cite book |last1=Tahaei |first1=Mohammad |last2=Vaniea |first2=Kami |last3=Beznosov |first3=Konstantin (Kosta) |last4=Wolters |first4=Maria K |title=Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems |chapter=Security Notifications in Static Analysis Tools: Developers' Attitudes, Comprehension, and Ability to Act on Them |date=6 May 2021 |pages=1–17 |doi=10.1145/3411764.3445616|isbn=9781450380966 |s2cid=233987670 |url=https://www.research.ed.ac.uk/en/publications/e1bc04ef-ae83-4e82-8ade-ca572bc503d2 }}</ref>
 
With [[Agile software development|Agile Processes]] in software development, early integration of SAST generates many bugs, as developers using this framework focus first on features and delivery.<ref>
{{Cite book
|last=Arreaza|first=Gustavo Jose Nieves
Line 266 ⟶ 258:
}}</ref>
 
Scanning many lines of code with SAST tools may result in hundreds or thousands of vulnerability warnings for a single application. It can generate many false- positives, increasing investigation time and reducing trust in such tools. This is particularly the case when the context of the vulnerability cannot be caught by the tool.<ref name="ReferenceA"/>
 
== See also ==