Repository navigation
Fix: rename SetHeader parameters to clear Snyk hardcoded-credential findings - #210
Merged
Merged
Conversation
back merge
chore: back-merge master into development
Brings back-merge branch up to date with development so master can be back-merged cleanly (DX-20927). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DX-20927 | Back-merge master into development
…indings Snyk Code flagged the `key` parameter in ContentstackClient.SetHeader, Entry.SetHeader and Query.SetHeader as a hardcoded credential (false positive). The existing deepcode ignore comments do not suppress it in the CLI scan, so rename the parameters to headerName/headerValue. Behaviour is unchanged; only the parameter names and XML docs differ. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
cs-raj
approved these changes
Nov 2, 2026
cs-raj
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Clears the three Snyk Code findings DX-21674, DX-21675 and DX-21676 ("Use of Hardcoded Credentials", rule
csharp/NoHardcodedCredentials).Snyk flagged the
keyparameter ofContentstackClient.SetHeader,Entry.SetHeaderandQuery.SetHeaderas a hardcoded credential. These are false positives: there is no credential in the code. The existing// deepcode ignorecomments do not suppress them in the CLI scan, so the parameters are renamed instead.Change
SetHeader(string key, string value)becomesSetHeader(string headerName, string headerValue)in the three classes, including the XML doc<param>names.Compatibility
Calls such as
SetHeader("name", "value")are unaffected. Only a caller using named arguments (SetHeader(key: ..., value: ...)) would need to update; nothing in this repo does.Verification
snyk code testreturns no findings (was 3).Contentstack.Core.Unit.Tests: 847 passed, 0 failed.🤖 Generated with Claude Code