coreos / coreos/coreos-assembler
`go-autorest v9.1.0` : Update module to `v14.2.0` to address authorization bypass in jwt-go
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 393
- Forks
- 193
- Avg merge
- 17h 6m
- Merged PRs (30d)
- 5
Description
The go-autorest dependency in Mantle is currently using v9.1.0 which uses jwt-go the vulnerable dependency. COSA build fails at any version after v9.10.0 since there is a change in package structure. Specifically Building Ore fails. The switch from jwt (insecure) to jwt(secure) for go-autorest occurs in the v14.2.0 documented over here .
The function used in the the current v9.1.0 called GetClientSetup() used in coreos-assembler/mantle/platform/api/azure/api.go is now replaced by several functions GetEnvironmentSettings(), NewAuthorizerFromFile(), GetSettingsFromFile().
To reproduce the fail in building COSA:
cd coreos-assembler/mantle
go get github.com/Azure/go-autorest@v14.2.0
go mod tidy
go mod vendor
make
Results in
./build cmd/ore
Building ore
# github.com/Azure/azure-sdk-for-go/arm/storage
vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go:55:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go:144:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go:193:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go:219:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go:292:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go:487:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go:564:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go:648:29: undefined: validation.NewErrorWithValidationError
# github.com/Azure/azure-sdk-for-go/arm/resources/resources
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go:61:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go:138:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:62:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:137:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:223:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:272:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:314:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:361:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:391:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:466:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go:466:29: too many errors
\# github.com/Azure/azure-sdk-for-go/arm/compute
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go:58:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go:107:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go:173:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usage.go:52:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go:102:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go:171:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go:60:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go:109:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go:177:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go:219:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go:219:29: too many errors
# github.com/Azure/azure-sdk-for-go/arm/network
vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go:105:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go:135:29: undefined: validation.NewErrorWithValidationError
vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go:184:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go:251:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go:548:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go:615:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go:105:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go:174:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go:105:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go:173:9: undefined: azure.DoPollForAsynchronous
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go:173:9: too many errors
make: *** [Makefile:12: ore] Error 2
I am working on changing the function calls to update them from v9.1.0 to v14.2.0.
Let me know if anyone has questions, issues, concerns, advice.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in coreos-assembler/mantle/platform/api/azure/api.go and the module and vendor files after reproducing the failure with the listed go get, go mod tidy, go mod vendor, and make commands. Update the go-autorest usage from GetClientSetup() to the v14.2.0 APIs, resolve the reported Azure SDK compilation errors, and confirm that make successfully builds ore.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- build-system, cloud, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100