← Back
DevSecOps Transformation for a Growing Fintech Product
Fintech

DevSecOps Transformation for a Growing Fintech Product

Pipeline, infrastructure, access, monitoring and recovery for a B2B payments company

Following recurring incidents, a B2B payments company needed its infrastructure and delivery process reworked without interrupting releases. The engagement began with a gap assessment across the platform and went on to the design and build of a new foundation for future products.

Scope

The objective was to shorten lead time and lower the change failure rate in the delivery pipeline, bring the infrastructure code under a clear structure, close the security findings from the assessment, and put a tested backup and recovery plan in place.

AreaScopeOutcome measured
Delivery pipelineRelease control, versioning, rollbackChange failure rate, lead time
InfrastructureConsistency, change controlUnreviewed changes to production
Access and secretsProduction access, CI/CD agent access, credential handlingAccess reviewed, standing privileges reduced
MonitoringCoverage, alert quality, escalationTime to detect, time to restore, reliable metrics
Backup and recoveryBackup and restore practiceRecovery time, data-loss window, restore runbook

Approach and Timeline

The team worked in agile sprints, so the work followed the same rhythm. The assessment came first and produced a prioritized backlog. Fixes were then delivered in cycles alongside the sprints, highest priority first, with releases continuing throughout.

PhaseWhat happensOutput
KickoffGoals, access and alignment agreedAgreed scope, current-state map
AssessmentEach area reviewed for gaps and rankedGap sheet, prioritized backlog
Fix cyclesHighest-priority items designed, shipped and checked. Each cycle closes with a short review with the teamMerged changes, updated backlog
HandoverFinal walkthrough of the full setup, open backlog passed to the teamRunbook, handover session

Delivery pipeline

A release is the moment a change reaches customers, and when one went wrong the team had no quick way back. The aim here was to make every release identifiable and reversible, with a record the team could show a customer or an auditor.

Findings

01

There was no reliable rollback process. Recovery depended on reverting the commit and running the pipeline again, which was slow and error-prone.

02

Versions were chosen by a person at release time, with no rule for what a change meant. Nothing tied a version to the commit that was built and tested, so a release could not be reliably identified or reverted to.

03

Executions and releases were not recorded, so the team could not show what had been released, when, or by whom.

04

Code analysis tools were installed in the pipeline, but no process defined how findings were handled or what should block a release. Several controls were missing.

Changes

The pipeline before and after the rework, followed by what was changed against each finding.

Animated diagram of the delivery pipeline. Before: a developer's push runs through a pipeline with no versioning, producing an untagged release that is not logged, with security checks not enforced and no rollback process. After: the same flow with versioned releases, recorded history, enforced security checks and a rollback step.

Releases that can be reverted quickly

A rollback step that redeploys a previous release instead of rebuilding it

Versions that identify one build

Semantic versions assigned by the pipeline, with one tag and release per build

A history of what was released

Every execution and release recorded, with rollbacks logged against the release they reverted

Security built into the lifecycle

Security controls at each stage, with a defined process for handling findings

Measures the team could trust

The four DORA measures, calculated from release and rollback records

Infrastructure

Production infrastructure was being changed from individual machines, with no review and no record. The aim here was for every change to go through one reviewed path, so the team can say what changed, who approved it, and trust the code to match what is running.

Findings

01

Terraform state was stored without access control or locking.

02

Changes were applied from individual machines, with no review and no record of who changed what.

03

Infrastructure code was applied without checks, so errors and risky settings were found late, if at all.

04

Stacks depended on each other in both directions, so they could only be applied in an order few people knew.

05

Values such as resource IDs were hard-coded between stacks, so a change in one place could break another.

Changes

The infrastructure workflow after the rework, followed by what was changed against each finding.

Diagram of the infrastructure workflow. Code is checked (linted, validated, scanned for risks), then a plan shows what will change and is approved, then the pipeline applies it under its own limited identity. Changes go to four stacks grouped by how often they change: core, platform, data and service stacks, each with encrypted, locked remote state. Dependencies run in one direction, from service stacks up to the core stack.

Protected state

Encrypted remote state for each stack, with locking and restricted access

Code checked before every change

Infrastructure code linted, validated and scanned for risky settings before a plan is produced, with a defined process for handling findings

Reviewed changes

Applied only by the pipeline, under its own limited identity, after the plan is reviewed and approved

Deployments that don’t collide

One apply at a time per stack, with independent stacks in parallel

Clear stack structure

Stacks grouped by how often they change and who owns them, with dependencies in one direction and shared values passed as outputs, not hard-coded

Access and secrets

Long-lived keys and scattered secrets are one of the easier ways into a payments platform, and nobody could say what was still in use. The aim here was to remove the stored keys, give every secret an owner, and make changing one a routine task instead of a risk to production.

Findings

01

The pipeline and several engineers used long-lived cloud access keys, kept in CI variables and on local machines. Nobody could say which of them were still in use.

02

Application secrets lived in environment variables and repository config files. There was no list of what existed, who owned it, or what depended on it.

03

Service roles used wildcard actions and resources, so a compromised service could reach far more than its own data.

04

There was no rotation procedure. Changing a secret meant guessing which services would break.

Changes

What was changed against each finding.

No keys stored in the pipeline

Temporary AWS credentials issued to GitLab CI for each run through OIDC, with the old access keys and the CI variables that held them deleted

All secrets in one place

Secrets moved into AWS Secrets Manager, encrypted with a customer-managed KMS key. Every secret has a named owner, a list of what uses it and a rotation interval, and services read it at runtime instead of carrying it in config

Roles scoped to each service

Wildcards replaced with the actions and resources each service really calls. A service can read its own secrets and nothing else

A rotation runbook the team can follow

A documented runbook for managing credential rotations, so the team can rotate any secret without guessing what depends on it