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.
| Area | Scope | Outcome measured |
|---|---|---|
| Delivery pipeline | Release control, versioning, rollback | Change failure rate, lead time |
| Infrastructure | Consistency, change control | Unreviewed changes to production |
| Access and secrets | Production access, CI/CD agent access, credential handling | Access reviewed, standing privileges reduced |
| Monitoring | Coverage, alert quality, escalation | Time to detect, time to restore, reliable metrics |
| Backup and recovery | Backup and restore practice | Recovery 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.
| Phase | What happens | Output |
|---|---|---|
| Kickoff | Goals, access and alignment agreed | Agreed scope, current-state map |
| Assessment | Each area reviewed for gaps and ranked | Gap sheet, prioritized backlog |
| Fix cycles | Highest-priority items designed, shipped and checked. Each cycle closes with a short review with the team | Merged changes, updated backlog |
| Handover | Final walkthrough of the full setup, open backlog passed to the team | Runbook, 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
There was no reliable rollback process. Recovery depended on reverting the commit and running the pipeline again, which was slow and error-prone.
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.
Executions and releases were not recorded, so the team could not show what had been released, when, or by whom.
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.
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
Terraform state was stored without access control or locking.
Changes were applied from individual machines, with no review and no record of who changed what.
Infrastructure code was applied without checks, so errors and risky settings were found late, if at all.
Stacks depended on each other in both directions, so they could only be applied in an order few people knew.
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.
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
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.
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.
Service roles used wildcard actions and resources, so a compromised service could reach far more than its own data.
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


