Skip to content

Commit

Permalink
fix nosec annotation?
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed May 9, 2024
1 parent a647035 commit fdde58c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/upgrade_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ func (t upgradeTracker) getDevelopUpgrades() ([]upgradeHandlerFn, *storetypes.St
stateFilePath := path.Join(t.stateFileDir, "developupgradetracker")

currentIndex := int64(0)
// #nosec G304 stateFilePath is not user controllable
if stateFileContents, err := os.ReadFile(stateFilePath); err == nil {
if stateFileContents, err := os.ReadFile(stateFilePath); err == nil { // #nosec G304 -- stateFilePath is not user controllable
currentIndex, err = strconv.ParseInt(string(stateFileContents), 10, 64)
if err != nil {
return nil, nil, fmt.Errorf("unable to decode upgrade tracker: %w", err)

Check warning on line 40 in app/upgrade_tracker.go

View check run for this annotation

Codecov / codecov/patch

app/upgrade_tracker.go#L40

Added line #L40 was not covered by tests
Expand Down

0 comments on commit fdde58c

Please sign in to comment.