Skip to content

ISSUE-9: Security: CredentialMasker regex patterns have limited coverage #421

@sfloess

Description

@sfloess

Severity: Low

Type: Security / Credential Protection

Description:
The CredentialMasker utility masks common credential patterns but may miss variations used in modern applications.

Location:

  • platform-api/src/main/java/org/flossware/platform/api/CredentialMasker.java:48-58

Current Patterns:

  • password, token, api_key, Bearer, Basic auth, environment variables

Missing Patterns:

  • JWT tokens (ey...)
  • AWS Access Keys (AKIA...)
  • Private keys (-----BEGIN...)
  • Slack tokens (xoxb-, xoxp-)
  • GitHub tokens (ghp_, ghs_, ghu_)
  • GitLab tokens (glpat-)
  • AWS Secret keys and connection strings
  • Google Cloud API keys
  • PEM/RSA private keys

Impact:
Medium - Sensitive credentials may leak in logs if they don't match the limited patterns.

Recommendation:
Expand the regex patterns to cover more credential formats. Consider adding:

Additional patterns to add:

  • JWT tokens
  • AWS credentials
  • Private keys
  • Common CI/CD provider tokens
  • Cloud provider API keys

This is important for a platform that may run diverse workloads with various credential types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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