Skip to content

Examples: Modifications Across Scopes

Compact, end-to-end examples that combine global, app, and launch profile settings to illustrate how precedence and scope resolution work.

What You'll Learn

  • How to layer global, app, and launch profile settings for runtime and arguments
  • How scope precedence affects effective values such as runtime.clipboard.size
  • How to reason about final behavior when multiple scopes modify the same setting

Per-App: Runtime + Arguments

This example shows how to apply runtime and argument modifications at the app scope only.

json
{
  "id": "harden-chrome",
  "displayName": "Harden Chrome",
  "enabled": true,
  "priority": 100,
  "matchAll": [
    { "type": "targetPath", "pattern": ".*\\\\chrome\\.exe$", "patternType": "regex" }
  ],
  "action": "allow",
  "modifications": {
    "runtime": {
      "isolation": { "remoteSandbox": true },
      "visual": { "borderColor": "#80008200" }
    },
    "arguments": {
      "append": "--hide-crash-restore-bubble"
    }
  }
}

Effective Behavior

  • Authorizes Chrome based on a targetPath regex match.
  • Applies runtime settings at the app scope:
    • Enables remote sandbox isolation under runtime.isolation.remoteSandbox.
    • Sets a visual border color under runtime.visual.borderColor.
  • Appends one application argument (--hide-crash-restore-bubble) to the base shortcut arguments.
  • No global or launch profile overrides are present, so app-scope settings determine the effective behavior.

Global + Policy + Launch Profile

This example shows how a setting (clipboard size) and arguments resolve when configured at global, app (policy), and launch profile scopes.

json
{
  "configuration": {
    "launch": { "runtime": { "clipboard": { "size": 1000 } } }
  },
  "apps": [
    {
      "id": "google-chrome",
      "displayName": "Google Chrome",
      "enabled": true,
      "priority": 200,
      "matchAll": [
        { "type": "shortcutName", "pattern": "Google Chrome", "patternType": "exact" }
      ],
      "action": "allow",
      "modifications": {
        "runtime": { "clipboard": { "size": 500 } },
        "arguments": { "append": "--incognito" }
      },
      "profiles": [
        {
          "id": "chrome-diagnostic",
          "displayName": "Run Chrome (Diagnostic)",
          "runtime": { "clipboard": { "size": 200 } },
          "arguments": { "append": "--enable-logging=stderr" }
        }
      ]
    }
  ]
}

Effective Behavior

  • Clipboard size resolution (runtime.clipboard.size):
    • Global configuration: 1000.
    • App (policy) modifications: 500.
    • Launch profile modifications: 200.
    • Highest-precedence scope wins for the selected profile:
      • When the Launch Profile is selected: effective size is 200.
      • When the app runs without a profile: effective size is 500 (app scope).
  • Final arguments (no replace present):
    • Base shortcut arguments (if any), followed by app-scope append, followed by profile append:
      • --incognito --enable-logging=stderr when the profile is selected.
  • Ordering follows scope concatenation rules:
    • Global → App (policy) → Launch Profile for arguments that use append.
    • For scalar values like clipboard.size, precedence resolves to the highest scope that sets the value.

See also: