mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-12-12 14:41: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'
|
||||
description: 'A Github Action that allows you to consume HashiCorp Vault™ secrets as secure environment variables'
|
||||
inputs:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright IBM Corp. 2019, 2025
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Start vault server locally for the purposes of integration tests.
|
||||
version: "3.0"
|
||||
services:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
jest.mock('@actions/core');
|
||||
jest.mock('@actions/core/lib/command');
|
||||
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/lib/command');
|
||||
const core = require('@actions/core');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
verbose: true
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
jest.mock('@actions/core');
|
||||
jest.mock('@actions/core/lib/command');
|
||||
const core = require('@actions/core');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
const privateRsaKey = `
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEowIBAAKCAQEArcch89X6VuWj/CQtVfaCXUl0Pcv8IJRgICN8X+3zFNrbiTdh
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
jest.mock('@actions/core');
|
||||
jest.mock('@actions/core/lib/command');
|
||||
const core = require('@actions/core');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright IBM Corp. 2019, 2025
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
ui = false
|
||||
disable_mlock = true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
describe('e2e-tls', () => {
|
||||
it('verify', () => {
|
||||
expect(process.env.SECRET).toBe("SUPERSECRET");
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
verbose: true
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
const got = require('got');
|
||||
const core = require('@actions/core');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
describe('e2e', () => {
|
||||
it('verify', () => {
|
||||
expect(process.env.SECRET).toBe("SUPERSECRET");
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
verbose: true
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
const got = require('got');
|
||||
|
||||
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/lib/command');
|
||||
const core = require('@actions/core');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
verbose: true
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/integrationTests/'],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
const core = require('@actions/core');
|
||||
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('@actions/core');
|
||||
jest.mock('@actions/core/lib/command');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
const core = require('@actions/core');
|
||||
const rsasign = require('jsrsasign');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
jest.mock('got');
|
||||
jest.mock('@actions/core');
|
||||
jest.mock('@actions/core/lib/command');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
const WILDCARD_UPPERCASE = '*';
|
||||
const WILDCARD = '**';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
const core = require('@actions/core');
|
||||
const { exportSecrets } = require('./action');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
const auth = require('./auth');
|
||||
const secrets = require('./secrets');
|
||||
const pki = require('./pki');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
const { normalizeOutputKey } = require('./utils');
|
||||
const core = require('@actions/core');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright IBM Corp. 2019, 2025
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
jest.mock('@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 { WILDCARD, WILDCARD_UPPERCASE} = require("./constants");
|
||||
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
|
||||
* @param {string} dataKey
|
||||
|
|
|
|||
Loading…
Reference in a new issue