From ce2ad5e5db579aef11f4e2c0e5dd13ccec19a54a Mon Sep 17 00:00:00 2001 From: Joe Block Date: Mon, 1 Jan 2024 09:40:37 -0700 Subject: [PATCH 1/6] Make gitleaks _only_ check changed files Signed-off-by: Joe Block --- .github/workflows/mega-linter.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 2530c5a..a11ec35 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -51,10 +51,12 @@ jobs: - name: Lint Code Base uses: oxsecurity/megalinter/flavors/python@v7 env: + DOCKERFILE_HADOLINT_DISABLE_ERRORS: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PAT: ${{secrets.PAT}} + REPOSITORY_GITLEAKS_PR_COMMITS_SCAN: true REPOSITORY_TRIVY_DISABLE_ERRORS: true - DOCKERFILE_HADOLINT_DISABLE_ERRORS: true + VALIDATE_ALL_CODEBASE: false # Upload Mega-Linter artifacts. # They will be available on Github action page "Artifacts" section From 644258253b6c406345926dbcebf05e23e445f042 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Mon, 1 Jan 2024 09:43:29 -0700 Subject: [PATCH 2/6] Bump poetry hook version Signed-off-by: Joe Block --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62e1c15..7108204 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: - id: doctoc - repo: https://github.com/python-poetry/poetry - rev: "1.4.1" + rev: "1.7.1" hooks: - id: poetry-check - id: poetry-lock From 280e787f3fd9866e77c58d9ce14bf729e4c9f872 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Mon, 1 Jan 2024 09:47:15 -0700 Subject: [PATCH 3/6] Update dependencies Signed-off-by: Joe Block --- poetry.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6d9e1dd..6ddce12 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "black" @@ -99,13 +99,13 @@ pytz = "*" [[package]] name = "distlib" -version = "0.3.7" +version = "0.3.8" description = "Distribution utilities" optional = false python-versions = "*" files = [ - {file = "distlib-0.3.7-py2.py3-none-any.whl", hash = "sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057"}, - {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, + {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"}, + {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"}, ] [[package]] @@ -167,13 +167,13 @@ files = [ [[package]] name = "identify" -version = "2.5.32" +version = "2.5.33" description = "File identification library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "identify-2.5.32-py2.py3-none-any.whl", hash = "sha256:0b7656ef6cba81664b783352c73f8c24b39cf82f926f78f4550eda928e5e0545"}, - {file = "identify-2.5.32.tar.gz", hash = "sha256:5d9979348ec1a21c768ae07e0a652924538e8bce67313a73cb0f681cf08ba407"}, + {file = "identify-2.5.33-py2.py3-none-any.whl", hash = "sha256:d40ce5fcd762817627670da8a7d8d8e65f24342d14539c59488dc603bf662e34"}, + {file = "identify-2.5.33.tar.gz", hash = "sha256:161558f9fe4559e1557e1bff323e8631f6a0e4837f7497767c1782832f16b62d"}, ] [package.extras] @@ -252,24 +252,24 @@ proxy = ["PySocks"] [[package]] name = "pathspec" -version = "0.11.2" +version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pathspec-0.11.2-py3-none-any.whl", hash = "sha256:1d6ed233af05e679efb96b1851550ea95bbb64b7c490b0f5aa52996c11e92a20"}, - {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"}, + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, ] [[package]] name = "platformdirs" -version = "4.0.0" +version = "4.1.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "platformdirs-4.0.0-py3-none-any.whl", hash = "sha256:118c954d7e949b35437270383a3f2531e99dd93cf7ce4dc8340d3356d30f173b"}, - {file = "platformdirs-4.0.0.tar.gz", hash = "sha256:cb633b2bcf10c51af60beb0ab06d2f1d69064b43abf4c185ca6b28865f3f9731"}, + {file = "platformdirs-4.1.0-py3-none-any.whl", hash = "sha256:11c8f37bcca40db96d8144522d925583bdb7a31f7b0e37e3ed4318400a8e2380"}, + {file = "platformdirs-4.1.0.tar.gz", hash = "sha256:906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420"}, ] [package.extras] @@ -522,13 +522,13 @@ files = [ [[package]] name = "setuptools" -version = "69.0.2" +version = "69.0.3" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.0.2-py3-none-any.whl", hash = "sha256:1e8fdff6797d3865f37397be788a4e3cba233608e9b509382a2777d25ebde7f2"}, - {file = "setuptools-69.0.2.tar.gz", hash = "sha256:735896e78a4742605974de002ac60562d286fa8051a7e2299445e8e8fbb01aa6"}, + {file = "setuptools-69.0.3-py3-none-any.whl", hash = "sha256:385eb4edd9c9d5c17540511303e39a147ce2fc04bc55289c322b9e5904fe2c05"}, + {file = "setuptools-69.0.3.tar.gz", hash = "sha256:be1af57fc409f93647f2e8e4573a142ed38724b8cdd389706a867bb4efcf1e78"}, ] [package.extras] @@ -575,24 +575,24 @@ files = [ [[package]] name = "typing-extensions" -version = "4.8.0" +version = "4.9.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"}, - {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, ] [[package]] name = "virtualenv" -version = "20.24.7" +version = "20.25.0" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.24.7-py3-none-any.whl", hash = "sha256:a18b3fd0314ca59a2e9f4b556819ed07183b3e9a3702ecfe213f593d44f7b3fd"}, - {file = "virtualenv-20.24.7.tar.gz", hash = "sha256:69050ffb42419c91f6c1284a7b24e0475d793447e35929b488bf6a0aade39353"}, + {file = "virtualenv-20.25.0-py3-none-any.whl", hash = "sha256:4238949c5ffe6876362d9c0180fc6c3a824a7b12b80604eeb8085f2ed7460de3"}, + {file = "virtualenv-20.25.0.tar.gz", hash = "sha256:bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b"}, ] [package.dependencies] From a711a56bf5b2390966ee6d9b55322c938705fe6e Mon Sep 17 00:00:00 2001 From: Joe Block Date: Mon, 1 Jan 2024 09:52:48 -0700 Subject: [PATCH 4/6] Demote actionlint errors to warnings Signed-off-by: Joe Block --- .github/workflows/mega-linter.yml | 1 + tests/test_discoverable.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index a11ec35..9a3dd0f 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -51,6 +51,7 @@ jobs: - name: Lint Code Base uses: oxsecurity/megalinter/flavors/python@v7 env: + ACTION_ACTIONLINT_DISABLE_ERRORS: true DOCKERFILE_HADOLINT_DISABLE_ERRORS: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PAT: ${{secrets.PAT}} diff --git a/tests/test_discoverable.py b/tests/test_discoverable.py index e81c51a..05dd63e 100644 --- a/tests/test_discoverable.py +++ b/tests/test_discoverable.py @@ -1,5 +1,5 @@ # -# Copyright 2022-2023 Joe Block +# Copyright 2022-2024 Joe Block # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 4bd66f38db93b3779c16df95719dd7e1c4b3e4c8 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Mon, 1 Jan 2024 09:57:16 -0700 Subject: [PATCH 5/6] Demote gitleaks errors to warnings Keep gitleaks from whining about test user info in tests directory Signed-off-by: Joe Block --- .github/workflows/mega-linter.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 9a3dd0f..0b9ca05 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -51,13 +51,14 @@ jobs: - name: Lint Code Base uses: oxsecurity/megalinter/flavors/python@v7 env: - ACTION_ACTIONLINT_DISABLE_ERRORS: true - DOCKERFILE_HADOLINT_DISABLE_ERRORS: true - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PAT: ${{secrets.PAT}} - REPOSITORY_GITLEAKS_PR_COMMITS_SCAN: true - REPOSITORY_TRIVY_DISABLE_ERRORS: true - VALIDATE_ALL_CODEBASE: false + ACTION_ACTIONLINT_DISABLE_ERRORS: true + DOCKERFILE_HADOLINT_DISABLE_ERRORS: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PAT: ${{secrets.PAT}} + REPOSITORY_GITLEAKS_DISABLE_ERRORS: true + REPOSITORY_GITLEAKS_PR_COMMITS_SCAN: true + REPOSITORY_TRIVY_DISABLE_ERRORS: true + VALIDATE_ALL_CODEBASE: false # Upload Mega-Linter artifacts. # They will be available on Github action page "Artifacts" section From d6329f4c8851fd37ea90c5f56047574ca849da8b Mon Sep 17 00:00:00 2001 From: Joe Block Date: Mon, 1 Jan 2024 10:01:00 -0700 Subject: [PATCH 6/6] Demote yamllint errors to warnings too Signed-off-by: Joe Block --- .github/workflows/mega-linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 0b9ca05..fdc63fd 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -59,6 +59,7 @@ jobs: REPOSITORY_GITLEAKS_PR_COMMITS_SCAN: true REPOSITORY_TRIVY_DISABLE_ERRORS: true VALIDATE_ALL_CODEBASE: false + YAML_YAMLLINT_DISABLE_ERRORS: true # Upload Mega-Linter artifacts. # They will be available on Github action page "Artifacts" section