# Illustrative, inactive example; no deployment. Provider/environment setup is external.
name: Inspect bounded lab identity
on:
  workflow_dispatch:
permissions:
  contents: read
jobs:
  inspect:
    runs-on: ubuntu-24.04
    timeout-minutes: 5
    environment: staging
    permissions:
      contents: read
      id-token: write
    steps:
      - name: Exchange only the approved environment assertion
        uses: aws-actions/configure-aws-credentials@ff717079ee2060e4bcee96c4779b553acc87447c # v4 (resolved 2026-11-02)
        with:
          role-to-assume: ${{ vars.LAB_ROLE_ARN }}
          aws-region: ca-central-1
          role-duration-seconds: 900
          role-session-name: research-${{ github.run_id }}
          allowed-account-ids: ${{ vars.LAB_ACCOUNT_ID }}
          unset-current-credentials: true
          mask-aws-account-id: true
      - name: Inspect session identity without changing resources
        run: aws sts get-caller-identity --query Arn --output text
