Harden legacy AWS deployment templates#88
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Related Knowledge 1 document with suggested updates is ready for review. BAWES Universe StudentHub – Complete Services & Infrastructure Map (Org-wide)”View Suggested Changes@@ -4,7 +4,7 @@
|------------------|--------------|------------------------------------------------------------------------|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|-------------------------------------------|
| AWS S3 | Storage | Hosts static frontend builds and stores backend exports | admin portal, backend | [studenthub-admin/.circleci/config.yml](https://github.com/BAWES-Universe/studenthub-admin/blob/b453c0c7d0b0f170964a82948fb09da610cde5e9/.circleci/config.yml#L1-L202), [studenthub/README.md](https://github.com/BAWES-Universe/studenthub/blob/ca90a5502040ba8191fe9f80d29d0b6a4d2a6152/README.md#L9-L150) | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | s3://studenthub-admin-dev/, s3://studenthub-admin-prod/, s3://studenthub-uploads-dev-server/ |
| AWS CloudFront | Hosting/CDN | CDN for serving static frontend assets | admin portal | [studenthub-admin/.circleci/config.yml](https://github.com/BAWES-Universe/studenthub-admin/blob/b453c0c7d0b0f170964a82948fb09da610cde5e9/.circleci/config.yml#L1-L202) | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | EWGE3N1OKYVZX (dev), E3PPAL159PAQIU (staging) |
-| AWS ECR | Storage | Stores Docker images for backend deployment | backend | [studenthub/README.md](https://github.com/BAWES-Universe/studenthub/blob/ca90a5502040ba8191fe9f80d29d0b6a4d2a6152/README.md#L9-L150) | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | 438663597141.dkr.ecr.eu-west-2.amazonaws.com |
+| AWS ECR | Storage | Stores Docker images for backend deployment | backend | [studenthub/README.md](https://github.com/BAWES-Universe/studenthub/blob/ca90a5502040ba8191fe9f80d29d0b6a4d2a6152/README.md#L9-L150) | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ECR_ACCOUNT_ID, AWS_ECR_REGION, AWS_ECR_IMAGE, AWS_ECR_TAG | Registry configured via environment variables (deployment template hardening) |
| CircleCI | Other | CI/CD pipeline for building and deploying frontend | admin portal | [studenthub-admin/.circleci/config.yml](https://github.com/BAWES-Universe/studenthub-admin/blob/b453c0c7d0b0f170964a82948fb09da610cde5e9/.circleci/config.yml#L1-L202) | context: org-global | N/A |
| Railway | Hosting | Deploys and manages backend environments and MySQL databases | backend, cron/worker | [studenthub/railway/railway.md](https://github.com/BAWES-Universe/studenthub/blob/ca90a5502040ba8191fe9f80d29d0b6a4d2a6152/railway/railway.md#L1-L34), [studenthub/environments/dev-server-railway/deployments/july_2025/3_july_2025_deployment.sh](https://github.com/BAWES-Universe/studenthub/pull/8) | RAILWAY_DOCKERFILE_PATH | mysql.railway.internal |
| Netlify | Hosting/CDN | Hosts static frontend portals (SPA routing) | staff portal, admin portal | [studenthub-staff/src/_redirects](https://github.com/BAWES-Universe/studenthub-staff/pull/12), [studenthub-staff/angular.json](https://github.com/BAWES-Universe/studenthub-staff/pull/13), [studenthub-admin/src/netlify.toml](https://github.com/BAWES-Universe/studenthub-admin/pull/10) | NODE_VERSION, NODE_OPTIONS | N/A | |
/claim #55
Summary
aws-template.sh,aws-template-dev.sh, andaws-template-docker.shhelpers so they no longer write inline GitHub private/public key placeholders into deploy key filesGITHUB_DEPLOY_KEY_PATHand install the deploy key with mode600, with optional public-key copy whenGITHUB_DEPLOY_PUBLIC_KEY_PATHis providedAWS_ECR_ACCOUNT_ID,AWS_ECR_REGION,AWS_ECR_IMAGE, andAWS_ECR_TAGvariablesDemo
docs/demo/studenthub-55-aws-template-hardening-demo.webmValidation
python3 scripts/check-aws-template-hardening.pybash -n aws-template.sh && bash -n aws-template-dev.sh && bash -n aws-template-docker.shpython3 -m py_compile scripts/check-aws-template-hardening.pygit diff --checkffprobe -v error -show_entries format=duration,size -show_streams docs/demo/studenthub-55-aws-template-hardening-demo.webmSafety scope
No live AWS/IAM calls, key rotation, bucket policy changes, candidate data, credentials, or private exports are accessed or committed.