-
Notifications
You must be signed in to change notification settings - Fork 52
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 CodeQL scans for golang #2643
Merged
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
geigerj0
added
allow-acceptance-tests
This label needs to be added to enable the acceptance tests to run.
exclude-from-changelog
labels
Feb 21, 2024
silvestre
approved these changes
Feb 21, 2024
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.
Wow. nice sleuthing!
Quality Gate passedIssues Measures |
The scans are back after merging this to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
allow-acceptance-tests
This label needs to be added to enable the acceptance tests to run.
exclude-from-changelog
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.
Problem
The CodeQL scans stopped working after the go version was bumped from
1.20
to1.21
: 9a9d98c#diff-751af1a340658c7b8176fe32d7db9fadbe15d1d075daba1919a91df04155bc70R9. Note that for this commit, the CodeQL scans were still working because the Docker image being used during the scan was still on1.20
. Following commits started to have failing CodeQL scans for Go: https://github.com/cloudfoundry/app-autoscaler-release/commits/main/?since=2024-01-08&until=2024-01-08.The root cause why the scans stopped working with go
1.21
in combination with our ownautoscaler-tools
Docker image is the following:1.21
for linuxfile
command to be availabe which is not the case for our Docker imageSolution
Install
file
for ourautoscaler-release-tools
Docker image so that the CodeQL workaround for go1.21
actually works.Tests if solution works
autoscaler-tools
Docker image that comes with go1.21
andfile
: a8ed629Why are scans not working for latest commit of this PR?
Because the CI pipeline is still using a Docker image that doesn't come with
file
. After this PR has been merged, a new Docker image will be build. This causes subsequent CodeQL scans to work again.