Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker-vulnerability-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
with:
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/forms-api-plan
role-session-name: ECRPull
role-session-name: DockerVulnerabilityScan
aws-region: ${{ env.AWS_REGION }}

- name: Login to Staging Amazon ECR
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Docker vulnerability scan
uses: cds-snc/security-tools/.github/actions/docker-scan@5a93d1deec72d4cb2737cb8418364fedba1c695c # v3.2.1
env:
TRIVY_DB_REPOSITORY: ${{ vars.TRIVY_DB_REPOSITORY }}
TRIVY_DB_REPOSITORY: ${{ vars.LOCAL_TRIVY_DB_REPOSITORY }}
ECR_REGISTRY: ${{ steps.login-ecr-staging.outputs.registry }}
with:
docker_image: "${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest"
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/staging-post-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ concurrency:
group: staging-post-deployment
cancel-in-progress: true

env:
AWS_ACCOUNT_ID: ${{ vars.STAGING_AWS_ACCOUNT_ID }}
AWS_REGION: ca-central-1

permissions:
id-token: write
contents: write
security-events: write

Expand All @@ -26,10 +31,21 @@ jobs:
- name: Build Docker image
run: docker build --platform=linux/amd64 --provenance false -t forms-api .

- name: Configure AWS credentials using OIDC
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
with:
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/forms-api-plan
role-session-name: StagingPostDeployment
aws-region: ${{ env.AWS_REGION }}

- name: Login to Staging Amazon ECR
id: login-ecr-staging
uses: aws-actions/amazon-ecr-login@f2e9fc6c2b355c1890b65e6f6f0e2ac3e6e22f78

- name: Docker generate SBOM
uses: cds-snc/security-tools/.github/actions/generate-sbom@837a88b6337d4842543184c8eac97a8adac8f302 # v4.0.3
env:
TRIVY_DB_REPOSITORY: ${{ vars.TRIVY_DB_REPOSITORY }}
TRIVY_DB_REPOSITORY: ${{ vars.LOCAL_TRIVY_DB_REPOSITORY }}
with:
docker_image: "forms-api"
dockerfile_path: "Dockerfile"
Expand Down
Loading