mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-12-12 22:51:14 +00:00
Merge fdd4861d11 into 2c5827061f
This commit is contained in:
commit
ec113f0318
29 changed files with 139 additions and 0 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Copyright IBM Corp. 2019, 2025
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: 'HashiCorp Vault'
|
name: 'HashiCorp Vault'
|
||||||
description: 'A Github Action that allows you to consume HashiCorp Vault™ secrets as secure environment variables'
|
description: 'A Github Action that allows you to consume HashiCorp Vault™ secrets as secure environment variables'
|
||||||
inputs:
|
inputs:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Copyright IBM Corp. 2019, 2025
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
# Start vault server locally for the purposes of integration tests.
|
# Start vault server locally for the purposes of integration tests.
|
||||||
version: "3.0"
|
version: "3.0"
|
||||||
services:
|
services:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
jest.mock('@actions/core/lib/command');
|
jest.mock('@actions/core/lib/command');
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
jest.mock('@actions/core/lib/command');
|
jest.mock('@actions/core/lib/command');
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
verbose: true
|
verbose: true
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
jest.mock('@actions/core/lib/command');
|
jest.mock('@actions/core/lib/command');
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
const privateRsaKey = `
|
const privateRsaKey = `
|
||||||
-----BEGIN RSA PRIVATE KEY-----
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
MIIEowIBAAKCAQEArcch89X6VuWj/CQtVfaCXUl0Pcv8IJRgICN8X+3zFNrbiTdh
|
MIIEowIBAAKCAQEArcch89X6VuWj/CQtVfaCXUl0Pcv8IJRgICN8X+3zFNrbiTdh
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
jest.mock('@actions/core/lib/command');
|
jest.mock('@actions/core/lib/command');
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Copyright IBM Corp. 2019, 2025
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
ui = false
|
ui = false
|
||||||
disable_mlock = true
|
disable_mlock = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
describe('e2e-tls', () => {
|
describe('e2e-tls', () => {
|
||||||
it('verify', () => {
|
it('verify', () => {
|
||||||
expect(process.env.SECRET).toBe("SUPERSECRET");
|
expect(process.env.SECRET).toBe("SUPERSECRET");
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
verbose: true
|
verbose: true
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
const got = require('got');
|
const got = require('got');
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
describe('e2e', () => {
|
describe('e2e', () => {
|
||||||
it('verify', () => {
|
it('verify', () => {
|
||||||
expect(process.env.SECRET).toBe("SUPERSECRET");
|
expect(process.env.SECRET).toBe("SUPERSECRET");
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
verbose: true
|
verbose: true
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
const got = require('got');
|
const got = require('got');
|
||||||
|
|
||||||
const vaultUrl = `${process.env.VAULT_HOST}:${process.env.VAULT_PORT}`;
|
const vaultUrl = `${process.env.VAULT_HOST}:${process.env.VAULT_PORT}`;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
jest.mock('@actions/core/lib/command');
|
jest.mock('@actions/core/lib/command');
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
verbose: true
|
verbose: true
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/integrationTests/'],
|
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/integrationTests/'],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
const command = require('@actions/core/lib/command');
|
const command = require('@actions/core/lib/command');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
jest.mock('got');
|
jest.mock('got');
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
jest.mock('@actions/core/lib/command');
|
jest.mock('@actions/core/lib/command');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
const rsasign = require('jsrsasign');
|
const rsasign = require('jsrsasign');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
jest.mock('got');
|
jest.mock('got');
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
jest.mock('@actions/core/lib/command');
|
jest.mock('@actions/core/lib/command');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
const WILDCARD_UPPERCASE = '*';
|
const WILDCARD_UPPERCASE = '*';
|
||||||
const WILDCARD = '**';
|
const WILDCARD = '**';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
const { exportSecrets } = require('./action');
|
const { exportSecrets } = require('./action');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
const auth = require('./auth');
|
const auth = require('./auth');
|
||||||
const secrets = require('./secrets');
|
const secrets = require('./secrets');
|
||||||
const pki = require('./pki');
|
const pki = require('./pki');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
const { normalizeOutputKey } = require('./utils');
|
const { normalizeOutputKey } = require('./utils');
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
|
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
const jsonata = require("jsonata");
|
const jsonata = require("jsonata");
|
||||||
const { WILDCARD, WILDCARD_UPPERCASE} = require("./constants");
|
const { WILDCARD, WILDCARD_UPPERCASE} = require("./constants");
|
||||||
const { normalizeOutputKey } = require("./utils");
|
const { normalizeOutputKey } = require("./utils");
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* Copyright IBM Corp. 2019, 2025
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces any dot chars to __ and removes non-ascii charts
|
* Replaces any dot chars to __ and removes non-ascii charts
|
||||||
* @param {string} dataKey
|
* @param {string} dataKey
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue