Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/basic/approle_auth.test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/basic/integration.test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/basic/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

module.exports = {
verbose: true
};
5 changes: 5 additions & 0 deletions integrationTests/basic/jwt_auth.test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/basic/rsa_keys.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

const privateRsaKey = `
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEArcch89X6VuWj/CQtVfaCXUl0Pcv8IJRgICN8X+3zFNrbiTdh
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/basic/userpass_auth.test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
3 changes: 3 additions & 0 deletions integrationTests/e2e-tls/configs/config.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2019, 2025
# SPDX-License-Identifier: MIT

ui = false
disable_mlock = true

Expand Down
5 changes: 5 additions & 0 deletions integrationTests/e2e-tls/e2e-tls.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

describe('e2e-tls', () => {
it('verify', () => {
expect(process.env.SECRET).toBe("SUPERSECRET");
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/e2e-tls/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

module.exports = {
verbose: true
};
5 changes: 5 additions & 0 deletions integrationTests/e2e-tls/setup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

const got = require('got');
const core = require('@actions/core');

Expand Down
5 changes: 5 additions & 0 deletions integrationTests/e2e/e2e.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

describe('e2e', () => {
it('verify', () => {
expect(process.env.SECRET).toBe("SUPERSECRET");
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/e2e/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

module.exports = {
verbose: true
};
5 changes: 5 additions & 0 deletions integrationTests/e2e/setup.js
Original file line number Diff line number Diff line change
@@ -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}`;
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/enterprise/enterprise.test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
5 changes: 5 additions & 0 deletions integrationTests/enterprise/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

module.exports = {
verbose: true
};
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

module.exports = {
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/integrationTests/'],
};
5 changes: 5 additions & 0 deletions src/action.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
5 changes: 5 additions & 0 deletions src/action.test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
5 changes: 5 additions & 0 deletions src/auth.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

// @ts-check
const core = require('@actions/core');
const rsasign = require('jsrsasign');
Expand Down
5 changes: 5 additions & 0 deletions src/auth.test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
5 changes: 5 additions & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

const WILDCARD_UPPERCASE = '*';
const WILDCARD = '**';

Expand Down
5 changes: 5 additions & 0 deletions src/entry.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

const core = require('@actions/core');
const { exportSecrets } = require('./action');

Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
5 changes: 5 additions & 0 deletions src/pki.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

const { normalizeOutputKey } = require('./utils');
const core = require('@actions/core');

Expand Down
5 changes: 5 additions & 0 deletions src/retries.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright IBM Corp. 2019, 2025
* SPDX-License-Identifier: MIT
*/

jest.mock('@actions/core');

const core = require('@actions/core');
Expand Down
5 changes: 5 additions & 0 deletions src/secrets.js
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
5 changes: 5 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading