Compare commits

...

84 Commits

Author SHA1 Message Date
Release Automation 1fa7ccadcd chore(release): 1.4.4 2020-07-17 14:03:05 +00:00
dependabot[bot] 34a2f81761 chore: Bump lodash from 4.17.15 to 4.17.19 (#98)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 13:57:19 +00:00
Release Automation 6835cc9216 chore(release): 1.4.3 2020-07-14 19:42:41 +00:00
GitHub Actions bb38f46f0f chore: Update dist 2020-07-10 12:02:38 +00:00
dependabot[bot] e55fab9d37 chore: Bump aws-sdk from 2.708.0 to 2.713.0 (#96)
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.708.0 to 2.713.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.708.0...v2.713.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-10 12:02:06 +00:00
GitHub Actions 740d8a44f8 chore: Update dist 2020-07-08 23:25:49 +00:00
KeifferCulbreth baf85d8be9 fix: Make tagging optional (#92)
* fix:making role session tagging optional

* test:improve test coverage

Add test to cover error thrown if access key exists and no secret key provided

* docs: Update README.md

Add details about skipping session tagging during role assumption

Co-authored-by: KeifferCulbreth <KeifferCulbreth@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-08 23:25:05 +00:00
dependabot[bot] b3a87c1114 chore: Bump eslint from 7.3.1 to 7.4.0 (#94)
Bumps [eslint](https://github.com/eslint/eslint) from 7.3.1 to 7.4.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.3.1...v7.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-07 05:46:11 +00:00
GitHub Actions 9ba95ecaf9 chore: Update dist 2020-06-30 19:38:24 +00:00
dependabot[bot] 2e0b693663 chore: Bump aws-sdk from 2.707.0 to 2.708.0 (#90)
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.707.0 to 2.708.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.707.0...v2.708.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-30 19:37:54 +00:00
Piradeep Kandasamy 2f596bbeba chore: update dependabot schedule (#89) 2020-06-30 19:35:55 +00:00
Release Automation 9a78866a56 chore(release): 1.4.2 2020-06-30 16:25:14 +00:00
GitHub Actions 58784d3648 chore: Update dist 2020-06-30 16:09:28 +00:00
dependabot[bot] e22426a453 chore: Bump aws-sdk from 2.706.0 to 2.707.0 (#88)
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.706.0 to 2.707.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.706.0...v2.707.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-30 16:08:55 +00:00
Clare Liguori fe3da2c1fd chore: Switch to GitHub-native Dependabot 2020-06-30 09:06:27 -07:00
GitHub Actions 67b6c7c1a9 chore: Update dist 2020-06-29 16:59:43 +00:00
dependabot-preview[bot] 7ab2a28ca9 Merge pull request #86 from aws-actions/dependabot/npm_and_yarn/aws-sdk-2.706.0 2020-06-29 16:59:12 +00:00
dependabot-preview[bot] 77a21a780c chore: Bump aws-sdk from 2.704.0 to 2.706.0
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.704.0 to 2.706.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.704.0...v2.706.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-29 16:58:05 +00:00
GitHub Actions ae509cd90a chore: Update dist 2020-06-29 16:16:05 +00:00
Rodrigo Quezada f04843b510 fix: add comma to set of special characters (#78)
* add comma to set

* add comma to set

* fix: test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-29 16:15:17 +00:00
dependabot-preview[bot] 5b6b815585 Merge pull request #84 from aws-actions/dependabot/npm_and_yarn/jest-26.1.0 2020-06-24 23:19:34 +00:00
dependabot-preview[bot] 1a820d1dd7 chore: Bump jest from 26.0.1 to 26.1.0
Bumps [jest](https://github.com/facebook/jest) from 26.0.1 to 26.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v26.0.1...v26.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-24 23:18:32 +00:00
GitHub Actions cdd78886ae chore: Update dist 2020-06-24 23:18:05 +00:00
dependabot-preview[bot] 053a0e8b78 Merge pull request #85 from aws-actions/dependabot/npm_and_yarn/aws-sdk-2.704.0 2020-06-24 23:17:37 +00:00
dependabot-preview[bot] 863af956d9 Merge pull request #83 from aws-actions/dependabot/npm_and_yarn/eslint-7.3.1 2020-06-24 23:16:47 +00:00
dependabot-preview[bot] f4f3929463 chore: Bump aws-sdk from 2.692.0 to 2.704.0
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.692.0 to 2.704.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.692.0...v2.704.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-24 23:16:33 +00:00
dependabot-preview[bot] 96febc6582 chore: Bump eslint from 7.2.0 to 7.3.1
Bumps [eslint](https://github.com/eslint/eslint) from 7.2.0 to 7.3.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.2.0...v7.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-24 23:15:31 +00:00
Release Automation da082bd937 chore(release): 1.4.1 2020-06-09 17:20:21 +00:00
GitHub Actions 554e695b56 chore: Update dist 2020-06-09 01:36:05 +00:00
dependabot-preview[bot] 06ce89fcf6 Merge pull request #76 from aws-actions/dependabot/npm_and_yarn/aws-sdk-2.692.0 2020-06-09 01:35:30 +00:00
dependabot-preview[bot] 684c75b685 Merge pull request #75 from aws-actions/dependabot/npm_and_yarn/eslint-7.2.0 2020-06-09 01:34:35 +00:00
dependabot-preview[bot] 442c1ba794 chore: Bump aws-sdk from 2.686.0 to 2.692.0
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.686.0 to 2.692.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.686.0...v2.692.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 01:34:14 +00:00
dependabot-preview[bot] c787feb964 chore: Bump eslint from 7.1.0 to 7.2.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.1.0 to 7.2.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.1.0...v7.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 01:33:31 +00:00
Release Automation 58b282f00f chore(release): 1.4.0 2020-06-03 20:34:11 +00:00
Clare Liguori 472e549195 feat: Refresh and validate credentials after setting env var creds (#71)
* feat: Refresh and validate credentials after setting env var creds

* Positive test case

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-03 20:05:51 +00:00
GitHub Actions 187737abc2 chore: Update dist 2020-06-01 13:38:19 +00:00
dependabot-preview[bot] 8d8bc098cc Merge pull request #74 from aws-actions/dependabot/npm_and_yarn/aws-sdk-2.686.0 2020-06-01 13:37:47 +00:00
dependabot-preview[bot] fa078d278f chore: Bump aws-sdk from 2.684.0 to 2.686.0
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.684.0 to 2.686.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.684.0...v2.686.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 13:36:40 +00:00
Release Automation 9f7f57b093 chore(release): 1.3.5 2020-05-27 16:03:20 +00:00
dependabot-preview[bot] 09758fb6fe Merge pull request #66 from aws-actions/dependabot/npm_and_yarn/zeit/ncc-0.22.3 2020-05-26 19:17:49 +00:00
GitHub Actions 38878c03af chore: Update dist 2020-05-26 19:12:44 +00:00
dependabot-preview[bot] ab6dfc4459 chore: Bump @zeit/ncc from 0.22.2 to 0.22.3
Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.22.2 to 0.22.3.
- [Release notes](https://github.com/zeit/ncc/releases)
- [Commits](https://github.com/zeit/ncc/compare/0.22.2...0.22.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-26 19:12:17 +00:00
dependabot-preview[bot] 9d7a893ad4 Merge pull request #68 from aws-actions/dependabot/npm_and_yarn/aws-sdk-2.684.0 2020-05-26 19:11:54 +00:00
dependabot-preview[bot] 48c7de6aec Merge pull request #67 from aws-actions/dependabot/npm_and_yarn/eslint-7.1.0 2020-05-26 19:10:37 +00:00
dependabot-preview[bot] 2371778031 chore: Bump aws-sdk from 2.679.0 to 2.684.0
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.679.0 to 2.684.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.679.0...v2.684.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-26 19:10:04 +00:00
dependabot-preview[bot] aec054896e chore: Bump eslint from 7.0.0 to 7.1.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.0.0...v7.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-26 19:09:32 +00:00
GitHub Actions 9c93b3b896 chore: Update dist 2020-05-26 04:01:20 +00:00
Clare Liguori 0c2c1f7c12 fix: clear session token env var if present for non-session credentials (#65) 2020-05-26 04:00:51 +00:00
Release Automation 2d01f93692 chore(release): 1.3.4 2020-05-18 22:37:00 +00:00
GitHub Actions 7d7a0bc951 chore: Update dist 2020-05-18 22:12:58 +00:00
dependabot-preview[bot] 92f9ac93ef Merge pull request #62 from aws-actions/dependabot/npm_and_yarn/zeit/ncc-0.22.2 2020-05-18 22:12:15 +00:00
dependabot-preview[bot] d91230b55a chore: Bump @zeit/ncc from 0.22.0 to 0.22.2
Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.22.0 to 0.22.2.
- [Release notes](https://github.com/zeit/ncc/releases)
- [Commits](https://github.com/zeit/ncc/compare/0.22.0...0.22.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 22:10:42 +00:00
dependabot-preview[bot] 00fabbe944 Merge pull request #60 from aws-actions/dependabot/npm_and_yarn/jest-26.0.1 2020-05-18 22:09:10 +00:00
dependabot-preview[bot] 0b4d37d15b chore: Bump jest from 25.2.4 to 26.0.1
Bumps [jest](https://github.com/facebook/jest) from 25.2.4 to 26.0.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.4...v26.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 22:06:18 +00:00
dependabot-preview[bot] 6222ef53ed Merge pull request #64 from aws-actions/dependabot/npm_and_yarn/eslint-7.0.0 2020-05-18 22:04:29 +00:00
GitHub Actions 4dffe9935f chore: Update dist 2020-05-18 21:54:35 +00:00
Piradeep Kandasamy 7a20e4d87a Merge pull request #63 from aws-actions/dependabot/npm_and_yarn/aws-sdk-2.679.0
chore: Bump aws-sdk from 2.650.0 to 2.679.0
2020-05-18 14:54:04 -07:00
Piradeep Kandasamy d0f92ec22a Merge branch 'master' into dependabot/npm_and_yarn/aws-sdk-2.679.0 2020-05-18 14:02:13 -07:00
dependabot-preview[bot] c4c5364d3e chore: Bump eslint from 6.8.0 to 7.0.0
Bumps [eslint](https://github.com/eslint/eslint) from 6.8.0 to 7.0.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.8.0...v7.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 19:39:01 +00:00
GitHub Actions 5c99022f7d chore: Update dist 2020-05-18 19:38:58 +00:00
dependabot-preview[bot] 573b434a39 chore: Bump aws-sdk from 2.650.0 to 2.679.0
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.650.0 to 2.679.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.650.0...v2.679.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 19:38:32 +00:00
dependabot-preview[bot] 4162c23c46 Merge pull request #61 from aws-actions/dependabot/npm_and_yarn/actions/core-1.2.4 2020-05-18 19:38:30 +00:00
dependabot-preview[bot] 1116bc7043 chore: Bump @actions/core from 1.2.3 to 1.2.4
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 19:37:20 +00:00
Clare Liguori 32a3a7cc43 chore: add table of contents to README 2020-04-19 19:09:20 -07:00
Clare Liguori 35a0f3fe6c chore: make permissions section title more descriptive 2020-04-19 18:40:29 -07:00
J. Davila 0a0b8e52b4 docs: add code block tags 2020-04-15 10:42:33 -07:00
Release Automation b77dc22838 chore(release): 1.3.3 2020-04-02 17:21:18 +00:00
dependabot-preview[bot] 40fbf99f9b chore: Bump @zeit/ncc from 0.21.1 to 0.22.0
Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.21.1 to 0.22.0.
- [Release notes](https://github.com/zeit/ncc/releases)
- [Commits](https://github.com/zeit/ncc/compare/0.21.1...0.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-01 18:09:58 -07:00
dependabot-preview[bot] bc03572061 Merge pull request #53 from aws-actions/dependabot/npm_and_yarn/jest-25.2.4 2020-04-01 08:41:14 +00:00
GitHub Actions c831837ecb chore: Update dist 2020-04-01 08:41:00 +00:00
dependabot-preview[bot] 9a3b1bcbca Merge pull request #52 from aws-actions/dependabot/npm_and_yarn/aws-sdk-2.650.0 2020-04-01 08:40:31 +00:00
dependabot-preview[bot] e798aff9bb chore: Bump jest from 25.1.0 to 25.2.4
Bumps [jest](https://github.com/facebook/jest) from 25.1.0 to 25.2.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.1.0...v25.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-01 08:40:08 +00:00
dependabot-preview[bot] f99a28d036 chore: Bump aws-sdk from 2.643.0 to 2.650.0
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.643.0 to 2.650.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.643.0...v2.650.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-01 08:39:27 +00:00
GitHub Actions 96ec5c4c14 chore: Update dist 2020-03-21 02:43:58 +00:00
dependabot-preview[bot] 8ee391aeef Merge pull request #49 from aws-actions/dependabot/npm_and_yarn/aws-sdk-2.643.0 2020-03-21 02:43:30 +00:00
dependabot-preview[bot] a679b609cc chore: Bump aws-sdk from 2.633.0 to 2.643.0
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.633.0 to 2.643.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.633.0...v2.643.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-21 02:42:22 +00:00
Release Automation c9874b9244 chore(release): 1.3.2 2020-03-18 21:05:44 +00:00
GitHub Actions 3e2ba00093 chore: Update dist 2020-03-18 20:55:56 +00:00
Clare Liguori fc72bd38db fix: let the AWS SDK determine the STS regional endpoint (#48) 2020-03-18 20:55:16 +00:00
dependabot-preview[bot] a633ed5e02 Merge pull request #45 from aws-actions/dependabot/npm_and_yarn/acorn-6.4.1 2020-03-13 21:22:16 +00:00
dependabot-preview[bot] c8c5fb1fc0 chore: [Security] Bump acorn from 6.4.0 to 6.4.1
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1. **This update includes a security fix.**
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-13 21:21:11 +00:00
Release Automation cf6b87e99e chore(release): 1.3.1 2020-03-06 22:35:15 +00:00
GitHub Actions 5ce6d03987 chore: Update dist 2020-03-06 22:30:26 +00:00
Clare Liguori 3d568d2c43 fix: validate region input string (#44) 2020-03-06 14:29:46 -08:00
11 changed files with 2479 additions and 1716 deletions
-9
View File
@@ -1,9 +0,0 @@
version: 1
update_configs:
- package_manager: "javascript"
directory: "/"
update_schedule: "monthly"
automerged_updates:
- match:
dependency_type: "all"
update_type: "semver:minor"
+8
View File
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: tuesday
open-pull-requests-limit: 10
+8 -3
View File
@@ -12,17 +12,18 @@ pull_request_rules:
- -merged
- -closed
- author!=dependabot[bot]
- author!=dependabot-preview[bot]
actions:
merge:
method: squash
strict: smart
strict_method: merge
- name: Automatically approve Dependabot PRs
- name: Automatically approve and merge Dependabot PRs
conditions:
- base=master
- author~=^dependabot(|-preview)\[bot\]$
- author=dependabot[bot]
- status-success=Run Unit Tests
- status-success=Semantic Pull Request
- -title~=(WIP|wip)
- -label~=(blocked|do-not-merge)
- -merged
@@ -30,3 +31,7 @@ pull_request_rules:
actions:
review:
type: APPROVE
merge:
method: squash
strict: smart+fasttrack
strict_method: merge
+50
View File
@@ -2,6 +2,56 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.4.4](https://github.com/aws-actions/configure-aws-credentials/compare/v1.4.3...v1.4.4) (2020-07-17)
### [1.4.3](https://github.com/aws-actions/configure-aws-credentials/compare/v1.4.2...v1.4.3) (2020-07-14)
### Bug Fixes
* Make tagging optional ([#92](https://github.com/aws-actions/configure-aws-credentials/issues/92)) ([baf85d8](https://github.com/aws-actions/configure-aws-credentials/commit/baf85d8be969f190df9bc9153f06958c32ef3828))
### [1.4.2](https://github.com/aws-actions/configure-aws-credentials/compare/v1.4.1...v1.4.2) (2020-06-30)
### Bug Fixes
* add comma to set of special characters ([#78](https://github.com/aws-actions/configure-aws-credentials/issues/78)) ([f04843b](https://github.com/aws-actions/configure-aws-credentials/commit/f04843b510a6c8adf77eed907a616cf00a99970d))
### [1.4.1](https://github.com/aws-actions/configure-aws-credentials/compare/v1.4.0...v1.4.1) (2020-06-09)
## [1.4.0](https://github.com/aws-actions/configure-aws-credentials/compare/v1.3.5...v1.4.0) (2020-06-03)
### Features
* Refresh and validate credentials after setting env var creds ([#71](https://github.com/aws-actions/configure-aws-credentials/issues/71)) ([472e549](https://github.com/aws-actions/configure-aws-credentials/commit/472e549195ba1f153e9fb72e39dc2a094e5de13e))
### [1.3.5](https://github.com/aws-actions/configure-aws-credentials/compare/v1.3.4...v1.3.5) (2020-05-27)
### Bug Fixes
* clear session token env var if present for non-session credentials ([#65](https://github.com/aws-actions/configure-aws-credentials/issues/65)) ([0c2c1f7](https://github.com/aws-actions/configure-aws-credentials/commit/0c2c1f7c129971b6f433551b1f4ba4a6a9cc8b70))
### [1.3.4](https://github.com/aws-actions/configure-aws-credentials/compare/v1.3.3...v1.3.4) (2020-05-18)
### [1.3.3](https://github.com/aws-actions/configure-aws-credentials/compare/v1.3.2...v1.3.3) (2020-04-02)
### [1.3.2](https://github.com/aws-actions/configure-aws-credentials/compare/v1.3.1...v1.3.2) (2020-03-18)
### Bug Fixes
* let the AWS SDK determine the STS regional endpoint ([#48](https://github.com/aws-actions/configure-aws-credentials/issues/48)) ([fc72bd3](https://github.com/aws-actions/configure-aws-credentials/commit/fc72bd38dbe25493f5113760c9c6e1ef2f6f9a0e))
### [1.3.1](https://github.com/aws-actions/configure-aws-credentials/compare/v1.3.0...v1.3.1) (2020-03-06)
### Bug Fixes
* validate region input string ([#44](https://github.com/aws-actions/configure-aws-credentials/issues/44)) ([3d568d2](https://github.com/aws-actions/configure-aws-credentials/commit/3d568d2c4359304d46d9bd1b4d9f69e088ccbf7b))
## [1.3.0](https://github.com/aws-actions/configure-aws-credentials/compare/v1.2.0...v1.3.0) (2020-03-06)
+51 -12
View File
@@ -2,6 +2,21 @@
Configure AWS credential and region environment variables for use in other GitHub Actions. The environment variables will be detected by both the AWS SDKs and the AWS CLI to determine the credentials and region to use for AWS API calls.
**Table of Contents**
<!-- toc -->
- [Usage](#usage)
- [Credentials](#credentials)
- [Assuming a Role](#assuming-a-role)
+ [Permissions for assuming a role](#permissions-for-assuming-a-role)
+ [Session tagging](#session-tagging)
- [Self-Hosted Runners](#self-hosted-runners)
- [License Summary](#license-summary)
- [Security Disclosures](#security-disclosures)
<!-- tocstop -->
## Usage
Add the following step to your workflow:
@@ -16,8 +31,9 @@ Add the following step to your workflow:
```
For example, you can use this action with the AWS CLI available in [GitHub's hosted virtual environments](https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners).
You can also run this action multiple times to use different AWS accounts, regions, or IAM roles in the same GitHub Actions workflow job.
```
```yaml
jobs:
deploy:
name: Upload to Amazon S3
@@ -27,16 +43,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Copy files to S3 with the AWS CLI
- name: Copy files to the test website with the AWS CLI
run: |
aws s3 sync . s3://my-s3-website-bucket
aws s3 sync . s3://my-s3-test-website-bucket
- name: Configure AWS credentials from Production account
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Copy files to the production website with the AWS CLI
run: |
aws s3 sync . s3://my-s3-prod-website-bucket
```
See [action.yml](action.yml) for the full documentation for this action's inputs and outputs.
@@ -50,7 +77,7 @@ We recommend following [Amazon IAM best practices](https://docs.aws.amazon.com/I
* [Rotate the credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#rotate-credentials) used in GitHub Actions workflows regularly.
* [Monitor the activity](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#keep-a-log) of the credentials used in GitHub Actions workflows.
## Assuming a role
## Assuming a Role
If you would like to use the static credentials you provide to this action to assume a role, you can do so by specifying the role ARN in `role-to-assume`.
The role credentials will then be configured in the Actions environment instead of the static credentials you have provided.
The default session duration is 6 hours, but if you would like to adjust this you can pass a duration to `role-duration-seconds`.
@@ -71,10 +98,10 @@ Example:
```
In this example, the secret `AWS_ROLE_TO_ASSUME` contains a string like `arn:aws:iam::123456789100:role/my-github-actions-role`. To assume a role in the same account as the static credentials, you can simply specify the role name, like `role-to-assume: my-github-actions-role`.
### Permissions
### Permissions for assuming a role
In order to assume a role, the IAM user for the static credentials must have the following permissions:
```
```json
{
"Version": "2012-10-17",
"Statement": [
@@ -91,7 +118,7 @@ In order to assume a role, the IAM user for the static credentials must have the
```
The role's trust policy must allow the IAM user to assume the role:
```
```json
{
"Version": "2012-10-17",
"Statement": [
@@ -130,7 +157,15 @@ The session will have the name "GitHubActions" and be tagged with the following
_Note: all tag values must conform to [the requirements](https://docs.aws.amazon.com/STS/latest/APIReference/API_Tag.html). Particularly, `GITHUB_WORKFLOW` will be truncated if it's too long. If `GITHUB_ACTOR` or `GITHUB_WORKFLOW` contain invalid charcters, the characters will be replaced with an '*'._
## Self-hosted runners
The action will use session tagging by default during role assumption. You can skip this session tagging by providing `role-skip-session-tagging` as true in the action's inputs:
```yaml
uses: aws-actions/configure-aws-credentials@v1
with:
role-skip-session-tagging: true
```
## Self-Hosted Runners
If you run your GitHub Actions in a [self-hosted runner](https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) that already has access to AWS credentials, such as an EC2 instance, then you do not need to provide IAM user access key credentials to this action.
@@ -156,3 +191,7 @@ In this case, your runner's credentials must have permissions to assume the role
## License Summary
This code is made available under the MIT license.
## Security Disclosures
If you would like to report a potential security issue in this project, please do not create a GitHub issue. Instead, please follow the instructions [here](https://aws.amazon.com/security/vulnerability-reporting/) or [email AWS security directly](mailto:aws-security@amazon.com).
+3
View File
@@ -43,6 +43,9 @@ inputs:
role-external-id:
description: 'The external ID of the role to assume'
required: false
role-skip-session-tagging:
description: 'Skip session tagging during role assumption'
required: false
outputs:
aws-account-id:
description: 'The AWS account ID for the provided credentials'
+603 -245
View File
File diff suppressed because one or more lines are too long
+78 -14
View File
@@ -1,7 +1,6 @@
const core = require('@actions/core');
const aws = require('aws-sdk');
const assert = require('assert');
const util = require('util');
// The max time that a GitHub action is allowed to run is 6 hours.
// That seems like a reasonable default to use if no role duration is defined.
@@ -10,6 +9,7 @@ const USER_AGENT = 'configure-aws-credentials-for-github-actions';
const MAX_TAG_VALUE_LENGTH = 256;
const SANITIZATION_CHARACTER = '_';
const ROLE_SESSION_NAME = 'GitHubActions';
const REGION_REGEX = /^[a-z0-9-]+$/g;
async function assumeRole(params) {
// Assume a role to get short-lived credentials using longer-lived credentials.
@@ -22,6 +22,7 @@ async function assumeRole(params) {
roleDurationSeconds,
roleSessionName,
region,
roleSkipSessionTagging
} = params;
assert(
[sourceAccountId, roleToAssume, roleDurationSeconds, roleSessionName, region].every(isDefined),
@@ -41,20 +42,23 @@ async function assumeRole(params) {
// Supports only 'aws' partition. Customers in other partitions ('aws-cn') will need to provide full ARN
roleArn = `arn:aws:iam::${sourceAccountId}:role/${roleArn}`;
}
const tagArray = [
{Key: 'GitHub', Value: 'Actions'},
{Key: 'Repository', Value: GITHUB_REPOSITORY},
{Key: 'Workflow', Value: sanitizeGithubWorkflowName(GITHUB_WORKFLOW)},
{Key: 'Action', Value: GITHUB_ACTION},
{Key: 'Actor', Value: sanitizeGithubActor(GITHUB_ACTOR)},
{Key: 'Branch', Value: GITHUB_REF},
{Key: 'Commit', Value: GITHUB_SHA},
];
const roleSessionTags = roleSkipSessionTagging ? undefined : tagArray;
const assumeRoleRequest = {
RoleArn: roleArn,
RoleSessionName: roleSessionName,
DurationSeconds: roleDurationSeconds,
Tags: [
{Key: 'GitHub', Value: 'Actions'},
{Key: 'Repository', Value: GITHUB_REPOSITORY},
{Key: 'Workflow', Value: sanitizeGithubWorkflowName(GITHUB_WORKFLOW)},
{Key: 'Action', Value: GITHUB_ACTION},
{Key: 'Actor', Value: sanitizeGithubActor(GITHUB_ACTOR)},
{Key: 'Branch', Value: GITHUB_REF},
{Key: 'Commit', Value: GITHUB_SHA},
]
Tags: roleSessionTags
};
if (roleExternalId) {
@@ -82,7 +86,7 @@ function sanitizeGithubWorkflowName(name) {
// Workflow names can be almost any valid UTF-8 string, but tags are more restrictive.
// This replaces anything not conforming to the tag restrictions by inverting the regular expression.
// See the AWS documentation for constraint specifics https://docs.aws.amazon.com/STS/latest/APIReference/API_Tag.html.
const nameWithoutSpecialCharacters = name.replace(/[^\p{L}\p{Z}\p{N}_.:/=+-@]/gu, SANITIZATION_CHARACTER);
const nameWithoutSpecialCharacters = name.replace(/[^\p{L}\p{Z}\p{N}_:/=+.-@-]/gu, SANITIZATION_CHARACTER);
const nameTruncated = nameWithoutSpecialCharacters.slice(0, MAX_TAG_VALUE_LENGTH)
return nameTruncated
}
@@ -107,6 +111,9 @@ function exportCredentials(params){
if (sessionToken) {
core.exportVariable('AWS_SESSION_TOKEN', sessionToken);
core.setSecret(sessionToken);
} else if (process.env.AWS_SESSION_TOKEN) {
// clear session token from previous credentials action
core.exportVariable('AWS_SESSION_TOKEN', '');
}
}
@@ -129,11 +136,54 @@ async function exportAccountId(maskAccountId, region) {
return accountId;
}
function loadCredentials() {
// Force the SDK to re-resolve credentials with the default provider chain.
//
// This action typically sets credentials in the environment via environment variables.
// The SDK never refreshes those env-var-based credentials after initial load.
// In case there were already env-var creds set in the actions environment when this action
// loaded, this action needs to refresh the SDK creds after overwriting those environment variables.
//
// The credentials object needs to be entirely recreated (instead of simply refreshed),
// because the credential object type could change when this action writes env var creds.
// For example, the first load could return EC2 instance metadata credentials
// in a self-hosted runner, and the second load could return environment credentials
// from an assume-role call in this action.
aws.config.credentials = null;
return new Promise((resolve, reject) => {
aws.config.getCredentials((err) => {
if (err) {
reject(err);
}
resolve(aws.config.credentials);
})
});
}
async function validateCredentials(expectedAccessKeyId) {
let credentials;
try {
credentials = await loadCredentials();
if (!credentials.accessKeyId) {
throw new Error('Access key ID empty after loading credentials');
}
} catch (error) {
throw new Error(`Credentials could not be loaded, please check your action inputs: ${error.message}`);
}
const actualAccessKeyId = credentials.accessKeyId;
if (expectedAccessKeyId && expectedAccessKeyId != actualAccessKeyId) {
throw new Error('Unexpected failure: Credentials loaded by the SDK do not match the access key ID configured by the action');
}
}
function getStsClient(region) {
const endpoint = util.format('https://sts.%s.amazonaws.com', region);
return new aws.STS({
region,
endpoint,
stsRegionalEndpoints: 'regional',
customUserAgent: USER_AGENT
});
}
@@ -150,6 +200,11 @@ async function run() {
const roleExternalId = core.getInput('role-external-id', { required: false });
const roleDurationSeconds = core.getInput('role-duration-seconds', {required: false}) || MAX_ACTION_RUNTIME;
const roleSessionName = core.getInput('role-session-name', { required: false }) || ROLE_SESSION_NAME;
const roleSkipSessionTagging = core.getInput('role-skip-session-tagging', { required: false });
if (!region.match(REGION_REGEX)) {
throw new Error(`Region is not valid: ${region}`);
}
exportRegion(region);
@@ -166,6 +221,13 @@ async function run() {
exportCredentials({accessKeyId, secretAccessKey, sessionToken});
}
// Regardless of whether any source credentials were provided as inputs,
// validate that the SDK can actually pick up credentials. This validates
// cases where this action is on a self-hosted runner that doesn't have credentials
// configured correctly, and cases where the user intended to provide input
// credentials but the secrets inputs resolved to empty strings.
await validateCredentials(accessKeyId);
const sourceAccountId = await exportAccountId(maskAccountId, region);
// Get role credentials if configured to do so
@@ -176,9 +238,11 @@ async function run() {
roleToAssume,
roleExternalId,
roleDurationSeconds,
roleSessionName
roleSessionName,
roleSkipSessionTagging
});
exportCredentials(roleCredentials);
await validateCredentials(roleCredentials.accessKeyId);
await exportAccountId(maskAccountId, region);
}
}
+195 -2
View File
@@ -1,6 +1,6 @@
const core = require('@actions/core');
const assert = require('assert');
const aws = require('aws-sdk');
const run = require('.');
jest.mock('@actions/core');
@@ -49,6 +49,9 @@ const mockStsAssumeRole = jest.fn();
jest.mock('aws-sdk', () => {
return {
config: {
getCredentials: jest.fn()
},
STS: jest.fn(() => ({
getCallerIdentity: mockStsCallerIdentity,
assumeRole: mockStsAssumeRole,
@@ -82,6 +85,27 @@ describe('Configure AWS Credentials', () => {
}
});
aws.config.getCredentials.mockReset();
aws.config.getCredentials
.mockImplementationOnce(callback => {
if (!aws.config.credentials) {
aws.config.credentials = {
accessKeyId: FAKE_ACCESS_KEY_ID,
secretAccessKey: FAKE_SECRET_ACCESS_KEY
}
}
callback(null);
})
.mockImplementationOnce(callback => {
if (!aws.config.credentials) {
aws.config.credentials = {
accessKeyId: FAKE_STS_ACCESS_KEY_ID,
secretAccessKey: FAKE_STS_SECRET_ACCESS_KEY
}
}
callback(null);
});
mockStsAssumeRole.mockImplementation(() => {
return {
promise() {
@@ -134,6 +158,59 @@ describe('Configure AWS Credentials', () => {
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCOUNT_ID);
});
test('action with no accessible credentials fails', async () => {
process.env.SHOW_STACK_TRACE = 'false';
const mockInputs = {'aws-region': FAKE_REGION};
core.getInput = jest
.fn()
.mockImplementation(mockGetInput(mockInputs));
aws.config.getCredentials.mockReset();
aws.config.getCredentials.mockImplementation(callback => {
callback(new Error('No credentials to load'));
});
await run();
expect(core.setFailed).toHaveBeenCalledWith("Credentials could not be loaded, please check your action inputs: No credentials to load");
});
test('action with empty credentials fails', async () => {
process.env.SHOW_STACK_TRACE = 'false';
const mockInputs = {'aws-region': FAKE_REGION};
core.getInput = jest
.fn()
.mockImplementation(mockGetInput(mockInputs));
aws.config.getCredentials.mockReset();
aws.config.getCredentials.mockImplementation(callback => {
aws.config.credentials = {
accessKeyId: ''
}
callback(null);
});
await run();
expect(core.setFailed).toHaveBeenCalledWith("Credentials could not be loaded, please check your action inputs: Access key ID empty after loading credentials");
});
test('action fails when credentials are not set in the SDK correctly', async () => {
process.env.SHOW_STACK_TRACE = 'false';
core.getInput = jest
.fn()
.mockImplementation(mockGetInput(ASSUME_ROLE_INPUTS));
aws.config.getCredentials.mockReset();
aws.config.getCredentials.mockImplementation(callback => {
aws.config.credentials = {
accessKeyId: FAKE_ACCESS_KEY_ID
}
callback(null);
});
await run();
expect(core.setFailed).toHaveBeenCalledWith("Unexpected failure: Credentials loaded by the SDK do not match the access key ID configured by the action");
});
test('session token is optional', async () => {
const mockInputs = {...CREDS_INPUTS, 'aws-region': 'eu-west-1'};
core.getInput = jest
@@ -154,6 +231,64 @@ describe('Configure AWS Credentials', () => {
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCOUNT_ID);
});
test('existing env var creds are cleared', async () => {
const mockInputs = {...CREDS_INPUTS, 'aws-region': 'eu-west-1'};
core.getInput = jest
.fn()
.mockImplementation(mockGetInput(mockInputs));
process.env.AWS_ACCESS_KEY_ID = 'foo';
process.env.AWS_SECRET_ACCESS_KEY = 'bar';
process.env.AWS_SESSION_TOKEN = 'helloworld';
aws.config.credentials = {
accessKeyId: 'foo',
secretAccessKey: 'bar',
sessionToken: 'helloworld'
};
await run();
expect(mockStsAssumeRole).toHaveBeenCalledTimes(0);
expect(core.exportVariable).toHaveBeenCalledTimes(5);
expect(core.setSecret).toHaveBeenCalledTimes(3);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_ACCESS_KEY_ID', FAKE_ACCESS_KEY_ID);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCESS_KEY_ID);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_SECRET_ACCESS_KEY', FAKE_SECRET_ACCESS_KEY);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_SECRET_ACCESS_KEY);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_SESSION_TOKEN', '');
expect(core.exportVariable).toHaveBeenCalledWith('AWS_DEFAULT_REGION', 'eu-west-1');
expect(core.exportVariable).toHaveBeenCalledWith('AWS_REGION', 'eu-west-1');
expect(core.setOutput).toHaveBeenCalledWith('aws-account-id', FAKE_ACCOUNT_ID);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCOUNT_ID);
expect(aws.config.credentials.accessKeyId).toBe(FAKE_ACCESS_KEY_ID);
expect(aws.config.credentials.secretAccessKey).toBe(FAKE_SECRET_ACCESS_KEY);
expect(aws.config.credentials.sessionToken).toBeUndefined();
});
test('validates region name', async () => {
process.env.SHOW_STACK_TRACE = 'false';
const mockInputs = {...CREDS_INPUTS, 'aws-region': '$AWS_REGION'};
core.getInput = jest
.fn()
.mockImplementation(mockGetInput(mockInputs));
await run();
expect(core.setFailed).toHaveBeenCalledWith('Region is not valid: $AWS_REGION');
});
test('throws error if access key id exists but missing secret access key', async () => {
process.env.SHOW_STACK_TRACE = 'false';
const inputsWIthoutSecretKey = {...ASSUME_ROLE_INPUTS}
inputsWIthoutSecretKey["aws-secret-access-key"] = undefined
core.getInput = jest
.fn()
.mockImplementation(mockGetInput(inputsWIthoutSecretKey));
await run();
expect(core.setFailed).toHaveBeenCalledWith("'aws-secret-access-key' must be provided if 'aws-access-key-id' is provided");
});
test('can opt out of masking account ID', async () => {
const mockInputs = {...CREDS_INPUTS, 'aws-region': 'us-east-1', 'mask-aws-account-id': 'false'};
core.getInput = jest
@@ -382,7 +517,7 @@ describe('Configure AWS Credentials', () => {
process.env = {...process.env, GITHUB_WORKFLOW: 'Workflow!"#$%&\'()*+, -./:;<=>?@[]^_`{|}~🙂💥🍌1yFvMOeD3ZHYsHrGjCceOboMYzBPo0CRNFdcsVRG6UgR3A912a8KfcBtEVvkAS7kRBq80umGff8mux5IN1y55HQWPNBNyaruuVr4islFXte4FDQZexGJRUSMyHQpxJ8OmZnET84oDmbvmIjgxI6IBrdihX9PHMapT4gQvRYnLqNiKb18rEMWDNoZRy51UPX5sWK2GKPipgKSO9kqLckZai9D2AN2RlWCxtMqChNtxuxjqeqhoQZo0oaq39sjcRZgAAAAAAA'};
const sanitizedWorkflowName = 'Workflow__________+, -./:;<=>?@____________1yFvMOeD3ZHYsHrGjCceOboMYzBPo0CRNFdcsVRG6UgR3A912a8KfcBtEVvkAS7kRBq80umGff8mux5IN1y55HQWPNBNyaruuVr4islFXte4FDQZexGJRUSMyHQpxJ8OmZnET84oDmbvmIjgxI6IBrdihX9PHMapT4gQvRYnLqNiKb18rEMWDNoZRy51UPX5sWK2GKPipgKSO9kqLckZa'
const sanitizedWorkflowName = 'Workflow__________+_ -./:;<=>?@____________1yFvMOeD3ZHYsHrGjCceOboMYzBPo0CRNFdcsVRG6UgR3A912a8KfcBtEVvkAS7kRBq80umGff8mux5IN1y55HQWPNBNyaruuVr4islFXte4FDQZexGJRUSMyHQpxJ8OmZnET84oDmbvmIjgxI6IBrdihX9PHMapT4gQvRYnLqNiKb18rEMWDNoZRy51UPX5sWK2GKPipgKSO9kqLckZa'
await run();
expect(mockStsAssumeRole).toHaveBeenCalledWith({
@@ -401,4 +536,62 @@ describe('Configure AWS Credentials', () => {
})
});
test('skip tagging provided as true', async () => {
core.getInput = jest
.fn()
.mockImplementation(mockGetInput({...ASSUME_ROLE_INPUTS, 'role-skip-session-tagging': true}));
await run();
expect(mockStsAssumeRole).toHaveBeenCalledWith({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 21600,
Tags: undefined
})
});
test('skip tagging provided as false', async () => {
core.getInput = jest
.fn()
.mockImplementation(mockGetInput({...ASSUME_ROLE_INPUTS, 'role-skip-session-tagging': false}));
await run();
expect(mockStsAssumeRole).toHaveBeenCalledWith({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 21600,
Tags: [
{Key: 'GitHub', Value: 'Actions'},
{Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY},
{Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW},
{Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION},
{Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED},
{Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF},
{Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA},
]
})
});
test('skip tagging not provided', async () => {
core.getInput = jest
.fn()
.mockImplementation(mockGetInput({...ASSUME_ROLE_INPUTS}));
await run();
expect(mockStsAssumeRole).toHaveBeenCalledWith({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 21600,
Tags: [
{Key: 'GitHub', Value: 'Actions'},
{Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY},
{Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW},
{Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION},
{Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED},
{Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF},
{Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA},
]
})
});
});
+1477 -1425
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "aws-actions-configure-aws-credentials",
"version": "1.3.0",
"version": "1.4.4",
"description": "Configure AWS Credentials",
"main": "index.js",
"scripts": {
@@ -25,12 +25,12 @@
},
"homepage": "https://github.com/aws-actions/configure-aws-credentials#readme",
"dependencies": {
"@actions/core": "^1.2.3",
"aws-sdk": "^2.633.0"
"@actions/core": "^1.2.4",
"aws-sdk": "^2.713.0"
},
"devDependencies": {
"@zeit/ncc": "^0.21.1",
"eslint": "^6.8.0",
"jest": "^25.1.0"
"@zeit/ncc": "^0.22.3",
"eslint": "^7.4.0",
"jest": "^26.1.0"
}
}