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

Fix panic from wrong type conversion in ng rules #265

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

lewinski
Copy link
Contributor

Description

This fixes a panic caused by a wrong type conversion in the NAT Gateway scanner rules (copy-paste issue) since 2.0.0:

panic: interface conversion: interface {} is *armnetwork.NatGateway, not *armnetwork.SecurityGroup

goroutine 172 [running]:
github.com/Azure/azqr/internal/scanners/ng.(*NatGatewayScanner).GetRecommendations.func4({0xc4df5a0?, 0xc00040a960?}, 0xc000180f90?)

Issue reference

n/a

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Unit tests passing

@lewinski lewinski requested a review from cmendible as a code owner October 30, 2024 20:30
@cmendible
Copy link
Member

wow thanks for this one. I stashed those changes yesterday and never popped them before the release.

Copy link
Member

@cmendible cmendible left a comment

Choose a reason for hiding this comment

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

LGTM

@cmendible cmendible merged commit 6f2560a into Azure:main Oct 30, 2024
12 checks passed
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