PHPackages                             bartlett/sarif-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bartlett/sarif-php-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bartlett/sarif-php-sdk
======================

PHP library to create and manipulate SARIF logs

2.3.0(3mo ago)1078.7k↑76.4%4MITPHPPHP ^7.4 || ^8.0CI passing

Since Nov 9Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/llaville/sarif-php-sdk)[ Packagist](https://packagist.org/packages/bartlett/sarif-php-sdk)[ RSS](/packages/bartlett-sarif-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (27)Used By (4)

SARIF PHP SDK
=============

[](#sarif-php-sdk)

[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)[![GitHub Discussions](https://camo.githubusercontent.com/9607d34c6f1b8793274c9ba770e41a43996168f9295cbc56f510c4e49567301b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f64697363757373696f6e732f6c6c6176696c6c652f73617269662d7068702d73646b)](https://github.com/llaville/sarif-php-sdk/discussions)

ReleasesBranchPHPPackagistLicenseDocumentationStable v1.0.x[![Branch 1.0](https://camo.githubusercontent.com/fe1cf10ae654b15922a54e444e5c23f782fc9b781b8d24f32b866a808f058a14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6272616e63682d312e302d6f72616e6765)](https://github.com/llaville/sarif-php-sdk/tree/1.0)[![Minimum PHP Version)](https://camo.githubusercontent.com/f8e5e3f9e360495a01dacf70c5963d1e71858d6acb080df4cd26e4dc6314b702/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626172746c6574742f73617269662d7068702d73646b2f312e302e31)](https://www.php.net/supported-versions.php)[![Stable Version 1.0](https://camo.githubusercontent.com/5b8f929d95bea4d849c8c3ff66a514565a2b7c3b50f6cfc9eada02ddcb740e80/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76312e302e312d626c7565)](https://packagist.org/packages/bartlett/sarif-php-sdk)[![License 1.0](https://camo.githubusercontent.com/d89e2a74c93de5f97176c7f8134601a701c59686f296510ef213224a2ea0fdc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626172746c6574742f73617269662d7068702d73646b)](https://github.com/llaville/sarif-php-sdk/blob/1.0/LICENSE)[![Documentation 1.0](https://camo.githubusercontent.com/2af568c5d303da11e5e21de55eb5a997291c4faeccfdfa802e86409aa78d22fc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d76312e302d677265656e)](https://github.com/llaville/sarif-php-sdk/tree/1.0/docs)Stable v1.5.x[![Branch 1.5](https://camo.githubusercontent.com/259e332182673602549e3f9bdd40afd0bc3f5218758b511bbae5cd4d0b464994/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6272616e63682d312e352d6f72616e6765)](https://github.com/llaville/sarif-php-sdk/tree/1.5)[![Minimum PHP Version)](https://camo.githubusercontent.com/d7b51754b5b154d06b2c0f3c4d9ea164aa9f1bde1e22c2759353ebe7b5df4c3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626172746c6574742f73617269662d7068702d73646b2f312e352e30)](https://www.php.net/supported-versions.php)[![Stable Version 1.5](https://camo.githubusercontent.com/58ba5db8bec67ebd5ce7819b99737f605395873e72c13480280e58144dcef8a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76312e352e302d626c7565)](https://packagist.org/packages/bartlett/sarif-php-sdk)[![License 1.5](https://camo.githubusercontent.com/d89e2a74c93de5f97176c7f8134601a701c59686f296510ef213224a2ea0fdc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626172746c6574742f73617269662d7068702d73646b)](https://github.com/llaville/sarif-php-sdk/blob/1.5/LICENSE)[![Documentation 1.5](https://camo.githubusercontent.com/71d9dc71aef19f493cfff5def701ed05b67ee604f6e8cbf1d55c8a724b1055e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d76312e352d677265656e)](https://github.com/llaville/sarif-php-sdk/tree/1.5/docs)Stable v2.0.x[![Branch 2.0](https://camo.githubusercontent.com/1cffd5da28333bb284bbdc3a1b2449b8ec79799c25fa624ccfd132f6882c9ff4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6272616e63682d322e302d6f72616e6765)](https://github.com/llaville/sarif-php-sdk/tree/2.0)[![Minimum PHP Version)](https://camo.githubusercontent.com/b9c1c8b41f6f4ebc94367471145c979da9425fb9e26161064836baa0ca840708/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626172746c6574742f73617269662d7068702d73646b2f322e302e31)](https://www.php.net/supported-versions.php)[![Stable Version 2.0](https://camo.githubusercontent.com/dc6ceebff5a0c8d54877256a5a8bf5d150015ea077e5ecd43656ddcc54b6198f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76322e302e312d626c7565)](https://packagist.org/packages/bartlett/sarif-php-sdk)[![License 2.0](https://camo.githubusercontent.com/d89e2a74c93de5f97176c7f8134601a701c59686f296510ef213224a2ea0fdc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626172746c6574742f73617269662d7068702d73646b)](https://github.com/llaville/sarif-php-sdk/blob/2.0/LICENSE)[![Documentation 2.0](https://camo.githubusercontent.com/50e0f2d2e4c13cab5a634b9d72ecc8fc84a850fc60fd7e0e4777755812f1840a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d76322e302d677265656e)](https://github.com/llaville/sarif-php-sdk/tree/2.0/docs)Stable v2.1.x[![Branch 2.1](https://camo.githubusercontent.com/792b8c6ec95caffc936b3bc7d95331008871d6e59242e1bc78d850c24f995f75/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6272616e63682d322e312d6f72616e6765)](https://github.com/llaville/sarif-php-sdk/tree/2.1)[![Minimum PHP Version)](https://camo.githubusercontent.com/500540d1332e9fb8f9018917e366fb51baa0190119497d7d4851e5277a1cabbf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626172746c6574742f73617269662d7068702d73646b2f322e312e31)](https://www.php.net/supported-versions.php)[![Stable Version 2.1](https://camo.githubusercontent.com/b7f0dcbe4bbd9597fde06ef4aa8382b4e88fcb667696434bf986856f5f357160/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76322e312e312d626c7565)](https://packagist.org/packages/bartlett/sarif-php-sdk)[![License 2.1](https://camo.githubusercontent.com/d89e2a74c93de5f97176c7f8134601a701c59686f296510ef213224a2ea0fdc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626172746c6574742f73617269662d7068702d73646b)](https://github.com/llaville/sarif-php-sdk/blob/2.1/LICENSE)[![Documentation 2.1](https://camo.githubusercontent.com/38d40a1875f71166ac98c83aeb98a09ad628ce6e4e4be510d014f30255b1b4bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d76322e312d677265656e)](https://github.com/llaville/sarif-php-sdk/tree/2.1/docs)Stable v2.2.x[![Branch 2.2](https://camo.githubusercontent.com/6538eb8c5e17619d606cfd4113379097e48a39a5bc5fc5b8a9c6c52e4f6412b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6272616e63682d322e322d6f72616e6765)](https://github.com/llaville/sarif-php-sdk/tree/2.2)[![Minimum PHP Version)](https://camo.githubusercontent.com/10bfd4a66033ed47a7be89a9f4feef1c2ddadbbc1db7b922472f0f01d3d3d3a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626172746c6574742f73617269662d7068702d73646b2f322e322e31)](https://www.php.net/supported-versions.php)[![Stable Version 2.2](https://camo.githubusercontent.com/311dfe5e9a5aaecea4fb440b3a2d47bab6d669b19f15fec79d79bbfe22039007/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76322e322e312d626c7565)](https://packagist.org/packages/bartlett/sarif-php-sdk)[![License 2.2](https://camo.githubusercontent.com/d89e2a74c93de5f97176c7f8134601a701c59686f296510ef213224a2ea0fdc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626172746c6574742f73617269662d7068702d73646b)](https://github.com/llaville/sarif-php-sdk/blob/2.2/LICENSE)[![Documentation 2.2](https://camo.githubusercontent.com/7841d4f42fb9f722928773a77fe086d92d4dfa23f121042499964dc65fd260b2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d76322e322d677265656e)](https://github.com/llaville/sarif-php-sdk/tree/2.2/docs)Stable v2.3.x[![Branch 2.3](https://camo.githubusercontent.com/3114d4007fd6f4983e8d1833480f70ffd0e16191b43e0263b928a37b3e7d88e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6272616e63682d322e332d6f72616e6765)](https://github.com/llaville/sarif-php-sdk/tree/2.3)[![Minimum PHP Version)](https://camo.githubusercontent.com/da99d18b0aa6f1cb96bef19d06bbfac5f8cc3b1e4f9ca8aac570c18ab2b4ce44/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626172746c6574742f73617269662d7068702d73646b2f322e332e30)](https://www.php.net/supported-versions.php)[![Stable Version 2.3](https://camo.githubusercontent.com/186116d18c6fa59d6d0c79897069fd174eef8993d76c590fe94f870c41177efb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76322e332e302d626c7565)](https://packagist.org/packages/bartlett/sarif-php-sdk)[![License 2.3](https://camo.githubusercontent.com/d89e2a74c93de5f97176c7f8134601a701c59686f296510ef213224a2ea0fdc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626172746c6574742f73617269662d7068702d73646b)](https://github.com/llaville/sarif-php-sdk/blob/2.3/LICENSE)[![Documentation 2.3](https://camo.githubusercontent.com/0d31a1d01afc2e837ac9c1c3076db43524c34f6e81a093bca09a6336e6416194/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d76322e332d677265656e)](https://github.com/llaville/sarif-php-sdk/tree/2.3/docs)Introduction
------------

[](#introduction)

SARIF, the Static Analysis Results Interchange Format, defines a standard format for the output of static analysis tools. It is a powerful and sophisticated format suited to the needs of a wide variety of tools.

Specifications
--------------

[](#specifications)

Read the specification document for the Static Analysis Results Interchange Format (SARIF) version 2.1.0, in [HTML format](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html).

View and validate your SARIF files
----------------------------------

[](#view-and-validate-your-sarif-files)

- [Upload and explore your SARIF file](https://sarifweb.azurewebsites.net/Validation)

Documentation
-------------

[](#documentation)

All the documentation is available on [website](https://llaville.github.io/sarif-php-sdk/2.3), generated from the [docs](https://github.com/llaville/sarif-php-sdk/tree/2.3/docs) folder.

- API [Reference](docs/reference/README.md) describes all SARIF objects with examples.

or

- Builder API [reference](docs/builder/README.md) as an alternative to build SARIF objects with a fluent interface.

And also

- [Study the tutorials](https://github.com/microsoft/sarif-tutorials) from GitHub's Microsoft account.

Add support to SARIF report into your application
-------------------------------------------------

[](#add-support-to-sarif-report-into-your-application)

Please have a look on project [Sarif-PHP-Converters](https://github.com/llaville/sarif-php-converters) that already gave support to 9 and more converters, and learn how to build your own one !

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance80

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~64 days

Recently: every ~48 days

Total

25

Last Release

105d ago

Major Versions

1.5.x-dev → 2.0.02024-07-02

PHP version history (5 changes)1.0.0PHP ^7.1|^8.0

1.0.x-devPHP ^7.1 || ^8.0

1.1.0PHP ^7.4 || ^8.0

2.1.0PHP ^8.1

2.2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/555d494363fdc69e712d56b46d3b9bf3fe221f2dae8a0cf3c732b0138d54f192?d=identicon)[llaville](/maintainers/llaville)

---

Top Contributors

[![llaville](https://avatars.githubusercontent.com/u/364342?v=4)](https://github.com/llaville "llaville (316 commits)")

---

Tags

sarifsdk-phpsarif

### Embed Badge

![Health badge](/badges/bartlett-sarif-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/bartlett-sarif-php-sdk/health.svg)](https://phpackages.com/packages/bartlett-sarif-php-sdk)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
