{"id":21261371,"url":"https://github.com/dflook/configure-oidc-aws-credentials","last_synced_at":"2026-02-13T10:02:22.728Z","repository":{"id":65421205,"uuid":"591923971","full_name":"dflook/configure-oidc-aws-credentials","owner":"dflook","description":"Fetch temporary AWS session credentials using OIDC","archived":false,"fork":false,"pushed_at":"2024-05-28T17:26:33.000Z","size":128,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T00:19:03.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dflook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-22T11:15:45.000Z","updated_at":"2025-01-30T06:16:51.000Z","dependencies_parsed_at":"2025-01-31T09:28:35.029Z","dependency_job_id":"9e4e5efa-1948-4009-9525-f1f7baa22e66","html_url":"https://github.com/dflook/configure-oidc-aws-credentials","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"f8332fa57e44f1d41104f90146295390236362bf"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dflook/configure-oidc-aws-credentials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fconfigure-oidc-aws-credentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fconfigure-oidc-aws-credentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fconfigure-oidc-aws-credentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fconfigure-oidc-aws-credentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dflook","download_url":"https://codeload.github.com/dflook/configure-oidc-aws-credentials/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fconfigure-oidc-aws-credentials/sbom","scorecard":{"id":339075,"data":{"date":"2025-08-11","repo":{"name":"github.com/dflook/configure-oidc-aws-credentials","commit":"89eeaa16ddf67f8cec1758a9238028de40a4ba52"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T05:22:22.108Z","repository_id":65421205,"created_at":"2025-08-18T05:22:22.108Z","updated_at":"2025-08-18T05:22:22.108Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271889823,"owners_count":24839198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T04:29:11.334Z","updated_at":"2026-02-13T10:02:22.653Z","avatar_url":"https://github.com/dflook.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action to get AWS credentials using OIDC\n\nThis GitHub action fetches temporary AWS role session credentials using OpenID Connect.\nSee [About security hardening with OpenID Connect](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect) for an overview.\n\nThe GitHub identity provider must be configured in you AWS account, and the role you want to assume must have the correct trust policy.\n\n## Inputs\n\n* `role-arn`\n\n  The ARN of the role to get credentials for.\n\n    - Type: string\n    - Required\n\n* `sts-region`\n\n  The AWS region to use the STS regional endpoint in. If not set, the global STS endpoint is used.\n\n    - Type: string\n    - Optional\n\n* `audience`\n\n  The OIDC audience to use.\n\n  If not set this is chosen by the GitHub OIDC identity provider and appears to be the url of the repo owner, e.g.`https://github.com/\u003cowner\u003e`.\n\n  This must be present in the audiences (client-id) list for the identity provider that has been configured in your AWS account.\n  It should also match a condition in the trust policy for the role you want to assume.\n\n    - Type: string\n    - Optional\n\n* `role-session-name`\n\n  An identifier for the role session.\n\n    - Type: string\n    - Optional\n    - Default: 'GitHubActions'\n\n* `duration-seconds`\n\n  The duration of the session.\n\n  The minimum is 900 seconds. It can't be set higher than the maximum session duration of the role, which can be between 1 hour and 12 hours.\n\n    - Type: integer\n    - Optional\n    - Default: 3600\n\n* `export-variables`\n\n  If the AWS environment variables for the session should be exported\n\n  If set to true the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` environment variables will be set for use by subsequent steps.\n\n    - Type: boolean\n    - Optional\n    - Default: false\n\n## Outputs\n\n* `aws-access-key-id`\n* `aws-secret-access-key`\n* `aws-session-token`\n\n  The temporary session credentials for the requested role \n\n* `expiration`\n\n  The date on which the temporary session credentials expire\n\n## Example usage\n\n### AWS Configuration\n\nThese examples would need an IAM Identity provider configured for GitHub in AWS account `123456789000`.\nIt should be an OpenID Connect provider with url `https://token.actions.githubusercontent.com`.\n\nAssuming the actions run in this repo, the GitHub provider will use `https://github.com/dflook` as the default audience.\nTo match this, the audience has been set to `https://github.com/dflook` in the IAM Identity provider for `https://token.actions.githubusercontent.com`\n\nThe role `MyRole` and `MySecondRole` have the trust policy:\n```json\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"\",\n            \"Effect\": \"Allow\",\n            \"Principal\": {\n                \"Federated\": \"arn:aws:iam::123456789000:oidc-provider/token.actions.githubusercontent.com\"\n            },\n            \"Action\": \"sts:AssumeRoleWithWebIdentity\",\n            \"Condition\": {\n                \"StringEquals\": {\n                    \"token.actions.githubusercontent.com:aud\": \"https://github.com/dflook\"\n                },\n                \"StringLike\": {\n                    \"token.actions.githubusercontent.com:sub\": \"repo:dflook/configure-oidc-aws-credentials:*\"\n                }\n            }\n        }\n    ]\n}\n```\n\n### Creating and using a session\n\nThis example fetches and uses temporary credentials using OIDC and exports them as environment variables\nfor the next step.\n\n```yaml\non: [push]\n\npermissions:\n  id-token: write\n  contents: read\n\njobs:\n  simple_example:\n    runs-on: ubuntu-latest\n    name: Export AWS variables with a temporary session\n    steps:\n      - name: Fetch credentials\n        uses: dflook/configure-oidc-aws-credentials@v1\n        with:\n          role-arn: arn:aws:iam::123456789000:role/MyRole\n          export-variables: true\n\n      - name: Test credentials\n        run: aws s3 ls\n```\n\n### Using multiple sessions\n\nThis example creates sessions for two different roles.\nA subsequent step sets the AWS environment variables to use one of the roles.\n\n```yaml\non: [push]\n\npermissions:\n  id-token: write\n  contents: read\n\njobs:\n  multiple_sessions:\n    runs-on: ubuntu-latest\n    name: Use multiple role sessions\n    steps:\n      - name: Fetch MyRole credentials\n        uses: dflook/configure-oidc-aws-credentials@v1\n        id: my-role\n        with:\n          role-arn: arn:aws:iam::123456789000:role/MyRole\n\n      - name: Fetch MySecondRole credentials\n        uses: dflook/configure-oidc-aws-credentials@v1\n        id: my-second-role\n        with:\n          role-arn: arn:aws:iam::123456789000:role/MySecondRole\n\n      - name: Test credentials\n        env:\n          AWS_ACCESS_KEY_ID: ${{ steps.my-role.outputs.aws-access-key-id }}\n          AWS_SECRET_ACCESS_KEY: ${{ steps.my-role.outputs.aws-secret-access-key }}\n          AWS_SESSION_TOKEN: ${{ steps.my-role.outputs.aws-session-token }}\n        run: aws s3 ls\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflook%2Fconfigure-oidc-aws-credentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdflook%2Fconfigure-oidc-aws-credentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflook%2Fconfigure-oidc-aws-credentials/lists"}