Sentinel policies are written using the Sentinel language. This language
is easy to learn and easy to write. You can learn the Sentinel language
and be productive within an hour. Learning Sentinel doesn't require any
formal programming experience.

This language guide will contain many details that are not necessary to
be productive with Sentinel or are targeted to those who are looking for
exact information about the language (such as what types of line endings are
allowed). You can safely ignore these sentences.

You may also view the
official language specification
This is a specific and detailed document on the syntax and behavior of
the language primarily intended for implementation creators and to disambiguate
the language.

Sentinel policies are single files that end in the .sentinel file extension.
There is currently no built-in mechanism to Sentinel for merging multiple
files. This is purposefully done to make Sentinel policies easy to submit
to systems that support Sentinel policies.

Sentinel policy files must be UTF-8 encoded and can end in both
Unix (LF) or Windows (CRLF) line breaks. When running the
auto-formatter,
line endings will always use Unix line breaks.

Sentinel expects there to be a mainrule.
The value of this rule is the result of the entire policy.

If the result of main is true, the policy passes. If the value is anything
else (false or a non-boolean value), the policy fails. The exact meaning
of what happens a policy passes or fails is dependent on the host system.

The simple example above is a full working example. In our experience with
Sentinel, many policies can be representing using this simple form. However,
to show more features of the language, a more complex example is shown below.
This example is also a realistic example of what Sentinel may be used for.