Skip to main content

app security check

Checks your app for Shopify-specific security issues.

Run it before you submit an app, and on every release, to catch Shopify-specific problems in your own code. For example, a committed credential, a query that isn't scoped to one shop, or a webhook nobody verifies.

Caution

This command is limited to checking your app's source code, and should be part of a layered approach to security. Read more about improving the security of your app.

The recommended way to run it is through your coding agent with Shopify AI Toolkit installed. Ask your agent:

Example prompt

/shopify Check my app for security vulnerabilities

Your agent runs this command, investigates the checks that can't be determined by code inspection alone, and walks you through the results. Running the command on its own gives you only the deterministic scan, plus instructions that you can hand to your coding agent. For the full flow, see app security checks.

Results are stored in .shopify/app-security/.

The following flags are available for the app security check command:

Anchor to --blocking <value>
--blocking <value>
string
env: SHOPIFY_FLAG_APP_SECURITY_BLOCKING

The minimum finding severity that causes a non-zero exit code: high, medium, or low. Defaults to none, which never fails on findings.

Anchor to --client-id <value>
--client-id <value>
string
env: SHOPIFY_FLAG_CLIENT_ID

The Client ID of your app.

Anchor to --exclude <value>
--exclude <value>
string

Skip paths that match this glob, relative to the working directory. Repeat the flag to add globs. The selected app configuration file can't be excluded.

Anchor to --include-dir <value>
--include-dir <value>
string

Also scan this directory, relative to the working directory. Repeat the flag to add directories. Use it for code that lives outside the app directory, such as a backend or a shared library.

Anchor to --json-schema
--json-schema
env: SHOPIFY_FLAG_JSON_SCHEMA

Print the command's JSON schemas.

Anchor to --list-files
--list-files
env: SHOPIFY_FLAG_LIST_FILES

Print the files the check would gather, one path per line, and stop. Nothing is scanned, no results are written, and nothing is prompted for.

Anchor to --no-color
--no-color
env: SHOPIFY_FLAG_NO_COLOR

Disable color output.

Anchor to --no-git-ignore
--no-git-ignore
env: SHOPIFY_FLAG_NO_GIT_IGNORE

Turn off Git ignore rules for every scanned directory, so files that Git ignores are scanned too. Files that Git tracks are always scanned.

Anchor to --no-input
--no-input
env: SHOPIFY_FLAG_NO_INPUT

Disable interactive prompts and browser authentication.

Anchor to --path <value>
--path <value>
string
env: SHOPIFY_FLAG_PATH

The path to your app directory.

Anchor to --print-instructions
--print-instructions
env: SHOPIFY_FLAG_APP_SECURITY_PRINT_INSTRUCTIONS

Print coding-agent instructions without prompting for how to deliver them.

Anchor to --skip-instructions
--skip-instructions
env: SHOPIFY_FLAG_APP_SECURITY_SKIP_INSTRUCTIONS

Don't offer the coding-agent instructions after the scan. Use it when you want only the deterministic scan results.

Anchor to --verbose
--verbose
env: SHOPIFY_FLAG_VERBOSE

Increase the verbosity of the output. May include sensitive data.

Anchor to --without-app-config
--without-app-config
env: SHOPIFY_FLAG_WITHOUT_APP_CONFIG

Scan --path as an app with no app configuration file. Config checks are skipped. Requires --client-id.

Anchor to -c, --config <value>
-c, --config <value>
string
env: SHOPIFY_FLAG_APP_CONFIG

The name of the app configuration.

Examples

app security check

shopify app security check

To learn more about the individual checks that this command runs, see app security checks.

After the check, your coding agent records its findings with app security record, and app security review shows the combined results. Without a coding agent, you get only the deterministic scan results from this command. You don't run app security record yourself: it only accepts the findings document that your agent writes. To give your agent the whole workflow at another time, starting with a fresh scan, run app security instructions. Pass the same --path, --config, --client-id, and --without-app-config flags to every app security command so that they all use the same results. To delete the results, run app security clean.

Each check carries a severity, and each finding takes the severity of the check that reported it.

SeverityWhat to do about a finding
HighFix it before you ship: it puts shop data or shop access at risk.
MediumFix it in the same pass where you can. It weakens a boundary without breaking it outright.
LowFix it soon. It isn't an immediate risk, but left alone, your app stops getting security fixes.

Was this page helpful?