Skip to content

Add redact.ts regression tests for nested errors and Stellar seed false-positives #281

@mikewheeleer

Description

@mikewheeleer

Description

Strengthen src/redact.test.ts to assert secrets are redacted within deeply nested objects, arrays, and Error stack traces, while public Stellar keys and contract IDs are NOT over-redacted.

Requirements and context

  • Cover nested/array/Error-stack redaction and round-trip through the pino logger.
  • Assert no false positives on Stellar public keys (G...) and contractMetadata IDs.
  • Acceptance: deterministic tests; coverage on redact.ts >= 95%; explicit cases for each secret pattern.

Suggested execution

  • Fork the repo and create a branch:
    • git checkout -b test/redact-regression
  • Implement changes:
    • src/redact.ts
    • Tests: src/redact.test.ts
    • Docs: docs/backend
    • Include TSDoc/NatSpec-style doc comments
    • Validate security assumptions (input validation, auth, signature verification, secret redaction, idempotency)

Test and commit

  • Run tests: npm test (coverage: npm run test:ci)
  • Cover edge cases
  • Include test output and security notes in the PR

Example commit message

test(security): expand redaction regression coverage

Guidelines

  • Minimum 95% line coverage on new/changed code
  • No secrets in repo; use .env + deployment secrets only
  • Clear documentation
  • Timeframe: 96 hours from assignment

Metadata

Metadata

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions