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

Invalid Marshaling of ServerVulnerabilityProperties in SubAssessment #23891

Open
bbernays opened this issue Dec 26, 2024 · 0 comments
Open

Invalid Marshaling of ServerVulnerabilityProperties in SubAssessment #23891

bbernays opened this issue Dec 26, 2024 · 0 comments
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@bbernays
Copy link

Bug Report

The MarshalJSON() function for ServerVulnerabilityProperties the SDK is hardcoding the assessedResourceType as ServerVulnerabilityAssessment when in the sdk the const AssessedResourceTypeServerVulnerability has a value of ServerVulnerability

This means the following code will never return true:

func isTypeServerVulnerability(assessment *armsecurity.SubAssessment) bool {
    additionalType := assessment.Properties.AdditionalData.GetAdditionalData()
    return additionalType.AssessedResourceType == armsecurity.AssessedResourceTypeServerVulnerability
}

This value is also used in this function and will have to be changed as well

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

1 participant