Struct tectonic_bridge_core::SecuritySettings[][src]

pub struct SecuritySettings { /* fields omitted */ }
Expand description

A type for storing settings about potentially insecure engine features.

This type encapsulates configuration about which potentially insecure engine features are enabled. Methods that configure or instantiate engines require values of this type, and values of this type can only be created through centralized methods that respect standard environment variables, ensuring that there is some level of uniform control over the activation of any known-insecure features.

The purpose of this framework is to manage the use of engine features that are known to create security risks with untrusted input, but that trusted users may wish to use due to the extra functionalities they bring. (This is why these are settings and not simply security flaws!) The primary example of this is the TeX engine’s shell-escape feature.

Of course, this framework is only as good as our understanding of Tectonic’s security profile. Future versions might disable or restrict different pieces of functionality as new risks are discovered.

Implementations

Create a new security configuration.

The stance argument specifies the high-level security stance. If your program will be run by a trusted user, they should be able to control the setting through a command-line argument or something comparable. Even if there is a request to enable known-insecure features, however, such a request might be overridden by other mechanisms. In particular, if the environment variable TECTONIC_UNTRUSTED_MODE is set to any value, insecure features will always be disabled regardless of the user-level setting. Other mechanisms for disable known-insecure features may be added in the future.

Query whether the shell-escape TeX engine feature is allowed to be used.

Query whether we’re allowed to specify extra paths to read files from.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.