Skip to content

Commit

Permalink
Align integer sizes to address G115
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
  • Loading branch information
dhaiducek authored and openshift-merge-bot[bot] committed Sep 24, 2024
1 parent 2eae316 commit 7274485
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/templates/encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func (t *TemplateResolver) protect(options *ResolveOptions, value string) (strin
}

blockSize := block.BlockSize()
// #nosec G407 -- Onus to randomize the IV is on the consuming controller.
blockMode := cipher.NewCBCEncrypter(block, options.InitializationVector)

valueBytes := []byte(value)
Expand Down Expand Up @@ -85,6 +86,7 @@ func (t *TemplateResolver) decrypt(options *ResolveOptions, value string) (strin
continue
}

// #nosec G407 -- Onus to randomize the IV is on the consuming controller.
blockMode := cipher.NewCBCDecrypter(block, options.InitializationVector)
decryptedValue = make([]byte, len(decodedValue))
blockMode.CryptBlocks(decryptedValue, decodedValue)
Expand Down
2 changes: 1 addition & 1 deletion pkg/templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var (
// and cache entries are cleaned up. The manual control is done with the StartQueryBatch and EndQueryBatch methods.
// This has no effect if caching is not enabled.
type Config struct {
AdditionalIndentation uint
AdditionalIndentation uint32
DisabledFunctions []string
StartDelim string
StopDelim string
Expand Down

0 comments on commit 7274485

Please sign in to comment.