GitHub repositories
Two public repositories hold all code, infrastructure and evidence. Pull requests are the only way into main.
ShivaSai06/secure-static-platform · ShivaSai06/container-delivery-platform
GitHub Actions
Every pull request runs tests, Terraform validation, Checkov, gitleaks, actionlint and ShellCheck. Changes to AWS wait for a named environment approval.
.github/workflows/validate.yml, terraform-apply.yml, deliver.yml
IAM roles through OIDC
Each job swaps a short-lived GitHub token for one of three roles: plan, apply or deploy. Trust is pinned to the repository's numeric ID and the environment name.
infra/bootstrap/bootstrap.yaml (CloudFormation)
Visitor
Reaches both systems over HTTPS only. Plain HTTP is redirected, and HSTS keeps the browser on HTTPS afterwards.
DNS: DNS-only CNAME records at Cloudflare
Amazon CloudFront
The only public entry to the static platform: TLS 1.2 or later, an ACM certificate, PriceClass_200 edges and the managed CachingOptimized policy.
infra/terraform/cloudfront.tf
Private S3 bucket
Block Public Access is fully on and object ownership is enforced. The bucket policy lets exactly one distribution read, through SigV4-signed Origin Access Control. A direct request gets 403.
infra/terraform/s3.tf
CloudFront Function
A viewer-request function that opens this portfolio for projects.ju25.uk, from the same distribution and bucket, so no extra infrastructure is needed.
infra/terraform/functions/showcase.js
Response headers policy
A deny-by-default Content-Security-Policy, HSTS for a year, nosniff, DENY framing and a locked-down Permissions-Policy, all set at the edge.
infra/terraform/security_headers.json
Application Load Balancer
The stable public endpoint for a service whose tasks come and go. It uses a TLS 1.3 and 1.2 policy, redirects HTTP and sends traffic only to targets that pass /ready.
infra/terraform/alb.tf
ECS on Fargate
One ARM64 task (0.25 vCPU, 512 MiB): non-root, read-only root filesystem, all Linux capabilities dropped. The deployment circuit breaker rolls back automatically.
infra/terraform/ecs.tf
Amazon ECR
Tags are immutable and images are scanned on push. Releases point at the image digest, so what was scanned is exactly what runs.
infra/terraform/ecr.tf · scripts/push_image.sh
Amazon CloudWatch
Structured ECS-format logs kept for seven days, a dashboard of service and load balancer metrics, and the logs printed in every release run.
infra/terraform/observability.tf