sarif-v2.1.0-os 27 March 2020
Standards Track Work Product Copyright © OASIS Open 2020. All Rights Reserved. Page 1 of 227
Static Analysis Results Interchange
Format (SARIF) Version 2.1.0
OASIS Standard
27 March 2020
This stage:
https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.docx (Authoritative)
https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html
https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.pdf
Previous stage:
https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos01/sarif-v2.1.0-cos01.docx (Authoritative)
https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos01/sarif-v2.1.0-cos01.html
https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos01/sarif-v2.1.0-cos01.pdf
Latest stage:
https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.docx (Authoritative)
https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html
https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.pdf
Technical Committee:
OASIS Static Analysis Results Interchange Format (SARIF) TC
Chairs:
David Keaton (dmk@dmk.com), Individual Member
Luke Cartey (luke@semmle.com), Semmle
Editors:
Michael C. Fanning (mikefan@microsoft.com), Microsoft
Laurence J. Golding (v-lgold@microsoft.com), Microsoft
Additional artifacts:
This prose specification is one component of a Work Product that also includes:
� JSON schemas: https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos02/schemas/
Abstract:
This document defines a standard format for the output of static analysis tools. The format is referred to
as the “Static Analysis Results Interchange Format” and is abbreviated as SARIF.
Status:
This document was last revised or approved by the membership of OASIS on the above date. The level
of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions
of this document. Any other numbered Versions and other technical work produced by the Technical
Committee (TC) are listed at https://www.oasis-
open.org/committees/tc_home.php?wg_abbrev=sarif#technical.
TC members should send comments on this document to the TC's email list. Others should send
comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send
A Comment" button on the TC's web page at https://www.oasis-open.org/committees/sarif/.
This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode
chosen when the Technical Committee was established. For information on whether any patents have
been disclosed that may be essential to implementing this specification, and any offers of patent licensing
sarif-v2.1.0-os 27 March 2020
Standards Track Work Product Copyright © OASIS Open 2020. All Rights Reserved. Page 2 of 227
terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-
open.org/committees/sarif/ipr.php).
Note that any machine-readable content (Computer Language Definitions) declared Normative for this
Work Product is provided in separate plain text files. In the event of a discrepancy between any such
plain text file and display content in the Work Product's prose narrative document(s), the content in the
separate plain text file prevails.
Citation format:
When referencing this specification the following citation format should be used:
[SARIF-v2.1.0]
Static Analysis Results Interchange Format (SARIF) Version 2.1.0. Edited by Michael C. Fanning and
Laurence J. Golding. 27 March 2020. OASIS Standard. https://docs.oasis-
open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html. Latest stage: https://docs.oasis-
open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html.
sarif-v2.1.0-os 27 March 2020
Standards Track Work Product Copyright © OASIS Open 2020. All Rights Reserved. Page 3 of 227
Notices
Copyright © OASIS Open 2020. All Rights Reserved.
All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual
Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.
This document and translations of it may be copied and furnished to others, and derivative works that
comment on or otherwise explain it or assist in its implementation may be prepared, copied, published,
and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice
and this section are included on all such copies and derivative works. However, this document itself may
not be modified in any way, including by removing the copyright notice or references to OASIS, except as
needed for the purpose of developing any document or deliverable produced by an OASIS Technical
Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must
be followed) or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors
or assigns.
This document and the information contained herein is provided on an "AS IS" basis and OASIS
DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY
OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
OASIS requests that any OASIS Party or any other party that believes it has patent claims that would
necessarily be infringed by implementations of this OASIS Committee Specification or OASIS Standard,
to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to
such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that
produced this specification.
OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of
any patent claims that would necessarily be infringed by implementations of this specification by a patent
holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR
Mode of the OASIS Technical Committee that produced this specification. OASIS may include such
claims on its website, but disclaims any obligation to do so.
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that
might be claimed to pertain to the implementation or use of the technology described in this document or
the extent to which any license under such rights might or might not be available; neither does it
represent that it has made any effort to identify any such rights. Information on OASIS' procedures with
respect to rights in any document or deliverable produced by an OASIS Technical Committee can be
found on the OASIS website. Copies of claims of rights made available for publication and any
assurances of licenses to be made available, or the result of an attempt made to obtain a general license
or permission for the use of such proprietary rights by implementers or users of this OASIS Committee
Specification or OASIS Standard, can be obtained from the OASIS TC Administrator. OASIS makes no
representation that any information or list of intellectual property rights will at any time be complete, or
that any claims in such list are, in fact, Essential Claims.
The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be
used only to refer to the organization and its official outputs. OASIS welcomes reference to, and
implementation and use of, specifications, while reserving the right to enforce its marks against
misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark for above
guidance.
sarif-v2.1.0-os 27 March 2020
Standards Track Work Product Copyright © OASIS Open 2020. All Rights Reserved. Page 4 of 227
Table of Contents
1 Introduction ........................................................................................................................................16
1.1 IPR Policy.........................................................................................................................................16
1.2 Terminology......................................................................................................................................16
1.3 Normative References......................................................................................................................22
1.4 Non-Normative References..............................................................................................................24
1.5 Trademarks ......................................................................................................................................24
2 Conventions .......................................................................................................................................25
2.1 General.............................................................................................................................................25
2.2 Format examples..............................................................................................................................25
2.3 Property notation ..............................................................................................................................25
2.4 Syntax notation.................................................................................................................................25
2.5 Commonly used objects ...................................................................................................................25
3 File format ..........................................................................................................................................27
3.1 General.............................................................................................................................................27
3.2 SARIF file naming convention ..........................................................................................................27
3.3 artifactContent object .......................................................................................................................27
3.3.1 General .....................................................................................................................................27
3.3.2 text property ..............................................................................................................................27
3.3.3 binary property ..........................................................................................................................27
3.3.4 rendered property......................................................................................................................28
3.4 artifactLocation object ......................................................................................................................28
3.4.1 General .....................................................................................................................................28
3.4.2 Constraints ................................................................................................................................28
3.4.3 uri property ................................................................................................................................29
3.4.4 uriBaseId property.....................................................................................................................29
3.4.5 index property ...........................................................................................................................30
3.4.6 description property...................................................................................................................31
3.4.7 Guidance on the use of artifactLocation objects .......................................................................32
3.5 String properties ...............................................................................................................................32
3.5.1 Localizable strings.....................................................................................................................32
3.5.2 Redactable strings ....................................................................................................................33
3.5.3 GUID-valued strings..................................................................................................................33
3.5.4 Hierarchical strings....................................................................................................................33
3.5.4.1 General ...............................................................................................................................................33
3.5.4.2 Versioned hierarchical strings.............................................................................................................34
3.6 Object properties ..............................................................................................................................34
3.7 Array properties................................................................................................................................34
3.7.1 General .....................................................................................................................................34
3.7.2 Default value .............................................................................................................................34
3.7.3 Array properties with unique values..........................................................................................35
3.7.4 Array indices .............................................................................................................................35
3.8 Property bags ...................................................................................................................................35
3.8.1 General .....................................................................................................................................35
3.8.2 Tags ..........................................................................................................................................35
sarif-v2.1.0-os 27 March 2020
Standards Track Work Product Copyright © OASIS Open 2020. All Rights Reserved. Page 5 of 227
3.8.2.1 General ...............................................................................................................................................35
3.8.2.2 Tag metadata......................................................................................................................................36
3.9 Date/time properties .........................................................................................................................37
3.10 URI-valued properties ....................................................................................................................37
3.10.1 General ...................................................................................................................................37
3.10.2 Normalizing file scheme URIs .................................................................................................38
3.10.3 URIs that use the sarif scheme...............................................................................................39
3.10.4 Internationalized Resource Identifiers (IRIs)...........................................................................40
3.11 message object ..............................................................................................................................40
3.11.1 General ...................................................................................................................................40
3.11.2 Constraints ..............................................................................................................................40
3.11.3 Plain text messages................................................................................................................40
3.11.4 Formatted messages ..............................................................................................................41
3.11.4.1 General .............................................................................................................................................41
3.11.4.2 Security implications .........................................................................................................................41
3.11.5 Messages with placeholders...................................................................................................41
3.11.6 Messages with embedded links ..............................................................................................42
3.11.7 Message string lookup ............................................................................................................44
3.11.8 text property ............................................................................................................................45
3.11.9 markdown property .................................................................................................................45
3.11.10 id property .............................................................................................................................45
3.11.11 arguments property...............................................................................................................45
3.12 multiformatMessageString object ...................................................................................................46
3.12.1 General ...................................................................................................................................46
3.12.2 Localizable multiformatMessageStrings..................................................................................46
3.12.3 text property ............................................................................................................................46
3.12.4 markdown property .................................................................................................................46
3.13 sarifLog object ................................................................................................................................46
3.13.1 General ...................................................................................................................................46
3.13.2 version property ......................................................................................................................47
3.13.3 $schema property ...................................................................................................................47
3.13.4 runs property ...........................................................................................................................47
3.13.5 inlineExternalProperties property............................................................................................47
3.14 run object........................................................................................................................................49
3.14.1 General ...................................................................................................................................49
3.14.2 externalPropertyFileReferences property ...............................................................................49
3.14.3 automationDetails property .....................................................................................................49
3.14.4 runAggregates property ..........................................................................................................49
3.14.5 baselineGuid property.............................................................................................................49
3.14.6 tool property ............................................................................................................................49
3.14.7 language .................................................................................................................................50
3.14.8 taxonomies property................................................................................................................50
3.14.9 translations property................................................................................................................50
3.14.10 policies property ....................................................................................................................50
3.14.11 invocations property..............................................................................................................50
3.14.12 conversion property...............................................................................................................50