Goal
Tighten the deploy supply chain. Three related hardening items surfaced during the WebACL fix (PR #39) review but were intentionally out of scope.
Items
1. Migrate AWS auth from long-lived keys to GitHub OIDC
Currently `.github/workflows/deploy-production.yml` uses `secrets.AWS_ACCESS_KEY_ID_PROD` / `secrets.AWS_SECRET_ACCESS_KEY_PROD`. These are long-lived IAM access keys with broad blast radius if leaked.
Replace with OIDC role assumption:
- Create an IAM Role `gh-actions-deploy-prod` with a trust policy scoped to `repo:mikanmarusan/lambda-function-transit:environment:production`.
- Replace `aws-actions/configure-aws-credentials@v4` inputs with `role-to-assume` instead of access keys.
- Delete the old IAM user / access keys.
2. Add `.github/CODEOWNERS`
No CODEOWNERS file exists today. Add one covering at minimum:
```
template.yml @mikanmarusan
samconfig.toml @mikanmarusan
.github/workflows/ @mikanmarusan
CLAUDE.md @mikanmarusan
```
Then enable branch protection on `main` requiring code-owner review for those paths.
3. SHA-pin third-party Actions
Currently `deploy-production.yml` and `ci.yml` reference Actions by major-version tag (`actions/checkout@v4`, `aws-actions/setup-sam@v2`, etc.). Tag refs can be hijacked. Replace with full SHAs:
```
- uses: actions/checkout@ # v4.x.x
```
Use pin-github-action or Dependabot's GitHub Actions ecosystem to keep them current.
Acceptance
Each item can ship as its own PR, but ideally bundled if scope is small.
Related
Goal
Tighten the deploy supply chain. Three related hardening items surfaced during the WebACL fix (PR #39) review but were intentionally out of scope.
Items
1. Migrate AWS auth from long-lived keys to GitHub OIDC
Currently `.github/workflows/deploy-production.yml` uses `secrets.AWS_ACCESS_KEY_ID_PROD` / `secrets.AWS_SECRET_ACCESS_KEY_PROD`. These are long-lived IAM access keys with broad blast radius if leaked.
Replace with OIDC role assumption:
2. Add `.github/CODEOWNERS`
No CODEOWNERS file exists today. Add one covering at minimum:
```
template.yml @mikanmarusan
samconfig.toml @mikanmarusan
.github/workflows/ @mikanmarusan
CLAUDE.md @mikanmarusan
```
Then enable branch protection on `main` requiring code-owner review for those paths.
3. SHA-pin third-party Actions
Currently `deploy-production.yml` and `ci.yml` reference Actions by major-version tag (`actions/checkout@v4`, `aws-actions/setup-sam@v2`, etc.). Tag refs can be hijacked. Replace with full SHAs:
```
```
Use pin-github-action or Dependabot's GitHub Actions ecosystem to keep them current.
Acceptance
Each item can ship as its own PR, but ideally bundled if scope is small.
Related