Join our Newsletter — 33% off our NHI Course
Home FAQ Governance, Ownership & Risk What breaks when infrastructure workflows do not define…
Governance, Ownership & Risk

What breaks when infrastructure workflows do not define failure behavior for custom steps?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated August 28, 2026 Domain: Governance, Ownership & Risk

Without defined failure behavior, teams often end up relying on manual intervention, which slows recovery and creates inconsistent outcomes. That increases uncertainty about whether a deployment actually completed as intended, especially when scripts sit between infrastructure stages. The result is weaker operational control, more delay, and harder post-incident review.

Why This Matters for Security Teams

Custom workflow steps are where infrastructure automation stops being deterministic. Once a script, hook, or plugin can fail in multiple ways, teams need to know whether the pipeline should stop, retry, roll back, or continue. If that failure behavior is undefined, operators end up making judgment calls under pressure, which is exactly how partial deployments, drift, and hidden privilege issues persist. NIST’s NIST Cybersecurity Framework 2.0 emphasises recoverability and governance, but those goals only work when automation has explicit failure semantics.

This is not a theoretical edge case. When custom steps touch secrets, infrastructure state, or access controls, a silent failure can leave systems half-configured while downstream automation assumes success. That is how teams lose confidence in the deployment record and in the state of the environment. The risk grows when workflow logic is embedded in CI/CD, because the failure signal may be buried in logs rather than surfaced as a control point. In practice, many security teams encounter broken rollback logic only after a bad change has already propagated across environments, rather than through intentional failure testing.

How It Works in Practice

Defined failure behavior tells the workflow engine what to do when a custom step does not complete as expected. The key question is not just whether the step failed, but whether the failure is terminal, retryable, compensating, or safe to ignore. Mature pipelines make that decision at the boundary of each privileged action, not after a human notices something looks wrong. The same principle shows up in NHI governance: if a step can call cloud APIs, mutate secrets, or trigger provisioning, its identity and failure handling should be explicit. For related NHI risk patterns, see GitHub Action tj-actions Supply Chain Attack.

Operationally, teams usually define four outcomes for custom steps:

  • Fail closed and stop the pipeline when the step affects security, access, or compliance state.
  • Retry only when the failure is transient and the action is idempotent.
  • Run a compensating rollback when the step partially applied a change.
  • Mark the workflow indeterminate when the system cannot prove the action completed.

This is where policy, observability, and identity meet. A step that changes infrastructure should run with the minimum necessary privileges, use short-lived credentials where possible, and emit a machine-readable status so orchestration can decide whether to continue. If the step depends on secrets, the failure path must also specify whether those secrets are revoked, reissued, or quarantined. NHIMG research on the 2026 Infrastructure Identity Survey shows how quickly confidence erodes when identity and automation are loosely governed, especially as infrastructure teams adopt more autonomous execution. Current guidance suggests treating custom step failure mode as part of the control design, not as an implementation detail. These controls tend to break down when workflows span multiple tools and the orchestrator cannot reconcile partial success across systems.

Common Variations and Edge Cases

Tighter failure handling often increases pipeline friction, requiring organisations to balance operational speed against correctness. That tradeoff becomes visible in environments with legacy scripts, mixed cloud and on-prem tooling, or steps that were written long before CI/CD policy existed. In those cases, teams may need to decide whether a step should block deployment, create an incident ticket, or quarantine the release for review.

One common exception is a non-critical custom step that only enriches telemetry or tags metadata. Best practice is evolving here, but current guidance suggests that these steps can fail open if and only if their absence does not change access, state, or assurance. By contrast, anything that creates identities, rotates credentials, approves access, or provisions infrastructure should fail closed by default. That distinction matters because undefined behaviour in a supposedly “minor” step often becomes the reason a major change is hard to reconstruct later. The Schneider Electric credentials breach is a reminder that operational gaps around access and execution boundaries can become material security events. The practical test is simple: if the workflow cannot explain what happened after the step failed, the failure mode is not defined well enough for production.

Standards & Framework Alignment

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

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

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-06Custom steps often handle secrets and privileged NHI actions.
OWASP Agentic AI Top 10A-04Autonomous workflow actions need explicit failure handling and bounded execution.
CSA MAESTROGOV-03Workflow governance must specify rollback, retry, and recovery behavior.
NIST AI RMFAI RMF covers governance and monitoring of autonomous system behavior.
NIST CSF 2.0RC.RP-1Recovery planning depends on known failure behavior for automated changes.

Define fail-closed behavior for NHI steps that touch credentials or infrastructure state.

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