Skip to content

Fix credscan bugs - #40454

Closed
aik-jahoda wants to merge 3 commits into
dotnet:masterfrom
aik-jahoda:jajahoda/credscan4
Closed

Fix credscan bugs#40454
aik-jahoda wants to merge 3 commits into
dotnet:masterfrom
aik-jahoda:jajahoda/credscan4

Conversation

@aik-jahoda

@aik-jahoda aik-jahoda commented Aug 6, 2020

Copy link
Copy Markdown
Contributor

follow up of #38026

@Dotnet-GitSync-Bot

Copy link
Copy Markdown
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@aik-jahoda
aik-jahoda requested a review from a team August 6, 2020 11:39
{
// Apple requires all private keys to be exported encrypted, but since we're trying to export
// as parsed structures we will need to decrypt it for the user.
// [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Unit test password.")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This code, and a few other places, are not part of a unit test. Perhaps the comment above can be incorporated as the justification?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately it is not possible to use multiline justification. I added short justification with reference to the source.

"src/libraries/System.Security.Cryptography.Xml/tests/TestHelpers.cs"
"src/libraries/System.Security.Cryptography.Xml/tests/TestHelpers.cs",
"src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs",
"src/libraries/System.Management/src/System/Management/ManagementScope.cs",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file, according to the path, doesn't look like a test code. Is there a reason we cannot do inline suppression for it instead?

@ManickaP ManickaP left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small comments, otherwise LGTM. Thanks!


internal static ECParameters ExportPublicParametersFromPrivateKey(SafeSecKeyRefHandle handle)
{
// [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Password for temporary operation. See code comments for more details.")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See code comments for more details.

There're no comments though.

@ericstj

ericstj commented Jan 22, 2021

Copy link
Copy Markdown
Member

@aik-jahoda is this PR still important? Be sure to rerun tests if you want to merge it.

@joperezr

joperezr commented Feb 9, 2021

Copy link
Copy Markdown
Member

ping @aik-jahoda 😄

Do we still need this PR or can we go ahead and close?

@aik-jahoda

Copy link
Copy Markdown
Contributor Author

Closing as we have new credscan effort and we need reevaluate the approach

@aik-jahoda aik-jahoda closed this Feb 10, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

8 participants