Help CenterContact support
All Custos: Store Security Scan articles

Metafields and files

Updated

On this page
  1. What it checks
  2. What it cannot read
  3. Fixing an unescaped output finding

Your theme is not the only way code can reach a buyer’s browser. Many themes and apps print metafields (extra fields on products, collections, pages and your shop) straight into the page. Files uploaded to Content > Files are served from Shopify’s own file host, so they look trusted. A theme check alone misses changes made this way.

The data scan in Pro covers them.

What it checks

  • Metafields on your shop, products, variants, collections, pages, blog posts and blogs, and metaobjects. Each value is fingerprinted, and new or changed values are reported. Values that contain script or frame tags, javascript: links, inline event handlers, meta refresh tags, long encoded blobs or links to unknown sites are flagged.
  • Unescaped metafield output: the app reads your theme’s code, including app block settings in templates, and finds every place a metafield is printed without escaping. Such a place lets any code stored in that metafield run on your store, so the app reports it and checks those metafields every day.
  • Files: .js, .html and .svg files in Content > Files, when they are added or their content changes.
  • URL redirects and menus: new redirects for the cart, checkout or account pages, redirects to other sites, and menu links to other sites.

What it cannot read

Apps can keep metafields in a space reserved for that app. Shopify does not let other apps read them, so this app cannot either. When such a metafield is printed on your storefront, the shopper walk still sees the code it produces.

Fixing an unescaped output finding

Ask your theme developer to print the metafield with Liquid’s escape filter or with metafield_tag, unless the field is meant to hold HTML that only you edit. The finding names the theme file and the metafield.

Built and supported by StoreFleet, Shopify app developers since 2021.