Repository: kubernetes-sigs/security-profiles-operator
Pull request #1281 (2022-11-07 23:10:46)

build(deps): bump github.com/urfave/cli/v2 from 2.23.0 to 2.23.4
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.23.0 to 2.23.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/urfave/cli/releases">github.com/urfave/cli/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.23.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Chore: Add altsrc flag definition generation by <a href="https://github.com/dearchap"><code>@​dearchap</code></a> in <a href="https://github-redirect.dependabot.com/urfave/cli/pull/1553">urfave/cli#1553</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/urfave/cli/compare/v2.23.3...v2.23.4">https://github.com/urfave/cli/compare/v2.23.3...v2.23.4</a></p>
<h2>v2.23.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Avoid duplication of help commands by <a href="https://github.com/remiposo"><code>@​remiposo</code></a> in <a href="https://github-redirect.dependabot.com/urfave/cli/pull/1565">urfave/cli#1565</a></li>
<li>Feature:(issue_1550):Add support Int64Slice by read toml config file by <a href="https://github.com/Edelweiss-Snow"><code>@​Edelweiss-Snow</code></a> in <a href="https://github-redirect.dependabot.com/urfave/cli/pull/1551">urfave/cli#1551</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/remiposo"><code>@​remiposo</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/urfave/cli/pull/1565">urfave/cli#1565</a></li>
<li><a href="https://github.com/Edelweiss-Snow"><code>@​Edelweiss-Snow</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/urfave/cli/pull/1551">urfave/cli#1551</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/urfave/cli/compare/v2.23.2...v2.23.3">https://github.com/urfave/cli/compare/v2.23.2...v2.23.3</a></p>
<p>Note. This is considered a minor release even though it has a new &quot;feature&quot; i.e support for int64slice for alstrc flags. The int64slice is verbatim copy of existing code and doesnt include any new behaviour compared to other altsrc flags.</p>
<h2>v2.23.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix:(issue_1114) Add SkipFlagParsing to app to allow -- by <a href="https://github.com/dearchap"><code>@​dearchap</code></a> in <a href="https://github-redirect.dependabot.com/urfave/cli/pull/1562">urfave/cli#1562</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/urfave/cli/compare/v2.23.1...v2.23.2">https://github.com/urfave/cli/compare/v2.23.1...v2.23.2</a></p>
<h2>v2.23.1</h2>
<h2>What's Changed</h2>
<ul>
<li>FIx: Allow ext flags to be opt-out by default rather than opt-in by <a href="https://github.com/dearchap"><code>@​dearchap</code></a> in <a href="https://github-redirect.dependabot.com/urfave/cli/pull/1561">urfave/cli#1561</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/urfave/cli/compare/v2.23.0...v2.23.1">https://github.com/urfave/cli/compare/v2.23.0...v2.23.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/urfave/cli/commit/46043dde652210a50363c58d65ef40d5a22b7de4"><code>46043dd</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/urfave/cli/issues/1553">#1553</a> from dearchap/altsrc_generation</li>
<li><a href="https://github.com/urfave/cli/commit/45dc37629c02aab24826c9c18e6aec973056939a"><code>45dc376</code></a> Code review comment</li>
<li><a href="https://github.com/urfave/cli/commit/190e5b6082688b6a492c3eeb713345e7b88054ee"><code>190e5b6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/urfave/cli/issues/1551">#1551</a> from Edelweiss-Snow/issue_1550</li>
<li><a href="https://github.com/urfave/cli/commit/e194a18542e0e6157f2a013e800e9da7da8570eb"><code>e194a18</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/urfave/cli/issues/1565">#1565</a> from remiposo/avoid_duplication_of_help_commands</li>
<li><a href="https://github.com/urfave/cli/commit/a0343df736f5286cdbf6c5c29367f035cd7d07d7"><code>a0343df</code></a> Merge branch 'main' into issue_1550</li>
<li><a href="https://github.com/urfave/cli/commit/bc62fff34a6edb00137c340ec8bb56d7fde8a652"><code>bc62fff</code></a> Fix: Avoid duplication of help commands</li>
<li><a href="https://github.com/urfave/cli/commit/d0aeb4d55d006a3cd56c56bbf52b89bd500ed2bc"><code>d0aeb4d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/urfave/cli/issues/1562">#1562</a> from dearchap/issue_1114</li>
<li><a href="https://github.com/urfave/cli/commit/13cc7677ab2adc0c11bc8eec3defe83eea0f4599"><code>13cc767</code></a> Add SkipFlagParsing to app</li>
<li><a href="https://github.com/urfave/cli/commit/bb820560d9687d0b3e0d5f28191d94d13b9fadd7"><code>bb82056</code></a> Fix:(issue_1114) Add test case for --</li>
<li><a href="https://github.com/urfave/cli/commit/c3fccc031bc70ebf7cb2e289503a83fe45fcbce8"><code>c3fccc0</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/urfave/cli/issues/1561">#1561</a> from dearchap/ext_global_flags_optional</li>
<li>Additional commits viewable in <a href="https://github.com/urfave/cli/compare/v2.23.0...v2.23.4">compare view</a></li>
</ul>
</details>
<br />


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

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-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 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>

k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/security-profiles-operator/pull/1281#" title="Author self-approved">dependabot[bot]</a>*
**Once this PR has been reviewed and has the lgtm label**, please assign jhrozek for approval by writing `/assign @jhrozek` in a comment. For more information see [the Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fsecurity-profiles-operator).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-sigs/security-profiles-operator/blob/main/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["jhrozek"]} -->
k8s-ci-robot: Hi @dependabot[bot]. Thanks for your PR.

I'm waiting for a [kubernetes-sigs](https://github.com/orgs/kubernetes-sigs/people) member to verify that this patch is reasonable to test. If it is, they should reply with `/ok-to-test` on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should [join the org](https://git.k8s.io/community/community-membership.md#member) to skip this step.

Once the patch is verified, the new status will be reflected by the `ok-to-test` label.

I understand the commands that are listed [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fsecurity-profiles-operator).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>

codecov-commenter: # [Codecov](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/1281?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) Report
> Merging [#1281](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/1281?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (9b1213a) into [main](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/commit/3ebb7fe5ca556ff68140f36feee6d4334dc2ce17?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (3ebb7fe) will **not change** coverage.
> The diff coverage is `n/a`.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main    #1281   +/-   ##
=======================================
  Coverage   45.35%   45.35%           
=======================================
  Files          48       48           
  Lines        5382     5382           
=======================================
  Hits         2441     2441           
  Misses       2821     2821           
  Partials      120      120           
```

</details>

Patch:
diff --git a/go.mod b/go.mod
index 580f6f302..c5486182d 100644
--- a/go.mod
+++ b/go.mod
@@ -21,7 +21,7 @@ require (
 	github.com/prometheus/client_model v0.3.0
 	github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921
 	github.com/stretchr/testify v1.8.1
-	github.com/urfave/cli/v2 v2.23.0
+	github.com/urfave/cli/v2 v2.23.4
 	golang.org/x/net v0.0.0-20220921155015-db77216a4ee9
 	golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7
 	google.golang.org/grpc v1.50.1
diff --git a/go.sum b/go.sum
index 7e7af0da0..051532364 100644
--- a/go.sum
+++ b/go.sum
@@ -1345,8 +1345,8 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX
 github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
 github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
 github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
-github.com/urfave/cli/v2 v2.23.0 h1:pkly7gKIeYv3olPAeNajNpLjeJrmTPYCoZWaV+2VfvE=
-github.com/urfave/cli/v2 v2.23.0/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI=
+github.com/urfave/cli/v2 v2.23.4 h1:gcaHwki8kGX6lfp2zz7irxu7eZkcIl1Xapt6XW0Ynqc=
+github.com/urfave/cli/v2 v2.23.4/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI=
 github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA=
 github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
 github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus=
diff --git a/installation-usage.md b/installation-usage.md
index d6e920536..ffdd3f5ae 100644
--- a/installation-usage.md
+++ b/installation-usage.md
@@ -345,6 +345,10 @@ $ kubectl --namespace my-namespace get deployment myapp --output=jsonpath='{.spe
 }
 ```
 
+Note that a security profile that is in use by existing pods cannot be
+deleted unless the pods exit or are removed - the profile deletion is
+protected by finalizers.
+
 ### Base syscalls for a container runtime
 
 An example of the minimum required syscalls for a runtime such as
diff --git a/vendor/github.com/urfave/cli/v2/app.go b/vendor/github.com/urfave/cli/v2/app.go
index 3fb5c169a..e7f79c513 100644
--- a/vendor/github.com/urfave/cli/v2/app.go
+++ b/vendor/github.com/urfave/cli/v2/app.go
@@ -113,6 +113,11 @@ type App struct {
 	UseShortOptionHandling bool
 	// Enable suggestions for commands and flags
 	Suggest bool
+	// Allows global flags set by libraries which use flag.XXXVar(...) directly
+	// to be parsed through this library
+	AllowExtFlags bool
+	// Treat all flags as normal arguments if true
+	SkipFlagParsing bool
 
 	didSetup bool
 
@@ -199,13 +204,15 @@ func (a *App) Setup() {
 		a.ErrWriter = os.Stderr
 	}
 
-	// add global flags added by other packages
-	flag.VisitAll(func(f *flag.Flag) {
-		// skip test flags
-		if !strings.HasPrefix(f.Name, ignoreFlagPrefix) {
-			a.Flags = append(a.Flags, &extFlag{f})
-		}
-	})
+	if a.AllowExtFlags {
+		// add global flags added by other packages
+		flag.VisitAll(func(f *flag.Flag) {
+			// skip test flags
+			if !strings.HasPrefix(f.Name, ignoreFlagPrefix) {
+				a.Flags = append(a.Flags, &extFlag{f})
+			}
+		})
+	}
 
 	var newCommands []*Command
 
@@ -280,6 +287,7 @@ func (a *App) newRootCommand() *Command {
 		HelpName:               a.HelpName,
 		CustomHelpTemplate:     a.CustomAppHelpTemplate,
 		categories:             a.categories,
+		SkipFlagParsing:        a.SkipFlagParsing,
 		isRoot:                 true,
 	}
 }
diff --git a/vendor/github.com/urfave/cli/v2/godoc-current.txt b/vendor/github.com/urfave/cli/v2/godoc-current.txt
index fadb7f862..b8dbf6ad0 100644
--- a/vendor/github.com/urfave/cli/v2/godoc-current.txt
+++ b/vendor/github.com/urfave/cli/v2/godoc-current.txt
@@ -324,6 +324,11 @@ type App struct {
 	UseShortOptionHandling bool
 	// Enable suggestions for commands and flags
 	Suggest bool
+	// Allows global flags set by libraries which use flag.XXXVar(...) directly
+	// to be parsed through this library
+	AllowExtFlags bool
+	// Treat all flags as normal arguments if true
+	SkipFlagParsing bool
 
 	// Has unexported fields.
 }
@@ -2432,6 +2437,7 @@ type InputSourceContext interface {
 	String(name string) (string, error)
 	StringSlice(name string) ([]string, error)
 	IntSlice(name string) ([]int, error)
+	Int64Slice(name string) ([]int64, error)
 	Generic(name string) (cli.Generic, error)
 	Bool(name string) (bool, error)
 
@@ -2489,6 +2495,9 @@ func (f *Int64SliceFlag) Apply(set *flag.FlagSet) error
     Apply saves the flagSet for later usage calls, then calls the wrapped
     Int64SliceFlag.Apply
 
+func (f *Int64SliceFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+    ApplyInputSourceValue applies a Int64Slice value if required
+
 type IntFlag struct {
 	*cli.IntFlag
 	// Has unexported fields.
@@ -2549,6 +2558,10 @@ func (fsm *MapInputSource) Generic(name string) (cli.Generic, error)
 func (fsm *MapInputSource) Int(name string) (int, error)
     Int returns an int from the map if it exists otherwise returns 0
 
+func (fsm *MapInputSource) Int64Slice(name string) ([]int64, error)
+    Int64Slice returns an []int64 from the map if it exists otherwise returns
+    nil
+
 func (fsm *MapInputSource) IntSlice(name string) ([]int, error)
     IntSlice returns an []int from the map if it exists otherwise returns nil
 
diff --git a/vendor/github.com/urfave/cli/v2/help.go b/vendor/github.com/urfave/cli/v2/help.go
index 6dc593b34..2ccd3b71e 100644
--- a/vendor/github.com/urfave/cli/v2/help.go
+++ b/vendor/github.com/urfave/cli/v2/help.go
@@ -246,7 +246,7 @@ func ShowCommandHelp(ctx *Context, command string) error {
 	}
 	for _, c := range commands {
 		if c.HasName(command) {
-			if !ctx.App.HideHelpCommand && !c.HasName(helpName) && len(c.Subcommands) != 0 {
+			if !ctx.App.HideHelpCommand && !c.HasName(helpName) && len(c.Subcommands) != 0 && c.Command(helpName) == nil {
 				c.Subcommands = append(c.Subcommands, helpCommandDontUse)
 			}
 			if !ctx.App.HideHelp && HelpFlag != nil {
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 30c69f51b..4e9eb5c2d 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -566,7 +566,7 @@ github.com/spf13/pflag
 github.com/stretchr/testify/assert
 github.com/stretchr/testify/require
 github.com/stretchr/testify/suite
-# github.com/urfave/cli/v2 v2.23.0
+# github.com/urfave/cli/v2 v2.23.4
 ## explicit; go 1.18
 github.com/urfave/cli/v2
 # github.com/vbatts/tar-split v0.11.2


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 19be548b1..3f7c0c82a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -29,11 +29,11 @@ jobs:
     runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v3
-      - uses: github/codeql-action/init@18fe527fa8b29f134bb91f32f1a5dc5abb15ed7f
+      - uses: github/codeql-action/init@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898
         with:
           languages: go
-      - uses: github/codeql-action/autobuild@18fe527fa8b29f134bb91f32f1a5dc5abb15ed7f
-      - uses: github/codeql-action/analyze@18fe527fa8b29f134bb91f32f1a5dc5abb15ed7f
+      - uses: github/codeql-action/autobuild@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898
+      - uses: github/codeql-action/analyze@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898
 
   coverage:
     runs-on: ubuntu-22.04