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

Fixing CodeQL angry faces #95

Merged
merged 4 commits into from
Mar 13, 2025
Merged

Fixing CodeQL angry faces #95

merged 4 commits into from
Mar 13, 2025

Conversation

missymessa
Copy link
Member

garath
garath previously approved these changes Mar 12, 2025
@missymessa missymessa merged commit a65d3a0 into main Mar 13, 2025
4 checks passed
@missymessa missymessa deleted the missymessa-5220 branch March 13, 2025 22:24
public class AnonymousAttributeController : ControllerBase
{
[AllowAnonymous]
Copy link
Member

Choose a reason for hiding this comment

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

This one should just be deleted, since it's identical to the next test. Ideally, you'd have wanted another test that had the "inherit from the controller" behavior tested (you'd just need to not have any Authorize attributes in that controller to keep CodeQL quiet)

@@ -393,7 +393,7 @@ public string HashPassword(TestUser user, string password)

public static string CalculateHash(TestUser user, string password)
{
return $":HASH:{user.Name}:{password}"; // lgtm [cs/hardcoded-credentials] Part of unit tests
return $":HASH:{user.Name}:{password}"; // CodeQL [SM00423] Hardcoded as part of unit tests
Copy link
Member

Choose a reason for hiding this comment

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

These aren't even hardcoded, this a string interpolation.

Copy link
Member Author

Choose a reason for hiding this comment

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

I had to put 25 characters in there for a reason :D

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.

3 participants