Skip to content

Commit

Permalink
Stick on gosec v2.16.0 (#456)
Browse files Browse the repository at this point in the history
* Stick on gosec v2.16.0

The now latest version v2.17.0 will cause error as below:

    Golang errors in file: []:

      > [line 0 : column 0] - error obtaining VCS status: exit status 128
            Use -buildvcs=false to disable VCS stamping.

      > [line 0 : column 0] - error obtaining VCS status: exit status 128
            Use -buildvcs=false to disable VCS stamping.

      > [line 0 : column 0] - error obtaining VCS status: exit status 128
            Use -buildvcs=false to disable VCS stamping.

      > [line 0 : column 0] - error obtaining VCS status: exit status 128
            Use -buildvcs=false to disable VCS stamping.

This probably due to the fact that 2.17.0 updated its Go version, which might conflicts with the github action OS installed version.

* fix lint warnings
  • Loading branch information
magodo authored Sep 25, 2023
1 parent b3500d6 commit eb789a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v2

- name: Run Gosec Security Scanner
uses: securego/gosec@master
uses: securego/gosec@v2.16.0
with:
args: './...'

Expand Down
1 change: 1 addition & 0 deletions auth_oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func (w *OidcCredential) getAssertion(ctx context.Context) (string, error) {
return "", fmt.Errorf("getAssertion: cannot request token: %v", err)
}

// #nosec G307
defer resp.Body.Close()
body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20))
if err != nil {
Expand Down

0 comments on commit eb789a4

Please sign in to comment.