Subscribe to the Non-Human & AI Identity Journal
Architecture & Implementation Patterns

Formula Engine

← Back to Glossary
By NHI Mgmt Group Updated June 7, 2026 Domain: Architecture & Implementation Patterns

A formula engine is the runtime that evaluates user-authored expressions inside a business application. In a spreadsheet platform, it may transform data, call functions, and interact with supporting libraries, which means it must be governed as code execution whenever untrusted input is allowed.

Expanded Definition

A formula engine is the execution layer that interprets and evaluates expressions at runtime, often with access to fields, functions, conditionals, and external helpers. In NHI and agentic systems, it matters because a seemingly simple expression can become code execution if it can trigger data lookups, network calls, or privileged library functions. That is why NHI Management Group treats formula engines as governance-relevant runtime components, not just convenience features.

Definitions vary across vendors, especially when a platform blends formulas, scripts, and low-code actions into one surface. In practice, the boundary is whether the engine only computes values or can also influence state, access, or tool use. When that boundary is blurry, align the design to the stricter interpretation and apply controls consistent with NIST Cybersecurity Framework 2.0. If formulas can reference secrets, service accounts, or agent tools, they should be reviewed like application code. The most common misapplication is treating user-authored formulas as harmless configuration when the expression can invoke privileged functions or reach sensitive data.

Examples and Use Cases

Implementing formula engines rigorously often introduces usability friction, because tighter validation can limit ad hoc business logic and require more review before deployment.

  • A spreadsheet-like SaaS lets users build expressions for payroll or finance reports, so formula inputs must be sanitized and constrained before evaluation.
  • An internal workflow app allows formulas to route approvals based on user attributes, which creates a policy decision path that should be audited like access logic.
  • An agentic platform uses formulas to transform prompts, scores, or tool parameters, making the engine part of the trust boundary for the agent runtime.
  • A developer portal exposes templated formulas that read metadata and call helper functions, so secret access and outbound actions need explicit guardrails.

When formula behavior touches identity or secrets, the operational question becomes whether the engine can be abused to reach tokens, API keys, or privileged account data. That is why the NHI Management Group guidance in the Ultimate Guide to NHIs is directly relevant: once runtime logic can interact with non-human identities, it is no longer just a calculation feature. The same governance mindset appears in NIST Cybersecurity Framework 2.0 when protecting execution paths and controlling access to sensitive functions.

Why It Matters in NHI Security

Formula engines are a common bridge between user input and privileged execution, which makes them a frequent escalation point in SaaS, automation, and agentic AI systems. If a formula can call a function that reads a secret, updates a record, or passes data into an AI tool, then abuse of that formula becomes an identity and authorization problem, not merely a data quality issue. That is especially important in environments where service accounts, API keys, and workflow tokens are already overexposed. NHI Management Group notes that 96% of organisations store secrets outside of secrets managers in vulnerable locations including code, config files, and CI/CD tools, which means a formula engine can easily become the path that reaches those assets.

For governance, the key is to treat formula evaluation as a controlled runtime with input validation, function allowlists, least privilege, and logging. Practitioners should also review whether formula-authored logic can alter execution context for agents or service accounts, since that expands blast radius quickly. Organisations typically encounter formula engine risk only after a malformed expression, data exfiltration, or privilege abuse incident, at which point the term becomes operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10Formula engines can alter agent behavior and tool use through user-authored expressions.
OWASP Non-Human Identity Top 10NHI-02Formula engines often expose secrets or privileged functions, creating secret-handling risk.
NIST CSF 2.0PR.AC-4Formula execution must follow least-privilege access and controlled function exposure.

Treat formula runtime access as sensitive, deny secret exposure, and review expressions for privileged reach.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on June 7, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org