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

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

# Function: parseSuppressions()

> **parseSuppressions**(`comments`): [`InlineSuppression`](../interfaces/InlineSuppression.md)[]

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

Parses `b2c-dx-disable-next-line` and `b2c-dx-disable-line` comments.

A suppression must name one or more rule IDs (comma- or space-separated);
a reason after `--` (or ` - `, for XML comments, which can't contain `--`) is optional. IDs may carry the `b2c-security/` prefix.

## Parameters

### comments

readonly `object`[]

## Returns

[`InlineSuppression`](../interfaces/InlineSuppression.md)[]

## Example

```js
// b2c-dx-disable-next-line open-redirect -- target is checked by isSafeRedirect()
res.redirect(req.querystring.returnUrl);
```
