Skip to content

Conversation

adityapatwardhan
Copy link
Member

Fixes https://github.com/PowerShell/PSResourceGet/security/code-scanning/5

To fix the problem, we need to ensure that sensitive information such as passwords is not transmitted in plain text. Instead, we should use secure methods to handle and transmit such data. One way to achieve this is by encrypting the sensitive information before transmission and decrypting it at the receiving end. Additionally, we should avoid logging or displaying sensitive information in error messages.

In this specific case, we will modify the code to encrypt the content variable before it is assigned to request.Content. We will also ensure that any sensitive information is not included in error messages.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…ed data

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@adityapatwardhan
Copy link
Member Author

/azp list

Copy link

CI/CD Pipelines for this repository:

@adityapatwardhan
Copy link
Member Author

/azp run PowerShell.PSResourceGet

Copy link

Azure Pipelines successfully started running 1 pipeline(s).


request.Content = new StringContent(content);
string encryptedContent = EncryptContent(content);
request.Content = new StringContent(encryptedContent);

Check warning

Code scanning / CodeQL

Information exposure through transmitted data Medium

This data transmitted to the user depends on
sensitive information
.
This data transmitted to the user depends on
sensitive information
.
@alerickson
Copy link
Member

Closing, need to rethink approach for this issue.

@alerickson alerickson closed this Sep 9, 2025
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