Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cnbBuild): use SHA256 hashed values for redacted telemetry properties #4328

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

pbusko
Copy link
Member

@pbusko pbusko commented Apr 17, 2023

Changes

Instead of hardcoding <redacted> string in telemetry, use SHA256 hashed strings.

  • Tests
  • Documentation

@pbusko pbusko requested a review from a team as a code owner April 17, 2023 08:30
@pbusko
Copy link
Member Author

pbusko commented Apr 17, 2023

/it

assert.Equal(t, "<redacted>", image)
}

assert.ElementsMatch(t, filtered, []string{
Copy link
Member

Choose a reason for hiding this comment

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

I guess what unit test might be worth having: When the same buildpack is used several time (multiple images), will the sha256 be the same?

Most likely yes because of the Reset(), but it might be worth a test to document this. Because this is the main reason for us to use sha in the first place, to identify our buildpacks / builder later.

@pbusko pbusko force-pushed the cnbbuild-hash-redacted-telemetry branch from 19927eb to bcc1a29 Compare April 18, 2023 07:01
@pbusko
Copy link
Member Author

pbusko commented Apr 18, 2023

/it

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@pbusko pbusko enabled auto-merge (squash) April 18, 2023 07:04
@pbusko pbusko merged commit 5d8e89b into master Apr 18, 2023
@pbusko pbusko deleted the cnbbuild-hash-redacted-telemetry branch April 18, 2023 07:10
maxatsap pushed a commit to maxatsap/jenkins-library that referenced this pull request Jul 23, 2024
…rties (SAP#4328)

* feat(cnbBuild): use SHA256 hashed values for redacted telemetry properties

* update unit tests
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