---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [security](../index.md) / toSarif

# Function: toSarif()

> **toSarif**(`findings`, `rules`, `options`): `object`

Defined in: [packages/b2c-tooling-sdk/src/security/sarif.ts:36](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d7ff38c7ca2b1411cd718b9554500c9416f00266/packages/b2c-tooling-sdk/src/security/sarif.ts#L36)

Converts findings to a SARIF 2.1.0 log for GitHub code scanning and other
SARIF consumers. File locations are relative to `%SRCROOT%`.

## Parameters

### findings

readonly [`SecurityFinding`](../interfaces/SecurityFinding.md)[]

### rules

readonly [`SecurityRuleInfo`](../interfaces/SecurityRuleInfo.md)[]

### options

[`ToSarifOptions`](../interfaces/ToSarifOptions.md) = `{}`

## Returns

`object`
