Skip to content

Commit

Permalink
deps(go-tools): bump github.com/golangci/golangci-lint from 1.60.3 to…
Browse files Browse the repository at this point in the history
… 1.61.0 in /tools (#1094)

Bumps
[github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint)
from 1.60.3 to 1.61.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's
releases</a>.</em></p>
<blockquote>
<h2>v1.61.0</h2>
<p><code>golangci-lint</code> is a free and open-source project built by
volunteers.</p>
<p>If you value it, consider supporting us, the <a
href="https://opencollective.com/golangci-lint">maintainers</a> and <a
href="https://golangci-lint.run/product/thanks/">linter authors</a>.</p>
<p>We appreciate it! ❤️</p>
<p>For key updates, see the <a
href="https://golangci-lint.run/product/changelog/%5B#1610%5D(https://redirect.github.com/golangci/golangci-lint/issues/1610)">changelog</a>.</p>
<h2>Changelog</h2>
<ul>
<li>e9a872629d4feda79d2fff23ddc1f410faff163e build(deps): bump
github.com/Abirdcfly/dupword from 0.0.14 to 0.1.1 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4954">#4954</a>)</li>
<li>2813c451edd6b75098372dbb269ffed8df3a4ec6 build(deps): bump
github.com/Crocmagnon/fatcontext from 0.4.0 to 0.5.2 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4971">#4971</a>)</li>
<li>48251f274a1e09fae524271662a30a47f4ddb242 build(deps): bump
github.com/ckaznocha/intrange from 0.1.2 to 0.2.0 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4996">#4996</a>)</li>
<li>726b8153cac6c04238264b189f5b05ec059f9330 build(deps): bump
github.com/daixiang0/gci from 0.13.4 to 0.13.5 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4975">#4975</a>)</li>
<li>2fcfe26fdb368ae0930bac909a0573277a6d2226 build(deps): bump
github.com/go-viper/mapstructure/v2 from 2.0.0 to 2.1.0 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4910">#4910</a>)</li>
<li>5fa1b681e4518b09be4ebdbe635e044cf729b8a1 build(deps): bump
github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.3 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4955">#4955</a>)</li>
<li>a6fc686d733f339619b02de65ef4c782848eaff0 build(deps): bump
github.com/quasilyte/go-ruleguard to 0fe6f58b47b1 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4949">#4949</a>)</li>
<li>57fa4dad326cd24b71fccd3fb9b8fc8a2788c994 build(deps): bump
github.com/ryancurrah/gomodguard from 1.3.3 to 1.3.5 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4992">#4992</a>)</li>
<li>6e5dc28f52b76181f5c4f5c7d37dab20e09f59d1 build(deps): bump
github.com/securego/gosec/v2 from 2.20.1-0.20240826145712-bcec04e78483
to 2.21.0 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4981">#4981</a>)</li>
<li>dd069d5578f3fb9eb298e5d397697c368a0e85f7 build(deps): bump
github.com/securego/gosec/v2 from 2.21.0 to 2.21.1 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4982">#4982</a>)</li>
<li>a1d6c560de1a193a0c68ffed68cd5928ef39e884 build(deps): bump
github.com/securego/gosec/v2 from 2.21.1 to 2.21.2 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4997">#4997</a>)</li>
<li>98b685cc0d3dcc956eb30bd7557c4c2ecf369f54 build(deps): bump
github.com/securego/gosec/v2 from ab3f6c1c83a0 to bcec04e78483 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4960">#4960</a>)</li>
<li>bfc52476dd7b0b5111bcc17f7e2c103cfc0a15e0 build(deps): bump
github.com/tetafro/godot from 1.4.16 to 1.4.17 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4993">#4993</a>)</li>
<li>04c19e6f4f8b04dae083c2923457bc911303d177 build(deps): bump
golang.org/x/oauth2 from 0.22.0 to 0.23.0 in
/scripts/gen_github_action_config in the all group (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4977">#4977</a>)</li>
<li>e905c7a3e260abe5b984e532925dfa30ffe60a5b build(deps): bump
peter-evans/create-pull-request from 6 to 7 in the all group (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4978">#4978</a>)</li>
<li>2881c7178b62e75ac33df7747c40fabc75c62e2b build(deps): bump the all
group across 4 directories with 8 updates (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4979">#4979</a>)</li>
<li>0275389a64bd88fd37eb5f46993a8523ce4bf2f0 feat: add
junit-xml-extended format (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4918">#4918</a>)</li>
<li>a6bd868cf0c575d7a7e6d87007cd510394c30d86 feat: exclude Swagger
Codegen files (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4967">#4967</a>)</li>
<li>54d089d1064eb700aafade61cdb00e452fdbf5da fix: improve runtime
version parsing (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4961">#4961</a>)</li>
<li>bf4a66a07d618628f6a26609404cb5c608e99ff8 gosec: disable G407 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4983">#4983</a>)</li>
<li>3797ed90c38b8471c54f003ab9ac72492c1143ec nolintlint: remove empty
line in unused directive replacement (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4973">#4973</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's
changelog</a>.</em></p>
<blockquote>
<h3>v1.61.0</h3>
<ol>
<li>Enhancements
<ul>
<li>Add <code>junit-xml-extended</code> format</li>
<li>Exclude Swagger Codegen files by default</li>
</ul>
</li>
<li>Updated linters
<ul>
<li><code>dupword</code>: from 0.0.14 to 0.1.1</li>
<li><code>fatcontext</code>: from 0.4.0 to 0.5.2</li>
<li><code>gci</code>: from 0.13.4 to 0.13.5 (new option
<code>no-lex-order</code>)</li>
<li><code>go-ruleguard</code>: from 0.4.2 to 0fe6f58b47b1 (fix panic
with custom linters)</li>
<li><code>godot</code>: from 1.4.16 to 1.4.17</li>
<li><code>gomodguard</code>: from 1.3.3 to 1.3.5</li>
<li><code>gosec</code>: disable temporarily <code>G407</code></li>
<li><code>gosec</code>: from ab3f6c1c83a0 to 2.21.2 (partially fix
<code>G115</code>)</li>
<li><code>intrange</code>: from 0.1.2 to 0.2.0</li>
<li><code>nolintlint</code>: remove the empty line in the directive
replacement</li>
</ul>
</li>
<li>Misc.
<ul>
<li>Improve runtime version parsing</li>
</ul>
</li>
<li>Documentation
<ul>
<li>Add additional info about <code>typecheck</code></li>
</ul>
</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/golangci/golangci-lint/commit/a1d6c560de1a193a0c68ffed68cd5928ef39e884"><code>a1d6c56</code></a>
build(deps): bump github.com/securego/gosec/v2 from 2.21.1 to 2.21.2 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4997">#4997</a>)</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/48251f274a1e09fae524271662a30a47f4ddb242"><code>48251f2</code></a>
build(deps): bump github.com/ckaznocha/intrange from 0.1.2 to 0.2.0 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4996">#4996</a>)</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/bfc52476dd7b0b5111bcc17f7e2c103cfc0a15e0"><code>bfc5247</code></a>
build(deps): bump github.com/tetafro/godot from 1.4.16 to 1.4.17 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4993">#4993</a>)</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/57fa4dad326cd24b71fccd3fb9b8fc8a2788c994"><code>57fa4da</code></a>
build(deps): bump github.com/ryancurrah/gomodguard from 1.3.3 to 1.3.5
(<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4992">#4992</a>)</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/d302a302c93198df24e842a29f6ddebb5f4cb3dd"><code>d302a30</code></a>
dev: fix nancy</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/24e66454a471f6427a279c20048d0bc09cc00ba0"><code>24e6645</code></a>
docs: add additionnal info about typecheck (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4985">#4985</a>)</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/bf4a66a07d618628f6a26609404cb5c608e99ff8"><code>bf4a66a</code></a>
gosec: disable G407 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4983">#4983</a>)</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/dd069d5578f3fb9eb298e5d397697c368a0e85f7"><code>dd069d5</code></a>
build(deps): bump github.com/securego/gosec/v2 from 2.21.0 to 2.21.1 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4982">#4982</a>)</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/2813c451edd6b75098372dbb269ffed8df3a4ec6"><code>2813c45</code></a>
build(deps): bump github.com/Crocmagnon/fatcontext from 0.4.0 to 0.5.2
(<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4971">#4971</a>)</li>
<li><a
href="https://github.com/golangci/golangci-lint/commit/e9a872629d4feda79d2fff23ddc1f410faff163e"><code>e9a8726</code></a>
build(deps): bump github.com/Abirdcfly/dupword from 0.0.14 to 0.1.1 (<a
href="https://redirect.github.com/golangci/golangci-lint/issues/4954">#4954</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/golangci/golangci-lint/compare/v1.60.3...v1.61.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.60.3&new-version=1.61.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

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)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.
  • Loading branch information
didrocks authored Oct 22, 2024
2 parents beff413 + 8d1c56e commit cbb7ada
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 61 deletions.
8 changes: 7 additions & 1 deletion internal/authorizer/authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,16 @@ func (a Authorizer) isAllowed(ctx context.Context, action Action, pid int32, uid
return err
}

// polkit requests an uint32 on dbus
var upid uint32
if pid > 0 {
upid = uint32(pid)
}

subject := authSubject{
Kind: "unix-process",
Details: map[string]dbus.Variant{
"pid": dbus.MakeVariant(uint32(pid)), // polkit requests an uint32 on dbus
"pid": dbus.MakeVariant(upid),
"start-time": dbus.MakeVariant(startTime),
"uid": dbus.MakeVariant(uid),
},
Expand Down
4 changes: 2 additions & 2 deletions internal/smbsafe/smbsafe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ func TestMultipleSmbLocksOnlyReleaseOnLast(t *testing.T) {
func shouldHaveWaited(t *testing.T, startpoint time.Time) {
t.Helper()

require.Less(t, uint64(waitTime-time.Millisecond), uint64(time.Since(startpoint)), "Should have waited")
require.Less(t, int64(waitTime-time.Millisecond), int64(time.Since(startpoint)), "Should have waited")
}

func shouldNotHaveWaited(t *testing.T, startpoint time.Time) {
t.Helper()

require.Less(t, uint64(time.Since(startpoint)), uint64(waitTime+time.Millisecond), "Shouldn’t have waited")
require.WithinDuration(t, time.Now(), startpoint, waitTime, "Shouldn’t have waited")
}
32 changes: 16 additions & 16 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ toolchain go1.23.0

require (
github.com/golang/protobuf v1.5.3
github.com/golangci/golangci-lint v1.60.3
github.com/golangci/golangci-lint v1.61.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1
)

require (
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
4d63.com/gochecknoglobals v0.2.1 // indirect
github.com/4meepo/tagalign v1.3.4 // indirect
github.com/Abirdcfly/dupword v0.0.14 // indirect
github.com/Abirdcfly/dupword v0.1.1 // indirect
github.com/Antonboom/errname v0.1.13 // indirect
github.com/Antonboom/nilnil v0.1.9 // indirect
github.com/Antonboom/testifylint v1.4.3 // indirect
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
github.com/Crocmagnon/fatcontext v0.4.0 // indirect
github.com/Crocmagnon/fatcontext v0.5.2 // indirect
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect
github.com/alecthomas/go-check-sumtype v0.1.4 // indirect
github.com/alexkohler/nakedret/v2 v2.0.4 // indirect
Expand All @@ -43,9 +43,9 @@ require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/charithe/durationcheck v0.0.10 // indirect
github.com/chavacava/garif v0.1.0 // indirect
github.com/ckaznocha/intrange v0.1.2 // indirect
github.com/ckaznocha/intrange v0.2.0 // indirect
github.com/curioswitch/go-reassign v0.2.0 // indirect
github.com/daixiang0/gci v0.13.4 // indirect
github.com/daixiang0/gci v0.13.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingaikin/go-header v0.5.0 // indirect
github.com/ettle/strcase v0.2.0 // indirect
Expand All @@ -63,7 +63,7 @@ require (
github.com/go-toolsmith/astp v1.1.0 // indirect
github.com/go-toolsmith/strparse v1.1.0 // indirect
github.com/go-toolsmith/typep v1.1.0 // indirect
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.12.1 // indirect
Expand Down Expand Up @@ -119,26 +119,26 @@ require (
github.com/nunnatsa/ginkgolinter v0.16.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.6.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/quasilyte/go-ruleguard v0.4.2 // indirect
github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
github.com/quasilyte/gogrep v0.5.0 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/ryancurrah/gomodguard v1.3.3 // indirect
github.com/ryancurrah/gomodguard v1.3.5 // indirect
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect
github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0 // indirect
github.com/securego/gosec/v2 v2.21.2 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
Expand All @@ -157,7 +157,7 @@ require (
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/tdakkota/asciicheck v0.2.0 // indirect
github.com/tetafro/godot v1.4.16 // indirect
github.com/tetafro/godot v1.4.17 // indirect
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect
github.com/timonwong/loggercheck v0.9.4 // indirect
github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect
Expand All @@ -176,12 +176,12 @@ require (
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/tools v0.24.0 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit cbb7ada

Please sign in to comment.