Skip to content
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Environment variables and sensitive configuration files
.env
.env.*
.env.local
.env.development
.env.test
.env.production
.env.staging

# Private keys and credentials
*.key
*.pem
private-key*
*private-key*

# Infura and blockchain configuration
infura.config*
*.secrets

# Node modules and dependencies
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Build artifacts
dist/
build/
*.log

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store
28 changes: 28 additions & 0 deletions actions/setup-node-from-nvmrc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Setup Node.js from .nvmrc

A reusable composite action that sets up Node.js using the version specified in an `.nvmrc` file.

## Usage

```yaml
steps:
- uses: actions/checkout@v2
- name: Setup Node.js from .nvmrc
uses: ./actions/setup-node-from-nvmrc
```

## Requirements

- The repository must have an `.nvmrc` file in the root directory
- The `.nvmrc` file should contain a valid Node.js version (e.g., `16.14.0`, `18.x`)

## What it does

1. Reads the Node.js version from the `.nvmrc` file
2. Sets up Node.js with the specified version using `actions/setup-node@v2`

## Benefits

- Centralizes Node.js version management in `.nvmrc`
- Eliminates duplicated setup code across workflows
- Uses modern GitHub Actions output syntax (`$GITHUB_OUTPUT`)
13 changes: 13 additions & 0 deletions actions/setup-node-from-nvmrc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Setup Node.js from .nvmrc'
description: 'Sets up Node.js using the version specified in .nvmrc file'
runs:
using: "composite"
steps:
- name: Get Node.js version
id: nvm
shell: bash
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
17 changes: 17 additions & 0 deletions blockchain-address.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"address": "1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv",
"chain_stats": {
"funded_txo_count": 11,
"funded_txo_sum": 15007688098,
"spent_txo_count": 5,
"spent_txo_sum": 15007599040,
"tx_count": 13
},
"mempool_stats": {
"funded_txo_count": 0,
"funded_txo_sum": 0,
"spent_txo_count": 0,
"spent_txo_sum": 0,
"tx_count": 0
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated blockchain data file accidentally committed

Medium Severity

The file blockchain-address.json containing a Bitcoin address and transaction statistics appears to be accidentally committed. This file is unrelated to the PR's purpose of adding a .gitignore for private keys, is not referenced anywhere in the codebase, and looks like test data or API response output. While this is a public address (not a private key), committing such data could reveal information about wallet usage or testing patterns.

Fix in Cursor Fix in Web

2 changes: 1 addition & 1 deletion workflow-templates/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn --frozen-lockfile --ignore-scripts
Expand Down
8 changes: 2 additions & 6 deletions workflow-templates/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ jobs:
# We check out the specified branch, which will be used as the base
# branch for all git operations and the release PR.
ref: ${{ github.event.inputs.base-branch }}
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Setup Node.js from .nvmrc
uses: ./actions/setup-node-from-nvmrc
- uses: MetaMask/action-create-release-pr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 2 additions & 6 deletions workflow-templates/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Setup Node.js from .nvmrc
uses: ./actions/setup-node-from-nvmrc
- uses: MetaMask/action-publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}