This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 198
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ranweiler
reviewed
Nov 18, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, @puhley. I have some small suggested changes, and a few comments, but the latter are more for us to follow up with.
Co-authored-by: Joe Ranweiler <joe@lemma.co>
Co-authored-by: Joe Ranweiler <joe@lemma.co>
Co-authored-by: Joe Ranweiler <joe@lemma.co>
ranweiler
approved these changes
Nov 18, 2021
ranweiler
reviewed
Nov 18, 2021
Running integration tests. |
@puhley out of interest, what type (distro/version) of Linux images are you deploying? We might need to make our agent binary "less portable" in order to comply with some security policies, so I'm trying to gather information on what distros are currently in use. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
The documentation for using custom images while fuzzing states that Compute Gallery images are supported. However, the existing code for handling custom images does not properly address Compute Gallery resource IDs. The code only handles references to Azure Images. This pull request adds support for Compute Gallery resource IDs as discussed in issue #1443 . In addition, it corrects an error within the existing code where an attempt to retrieve a "name" parameter is performed on the image "os_type". The "os_type" is a string and does not have a "name" parameter. This pull request removes the invalid "name" reference and converts the string using ".lower()" similar to the default code path.
PR Checklist
Info on Pull Request
This pull request includes a check to determine whether the resource ID refers to a "galleries" resource type. If the resource ID is confirmed to be a Compute Gallery reference, then it will use the corresponding ComputeManagementClient methods and properties to retrieve the OS type. If an Azure Image reference is provided, then the code has been changed to provide the lower case value of the OS type. Since it was unknown what existing dependencies relied on the previous behavior, the code defaults to the existing approach of assuming an Azure Image reference was given.
Validation Steps Performed
This was tested locally within what is assumed to be a simple deployment environment. More robust testing is welcomed.