DevOps in regulated environments: making it work

Adapting DevOps practices for critical infrastructure, defence and regulated industries while meeting security and compliance requirements.

9 min read

DevOps promised faster delivery, better quality and closer collaboration, and for many organisations it delivered. Critical infrastructure and regulated environments often struggle to adopt it, because their constraints appear incompatible with its practices. With the right approach, the two can work together.

The apparent conflict

Standard DevOps assumes:

  • Rapid iteration and frequent deployment
  • Automated testing and continuous integration
  • Infrastructure as code and self-service provisioning
  • Blameless post-mortems and learning from failure

Regulated environments typically require:

  • Formal change control and approval processes
  • Extensive documentation and audit trails
  • Segregation of duties between development and operations
  • Zero tolerance for production failures

On the surface these are opposed. In practice the conflict is smaller than it looks.

What regulators require

Most regulatory frameworks do not prohibit automation. They require control, traceability and accountability. Automated deployments with proper controls can provide better compliance than manual processes:

Traceability: Automated pipelines create complete audit trails. Every change is logged, traced to a commit and linked to an approval.

Consistency: Automated deployments are repeatable. Manual deployments introduce variation and human error.

Segregation: Pipeline controls can enforce approval gates, prevent self-approval and maintain separation of duties, often more reliably than manual processes.

Documentation: Infrastructure as code documents itself. The code describes the deployed state and is updated with every change.

The task is to show that automated controls meet the intent of the regulation, which can differ from the wording of legacy procedures.

Adapting CI/CD for regulated environments

Continuous integration works in regulated environments with some adaptations:

Approval gates: Pipelines pause at defined points for manual approval. Automated tests run, the results are reviewed and qualified approvers sign off before the pipeline proceeds.

Environment progression: Changes move through dev, test, staging and production, with tighter controls at each stage. Early environments allow rapid iteration and later stages require formal approval.

Evidence collection: Pipelines collect compliance evidence automatically: test results, security scans, approval records and deployment logs. Together these form the compliance package for auditors.

Immutable artefacts: Build once and deploy the same tested artefact through every environment. This removes "works on my machine" issues and keeps environments consistent.

Rollback capability: Failed deployments roll back automatically. This reduces risk compared with manual "fix forward" approaches.

Infrastructure as code in air-gapped environments

Air-gapped and classified environments create specific challenges:

No external package registries: Dependencies must be vendored, mirrored internally or built from source. This takes investment and improves supply chain security.

No cloud-based CI/CD: Use self-hosted runners, on-premises Git servers and internal artefact repositories. The tooling exists and needs to be deployed locally.

Offline testing: Security scanning, dependency checking and compliance verification must work without internet connectivity.

Media-based deployment: Final deployment may involve transfer on physical media. Pipelines can generate deployment packages for media transfer, with integrity verification.

infraPatterns is being designed for these constraints, with patterns that deploy consistently to cloud-connected and fully air-gapped targets.

Change control integration

Formal change control can be built into an automated pipeline:

Change records from commits: Git commits link to change requests, and the change control record becomes metadata in the pipeline.

Automated CAB preparation: Pipelines generate change summaries, risk assessments and rollback procedures for Change Advisory Board (CAB) review.

Scheduled deployment windows: Pipelines respect deployment windows and queue approved changes for execution during permitted times.

Emergency change procedures: Break-glass processes handle urgent changes, with full logging and approval after the event.

The aim is to make the compliant path the easiest one to follow. Automation should remove friction from compliant changes without adding bureaucratic overhead.

Security scanning integration

Regulated environments often require a security assessment before deployment:

Static analysis: Scan code for vulnerabilities, secrets and compliance issues, and block merges that fail the checks.

Dependency scanning: Detect known vulnerabilities in dependencies, with automated alerts and remediation tracking.

Container scanning: Assess images for vulnerabilities before deployment, and enforce base image standards and patch requirements.

Infrastructure scanning: Analyse Terraform and CloudFormation definitions for security issues, and catch misconfigurations before they reach production.

These scans should run automatically and quickly inside the developer workflow. Slow manual security reviews create pressure to bypass controls.

Cultural adaptation

Technical change is easier than cultural change. Regulated environments often have a cautious culture that resists DevOps adoption:

Start small: Pilot DevOps approaches in lower-risk areas and demonstrate results before expanding.

Involve compliance early: Bring auditors and compliance teams into pipeline design. They are more likely to accept controls they helped design.

Quantify improvement: Track deployment frequency, lead time, change failure rate and time to recovery. Use the figures to show whether reliability has improved.

Maintain safety valves: Keep a manual deployment capability for emergencies. This reduces resistance from teams worried about losing control.

The path forward

DevOps in a regulated environment means implementing controls through automation, which often makes them more effective. Organisations that do this deliver faster and remain compliant.

Organisations that treat DevOps and regulation as incompatible will find it increasingly hard to compete with those that have resolved the tension.