A system controls security during operation of a computerized device by
enforcing a first security policy during first operational state of the
computerized device. Enforcement of the first security policy provides a
first level access to resources within the computerized device by
processes operating in the computerized device. The system detects a
transition operation of the computerized device that occurs during
enforcement of the first security policy indicating that operation of the
computerized device is transitioning from the first operational state to
a second operational state and in response, enforces a second security
policy corresponding to the second operational state to provide a level
of access to the resources within the computerized device that
corresponds to the second operational state during operation of the
second operational state. This can be repeated for many different states
including boot time, normal runtime, installation, shutdown, and a
compromised state.