Skip to content

Commit

Permalink
fix gosec
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-henglu committed Oct 10, 2024
1 parent b031a80 commit 964f8e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ func (c AztfMigrateCommand) Handle(ctx context.Context, arguments []json.RawMess
}

for index, r := range resources {
// #nosec G115
reportProgress(ctx, fmt.Sprintf("Migrating resource %d/%d...", index+1, len(resources)), 40+uint32(50.0*index/len(resources)))
if err := r.GenerateNewConfig(tempTerraform); err != nil {
log.Printf("[ERROR] %+v", err)
Expand Down
5 changes: 5 additions & 0 deletions internal/lsp/token_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,15 @@ func (te *TokenEncoder) encodeTokenOfIndex(i int) []uint32 {
}

data = append(data, []uint32{
// #nosec G115
uint32(deltaLine),
// #nosec G115
uint32(deltaStartChar),
// #nosec G115
uint32(length),
// #nosec G115
uint32(tokenTypeIdx),
// #nosec G115
uint32(modifierBitMask),
}...)

Expand Down

0 comments on commit 964f8e7

Please sign in to comment.