gosec: G601 - Implicit memory aliasing in for loop
G601 warning doen't mean there's a vulnerabilty. But this code could have unintended bugs. Disabling warnings locally.
This commit is contained in:
parent
8136209d17
commit
610db6563a
7 changed files with 24 additions and 0 deletions
|
|
@ -512,6 +512,8 @@ func tarInstallerPipelines(t *imageType, customizations *blueprint.Customization
|
|||
installerPackages := packageSetSpecs[installerPkgsKey]
|
||||
for _, pkg := range installerPackages {
|
||||
if pkg.Name == "kernel" {
|
||||
// Implicit memory alasing doesn't couse any bug in this case
|
||||
/* #nosec G601 */
|
||||
kernelPkg = &pkg
|
||||
break
|
||||
}
|
||||
|
|
@ -1345,6 +1347,8 @@ func kernelVerStr(pkgs []rpmmd.PackageSpec, kernelName, arch string) string {
|
|||
kernelPkg := new(rpmmd.PackageSpec)
|
||||
for _, pkg := range pkgs {
|
||||
if pkg.Name == kernelName {
|
||||
// Implicit memory alasing doesn't couse any bug in this case
|
||||
/* #nosec G601 */
|
||||
kernelPkg = &pkg
|
||||
break
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue