Compare commits

...
Author SHA1 Message Date
Tom Keller 3fba25639d Merge branch 'main' into kellertk/chore 2026-09-11 15:10:08 -07:00
GitHub Actions e92ebccf39 chore: Update dist 2026-09-11 22:02:42 +00:00
Tom Keller 3c84afd7d3 Merge branch 'main' into kellertk/chore 2026-09-11 14:59:58 -07:00
Tom Keller 57b83659c2 feat: add translate-env-variables option (#1961)
* feat: add translate-env-variables option

* feat: add translate-env-variables option
2026-09-11 14:58:45 -07:00
Tom Keller cd1b971920 chore: remove duplicate wording 2026-09-11 13:27:56 -07:00
Tom Keller 030173c162 chore: add link to GH security docs 2026-09-11 13:27:56 -07:00
2 changed files with 11 additions and 8 deletions

No files matched your search

+4 -6
View File
@@ -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
Generated Vendored
+7 -2
View File
@@ -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 });