{"version":"2.1.221","anchor":"sandbox-credentials-files-gains-a-mask-mode-with-regex-extra","canonical_anchor":"sandbox-credentials-files-gains-a-mask-mode-with-regex-extra","heading":"sandbox.credentials.files gains a mask mode with regex extraction","tier":"use","area":"Sandbox","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221\/e\/sandbox-credentials-files-gains-a-mask-mode-with-regex-extra","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221","markdown":"### sandbox.credentials.files gains a `mask` mode with regex extraction\n\nYou can mask secrets in credential files so sandboxed commands see placeholders while real values are swapped in on egress.\n\n**What**\n\nCredential file entries used to accept only `deny`; the settings schema now takes an enum of `deny` and `mask`, where masked files are shown to sandboxed commands as a sentinel-substituted copy and the host proxy swaps sentinel for the real secret on egress.\n\n**Details**\n\n- new sibling keys: `extract` (a regex whose capture group 1 is the secret, so .netrc, JSON and YAML files still parse), `onExtractNoMatch` (`warn` is the default and fails open, `deny` fails closed, `error` aborts sandbox setup), `maskDuplicates`, and `injectHosts` (defaults to network.allowedDomains)\n- config validation rejects `mask` on a directory path and rejects an `extract` regex with no capturing group\n- the sandbox config builder was rewritten for this and now warns on empty injectHosts and on mask entries that degrade to deny\n- the schema states mask currently degrades to deny on macOS and Windows\n\n**Evidence**\n\n`extract must contain at least one capturing group \u2014 `\n\n- Area: Sandbox\n- Names: `sandbox.credentials.files`, `mask`, `extract`, `onExtractNoMatch`, `maskDuplicates`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 0\/5"}