Skip to content

Merge feature/obfuscator#33

Merged
gildas merged 21 commits intodevfrom
feature/obfuscator
Feb 8, 2026
Merged

Merge feature/obfuscator#33
gildas merged 21 commits intodevfrom
feature/obfuscator

Conversation

@gildas
Copy link
Owner

@gildas gildas commented Feb 8, 2026

Feature obfuscator. Do not delete the feature branch after the merge.

Copilot AI review requested due to automatic review settings February 8, 2026 16:14
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.27%. Comparing base (120fe87) to head (8f9d70e).
⚠️ Report is 22 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #33      +/-   ##
==========================================
+ Coverage   95.15%   95.27%   +0.11%     
==========================================
  Files          30       31       +1     
  Lines        1239     1269      +30     
==========================================
+ Hits         1179     1209      +30     
  Misses         59       59              
  Partials        1        1              
Flag Coverage Δ
unittests 95.27% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an obfuscation (reversible encryption) capability to the logger package so sensitive values can be logged in encrypted form and later recovered with the same key.

Changes:

  • Introduces (*Logger).Obfuscate / (*Logger).Unobfuscate implemented with AEAD (GCM) and a !ENC!:{...} marker.
  • Extends logger.Create(...) to accept a cipher.Block and propagate it to child loggers.
  • Adds an obfuscator test suite and documents usage in the README (plus dependency bumps).

Reviewed changes

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

Show a summary per file
File Description
obfuscator.go Implements obfuscation/unobfuscation using cipher.Block + GCM and a marker-based encoding format.
logger.go Adds storage/propagation of the obfuscation key and wires it into Create and child logger creation paths.
obfuscator_test.go Adds test coverage for obfuscation, missing key behavior, and failure scenarios.
README.md Documents the new obfuscation feature and how to use it.
go.mod / go.sum Bumps a few dependencies as part of the merge.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 439 to 441
```go
log.Infof("This is some sensitive information: %s. Do not show it!", logger.Obfuscate(sensitiveData))
```
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

The example calls logger.Obfuscate(...), but Obfuscate is a method on *Logger. Update the snippet to call it on the log instance created above.

Copilot uses AI. Check for mistakes.
README.md Outdated
```go
log := logger.Create("MYAPP", cipherBlock)

fmt.Printf("Here is the data: %s", logger.Unobfuscate(obfuscatedData))
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

The example calls logger.Unobfuscate(...) and ignores the returned error, but Unobfuscate is a *Logger method returning (string, error). Update the snippet to call log.Unobfuscate(...) and handle/propagate the error.

Suggested change
fmt.Printf("Here is the data: %s", logger.Unobfuscate(obfuscatedData))
data, err := log.Unobfuscate(obfuscatedData)
if err != nil {
fmt.Printf("failed to unobfuscate data: %v", err)
} else {
fmt.Printf("Here is the data: %s", data)
}

Copilot uses AI. Check for mistakes.
@gildas
Copy link
Owner Author

gildas commented Feb 8, 2026

@copilot review again

Copy link
Contributor

Copilot AI commented Feb 8, 2026

@gildas I've opened a new pull request, #34, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 8, 2026 16:46
Co-authored-by: gildas <56485+gildas@users.noreply.github.com>
Fix README documentation examples for obfuscator methods
@gildas gildas merged commit f8937cd into dev Feb 8, 2026
4 of 5 checks passed
@gildas gildas deleted the feature/obfuscator branch February 8, 2026 16:56
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.

2 participants