Skip to content

Redact secrets from public client configuration output #84

Description

@Lakes41

Difficulty: Hard

Type: Bug

Summary

Prevent getConfig() from returning sensitive configuration values such as apiKey by default.

Current Behaviour

GuildPassClient.getConfig() returns a shallow copy of the full merged configuration object. If apiKey is present, callers can accidentally log or expose it.

Expected Behaviour

The public config accessor should either redact sensitive values by default or provide a separate explicit method for internal unsafe access.

Suggested Implementation

Update getConfig() to return a safe configuration object where apiKey is omitted or replaced with [REDACTED]. If maintainers need raw config internally, keep it private or expose an intentionally named method such as getUnsafeConfigForDebugging.

Files or Areas Likely Affected

  • src/client/GuildPassClient.ts
  • src/config/sdkConfig.ts
  • src/types/
  • tests/client.test.ts
  • docs/sdk-guide.md

Acceptance Criteria

  • getConfig() does not return the raw API key
  • Other non-sensitive config fields remain visible
  • Tests prove apiKey is redacted or omitted
  • Documentation explains the safe config accessor behaviour
  • Existing SDK functionality continues to use the real API key internally
  • No hooks or logs expose the API key through config output

Additional Notes

This is a defensive security improvement for users who log SDK configuration during debugging.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions