Skip to content
Versora

Manual

Administrators

The policy.yml file

3 min read

On this page

Without GPO, the machine policy can come from a YAML file. It has the same keys as the registry and applies to all users of the computer.

Where it lives

%ProgramData%\MCK2\Versora\policy.yml

On a standard Windows, %ProgramData% is C:\ProgramData. Versora finds the folder through the Windows registry, not through the environment variable, which the user could change to hide the policy.

The file has less weight than the registry: each key comes from the first source with a valid value, in the order HKLM, HKCU and policy.yml. A key defined in the GPO ignores the same value in the file.

The file's owner

policy.yml only applies if the file's owner is the Administrators group or SYSTEM.

%ProgramData% lets any user create folders and files. Without this rule, another user of the same computer could create a policy.yml and, for example, lock a proxy that intercepts colleagues' traffic.

Files created by GPO, by Intune or by an elevated process (an installer, a script running as administrator) already come out with the right owner. A file copied by a regular user doesn't.

When the owner doesn't check out, Preferences › Policy and team shows the Company file source with the "ignored (file owner)" state and the reason: "ignored: the file isn't owned by the Administrators group or SYSTEM". No key from the file applies.

  • Simple YAML: maps, lists ([a, b] or one item per line with -), text and numbers. Avoid advanced YAML features, such as anchors.
  • Key names: the same as in the reference. Case, _, - and . don't matter.
  • Nested maps become a prefix: commit: { title_max: 72 } is the same as commit_title_max: 72; preferences: { hidden: [keys] } is the same as preferences_hidden: [keys].
  • Repeated key: the last occurrence applies.
  • Size: up to 1 MiB.
  • Encoding: UTF-8.

Text with YAML special characters (*, : followed by a space, #, \) goes in single quotes: '*.empresa.com.br', 'release/*'.

Complete example

YAML
# Versora policy for the company's computers.
proxy: http://proxy.empresa.com.br:3128      # or system / none
proxy_bypass: [localhost, '*.empresa.com.br']
allowed_servers: [gitlab.empresa.com.br, '*.empresa.com.br']
secrets_scan: required                        # always on (off = locked off)
telemetry: off                                # informational: Versora has no telemetry
preferences:
  hidden: [keys]                              # pages that disappear from Preferences
  locked: [network]                           # read-only pages
team_commands: deny                           # turns off the .versora.yml commands
welcome_wizard: show
commit:
  title_max: 72
  conventional: required
  types: [feat, fix, docs, refactor, test, chore]
  signoff: required
ai_coauthor: suggested
ai_trailer: 'Co-authored-by: AI Assistant <[email protected]>'
protected_branches: [main, 'release/*']
oauth_client_ids: ['gitlab.empresa.com.br=<OAuth application Application ID>']
updates: stable                               # off / stable / notify (or [stable, notify])
# defaults_folder: '\\servidor\versora\default'  # in place of %ProgramData%\MCK2\Versora\default
  1. Write the file with the Administrators or SYSTEM owner.
  2. Open Versora, or click Reload the policy in Preferences › Policy and team.
  3. Check the Company file source:
StateMeaning
"doesn't exist"The file isn't in the right place.
"in effect"The file was read.
"has an error"The file couldn't be read or isn't valid YAML. The message appears next to it.
"ignored (file owner)"The file's owner isn't Administrators or SYSTEM.
  1. Check Ignored values and "unknown keys: …".

Messages

  • "the file must be a map of keys and values": the file is a list or loose text. Start with the keys, as in the example.
  • "file too large": it's over 1 MiB.
  • "couldn't read the file: …": read permission or a locked file.
  • The messages for each key (for example "use a whole number from 10 to 500") are in Policy keys.

See also