Skip to content

fix: enhance secret handling by masking sensitive values in logs and updating parameter resolution - #14

Merged
WCY-dt merged 2 commits into
mainfrom
fix/secret_display
Sep 25, 2025
Merged

fix: enhance secret handling by masking sensitive values in logs and updating parameter resolution#14
WCY-dt merged 2 commits into
mainfrom
fix/secret_display

Conversation

@WCY-dt

@WCY-dt WCY-dt commented Sep 25, 2025

Copy link
Copy Markdown
Member

Description

  • enhance secret handling by masking sensitive values in logs and updating parameter resolution

Fixes #11

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@WCY-dt
WCY-dt requested a review from Copilot September 25, 2025 19:19
@WCY-dt WCY-dt added the bug Something isn't working label Sep 25, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances secret handling by masking sensitive values in logs and updating parameter resolution methods. The changes aim to prevent exposure of sensitive information in log outputs while maintaining functionality for testing environments.

  • Simplified secret masking logic by removing pattern-based detection and always masking values
  • Added test-mode detection to conditionally log sensitive information only during tests
  • Updated parameter resolution method names and signatures for clarity

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/common/params/params.go Updated masking logic to always mask values and simplified the API
internal/common/params/params_test.go Updated tests to match new masking behavior and method signatures
internal/common/params/constants.go Removed sensitive pattern constants that are no longer used
internal/checker/utils.go Added test mode detection and conditional logging utilities
internal/checker/endpoints.go Replaced direct logging with conditional test-only logging

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread internal/common/params/params.go Outdated
Comment thread internal/checker/utils.go Outdated
Comment thread internal/checker/utils.go Outdated
@WCY-dt
WCY-dt merged commit e5aa6a3 into main Sep 25, 2025
4 checks passed
@WCY-dt
WCY-dt deleted the fix/secret_display branch September 25, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

修复secrets隐藏问题

2 participants