Compare commits

...

8 Commits

Author SHA1 Message Date
Richard Simpson ab4dc55b2e fix: actually build namespace changes 2020-01-09 10:31:15 -06:00
dependabot[bot] e394527e23 chore(deps): bump handlebars from 4.2.1 to 4.5.3 (#9)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.2.1 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.2.1...v4.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-29 21:04:07 -06:00
dependabot[bot] 29150a8fd2 chore(deps): bump npm from 6.11.3 to 6.13.4 (#8)
Bumps [npm](https://github.com/npm/cli) from 6.11.3 to 6.13.4.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v6.11.3...v6.13.4)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-13 13:56:22 -06:00
Richard Simpson 38c189f087 chore(test): organize tests a bit better (#7)
* chore(test): organize tests a bit better

* add caching
2019-11-24 16:00:31 -06:00
Antoine Méausoone 3747195c5f feat(namespace): handle request on vault namespace (#5)
* feat(namespace): handle request on vault namespace
2019-11-24 15:21:11 -06:00
Richard Simpson 0104a02854 doc: fix old docs 2019-10-16 10:23:36 -05:00
Richard Simpson c81d6f1774 doc: add small clarification comment 2019-10-16 10:17:12 -05:00
Richard Simpson da9a93f3f5 fix: package action (#3)
Package action output per github docs.
2019-10-15 14:00:01 -05:00
17 changed files with 5149 additions and 138 deletions
+78 -22
View File
@@ -1,43 +1,83 @@
on: [push] on: [push]
jobs: jobs:
test: build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: setup npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install
run: npm ci
- name: npm build
run: npm run build
- name: npm run test
run: npm run test
integration:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: services:
vault: vaultBasic:
image: vault:1.2.3 image: vault:1.2.3
ports: ports:
- 8200/tcp - 8200/tcp
env: env:
VAULT_DEV_ROOT_TOKEN_ID: testtoken VAULT_DEV_ROOT_TOKEN_ID: testtoken
options: --cap-add=IPC_LOCK options: --cap-add=IPC_LOCK
vaultEnterprise:
image: hashicorp/vault-enterprise:1.3.0_ent
ports:
- 8200/tcp
env:
VAULT_DEV_ROOT_TOKEN_ID: testtoken
options: --cap-add=IPC_LOCK
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Use Node.js 10.x - name: Use Node.js 10.x
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 10.x node-version: 10.x
- name: npm install - name: setup npm cache
run: npm ci uses: actions/cache@v1
- name: npm run test with:
run: npm run test path: ~/.npm
env: key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
CI: true restore-keys: |
- name: npm run test:integration ${{ runner.os }}-node-
run: npm run test:integration - name: npm install
env: run: npm ci
VAULT_HOST: localhost - name: npm build
VAULT_PORT: ${{ job.services.vault.ports[8200] }} run: npm run build
CI: true - name: npm run test:integration:basic
run: npm run test:integration:basic
env:
VAULT_HOST: localhost
VAULT_PORT: ${{ job.services.vaultBasic.ports[8200] }}
CI: true
- name: npm run test:integration:enterprise
run: npm run test:integration:enterprise
env:
VAULT_HOST: localhost
VAULT_PORT: ${{ job.services.vaultEnterprise.ports[8200] }}
CI: true
e2e: e2e:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: services:
vault: vault:
image: vault:1.2.3 image: vault:1.3.0
ports: ports:
- 8200/tcp - 8200/tcp
env: env:
@@ -50,10 +90,19 @@ jobs:
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 10.x node-version: 10.x
- name: setup npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install - name: npm install
run: npm ci run: npm ci
- name: npm build
run: npm run build
- name: setup vault - name: setup vault
run: node ./e2e/setup.js run: node ./integrationTests/e2e/setup.js
env: env:
VAULT_HOST: localhost VAULT_HOST: localhost
VAULT_PORT: ${{ job.services.vault.ports[8200] }} VAULT_PORT: ${{ job.services.vault.ports[8200] }}
@@ -71,13 +120,20 @@ jobs:
publish: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test, e2e] needs: [build, integration, e2e]
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Use Node.js 10.x - name: Use Node.js 10.x
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 10.x node-version: 10.x
- name: setup npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install - name: npm install
run: npm ci run: npm ci
- name: release - name: release
+21 -2
View File
@@ -1,6 +1,6 @@
# vault-action # vault-action
A helper action for easily pulling secrets from the v2 K/V backend of vault. A helper action for easily pulling secrets from the default v2 K/V backend of vault.
## Example Usage ## Example Usage
@@ -68,11 +68,30 @@ This action can take multi-line input, so say you had your AWS keys stored in a
```yaml ```yaml
with: with:
keys: | secrets: |
ci/aws accessKey | AWS_ACCESS_KEY_ID ; ci/aws accessKey | AWS_ACCESS_KEY_ID ;
ci/aws secretKey | AWS_SECRET_ACCESS_KEY ci/aws secretKey | AWS_SECRET_ACCESS_KEY
``` ```
### Namespace
This action could be use with namespace Vault Enterprise feature. You can specify namespace in request :
```yaml
steps:
# ...
- name: Import Secrets
uses: RichiCoder1/vault-action
with:
url: https://vault-enterprise.mycompany.com:8200
token: ${{ secrets.VaultToken }}
namespace: ns1
secrets: |
ci/aws accessKey | AWS_ACCESS_KEY_ID ;
ci/aws secretKey | AWS_SECRET_ACCESS_KEY ;
ci npm_token
```
## Masking ## Masking
This action uses Github Action's built in masking, so all variables will automatically be masked if printed to the console or to logs. This action uses Github Action's built in masking, so all variables will automatically be masked if printed to the console or to logs.
+10 -4
View File
@@ -5,17 +5,23 @@ const got = require('got');
async function exportSecrets() { async function exportSecrets() {
const vaultUrl = core.getInput('url', { required: true }); const vaultUrl = core.getInput('url', { required: true });
const vaultToken = core.getInput('token', { required: true }); const vaultToken = core.getInput('token', { required: true });
const vaultNamespace = core.getInput('namespace', { required: false });
const secretsInput = core.getInput('secrets', { required: true }); const secretsInput = core.getInput('secrets', { required: true });
const secrets = parseSecretsInput(secretsInput); const secrets = parseSecretsInput(secretsInput);
for (const secret of secrets) { for (const secret of secrets) {
const { secretPath, outputName, secretKey } = secret; const { secretPath, outputName, secretKey } = secret;
const result = await got(`${vaultUrl}/v1/secret/data/${secretPath}`, { const requestOptions = {
headers: { headers: {
'X-Vault-Token': vaultToken 'X-Vault-Token': vaultToken
} }};
});
if (vaultNamespace != null){
requestOptions.headers["X-Vault-Namespace"] = vaultNamespace
}
const result = await got(`${vaultUrl}/v1/secret/data/${secretPath}`, requestOptions);
const parsedResponse = JSON.parse(result.body); const parsedResponse = JSON.parse(result.body);
const vaultKeyData = parsedResponse.data; const vaultKeyData = parsedResponse.data;
@@ -91,4 +97,4 @@ module.exports = {
exportSecrets, exportSecrets,
parseSecretsInput, parseSecretsInput,
normalizeOutputKey normalizeOutputKey
}; };
+5 -2
View File
@@ -10,9 +10,12 @@ inputs:
secrets: secrets:
description: 'A semicolon-separated list of secrets to retrieve. These will automatically be converted to environmental variable keys. See README for more details' description: 'A semicolon-separated list of secrets to retrieve. These will automatically be converted to environmental variable keys. See README for more details'
required: true required: true
namespace:
description: 'The Vault namespace from which to query secrets. Vault Enterprise only, unset by default'
required: false
runs: runs:
using: 'node12' using: 'node12'
main: 'index.js' main: 'dist/index.js'
branding: branding:
icon: 'unlock' icon: 'unlock'
color: 'gray-dark' color: 'gray-dark'
+4751
View File
File diff suppressed because it is too large Load Diff
+17
View File
@@ -0,0 +1,17 @@
# Start vault server locally for the purposes of integration tests.
version: "3.0"
services:
vault:
image: vault:1.3.0
environment:
VAULT_DEV_ROOT_TOKEN_ID: testtoken
ports:
- 8200:8200
privileged: true
vault-enterprise:
image: hashicorp/vault-enterprise:1.3.0_ent
environment:
VAULT_DEV_ROOT_TOKEN_ID: testtoken
ports:
- 8201:8201
privileged: true
@@ -5,51 +5,52 @@ const core = require('@actions/core');
const got = require('got'); const got = require('got');
const { when } = require('jest-when'); const { when } = require('jest-when');
const { exportSecrets } = require('../action'); const { exportSecrets } = require('../../action');
const vaultUrl = `http://${process.env.VAULT_HOST || 'localhost'}:${process.env.VAULT_PORT || '8200'}`;
describe('integration', () => { describe('integration', () => {
beforeAll(async () => { beforeAll(async () => {
// Verify Connection // Verify Connection
await got(`http://${process.env.VAULT_HOST}:${process.env.VAULT_PORT}/v1/secret/config`, { await got(`${vaultUrl}/v1/secret/config`, {
headers: { headers: {
'X-Vault-Token': 'testtoken', 'X-Vault-Token': 'testtoken',
}, },
}); });
await got(`http://${process.env.VAULT_HOST}:${process.env.VAULT_PORT}/v1/secret/data/test`, { await got(`${vaultUrl}/v1/secret/data/test`, {
method: 'POST', method: 'POST',
headers: { headers: {
'X-Vault-Token': 'testtoken', 'X-Vault-Token': 'testtoken',
}, },
body: { body: {
data: { data: {
secret: "SUPERSECRET", secret: 'SUPERSECRET',
}, },
}, },
json: true, json: true,
}); });
await got(`http://${process.env.VAULT_HOST}:${process.env.VAULT_PORT}/v1/secret/data/nested/test`, { await got(`${vaultUrl}/v1/secret/data/nested/test`, {
method: 'POST', method: 'POST',
headers: { headers: {
'X-Vault-Token': 'testtoken', 'X-Vault-Token': 'testtoken',
}, },
body: { body: {
data: { data: {
otherSecret: "OTHERSUPERSECRET", otherSecret: 'OTHERSUPERSECRET',
}, },
}, },
json: true, json: true,
}); });
}) });
beforeEach(() => { beforeEach(() => {
jest.resetAllMocks(); jest.resetAllMocks();
when(core.getInput) when(core.getInput)
.calledWith('url') .calledWith('url')
.mockReturnValue(`http://${process.env.VAULT_HOST}:${process.env.VAULT_PORT}`); .mockReturnValue(`${vaultUrl}`);
when(core.getInput) when(core.getInput)
.calledWith('token') .calledWith('token')
@@ -63,7 +64,7 @@ describe('integration', () => {
} }
it('get simple secret', async () => { it('get simple secret', async () => {
mockInput('test secret') mockInput('test secret');
await exportSecrets(); await exportSecrets();
@@ -71,7 +72,7 @@ describe('integration', () => {
}); });
it('re-map secret', async () => { it('re-map secret', async () => {
mockInput('test secret | TEST_KEY') mockInput('test secret | TEST_KEY');
await exportSecrets(); await exportSecrets();
@@ -79,7 +80,7 @@ describe('integration', () => {
}); });
it('get nested secret', async () => { it('get nested secret', async () => {
mockInput('nested/test otherSecret') mockInput('nested/test otherSecret');
await exportSecrets(); await exportSecrets();
@@ -100,4 +101,4 @@ describe('integration', () => {
expect(core.exportVariable).toBeCalledWith('NAMED_SECRET', 'SUPERSECRET'); expect(core.exportVariable).toBeCalledWith('NAMED_SECRET', 'SUPERSECRET');
expect(core.exportVariable).toBeCalledWith('OTHERSECRET', 'OTHERSUPERSECRET'); expect(core.exportVariable).toBeCalledWith('OTHERSECRET', 'OTHERSUPERSECRET');
}); });
}); });
+4
View File
@@ -0,0 +1,4 @@
# e2e tests
This test suite runs `vault-action` as a GitHub Action in the context of a live build, and then verifies that the appropriate environmental variables are set.
These tests are intended to mostly be very simple smoke tests to verify that the action is being compiled and run correctly in context.
@@ -16,7 +16,7 @@ const got = require('got');
}, },
body: { body: {
data: { data: {
secret: "SUPERSECRET", secret: 'SUPERSECRET',
}, },
}, },
json: true, json: true,
@@ -29,7 +29,7 @@ const got = require('got');
}, },
body: { body: {
data: { data: {
otherSecret: "OTHERSUPERSECRET", otherSecret: 'OTHERSUPERSECRET',
}, },
}, },
json: true, json: true,
@@ -38,4 +38,4 @@ const got = require('got');
console.log(error); console.log(error);
process.exit(1); process.exit(1);
} }
})(); })();
@@ -0,0 +1,130 @@
jest.mock('@actions/core');
jest.mock('@actions/core/lib/command');
const core = require('@actions/core');
const got = require('got');
const { when } = require('jest-when');
const { exportSecrets } = require('../../action');
const vaultUrl = `http://${process.env.VAULT_HOST || 'localhost'}:${process.env.VAULT_PORT || '8201'}`;
describe('integration', () => {
beforeAll(async () => {
// Verify Connection
await got(`${vaultUrl}/v1/secret/config`, {
headers: {
'X-Vault-Token': 'testtoken',
},
});
// Create namespace
await got(`${vaultUrl}/v1/sys/namespaces/ns1`, {
method: 'POST',
headers: {
'X-Vault-Token': 'testtoken',
},
json: true,
});
// Enable secret engine
await got(`${vaultUrl}/v1/sys/mounts/secret`, {
method: 'POST',
headers: {
'X-Vault-Token': 'testtoken',
'X-Vault-Namespace': 'ns1',
},
body: { path: 'secret', type: 'kv', config: {}, options: { version: 2 }, generate_signing_key: true },
json: true,
});
await got(`${vaultUrl}/v1/secret/data/test`, {
method: 'POST',
headers: {
'X-Vault-Token': 'testtoken',
'X-Vault-Namespace': 'ns1',
},
body: {
data: {
secret: 'SUPERSECRET_IN_NAMESPACE',
},
},
json: true,
});
await got(`${vaultUrl}/v1/secret/data/nested/test`, {
method: 'POST',
headers: {
'X-Vault-Token': 'testtoken',
'X-Vault-Namespace': 'ns1',
},
body: {
data: {
otherSecret: 'OTHERSUPERSECRET_IN_NAMESPACE',
},
},
json: true,
});
});
beforeEach(() => {
jest.resetAllMocks();
when(core.getInput)
.calledWith('url')
.mockReturnValue(`${vaultUrl}`);
when(core.getInput)
.calledWith('token')
.mockReturnValue('testtoken');
when(core.getInput)
.calledWith('namespace')
.mockReturnValue('ns1');
});
function mockInput(secrets) {
when(core.getInput)
.calledWith('secrets')
.mockReturnValue(secrets);
}
it('get simple secret', async () => {
mockInput('test secret');
await exportSecrets();
expect(core.exportVariable).toBeCalledWith('SECRET', 'SUPERSECRET_IN_NAMESPACE');
});
it('re-map secret', async () => {
mockInput('test secret | TEST_KEY');
await exportSecrets();
expect(core.exportVariable).toBeCalledWith('TEST_KEY', 'SUPERSECRET_IN_NAMESPACE');
});
it('get nested secret', async () => {
mockInput('nested/test otherSecret');
await exportSecrets();
expect(core.exportVariable).toBeCalledWith('OTHERSECRET', 'OTHERSUPERSECRET_IN_NAMESPACE');
});
it('get multiple secrets', async () => {
mockInput(`
test secret ;
test secret | NAMED_SECRET ;
nested/test otherSecret ;`);
await exportSecrets();
expect(core.exportVariable).toBeCalledTimes(3);
expect(core.exportVariable).toBeCalledWith('SECRET', 'SUPERSECRET_IN_NAMESPACE');
expect(core.exportVariable).toBeCalledWith('NAMED_SECRET', 'SUPERSECRET_IN_NAMESPACE');
expect(core.exportVariable).toBeCalledWith('OTHERSECRET', 'OTHERSUPERSECRET_IN_NAMESPACE');
});
});
@@ -0,0 +1,3 @@
module.exports = {
verbose: true
};
+1 -1
View File
@@ -1,3 +1,3 @@
module.exports = { module.exports = {
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/integration/', '<rootDir>/e2e/'], testPathIgnorePatterns: ['/node_modules/', '<rootDir>/integrationTests/'],
}; };
+106 -88
View File
@@ -965,6 +965,12 @@
"integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==", "integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==",
"dev": true "dev": true
}, },
"@zeit/ncc": {
"version": "0.20.5",
"resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.20.5.tgz",
"integrity": "sha512-XU6uzwvv95DqxciQx+aOLhbyBx/13ky+RK1y88Age9Du3BlA4mMPCy13BGjayOrrumOzlq1XV3SD/BWiZENXlw==",
"dev": true
},
"JSONStream": { "JSONStream": {
"version": "1.3.5", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
@@ -3306,9 +3312,9 @@
"dev": true "dev": true
}, },
"handlebars": { "handlebars": {
"version": "4.2.1", "version": "4.5.3",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.2.1.tgz", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz",
"integrity": "sha512-bqPIlDk06UWbVEIFoYj+LVo42WhK96J+b25l7hbFDpxrOXMphFM3fNIm+cluwg4Pk2jiLjWU5nHQY7igGE75NQ==", "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==",
"dev": true, "dev": true,
"requires": { "requires": {
"neo-async": "^2.6.0", "neo-async": "^2.6.0",
@@ -5131,9 +5137,9 @@
"integrity": "sha512-rjH3yRt0Ssx19mUwS0hrDUOdG9VI+oRLpLHJ7tXRdjcuQ7v7wo6qPvOZppHRrqfslTKr0L2yBhjj4UXd7c3cQg==" "integrity": "sha512-rjH3yRt0Ssx19mUwS0hrDUOdG9VI+oRLpLHJ7tXRdjcuQ7v7wo6qPvOZppHRrqfslTKr0L2yBhjj4UXd7c3cQg=="
}, },
"npm": { "npm": {
"version": "6.11.3", "version": "6.13.4",
"resolved": "https://registry.npmjs.org/npm/-/npm-6.11.3.tgz", "resolved": "https://registry.npmjs.org/npm/-/npm-6.13.4.tgz",
"integrity": "sha512-K2h+MPzZiY39Xf6eHEdECe/LKoJXam4UCflz5kIxoskN3LQFeYs5fqBGT5i4TtM/aBk+86Mcf+jgXs/WuWAutQ==", "integrity": "sha512-vTcUL4SCg3AzwInWTbqg1OIaOXlzKSS8Mb8kc5avwrJpcvevDA5J9BhYSuei+fNs3pwOp4lzA5x2FVDXACvoXA==",
"dev": true, "dev": true,
"requires": { "requires": {
"JSONStream": "^1.3.5", "JSONStream": "^1.3.5",
@@ -5142,12 +5148,12 @@
"ansistyles": "~0.1.3", "ansistyles": "~0.1.3",
"aproba": "^2.0.0", "aproba": "^2.0.0",
"archy": "~1.0.0", "archy": "~1.0.0",
"bin-links": "^1.1.3", "bin-links": "^1.1.6",
"bluebird": "^3.5.5", "bluebird": "^3.5.5",
"byte-size": "^5.0.1", "byte-size": "^5.0.1",
"cacache": "^12.0.3", "cacache": "^12.0.3",
"call-limit": "^1.1.1", "call-limit": "^1.1.1",
"chownr": "^1.1.2", "chownr": "^1.1.3",
"ci-info": "^2.0.0", "ci-info": "^2.0.0",
"cli-columns": "^3.1.2", "cli-columns": "^3.1.2",
"cli-table3": "^0.5.1", "cli-table3": "^0.5.1",
@@ -5163,11 +5169,11 @@
"find-npm-prefix": "^1.0.2", "find-npm-prefix": "^1.0.2",
"fs-vacuum": "~1.2.10", "fs-vacuum": "~1.2.10",
"fs-write-stream-atomic": "~1.0.10", "fs-write-stream-atomic": "~1.0.10",
"gentle-fs": "^2.2.1", "gentle-fs": "^2.3.0",
"glob": "^7.1.4", "glob": "^7.1.4",
"graceful-fs": "^4.2.2", "graceful-fs": "^4.2.3",
"has-unicode": "~2.0.1", "has-unicode": "~2.0.1",
"hosted-git-info": "^2.8.2", "hosted-git-info": "^2.8.5",
"iferr": "^1.0.2", "iferr": "^1.0.2",
"imurmurhash": "*", "imurmurhash": "*",
"infer-owner": "^1.0.4", "infer-owner": "^1.0.4",
@@ -5178,7 +5184,7 @@
"is-cidr": "^3.0.0", "is-cidr": "^3.0.0",
"json-parse-better-errors": "^1.0.2", "json-parse-better-errors": "^1.0.2",
"lazy-property": "~1.0.0", "lazy-property": "~1.0.0",
"libcipm": "^4.0.3", "libcipm": "^4.0.7",
"libnpm": "^3.0.1", "libnpm": "^3.0.1",
"libnpmaccess": "^3.0.2", "libnpmaccess": "^3.0.2",
"libnpmhook": "^5.0.3", "libnpmhook": "^5.0.3",
@@ -5204,33 +5210,33 @@
"mississippi": "^3.0.0", "mississippi": "^3.0.0",
"mkdirp": "~0.5.1", "mkdirp": "~0.5.1",
"move-concurrently": "^1.0.1", "move-concurrently": "^1.0.1",
"node-gyp": "^5.0.3", "node-gyp": "^5.0.5",
"nopt": "~4.0.1", "nopt": "~4.0.1",
"normalize-package-data": "^2.5.0", "normalize-package-data": "^2.5.0",
"npm-audit-report": "^1.3.2", "npm-audit-report": "^1.3.2",
"npm-cache-filename": "~1.0.2", "npm-cache-filename": "~1.0.2",
"npm-install-checks": "~3.0.0", "npm-install-checks": "^3.0.2",
"npm-lifecycle": "^3.1.3", "npm-lifecycle": "^3.1.4",
"npm-package-arg": "^6.1.1", "npm-package-arg": "^6.1.1",
"npm-packlist": "^1.4.4", "npm-packlist": "^1.4.7",
"npm-pick-manifest": "^3.0.2", "npm-pick-manifest": "^3.0.2",
"npm-profile": "^4.0.2", "npm-profile": "^4.0.2",
"npm-registry-fetch": "^4.0.0", "npm-registry-fetch": "^4.0.2",
"npm-user-validate": "~1.0.0", "npm-user-validate": "~1.0.0",
"npmlog": "~4.1.2", "npmlog": "~4.1.2",
"once": "~1.4.0", "once": "~1.4.0",
"opener": "^1.5.1", "opener": "^1.5.1",
"osenv": "^0.1.5", "osenv": "^0.1.5",
"pacote": "^9.5.8", "pacote": "^9.5.11",
"path-is-inside": "~1.0.2", "path-is-inside": "~1.0.2",
"promise-inflight": "~1.0.1", "promise-inflight": "~1.0.1",
"qrcode-terminal": "^0.12.0", "qrcode-terminal": "^0.12.0",
"query-string": "^6.8.2", "query-string": "^6.8.2",
"qw": "~1.0.1", "qw": "~1.0.1",
"read": "~1.0.7", "read": "~1.0.7",
"read-cmd-shim": "^1.0.4", "read-cmd-shim": "^1.0.5",
"read-installed": "~4.0.3", "read-installed": "~4.0.3",
"read-package-json": "^2.1.0", "read-package-json": "^2.1.1",
"read-package-tree": "^5.3.1", "read-package-tree": "^5.3.1",
"readable-stream": "^3.4.0", "readable-stream": "^3.4.0",
"readdir-scoped-modules": "^1.1.0", "readdir-scoped-modules": "^1.1.0",
@@ -5244,8 +5250,8 @@
"sorted-object": "~2.0.1", "sorted-object": "~2.0.1",
"sorted-union-stream": "~2.1.3", "sorted-union-stream": "~2.1.3",
"ssri": "^6.0.1", "ssri": "^6.0.1",
"stringify-package": "^1.0.0", "stringify-package": "^1.0.1",
"tar": "^4.4.10", "tar": "^4.4.13",
"text-table": "~0.2.0", "text-table": "~0.2.0",
"tiny-relative-date": "^1.3.0", "tiny-relative-date": "^1.3.0",
"uid-number": "0.0.6", "uid-number": "0.0.6",
@@ -5253,7 +5259,7 @@
"unique-filename": "^1.1.1", "unique-filename": "^1.1.1",
"unpipe": "~1.0.0", "unpipe": "~1.0.0",
"update-notifier": "^2.5.0", "update-notifier": "^2.5.0",
"uuid": "^3.3.2", "uuid": "^3.3.3",
"validate-npm-package-license": "^3.0.4", "validate-npm-package-license": "^3.0.4",
"validate-npm-package-name": "~3.0.0", "validate-npm-package-name": "~3.0.0",
"which": "^1.3.1", "which": "^1.3.1",
@@ -5424,14 +5430,15 @@
} }
}, },
"bin-links": { "bin-links": {
"version": "1.1.3", "version": "1.1.6",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
"bluebird": "^3.5.3", "bluebird": "^3.5.3",
"cmd-shim": "^3.0.0", "cmd-shim": "^3.0.0",
"gentle-fs": "^2.0.1", "gentle-fs": "^2.3.0",
"graceful-fs": "^4.1.15", "graceful-fs": "^4.1.15",
"npm-normalize-package-bin": "^1.0.0",
"write-file-atomic": "^2.3.0" "write-file-atomic": "^2.3.0"
} }
}, },
@@ -5536,7 +5543,7 @@
} }
}, },
"chownr": { "chownr": {
"version": "1.1.2", "version": "1.1.3",
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
@@ -6174,11 +6181,22 @@
} }
}, },
"fs-minipass": { "fs-minipass": {
"version": "1.2.6", "version": "1.2.7",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
"minipass": "^2.2.1" "minipass": "^2.6.0"
},
"dependencies": {
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
}
}
} }
}, },
"fs-vacuum": { "fs-vacuum": {
@@ -6279,12 +6297,13 @@
"dev": true "dev": true
}, },
"gentle-fs": { "gentle-fs": {
"version": "2.2.1", "version": "2.3.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
"aproba": "^1.1.2", "aproba": "^1.1.2",
"chownr": "^1.1.2", "chownr": "^1.1.2",
"cmd-shim": "^3.0.3",
"fs-vacuum": "^1.2.10", "fs-vacuum": "^1.2.10",
"graceful-fs": "^4.1.11", "graceful-fs": "^4.1.11",
"iferr": "^0.1.5", "iferr": "^0.1.5",
@@ -6375,7 +6394,7 @@
} }
}, },
"graceful-fs": { "graceful-fs": {
"version": "4.2.2", "version": "4.2.3",
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
@@ -6417,12 +6436,9 @@
"dev": true "dev": true
}, },
"hosted-git-info": { "hosted-git-info": {
"version": "2.8.2", "version": "2.8.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"requires": {
"lru-cache": "^5.1.1"
}
}, },
"http-cache-semantics": { "http-cache-semantics": {
"version": "3.8.1", "version": "3.8.1",
@@ -6449,7 +6465,7 @@
} }
}, },
"https-proxy-agent": { "https-proxy-agent": {
"version": "2.2.2", "version": "2.2.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -6479,7 +6495,7 @@
"dev": true "dev": true
}, },
"ignore-walk": { "ignore-walk": {
"version": "3.0.1", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -6733,7 +6749,7 @@
} }
}, },
"libcipm": { "libcipm": {
"version": "4.0.3", "version": "4.0.7",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7036,7 +7052,7 @@
} }
}, },
"make-fetch-happen": { "make-fetch-happen": {
"version": "5.0.0", "version": "5.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7044,7 +7060,7 @@
"cacache": "^12.0.0", "cacache": "^12.0.0",
"http-cache-semantics": "^3.8.1", "http-cache-semantics": "^3.8.1",
"http-proxy-agent": "^2.1.0", "http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.1", "https-proxy-agent": "^2.2.3",
"lru-cache": "^5.1.1", "lru-cache": "^5.1.1",
"mississippi": "^3.0.0", "mississippi": "^3.0.0",
"node-fetch-npm": "^2.0.2", "node-fetch-npm": "^2.0.2",
@@ -7097,30 +7113,25 @@
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
"minipass": { "minizlib": {
"version": "2.3.3", "version": "1.3.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "minipass": "^2.9.0"
"yallist": "^3.0.0"
}, },
"dependencies": { "dependencies": {
"yallist": { "minipass": {
"version": "3.0.2", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
}
} }
} }
}, },
"minizlib": {
"version": "1.2.1",
"bundled": true,
"dev": true,
"requires": {
"minipass": "^2.2.1"
}
},
"mississippi": { "mississippi": {
"version": "3.0.0", "version": "3.0.0",
"bundled": true, "bundled": true,
@@ -7187,7 +7198,7 @@
} }
}, },
"node-gyp": { "node-gyp": {
"version": "5.0.3", "version": "5.0.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7200,7 +7211,7 @@
"request": "^2.87.0", "request": "^2.87.0",
"rimraf": "2", "rimraf": "2",
"semver": "~5.3.0", "semver": "~5.3.0",
"tar": "^4.4.8", "tar": "^4.4.12",
"which": "1" "which": "1"
}, },
"dependencies": { "dependencies": {
@@ -7259,9 +7270,12 @@
} }
}, },
"npm-bundled": { "npm-bundled": {
"version": "1.0.6", "version": "1.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"requires": {
"npm-normalize-package-bin": "^1.0.1"
}
}, },
"npm-cache-filename": { "npm-cache-filename": {
"version": "1.0.2", "version": "1.0.2",
@@ -7269,7 +7283,7 @@
"dev": true "dev": true
}, },
"npm-install-checks": { "npm-install-checks": {
"version": "3.0.0", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7277,7 +7291,7 @@
} }
}, },
"npm-lifecycle": { "npm-lifecycle": {
"version": "3.1.3", "version": "3.1.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7296,6 +7310,11 @@
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
"npm-normalize-package-bin": {
"version": "1.0.1",
"bundled": true,
"dev": true
},
"npm-package-arg": { "npm-package-arg": {
"version": "6.1.1", "version": "6.1.1",
"bundled": true, "bundled": true,
@@ -7308,7 +7327,7 @@
} }
}, },
"npm-packlist": { "npm-packlist": {
"version": "1.4.4", "version": "1.4.7",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7337,7 +7356,7 @@
} }
}, },
"npm-registry-fetch": { "npm-registry-fetch": {
"version": "4.0.0", "version": "4.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7346,7 +7365,15 @@
"figgy-pudding": "^3.4.1", "figgy-pudding": "^3.4.1",
"lru-cache": "^5.1.1", "lru-cache": "^5.1.1",
"make-fetch-happen": "^5.0.0", "make-fetch-happen": "^5.0.0",
"npm-package-arg": "^6.1.0" "npm-package-arg": "^6.1.0",
"safe-buffer": "^5.2.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.2.0",
"bundled": true,
"dev": true
}
} }
}, },
"npm-run-path": { "npm-run-path": {
@@ -7482,7 +7509,7 @@
} }
}, },
"pacote": { "pacote": {
"version": "9.5.8", "version": "9.5.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7500,6 +7527,7 @@
"mississippi": "^3.0.0", "mississippi": "^3.0.0",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"normalize-package-data": "^2.4.0", "normalize-package-data": "^2.4.0",
"npm-normalize-package-bin": "^1.0.0",
"npm-package-arg": "^6.1.0", "npm-package-arg": "^6.1.0",
"npm-packlist": "^1.1.12", "npm-packlist": "^1.1.12",
"npm-pick-manifest": "^3.0.0", "npm-pick-manifest": "^3.0.0",
@@ -7518,7 +7546,7 @@
}, },
"dependencies": { "dependencies": {
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7751,7 +7779,7 @@
} }
}, },
"read-cmd-shim": { "read-cmd-shim": {
"version": "1.0.4", "version": "1.0.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7773,7 +7801,7 @@
} }
}, },
"read-package-json": { "read-package-json": {
"version": "2.1.0", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7781,7 +7809,7 @@
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"json-parse-better-errors": "^1.0.1", "json-parse-better-errors": "^1.0.1",
"normalize-package-data": "^2.0.0", "normalize-package-data": "^2.0.0",
"slash": "^1.0.0" "npm-normalize-package-bin": "^1.0.0"
} }
}, },
"read-package-tree": { "read-package-tree": {
@@ -7956,28 +7984,23 @@
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
"slash": {
"version": "1.0.0",
"bundled": true,
"dev": true
},
"slide": { "slide": {
"version": "1.1.6", "version": "1.1.6",
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
"smart-buffer": { "smart-buffer": {
"version": "4.0.2", "version": "4.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
"socks": { "socks": {
"version": "2.3.2", "version": "2.3.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
"ip": "^1.1.5", "ip": "1.1.5",
"smart-buffer": "4.0.2" "smart-buffer": "^4.1.0"
} }
}, },
"socks-proxy-agent": { "socks-proxy-agent": {
@@ -8192,7 +8215,7 @@
} }
}, },
"stringify-package": { "stringify-package": {
"version": "1.0.0", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
@@ -8223,13 +8246,13 @@
} }
}, },
"tar": { "tar": {
"version": "4.4.10", "version": "4.4.13",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
"chownr": "^1.1.1", "chownr": "^1.1.1",
"fs-minipass": "^1.2.5", "fs-minipass": "^1.2.5",
"minipass": "^2.3.5", "minipass": "^2.8.6",
"minizlib": "^1.2.1", "minizlib": "^1.2.1",
"mkdirp": "^0.5.0", "mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
@@ -8237,18 +8260,13 @@
}, },
"dependencies": { "dependencies": {
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
} }
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
} }
} }
}, },
@@ -8429,7 +8447,7 @@
} }
}, },
"uuid": { "uuid": {
"version": "3.3.2", "version": "3.3.3",
"bundled": true, "bundled": true,
"dev": true "dev": true
}, },
+6 -3
View File
@@ -2,11 +2,13 @@
"name": "vault-action", "name": "vault-action",
"version": "0.1.0", "version": "0.1.0",
"description": "A Github Action that allows you to consume vault secrets as secure environment variables.", "description": "A Github Action that allows you to consume vault secrets as secure environment variables.",
"main": "index.js", "main": "dist/index.js",
"scripts": { "scripts": {
"build": "ncc build index.js -o dist",
"test": "jest", "test": "jest",
"test:integration": "jest -c integration/jest.config.js", "test:integration:basic": "jest -c integrationTests/basic/jest.config.js",
"test:e2e": "jest -c e2e/jest.config.js" "test:integration:enterprise": "jest -c integrationTests/enterprise/jest.config.js",
"test:e2e": "jest -c integrationTests/e2e/jest.config.js"
}, },
"release": { "release": {
"branch": "master", "branch": "master",
@@ -41,6 +43,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^24.0.18", "@types/jest": "^24.0.18",
"@zeit/ncc": "^0.20.5",
"jest": "^24.9.0", "jest": "^24.9.0",
"jest-when": "^2.7.0", "jest-when": "^2.7.0",
"semantic-release": "^15.13.24" "semantic-release": "^15.13.24"