From f57752b276e07c37a227fe9d0692932b16b8ca7f Mon Sep 17 00:00:00 2001 From: Cassius John-Adams Date: Mon, 9 Jul 2018 16:05:33 -0400 Subject: [PATCH 1/4] Catch yum update/upgrade/update all but ignore other update/upgrade in RUN command --- sample_rules/basic_rules.yaml | 2 +- sample_rules/basic_rules_atomic.yaml | 2 +- sample_rules/default_rules.yaml | 2 +- sample_rules/modules.yaml | 2 +- sample_rules/osbs.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sample_rules/basic_rules.yaml b/sample_rules/basic_rules.yaml index 4690472..c009063 100644 --- a/sample_rules/basic_rules.yaml +++ b/sample_rules/basic_rules.yaml @@ -128,7 +128,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum(.+update all|.+upgrade|.+update)/ + regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/basic_rules_atomic.yaml b/sample_rules/basic_rules_atomic.yaml index a72defe..72bc1aa 100644 --- a/sample_rules/basic_rules_atomic.yaml +++ b/sample_rules/basic_rules_atomic.yaml @@ -128,7 +128,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum(.+update all|.+upgrade|.+update|\.config)/ + regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/default_rules.yaml b/sample_rules/default_rules.yaml index 47c5edd..78c7b01 100644 --- a/sample_rules/default_rules.yaml +++ b/sample_rules/default_rules.yaml @@ -110,7 +110,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum(.+update all|.+upgrade|.+update)/ + regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/modules.yaml b/sample_rules/modules.yaml index d22de76..f972601 100644 --- a/sample_rules/modules.yaml +++ b/sample_rules/modules.yaml @@ -131,7 +131,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum(.+update all|.+upgrade|.+update|\.config)/ + regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/osbs.yaml b/sample_rules/osbs.yaml index 52d139c..91246ca 100644 --- a/sample_rules/osbs.yaml +++ b/sample_rules/osbs.yaml @@ -115,7 +115,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum(.+update all|.+upgrade|.+update|\.config)/ + regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" From 80c7e085b3015127a44e3531b22e17539a6d9bb4 Mon Sep 17 00:00:00 2001 From: Cassius John-Adams Date: Wed, 10 Oct 2018 12:44:01 -0400 Subject: [PATCH 2/4] Change [ t] to [ /t] in the yum lint fix --- sample_rules/basic_rules.yaml | 2 +- sample_rules/basic_rules_atomic.yaml | 2 +- sample_rules/default_rules.yaml | 2 +- sample_rules/modules.yaml | 2 +- sample_rules/osbs.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sample_rules/basic_rules.yaml b/sample_rules/basic_rules.yaml index c009063..b1c2593 100644 --- a/sample_rules/basic_rules.yaml +++ b/sample_rules/basic_rules.yaml @@ -128,7 +128,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update)/ + regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/basic_rules_atomic.yaml b/sample_rules/basic_rules_atomic.yaml index 72bc1aa..71f6cc8 100644 --- a/sample_rules/basic_rules_atomic.yaml +++ b/sample_rules/basic_rules_atomic.yaml @@ -128,7 +128,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update|\.config)/ + regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/default_rules.yaml b/sample_rules/default_rules.yaml index 78c7b01..7fe5fb9 100644 --- a/sample_rules/default_rules.yaml +++ b/sample_rules/default_rules.yaml @@ -110,7 +110,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update)/ + regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/modules.yaml b/sample_rules/modules.yaml index f972601..62752ff 100644 --- a/sample_rules/modules.yaml +++ b/sample_rules/modules.yaml @@ -131,7 +131,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update|\.config)/ + regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/osbs.yaml b/sample_rules/osbs.yaml index 91246ca..05cb0bc 100644 --- a/sample_rules/osbs.yaml +++ b/sample_rules/osbs.yaml @@ -115,7 +115,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ t]+update all|[ t]+upgrade|[ t]+update|\.config)/ + regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" From 11019e52b143cbcd64e26f67d352f9b61067f9d9 Mon Sep 17 00:00:00 2001 From: Cassius John-Adams Date: Wed, 10 Oct 2018 12:53:16 -0400 Subject: [PATCH 3/4] Fixed wrong keybinding to use the correct slash :P --- sample_rules/basic_rules_atomic.yaml | 2 +- sample_rules/default_rules.yaml | 2 +- sample_rules/modules.yaml | 2 +- sample_rules/osbs.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sample_rules/basic_rules_atomic.yaml b/sample_rules/basic_rules_atomic.yaml index 71f6cc8..9b3dc95 100644 --- a/sample_rules/basic_rules_atomic.yaml +++ b/sample_rules/basic_rules_atomic.yaml @@ -128,7 +128,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update|\.config)/ + regex: /yum([ \t]+update all|[ \t]+upgrade|[ \t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/default_rules.yaml b/sample_rules/default_rules.yaml index 7fe5fb9..3b64a4d 100644 --- a/sample_rules/default_rules.yaml +++ b/sample_rules/default_rules.yaml @@ -110,7 +110,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update)/ + regex: /yum([ \t]+update all|[ \t]+upgrade|[ \t]+update)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/modules.yaml b/sample_rules/modules.yaml index 62752ff..90fa884 100644 --- a/sample_rules/modules.yaml +++ b/sample_rules/modules.yaml @@ -131,7 +131,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update|\.config)/ + regex: /yum([ \t]+update all|[ \t]+upgrade|[ \t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" diff --git a/sample_rules/osbs.yaml b/sample_rules/osbs.yaml index 05cb0bc..bcfd12b 100644 --- a/sample_rules/osbs.yaml +++ b/sample_rules/osbs.yaml @@ -115,7 +115,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update|\.config)/ + regex: /yum([ \t]+update all|[ \t]+upgrade|[ \t]+update|\.config)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container" From 71663ddc1d0757b954b3aeefbd6217dfbe2e4da8 Mon Sep 17 00:00:00 2001 From: Cassius John-Adams Date: Wed, 10 Oct 2018 12:54:28 -0400 Subject: [PATCH 4/4] Fixed wrong keybinding to use the correct slash :P --- sample_rules/basic_rules.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample_rules/basic_rules.yaml b/sample_rules/basic_rules.yaml index b1c2593..4e4e3c8 100644 --- a/sample_rules/basic_rules.yaml +++ b/sample_rules/basic_rules.yaml @@ -128,7 +128,7 @@ - "_clear_packaging_caches_and_temporary_package_downloads" - label: "yum_update_all" - regex: /yum([ /t]+update all|[ /t]+upgrade|[ /t]+update)/ + regex: /yum([ \t]+update all|[ \t]+upgrade|[ \t]+update)/ level: "info" message: "updating the entire base image may add unnecessary size to the container" description: "update the entire base image may add unnecessary size to the container"