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

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

# Function: collectMetadataFiles()

> **collectMetadataFiles**(`paths`): `object`[]

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

Collects metadata files to scan below the given paths: services.xml,
preferences.xml, metadata (attribute definitions), the CSRF allowlist, and
OCAPI settings JSON, wherever they are (site archives, site_template
folders). Files are recognized by their XML root element or OCAPI settings
file name.

## Parameters

### paths

readonly `string`[]

## Returns

`object`[]
