Skip to content

test: prevent private key logging in examples#1

Open
Luzijano wants to merge 1 commit into
BitgesellOfficial:mainfrom
Luzijano:test-redact-secret-logging
Open

test: prevent private key logging in examples#1
Luzijano wants to merge 1 commit into
BitgesellOfficial:mainfrom
Luzijano:test-redact-secret-logging

Conversation

@Luzijano
Copy link
Copy Markdown

Summary

  • removes an example console.log(evmPrivateKey) from README usage docs
  • removes the test-suite log of process.env.evmPrivateKey
  • adds a regression test to keep EVM private-key env vars out of example/test logging paths

Validation

  • RED before fix: npx jest src/__tests__/SecretLogging.test.ts --runInBand failed on the README private-key log
  • GREEN after fix: npx jest src/__tests__/SecretLogging.test.ts --runInBand
  • npx eslint src/__tests__/SecretLogging.test.ts src/__tests__/WBGL.test.ts --ext .ts
  • git diff --check

Notes: npm install --ignore-scripts hit the repo's existing npm peer dependency resolver conflict; dependency installation succeeded with --legacy-peer-deps. The Hermes patch tool's automatic TypeScript check also exposed the existing TypeScript/@types/node version mismatch, so I kept validation focused on the new regression test and touched test lint.

Submitted under the Bitgesell bounty/improvement program (BitgesellOfficial/bitgesell#81). No payout address posted unless/until accepted or requested.

AI/tooling disclosure: prepared with Hermes Agent automation.

Signed-off-by: Lucijano JL. <218673409+Luzijano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant