diff --git a/internal/cloud/awscloud/awscloud.go b/internal/cloud/awscloud/awscloud.go index 9aa282c1e..48748bf95 100644 --- a/internal/cloud/awscloud/awscloud.go +++ b/internal/cloud/awscloud/awscloud.go @@ -202,6 +202,8 @@ func (a *AWS) Register(name, bucket, key string, shareWith []string, rpmArch str log.Printf("[AWS] 🎥 Sharing ec2 snapshot") var userIds []*string for _, v := range shareWith { + // Implicit memory alasing doesn't couse any bug in this case + /* #nosec G601 */ userIds = append(userIds, &v) } _, err := a.ec2.ModifySnapshotAttribute( @@ -281,6 +283,8 @@ func (a *AWS) Register(name, bucket, key string, shareWith []string, rpmArch str var launchPerms []*ec2.LaunchPermission for _, id := range shareWith { launchPerms = append(launchPerms, &ec2.LaunchPermission{ + // Implicit memory alasing doesn't couse any bug in this case + /* #nosec G601 */ UserId: &id, }) } diff --git a/internal/cloudapi/v2/errors.go b/internal/cloudapi/v2/errors.go index b0378fc4f..e4ace4ddf 100644 --- a/internal/cloudapi/v2/errors.go +++ b/internal/cloudapi/v2/errors.go @@ -193,6 +193,8 @@ func APIErrorList(page int, pageSize int, c echo.Context) *ErrorList { errs := getServiceErrors()[min(page*pageSize, len(getServiceErrors())):min(((page+1)*pageSize), len(getServiceErrors()))] for _, e := range errs { + // Implicit memory alasing doesn't couse any bug in this case + /* #nosec G601 */ list.Items = append(list.Items, *APIError(e.code, &e, c)) } list.Size = len(list.Items) diff --git a/internal/distro/rhel85/pipelines.go b/internal/distro/rhel85/pipelines.go index 4f917c0da..c91ef6192 100644 --- a/internal/distro/rhel85/pipelines.go +++ b/internal/distro/rhel85/pipelines.go @@ -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 } diff --git a/internal/distro/rhel86/pipelines.go b/internal/distro/rhel86/pipelines.go index 5f7aee836..5c58a0297 100644 --- a/internal/distro/rhel86/pipelines.go +++ b/internal/distro/rhel86/pipelines.go @@ -679,6 +679,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 } @@ -1487,6 +1489,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 } diff --git a/internal/distro/rhel90/pipelines.go b/internal/distro/rhel90/pipelines.go index 47fa54a02..f6bc623d1 100644 --- a/internal/distro/rhel90/pipelines.go +++ b/internal/distro/rhel90/pipelines.go @@ -669,6 +669,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 } @@ -1487,6 +1489,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 } diff --git a/internal/distro/rhel90beta/pipelines.go b/internal/distro/rhel90beta/pipelines.go index 190dccfdd..1bfd9a9ea 100644 --- a/internal/distro/rhel90beta/pipelines.go +++ b/internal/distro/rhel90beta/pipelines.go @@ -644,6 +644,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 } @@ -1157,6 +1159,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 } diff --git a/internal/osbuild2/result.go b/internal/osbuild2/result.go index f1aaf77a9..2bdf5bbd7 100644 --- a/internal/osbuild2/result.go +++ b/internal/osbuild2/result.go @@ -151,6 +151,8 @@ func convertStageResults(v1Stages []osbuild1.StageResult) (PipelineResult, Pipel result := make([]StageResult, len(v1Stages)) metadata := make(map[string]StageMetadata) for idx, srv1 := range v1Stages { + // Implicit memory alasing doesn't couse any bug in this case + /* #nosec G601 */ stageResult, stageMetadata := convertStageResult(&srv1) result[idx] = *stageResult if stageMetadata != nil {