> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/variables-and-expressions/runtime-inputs.md).

# Fixed values, runtime inputs, and expressions

For most settings in Harness pipelines, you can use fixed values, runtime inputs, or expressions. These options are also sometimes available for other entities, such as connectors and triggers. We can also explicitly export variables as [Harness Secrets](/open-source/use-harness-open-source/pipelines-1/secrets.md) if you are transmitting sensitive information across steps.

{% tabs %}
{% tab title="Visual" %}
In the Pipeline Studio's Visual Editor, you can use the **Value type selector** to select **Fixed Values**, **Runtime Input**, or **Expression**.

The [**Expression**](#expressions) option is especially useful, because it enables suggestions for built-in expressions as you type.

In free-text fields, such as **Command**, you can directly enter values using the appropriate syntax, such as `<+input>` for [runtime input](#runtime-inputs), without changing the value type.
{% endtab %}

{% tab title="YAML" %}
When writing pipelines in YAML, enter the value using the appropriate syntax. For example:

* For fixed values, enter the value directly.
* For runtime input, enter `<+input>`.
* For expressions, enter the expression, such as `<+secrets.getValue("somesecret")>`.

When you type `<+`, Harness provides suggestions for built-in [expressions](#expressions) as you type.
{% endtab %}
{% endtabs %}

### Fixed values <a href="#fixed-values" id="fixed-values"></a>

Fixed Values are values that you define when you configure a setting. These values don't change at runtime.

Use fixed values for settings you don't need to change based on the build context, other steps, or runtime operations. For example, you could use a fixed value for your pipeline's [codebase configuration](/continuous-integration/use-harness-ci/use-harness-ci/codebase-configuration/create-and-configure-a-codebase.md) so that the pipeline always uses the same code repo connector and branch.

### Runtime inputs <a href="#runtime-inputs" id="runtime-inputs"></a>

Runtime input provides a placeholder with the expectation that you'll define this value at runtime. For example, if you set the Kubernetes cluster **Namespace** setting to runtime input (`<+input>`), you'll need to provide the **Namespace** value when you run the pipeline.

You can customize runtime inputs to have specific allowed values, default values, multi-selection, and more.

For more information, go to [Use runtime input](/harness-ai/use-harness-platform/variables-and-expressions/runtime-input-usage.md).

### Expressions <a href="#expressions" id="expressions"></a>

Use Harness expressions to reference input, output, and execution variables. These variables represent settings, metadata, and other values that exist in the pipeline before and during execution. These can include environment variables, secrets, [entity identifiers](/harness-ai/use-harness-platform/references/entity-identifier-reference.md), [user-defined variables](/harness-ai/use-harness-platform/variables-and-expressions/add-a-variable.md), and more.

At pipeline runtime, Harness replaces the expression with the resolved value.

{% tabs %}
{% tab title="Visual" %}
In the Pipeline Studio's Visual Editor, you can use the **Value type selector** to select **Expression**.

Harness provides suggestions for built-in expressions as you type. You can manually trigger the suggestions by placing your cursor after `<+` and pressing `ctrl + space`. These suggestions don't represent all possible expressions.

In free-text fields, such as **Command**, you can directly enter values using the appropriate syntax without changing the value type.

You can continue typing or select the expression from the list of suggestions.
{% endtab %}

{% tab title="YAML" %}
When writing pipelines in YAML, enter the expression using the appropriate syntax.

When you type `<+`, Harness provides suggestions for built-in expressions as you type. You can manually trigger the suggestions by placing your cursor after `<+` and pressing `ctrl + space`. These suggestions don't represent all possible expressions.

You can continue typing or select the expression from the list of suggestions.
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**IMPORTANT NOTE**

Variables and expressions can be used in pipelines to accept inputs at runtime. We recommend using them cautiously, as runtime input variables are accessible to anyone with permission to run the pipeline.

For example, using secret expressions in pipeline inputs at runtime can expose sensitive values to any user with permission to execute the pipeline.

To prevent such scenarios, use OPA policies like the one below. These policies block the use of secrets as input expressions at runtime. You can also create custom policies to further secure your pipeline builds.

```
package policy

# Rule to check if any value in the input contains the secret substring <a href="#rule-to-check-if-any-value-in-the-input-contains-the-secret-substring" id="rule-to-check-if-any-value-in-the-input-contains-the-secret-substring"></a>
has_secret_value {
    walk(input, [_, value])
    is_string(value)
    contains(value, "<+secrets.getValue")
    not contains(value,"<+secrets.getValue(\"account.")
}

# Main denial rule <a href="#main-denial-rule" id="main-denial-rule"></a>
deny[msg] {
    has_secret_value
    msg := "Found potentially sensitive value containing 'secret.getValues' in the input"
}
```

{% endhint %}

For more information, go to:

* [Use Harness expressions](/harness-ai/use-harness-platform/variables-and-expressions/harness-variables.md)
* [Write expressions using any JSON parser tool](/harness-ai/use-harness-platform/variables-and-expressions/expression-v2.md)
* [Use Java string methods](/harness-ai/use-harness-platform/variables-and-expressions/expressions-java-methods.md)
* [Define variables](/harness-ai/use-harness-platform/variables-and-expressions/add-a-variable.md)
