Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump github.com/golangci/golangci-lint from 1.58.1 to 1.59.0 in /internal/tools #558

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 28, 2024

Bumps github.com/golangci/golangci-lint from 1.58.1 to 1.59.0.

Release notes

Sourced from github.com/golangci/golangci-lint's releases.

v1.59.0

golangci-lint is a free and open-source project built by volunteers.

If you value it, consider supporting us, the maintainers and linter authors.

We appreciate it! ❤️

For key updates, see the changelog.

Changelog

  • 4f5251d3 Support Sarif output (#4723)
  • 73110df2 build(deps): bump github.com/Antonboom/testifylint from 1.2.0 to 1.3.0 (#4729)
  • 62c83ccd build(deps): bump github.com/BurntSushi/toml from 1.3.2 to 1.4.0 (#4746)
  • 0cb14183 build(deps): bump github.com/go-critic/go-critic from 0.11.3 to 0.11.4 (#4738)
  • e14ae4b7 build(deps): bump github.com/hashicorp/go-version from 1.6.0 to 1.7.0 (#4745)
  • 2059b18a build(deps): bump github.com/securego/gosec/v2 from 2.20.0 to 5f0084eb01a9 (#4748)
  • be1bb6db build(deps): bump go-simpler.org/sloglint from 0.6.0 to 0.7.0 (#4718)
  • 08deff42 feat: add warning about disabled and deprecated linters (level 2) (#4742)
  • b99d5295 feat: allow the analysis of generated files (#4740)
  • 867adaf9 feat: deprecate github-actions format (#4726)
  • 4beae6a9 fix: remove errcheck defaults (#4734)

v1.58.2

golangci-lint is a free and open-source project built by volunteers.

If you value it, consider supporting us, the maintainers and linter authors.

We appreciate it! ❤️

For key updates, see the changelog.

Changelog

  • 7c87a9e6 build(deps): bump github.com/Antonboom/nilnil from 0.1.8 to 0.1.9 (#4716)
  • 3fbc2f52 build(deps): bump github.com/fatih/color from 1.16.0 to 1.17.0 (#4725)
  • 8fe47a93 build(deps): bump github.com/lasiar/canonicalheader from 1.0.6 to 1.1.1 (#4715)
  • 8c4cfb61 build(deps): bump github.com/securego/gosec/v2 from 2.19.0 to 2.20.0 (#4724)
  • 35eaf609 build(deps): bump go-simpler.org/musttag from 0.12.1 to 0.12.2 (#4710)
  • 7f6606a7 build(deps): bump golangci/golangci-lint-action from 5.3.0 to 6.0.1 (#4722)
Changelog

Sourced from github.com/golangci/golangci-lint's changelog.

v1.59.0

  1. Enhancements
    • Add SARIF output format
    • Allow the analysis of generated files (issues.exclude-generated: disable)
  2. Updated linters
    • errcheck: fix deprecation warning
    • go-critic: from 0.11.3 to 0.11.4
    • gosec: from 2.20.0 to 5f0084eb01a9 (fix G601 and G113 performance issues)
    • sloglint: from 0.6.0 to 0.7.0 (new option forbidden-keys)
    • testifylint: from 1.2.0 to 1.3.0 (new checker negative-positive and new option go-require.ignore-http-handlers)
  3. Misc.
    • ️️⚠️ Deprecate github-action output format
    • ️️⚠️ Deprecate issues.exclude-generated-strict option (replaced by issues.exclude-generated: strict)
    • ️️⚠️ Add warning about disabled and deprecated linters (level 2)

v1.58.2

  1. Updated linters
    • canonicalheader: from 1.0.6 to 1.1.1
    • gosec: from 2.19.0 to 2.20.0
    • musttag: from 0.12.1 to 0.12.2
    • nilnil: from 0.1.8 to 0.1.9
  2. Documentation
    • Improve integrations and install pages
Commits
  • 2059b18 build(deps): bump github.com/securego/gosec/v2 from 2.20.0 to 5f0084eb01a9 (#...
  • 95ca3c3 dev: fix badges
  • 495321c dev: improve issue chooser (#4747)
  • 62c83cc build(deps): bump github.com/BurntSushi/toml from 1.3.2 to 1.4.0 (#4746)
  • e14ae4b build(deps): bump github.com/hashicorp/go-version from 1.6.0 to 1.7.0 (#4745)
  • 010b4f8 chore: use global security policy
  • b99d529 feat: allow the analysis of generated files (#4740)
  • 08deff4 feat: add warning about disabled and deprecated linters (level 2) (#4742)
  • b9868e1 chore: add html to the JSONSchema (#4737)
  • 0cb1418 build(deps): bump github.com/go-critic/go-critic from 0.11.3 to 0.11.4 (#4738)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.58.1 to 1.59.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.58.1...v1.59.0)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from a team May 28, 2024 05:05
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label May 28, 2024
@dependabot dependabot bot requested a review from a team May 28, 2024 05:05
@dependabot dependabot bot added go Pull requests that update Go code Skip Changelog PRs that do not require a CHANGELOG.md entry labels May 28, 2024
@dependabot dependabot bot requested review from a team and bogdandrutu May 28, 2024 05:05
@dependabot dependabot bot requested a review from TylerHelmuth May 28, 2024 05:05
Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.64%. Comparing base (e3fd63d) to head (2750134).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #558   +/-   ##
=======================================
  Coverage   60.64%   60.64%           
=======================================
  Files          40       40           
  Lines        1964     1964           
=======================================
  Hits         1191     1191           
  Misses        626      626           
  Partials      147      147           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This rule was updated to check for `os.ModePerm` in v1.58.2:
securego/gosec#1138.
@@ -256,7 +256,7 @@ func TestEntry(t *testing.T) {
func TestReadDeleteEntries(t *testing.T) {
tempDir := t.TempDir()
entriesDir := filepath.Join(tempDir, config.DefaultEntriesDir)
require.NoError(t, os.Mkdir(entriesDir, os.ModePerm))
require.NoError(t, os.Mkdir(entriesDir, 0750))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@andrzej-stencel andrzej-stencel Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter authors seem to think of it as a bug fix:

os.ModePerm equals 0777, so I suppose it's a good idea to fix the test and use 0750 permissions that satisfy the linter?

Copy link
Member

@pellared pellared Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a problem of gosec. golangci-lint has a list of default exclusions and it looks like EXC0009

does not work properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pellared After digging into this a bit (I'm not very familiar with the Go linter) I'm not sure I understand the ask.

The configuration in this repository says:

linters:
  enable:
    - ...
    - gosec
    - ...
issues:
  include:
    - ...
    - EXC0009
    - ...

The documentation is not perfectly clear (oh the double negations 🤦), but if I understand correctly, this is what it means:

  • mentioning gosec in linters::enable means "please enable the gosec linter"
  • mentioning EXC0009 in issues::include means "please remove the EXC0009 exclusion rule from the (default) list of exclusion rules", which effectively means "please disregard the EXC0009 exclusion rule", which means "please check for errors described in EXC0009".

If we want to use the EXC0009 exclusion rule, i.e. if we want to ignore permissions errors reported by the gosec linter, we should remove it from the issues::include and rather add it to issues::exclude - this is not necessary though, as EXC0009 is one of the default exclusion rules.

Or maybe I'm missing something again? 🤔

Copy link
Member

@pellared pellared Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I missed that it is include: 🤦
So the rule started to work correctly as you described. Sorry for the trouble.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pellared I've created a separate PR to fix the gosec linter violation:

Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 16, 2024

A newer version of github.com/golangci/golangci-lint exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@MrAlias
Copy link
Contributor

MrAlias commented Jun 17, 2024

@dependabot recreate

Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 17, 2024

Superseded by #574.

@dependabot dependabot bot closed this Jun 17, 2024
@dependabot dependabot bot deleted the dependabot/go_modules/internal/tools/github.com/golangci/golangci-lint-1.59.0 branch June 17, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants