schema_version: 1
platform: windows
security_domain_id: finshield.opencode
integrations:
- opencode
policy:
  filesystem_coverage:
    root: read_write
    rules:
    - id: host-recycle-bin
      source: windows_mandatory
      path: $Recycle.Bin
      access: host
      lifecycle: existing
      inheritance: descendants
  filesystem:
  - id: opencode-plugin-install-root
    source: opencode_compatibility
    path: ${FINSAFE_INSTALL_DIR}\..
    access: read_only
    lifecycle: existing
    inheritance: descendants
  - id: opencode-cache
    source: opencode_compatibility
    path: '{opencode_cache_dir}'
    access: read_write
    lifecycle: prepare_created
    inheritance: descendants
  - id: opencode-config
    source: opencode_compatibility
    path: '{opencode_config_dir}'
    access: read_write
    lifecycle: prepare_created
    inheritance: descendants
  - id: opencode-data
    source: opencode_compatibility
    path: '{opencode_data_dir}'
    access: read_write
    lifecycle: prepare_created
    inheritance: descendants
  - id: opencode-default-workspace
    source: opencode_compatibility
    path: '{opencode_default_workspace}'
    access: read_write
    lifecycle: prepare_created
    inheritance: descendants
  - id: opencode-state
    source: opencode_compatibility
    path: '{opencode_state_dir}'
    access: read_write
    lifecycle: prepare_created
    inheritance: descendants
  - id: deny-360se-profile
    source: windows_mandatory
    path: ${APPDATA}\360se6\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-bitwarden-desktop
    source: windows_mandatory
    path: ${APPDATA}\Bitwarden
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-bitwarden-cli
    source: windows_mandatory
    path: ${APPDATA}\Bitwarden CLI
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-dingtalk-state
    source: windows_mandatory
    path: ${APPDATA}\DingTalk
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-gcloud
    source: windows_mandatory
    path: ${APPDATA}\gcloud
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-gh
    source: windows_mandatory
    path: ${APPDATA}\GitHub CLI
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-feishu-roaming-state
    source: windows_mandatory
    path: ${APPDATA}\LarkShell
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: readonly-roaming-microsoft
    source: windows_mandatory
    path: ${APPDATA}\Microsoft
    access: read_only
    lifecycle: existing
    inheritance: descendants
  - id: deny-teams-classic
    source: windows_mandatory
    path: ${APPDATA}\Microsoft\Teams
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-firefox-profiles
    source: windows_mandatory
    path: ${APPDATA}\Mozilla\Firefox\Profiles
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-opera-profile
    source: windows_mandatory
    path: ${APPDATA}\Opera Software\Opera Stable
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-signal-desktop
    source: windows_mandatory
    path: ${APPDATA}\Signal
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-slack-desktop
    source: windows_mandatory
    path: ${APPDATA}\slack
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-qq-state
    source: windows_mandatory
    path: ${APPDATA}\Tencent\QQ
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-qqnt-state
    source: windows_mandatory
    path: ${APPDATA}\Tencent\QQNT
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-wechat3-state
    source: windows_mandatory
    path: ${APPDATA}\Tencent\WeChat
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-wecom-state
    source: windows_mandatory
    path: ${APPDATA}\Tencent\WXWork
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-wechat4-state
    source: windows_mandatory
    path: ${APPDATA}\Tencent\xwechat
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-thunderbird-profiles
    source: windows_mandatory
    path: ${APPDATA}\Thunderbird\Profiles
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: finsafe-config
    source: windows_mandatory
    path: ${FINSAFE_CONFIG_DIR}
    access: read_only
    lifecycle: existing
    inheritance: descendants
  - id: finsafe-install
    source: windows_mandatory
    path: ${FINSAFE_INSTALL_DIR}
    access: read_only
    lifecycle: existing
    inheritance: descendants
  - id: deny-360chromex-profile
    source: windows_mandatory
    path: ${LOCALAPPDATA}\360ChromeX\Chrome\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-brave-profile
    source: windows_mandatory
    path: ${LOCALAPPDATA}\BraveSoftware\Brave-Browser\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-feishu-profile
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Feishu\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: finsafe-root
    source: windows_mandatory
    path: ${LOCALAPPDATA}\FinSAFE
    access: read_only
    lifecycle: prepare_created
    inheritance: descendants
  - id: deny-chrome-profile
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Google\Chrome\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-feishu-local-state
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Lark
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: readonly-local-microsoft
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Microsoft
    access: read_only
    lifecycle: existing
    inheritance: descendants
  - id: deny-edge-profile
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Microsoft\Edge\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-outlook-data
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Microsoft\Outlook
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-bitwarden-store
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Packages\8bitSolutionsLLC.bitwardendesktop_h4e712dmw3xyy
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-slack-store
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Packages\com.tinyspeck.slackdesktop_8yrtsj140pw4g
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-teams-store
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Packages\MSTeams_8wekyb3d8bbwe
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-sogou-browser-profile
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Sogou\SogouExplorer\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-qqbrowser-profile
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Tencent\QQBrowser\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-vivaldi-profile
    source: windows_mandatory
    path: ${LOCALAPPDATA}\Vivaldi\User Data
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: readonly-common-microsoft
    source: windows_mandatory
    path: ${ProgramData}\Microsoft
    access: read_only
    lifecycle: existing
    inheritance: descendants
  - id: deny-aws
    source: windows_mandatory
    path: ${USERPROFILE}\.aws
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-gnupg
    source: windows_mandatory
    path: ${USERPROFILE}\.gnupg
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-kube
    source: windows_mandatory
    path: ${USERPROFILE}\.kube
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-ssh
    source: windows_mandatory
    path: ${USERPROFILE}\.ssh
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-outlook-archives-default
    source: windows_mandatory
    path: ${USERPROFILE}\Documents\Outlook Files
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-qq-files-default
    source: windows_mandatory
    path: ${USERPROFILE}\Documents\Tencent Files
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-wechat3-files-default
    source: windows_mandatory
    path: ${USERPROFILE}\Documents\WeChat Files
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-wecom-data-default
    source: windows_mandatory
    path: ${USERPROFILE}\Documents\WXWork
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-wecom-files-default
    source: windows_mandatory
    path: ${USERPROFILE}\Documents\WXWork Files
    access: deny
    lifecycle: existing
    inheritance: descendants
  - id: deny-wechat4-files-default
    source: windows_mandatory
    path: ${USERPROFILE}\Documents\xwechat_files
    access: deny
    lifecycle: existing
    inheritance: descendants
  network:
    mode: host
  resources:
    timeout_ms: max
    memory_max: max
    pids_max: max
    cpu_max: '100000 100000'
