diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..681a2f0 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,78 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: ["main"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["main"] + schedule: + - cron: "0 0 * * 1" + +permissions: + contents: read + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["go"] + # CodeQL supports [ $supported-codeql-languages ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - name: Checkout repository + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@ce64ddcb0d8d890d2df4a9d1c04ff297367dea2a # v3.35.2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@ce64ddcb0d8d890d2df4a9d1c04ff297367dea2a # v3.35.2 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@ce64ddcb0d8d890d2df4a9d1c04ff297367dea2a # v3.35.2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index f206238..f226d39 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -15,7 +15,12 @@ jobs: dependency-review: runs-on: ubuntu-24.04 steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + - name: 'Checkout Repository' - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: 'Dependency Review' - uses: actions/dependency-review-action@v4 + uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0 diff --git a/.github/workflows/go-version.yml b/.github/workflows/go-version.yml index ea608e1..2fc0f41 100644 --- a/.github/workflows/go-version.yml +++ b/.github/workflows/go-version.yml @@ -13,20 +13,25 @@ jobs: name: Stable runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 - - uses: arnested/go-version-action@v2 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: arnested/go-version-action@6343454db06c63467680c5dc1f4f382fe9fe6303 # v2.1.2 id: go-version with: patch-level: true - name: Setup Go ${{ steps.go-version.outputs.latest }} - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version: ${{ steps.go-version.outputs.latest }} - run: go mod edit -go ${{ steps.go-version.outputs.latest }} - run: go fix ./... - run: git diff - name: "Create pull request" - uses: peter-evans/create-pull-request@v8 + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: commit-message: | Update Go version to ${{ steps.go-version.outputs.latest }} @@ -44,12 +49,17 @@ jobs: name: Unstable runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 - - uses: arnested/go-version-action@v2 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: arnested/go-version-action@6343454db06c63467680c5dc1f4f382fe9fe6303 # v2.1.2 id: go-version-stable with: patch-level: true - - uses: arnested/go-version-action@v2 + - uses: arnested/go-version-action@6343454db06c63467680c5dc1f4f382fe9fe6303 # v2.1.2 id: go-version-unstable with: patch-level: true @@ -62,7 +72,7 @@ jobs: echo "URL=https://tip.golang.org/doc/go$(sed -E 's/([0-9]+\.[0-9]+).*/\1/' <<< '${{ steps.go-version-unstable.outputs.latest }}')" >> $GITHUB_OUTPUT - name: Setup Go ${{ steps.go-version-unstable.outputs.latest }} if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version: ${{ steps.go-version-unstable.outputs.latest }} - run: go mod edit -go ${{ steps.go-version-unstable.outputs.latest }} @@ -72,7 +82,7 @@ jobs: - run: git diff if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest - name: "Create pull request" - uses: peter-evans/create-pull-request@v8 + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: draft: true commit-message: | diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 77717dc..88c3c85 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -10,13 +10,18 @@ jobs: name: Lint runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup Go - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v9 + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 with: version: latest install-mode: goinstall diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8cc21d5..3c453b2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,21 +12,36 @@ jobs: actionlint: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 - - uses: reviewdog/action-actionlint@v1 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: reviewdog/action-actionlint@6fb7acc99f4a1008869fa8a0f09cfca740837d9d # v1.72.0 markdownlint: name: markdown runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run markdownlint - uses: DavidAnson/markdownlint-cli2-action@v23 + uses: DavidAnson/markdownlint-cli2-action@ce4853d43830c74c1753b39f3cf40f71c2031eb9 # v23.0.0 yamllint: name: Yamllint runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run Yamllint - uses: frenck/action-yamllint@v1.5.0 + uses: frenck/action-yamllint@34b4bbcaeabedcfefad6adea8c5bbc42af0e2d47 # v1.5.0 with: strict: true diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1d0fb37..739720e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -8,9 +8,14 @@ jobs: name: Check generated code is up to date runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup Go - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version-file: go.mod - name: go mod tidy @@ -25,11 +30,16 @@ jobs: name: Build and test runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - name: Setup Go - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version-file: go.mod - name: go version @@ -43,11 +53,11 @@ jobs: go fmt ./... git diff --exit-code - name: Test - uses: robherley/go-test-action@v1.0.0 + uses: robherley/go-test-action@72d31c2e7a3502ad0639274dcdc7ffbc7c9c6c4c # v1.0.0 with: testArguments: -race -shuffle=on -benchtime=1x -cover -covermode=atomic -coverprofile=coverage.txt ./... - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v6 + uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 with: token: ${{ secrets.CODECOV_TOKEN }} - name: Install changelog management tool @@ -55,10 +65,10 @@ jobs: - name: Build changelog run: chglog init - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v7 + uses: goreleaser/goreleaser-action@e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c # v7.1.0 with: args: release --snapshot - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: Debian packages path: dist/*.deb @@ -67,11 +77,16 @@ jobs: name: Nilaway runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - name: Setup Go - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version-file: go.mod - name: Install nilaway @@ -83,9 +98,14 @@ jobs: name: License check runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup Go - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version-file: go.mod - name: Install wwhrd diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e666fb1..c8a418c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,13 +12,18 @@ jobs: bump-version: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - - uses: arnested/go-version-action@v2 + - uses: arnested/go-version-action@6343454db06c63467680c5dc1f4f382fe9fe6303 # v2.1.2 id: go-version - name: Bump version and push tag - uses: anothrNick/github-tag-action@1.75.0 + uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8 # 1.75.0 id: version env: GITHUB_TOKEN: ${{ github.token }} @@ -27,7 +32,7 @@ jobs: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} RELEASE_BRANCHES: main - name: Setup Go - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version-file: go.mod - name: go version @@ -39,7 +44,7 @@ jobs: - name: Build changelog run: chglog init - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v7 + uses: goreleaser/goreleaser-action@e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c # v7.1.0 with: args: release env: @@ -70,7 +75,7 @@ jobs: working-directory: site env: GH_TOKEN: ${{ github.token }} - - uses: BaileyJM02/markdown-to-pdf@v1.2.0 + - uses: BaileyJM02/markdown-to-pdf@1be26775add5f94fb55d4a2ce36ff7cad23b8dd0 # v1.2.0 with: input_path: index.md output_dir: site/ @@ -90,7 +95,7 @@ jobs: - name: Add .well-known for Bluesky to GitHub Pages run: cp -vR page/.well-known site/ - name: Deploy deb packages - uses: JamesIves/github-pages-deploy-action@v4 + uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0 with: branch: gh-pages folder: site @@ -98,7 +103,7 @@ jobs: single-commit: true - name: Post status to Google Chat if: ${{ always() }} - uses: containrrr/shoutrrr-action@v1 + uses: containrrr/shoutrrr-action@a478c36b6a37012a65dc756032c4367b3221768d # v1.0.98 with: url: "${{ secrets.WATCHTOWER_NOTIFICATION_URL }}" message: "Released `${{ github.repository }}`@`${{ github.sha }}` as ${{ steps.version.outputs.tag }}: *${{ job.status }}*." diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml new file mode 100644 index 0000000..8269345 --- /dev/null +++ b/.github/workflows/scorecards.yml @@ -0,0 +1,81 @@ +# This workflow uses actions that are not certified by GitHub. They are provided +# by a third-party and are governed by separate terms of service, privacy +# policy, and support documentation. + +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '20 7 * * 2' + push: + branches: ["main"] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + contents: read + actions: read + # To allow GraphQL ListCommits to work + issues: read + pull-requests: read + # To detect SAST tools + checks: read + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - name: "Checkout code" + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecards on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@ce64ddcb0d8d890d2df4a9d1c04ff297367dea2a # v3.35.2 + with: + sarif_file: results.sarif diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index c56eb26..02254eb 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -19,14 +19,19 @@ jobs: name: Golang Security Checker runs-on: ubuntu-24.04 steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + - name: Checkout Source - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run Gosec Security Scanner - uses: securego/gosec@v2.25.0 + uses: securego/gosec@223e19b8856e00f02cc67804499a83f77e208f3c # v2.25.0 with: args: '-no-fail -fmt sarif -out results.sarif -tests ./...' - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@v4 + uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2 with: # Path to SARIF file relative to the root of the repository sarif_file: results.sarif @@ -34,19 +39,24 @@ jobs: name: Govulncheck runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup Go - uses: arnested/setup-go@rc + uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc with: go-version-file: go.mod - id: govulncheck - uses: arnested/govulncheck-action@main + uses: arnested/govulncheck-action@4023fbc84610f7e67de4571c97282dabdbd1b813 # main with: output-format: sarif output-file: results.sarif setup-go: false repo-checkout: false - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@v4 + uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2 with: sarif_file: results.sarif diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 568e5cb..f851d66 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -11,8 +11,13 @@ jobs: name: shellcheck runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 + with: + egress-policy: audit + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run shellcheck - uses: ludeeus/action-shellcheck@2.0.0 + uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 env: SHELLCHECK_OPTS: -o all diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..e8e9387 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +repos: +- repo: https://github.com/gitleaks/gitleaks + rev: v8.16.3 + hooks: + - id: gitleaks +- repo: https://github.com/golangci/golangci-lint + rev: v1.52.2 + hooks: + - id: golangci-lint +- repo: https://github.com/jumanjihouse/pre-commit-hooks + rev: 3.0.0 + hooks: + - id: shellcheck +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace