mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-11-27 18:54:22 +01:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fba25639d | ||
|
|
e92ebccf39 | ||
|
|
3c84afd7d3 | ||
|
|
57b83659c2 | ||
|
|
cd1b971920 | ||
|
|
030173c162 |
No files matched your search
@@ -5,12 +5,6 @@ Authenticate to AWS in GitHub Actions (and others)! Works especially well with
|
||||
|
||||
[secretsmanager]: https://github.com/aws-actions/aws-secretsmanager-get-secrets
|
||||
|
||||
_Note: We recommend that you follow
|
||||
[GitHub's Security Best Practices][ghsecuritybestpractice]
|
||||
when implementing this action._
|
||||
|
||||
[ghsecuritybestpractice]: https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions
|
||||
|
||||
## Quick Start (OIDC, recommended)
|
||||
|
||||
1. Create an IAM Identity Provider in your AWS account for GitHub OIDC. (See
|
||||
@@ -102,6 +96,8 @@ below).
|
||||
- Be especially careful about running Actions in non-ephemeral environments, or
|
||||
[triggering workflows on `pull_request_target`](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target)
|
||||
events.
|
||||
- Follow [GitHub's security best practices][gh-security] for using third-party
|
||||
actions.
|
||||
- Set `translate-env-variables` to false if the [AWS environment variables][env]
|
||||
or the [action input variables](./README.md#inputs-as-environment-variables)
|
||||
in your runner are set by other processes to prevent unexpected behavior.
|
||||
@@ -110,6 +106,8 @@ below).
|
||||
https://docs.github.com/en/actions/security-guides/encrypted-secrets
|
||||
[env]:
|
||||
https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html#EVarSettings
|
||||
[gh-security]:
|
||||
https://docs.github.com/en/actions/security-guides/security-best-practices-for-github-actions
|
||||
|
||||
## Non-OIDC Authentication Options
|
||||
|
||||
|
||||
+7
-2
@@ -74025,7 +74025,10 @@ function translateEnvVariables() {
|
||||
for (const envVar of envVars) {
|
||||
if (process.env[envVar]) {
|
||||
const inputKey = `INPUT_${envVar.replace(/_/g, "-")}`;
|
||||
process.env[inputKey] = process.env[inputKey] || process.env[envVar];
|
||||
if (!process.env[inputKey]) {
|
||||
info(`Translating ${envVar} to input ${envVar.replace(/_/g, "-").toLowerCase()}`);
|
||||
process.env[inputKey] = process.env[envVar];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75935,7 +75938,9 @@ var REGION_REGEX = /^[a-z0-9-]+$/g;
|
||||
var ROLE_SESSION_NAME_REGEX = /^[\w+=,.@-]*$/;
|
||||
async function run() {
|
||||
try {
|
||||
translateEnvVariables();
|
||||
if (getBooleanInput("translate-env-variables", { required: false, default: true })) {
|
||||
translateEnvVariables();
|
||||
}
|
||||
const AccessKeyId = getInput("aws-access-key-id", { required: false });
|
||||
const SecretAccessKey = getInput("aws-secret-access-key", { required: false });
|
||||
const sessionTokenInput = getInput("aws-session-token", { required: false });
|
||||
|
||||
Reference in new issue
Block a user