diff --git a/.checkov.yaml b/.checkov.yaml new file mode 100644 index 00000000..76e09321 --- /dev/null +++ b/.checkov.yaml @@ -0,0 +1,20 @@ +block-list-secret-scan: [ ] +branch: master +directory: + - . +download-external-modules: false +evaluate-variables: true +external-modules-download-path: .external_modules +framework: + - secrets + - github_configuration + - github_actions + - json + - yaml +mask: [ ] +secrets-history-timeout: 12h +secrets-scan-file-type: [ ] +skip-path: + - terraform + - venv +summary-position: top diff --git a/.depguard.yml b/.depguard.yml new file mode 100644 index 00000000..0aca8602 --- /dev/null +++ b/.depguard.yml @@ -0,0 +1,32 @@ +Main: + files: + - $all + - "!$test" + allow: + - $gostd + - github.com/aws/aws-sdk-go-v2/aws + - github.com/aws/aws-sdk-go-v2/config + - github.com/aws/aws-sdk-go-v2/service/iam + - github.com/awslabs/goformation/v7/cloudformation + - github.com/awslabs/goformation/v7/cloudformation/tags + - github.com/go-git/go-git/v5 + - github.com/go-git/go-git/v5/plumbing + - github.com/gobeam/stringy + - github.com/google/go-github/v47/github + - github.com/hashicorp/hc-install/product + - github.com/hashicorp/hc-install/releases + - github.com/hashicorp/terraform-exec/tfexec + - github.com/jameswoolfenden/pike/src + - github.com/rs/zerolog + - github.com/rs/zerolog/log + - github.com/urfave/cli/v2 + - sato/src/arm + - sato/src/cf + - sato/src/see + deny: +Test: + files: + - $test + allow: + - $gostd + deny: diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 32059266..13f55594 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,41 +1,41 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - -- OS: [e.g. iOS] -- Browser [e.g. chrome, safari] -- Version [e.g. 22] - -**Smartphone (please complete the following information):** - -- Device: [e.g. iPhone6] -- OS: [e.g. iOS8.1] -- Browser [e.g. stock browser, safari] -- Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] + +**Smartphone (please complete the following information):** + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 6e38a59f..00000000 --- a/.github/stale.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 30 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security - - enhancement -# Label to use when marking an issue as stale -staleLabel: wontfix -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b619eeca..9304dc64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,16 +4,19 @@ on: - master name: CI +permissions: read-all jobs: test: + env: + GITHUB_API: ${{ secrets.PAT }} ## We want to define a strategy for our job strategy: ## this will contain a matrix of all the combinations ## we wish to test again: matrix: - go-version: [1.19.x] - platform: [ubuntu-latest, macos-latest, windows-latest] + go-version: [ 1.24.x ] + platform: [ ubuntu-latest, macos-latest, windows-latest ] ## Defines the platform for each test run runs-on: ${{ matrix.platform }} @@ -21,20 +24,25 @@ jobs: ## the steps that will be run through for each version and platform ## combination steps: - ## sets up go based on the version - - name: Install Go - uses: actions/setup-go@v3.3.0 - with: - go-version: ${{ matrix.go-version }} - - ## checks out our code locally, so we can work with the files - - name: Checkout code - uses: actions/checkout@v3.1.0 - - ## runs go test ./... - - name: Build - run: go build ./... - - ## runs go test ./... - - name: Test - run: go test ./... + ## sets up go based on the version + - name: Install Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: ${{ matrix.go-version }} + + ## checks out our code locally, so we can work with the files + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + ## runs go test ./... + - name: Build + run: go build ./... + + ## runs go test ./... + - name: Test + run: go test ./... -coverprofile=./cover.out + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@af09b5e394c93991b95a5e7646aeb90c1917f78f # v5.5.1 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 94bf78f4..a43c835b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,6 +19,7 @@ on: branches: [ "master" ] schedule: - cron: '36 4 * * 0' +permissions: read-all jobs: analyze: @@ -37,36 +38,36 @@ jobs: # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - - name: Checkout repository - uses: actions/checkout@v3.1.0 + - name: Checkout repository + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - 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. + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@17783bfb99b07f70fae080b654aed0c514057477 # codeql-bundle-v2.23.3 + 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. - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality - # 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@v2 + # 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@17783bfb99b07f70fae080b654aed0c514057477 # codeql-bundle-v2.23.3 - # â„šī¸ 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 + # â„šī¸ 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. + # 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 + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@17783bfb99b07f70fae080b654aed0c514057477 # codeql-bundle-v2.23.3 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ff4e5bc4..f1328622 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,52 +1,58 @@ -on: pull_request -name: Pull request -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3.1.0 - - name: Install Go - uses: actions/setup-go@v3.3.0 - with: - go-version: 1.19.x - - name: Restore cache - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - - name: Fmt - run: make fmt - test: - strategy: - matrix: - go-version: [1.19.x] - platform: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.platform }} - steps: - - name: Checkout code - uses: actions/checkout@v3.1.0 - - name: Install Go - uses: actions/setup-go@v3.3.0 - with: - go-version: ${{ matrix.go-version }} - - name: Restore cache - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - - name: Test - run: make test - docs: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3.1.0 - - name: Install Go - uses: actions/setup-go@v3.3.0 - with: - go-version: 1.19.x +on: pull_request +name: Pull request +permissions: read-all +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Install Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: 1.24.x + - name: Restore cache + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-mod- + - name: gofumpt + uses: jameswoolfenden/auto-gofmt@99a3ed2b78b6c01d70db1740ba16d3dff60003df # v0.0.3 + test: + strategy: + matrix: + go-version: [ 1.24.x ] + platform: [ ubuntu-latest, macos-latest, windows-latest ] + runs-on: ${{ matrix.platform }} + steps: + - uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 + with: + terraform_version: 1.5.4 + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Install Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: ${{ matrix.go-version }} + - name: Restore cache + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} + restore-keys: | + ## runs go test ./... + - name: Build + run: go build ./... + - name: Test + run: go test ./... -coverprofile=./cover.out + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Install Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: 1.24.x diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b5ae8ce..c61d02ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,68 +1,72 @@ ---- -name: release -on: - push: - tags: - - v* -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3.1.0 - - name: Unshallow - run: git fetch --prune --unshallow - - name: Set up Go - uses: actions/setup-go@v3.3.0 - with: - go-version: 1.19 - - name: Import GPG key - id: import_gpg - uses: crazy-max/ghaction-import-gpg@v5.1.0 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.PASSPHRASE }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3.1.0 - with: - version: latest - args: release --rm-dist - env: - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - PASSPHRASE: ${{ secrets.PASSPHRASE }} - HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} - publish-dockerhub: - runs-on: ubuntu-latest - needs: - - goreleaser - steps: - - uses: actions/checkout@v3.1.0 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v4 - with: - name: jameswoolfenden/pike - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - tags: "latest,${{ github.ref_name }}" - - name: Update Docker Hub README - uses: peter-evans/dockerhub-description@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - repository: jameswoolfenden/pike - short-description: ${{ github.event.repository.description }} - readme-filepath: ./README.md - update-scoop: - runs-on: ubuntu-latest - needs: - - goreleaser - steps: - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ secrets.PAT }} - repository: jameswoolfenden/scoop - event-type: pike - client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' +--- +name: Release +on: + push: + tags: + - v* +permissions: read-all +jobs: + goreleaser: + permissions: write-all + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Unshallow + run: git fetch --prune --unshallow + - name: Set up Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: 1.24 + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 + with: + version: latest + args: release --clean + env: + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + PASSPHRASE: ${{ secrets.PASSPHRASE }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} + publish-dockerhub: + permissions: write-all + runs-on: ubuntu-latest + needs: + - goreleaser + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@32b6623ebb46c5fe6dcfc2281cfcd549a31366ce # v5 + with: + name: jameswoolfenden/pike + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + tags: "latest,${{ github.ref_name }}" + - name: Update Docker Hub README + uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + repository: jameswoolfenden/pike + short-description: ${{ github.event.repository.description }} + readme-filepath: ./README.md + update-scoop: + permissions: write-all + runs-on: ubuntu-latest + needs: + - goreleaser + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@5fc4efd1a4797ddb68ffd0714a238564e4cc0e6f # v4.0.0 + with: + token: ${{ secrets.PAT }} + repository: jameswoolfenden/scoop + event-type: pike + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' diff --git a/.github/workflows/resources.yml b/.github/workflows/resources.yml new file mode 100644 index 00000000..3bf07482 --- /dev/null +++ b/.github/workflows/resources.yml @@ -0,0 +1,68 @@ +name: 'Resources' +on: + schedule: + - cron: '0 18 * * 5' + workflow_dispatch: +permissions: read-all + +jobs: + build: + permissions: write-all + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: ${{ matrix.go-version }} + + ## checks out our code locally, so we can work with the files + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + ## runs go test ./... + - name: Build + run: go build -o ${{ github.workspace }} ./... + + + - name: Checkout AWS + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: hashicorp/terraform-provider-aws + path: aws + + - name: Parse Azurerm + run: ${{ github.workspace }}/pike parse -d ${{ github.workspace }}/aws -name aws + + - name: Checkout AZURERM + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: hashicorp/terraform-provider-azurerm + path: azurerm + + - name: Parse Azurerm + run: ${{ github.workspace }}/pike parse -d ${{ github.workspace }}/azurerm -name azurerm + + - name: Generate Google + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: hashicorp/terraform-provider-google + path: google + + - name: Parse Google + run: ${{ github.workspace }}/pike parse -d ${{ github.workspace }}/google -name google + + - name: copy + run: cp ${{ github.workspace }}/*.json ${{ github.workspace }}/src/parse/ + - name: setup git config + run: | + # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default + git config user.name "GitHub Actions Bot" + git config user.email "jim.wolf@duck.com" + + - name: commit + run: | + # Stage the file, commit and push + mv *-members.json src/parse + git add src/parse/*-members.json --ignore-errors + git commit -m "updated resources" --allow-empty + git push origin master diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..87ceda51 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,23 @@ +name: 'Stale' +on: + schedule: + - cron: '30 1 * * *' + workflow_dispatch: +permissions: read-all + +jobs: + stale: + permissions: + contents: write + issues: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0 + with: + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' + days-before-stale: 30 + days-before-close: 5 + enable-statistics: true + exempt-issue-labels: enhancement + exempt-pr-labels: enhancement diff --git a/.gitignore b/.gitignore index 22dce999..3e0edec4 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,14 @@ __debug_bin.exe .pike provider.azure.tf provider.azurerm.tf +terraform-provider-* +terraform-provider-azurerm/ +terraform-provider-google/ +terraform-provider-aws/ +*.pem +*.csr +.destination +tf.plan +tf.json + +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml index d964ec20..bae3d7b6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,8 +1,19 @@ # .goreleaser.yml +# The lines below are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/need to use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +version: 2 + before: hooks: - - ./set-version.sh + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't use go generate + - go generate ./... + - ./set-version.sh builds: - goos: @@ -10,13 +21,13 @@ builds: - linux - windows goarch: - - 386 + - "386" - amd64 - arm64 goarm: - - 7 + - "7" ignore: - - goarch: 386 + - goarch: "386" goos: darwin archives: - format_overrides: @@ -24,10 +35,9 @@ archives: format: zip brews: - - - name: pike + - name: pike - tap: + repository: owner: JamesWoolfenden name: homebrew-tap token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" diff --git a/.markdownlint.json b/.markdownlint.json index 67d2ae55..ae6d0c2b 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,3 +1,8 @@ { - "MD013": false + "MD013": false, + "MD033": { + "allowed_elements": [ + "cloud" + ] + } } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7808f5aa..339dca20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,17 @@ --- # yamllint disable rule:line-length default_language_version: - python: python3.9 + python: python3.11 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-json - id: check-merge-conflict - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml + exclude: examples/ - id: check-added-large-files - id: pretty-format-json args: @@ -18,17 +19,17 @@ repos: - id: detect-aws-credentials - id: detect-private-key - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.3.1 + rev: v1.5.5 hooks: - id: forbid-tabs - exclude_types: [python, javascript, dtd, markdown, makefile, xml] + exclude_types: [ python, javascript, dtd, markdown, makefile, xml ] exclude: binary|\.bin$|rego|\.rego$|go|\.go$ - repo: https://github.com/jameswoolfenden/pre-commit-shell rev: 0.0.2 hooks: - id: shell-lint - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.32.2 + rev: v0.45.0 hooks: - id: markdownlint exclude: src/testdata|testdata @@ -36,21 +37,33 @@ repos: rev: v0.1.50 hooks: - id: terraform-fmt - language_version: python3.9 + language_version: python3.11 - repo: https://github.com/gruntwork-io/pre-commit - rev: v0.1.17 + rev: v0.1.29 hooks: - id: gofmt - id: goimports - - id: golint - - repo: https://github.com/golangci/golangci-lint - rev: v1.50.1 - hooks: - - id: golangci-lint + exclude: src/parse/terraform-provider-* - repo: https://github.com/syntaqx/git-hooks - rev: v0.0.17 + rev: v0.0.18 hooks: - id: go-test - args: ["./..."] + args: [ "./..." ] - id: go-mod-tidy - id: go-generate + - repo: https://github.com/jameswoolfenden/ghat + rev: v0.1.13 + hooks: + - id: ghat-go + name: ghat + description: upgrade action dependencies + language: golang + entry: ghat swot -d . --continue-on-error true --stable 14 + always_run: true + pass_filenames: false + types: [ yaml ] + - repo: https://github.com/dnephin/pre-commit-golang + rev: v0.5.1 + hooks: + - id: validate-toml + - id: no-go-testing diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 83cd9bae..ecd50ea6 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -7,7 +7,7 @@ language: golang entry: pike pass_filenames: false - types: [terraform] + types: [ terraform ] # Build and run `pike-docs` assuming it was installed manually # or via package manager @@ -18,7 +18,7 @@ language: system entry: pike pass_filenames: false - types: [terraform] + types: [ terraform ] # Builds and runs the Docker image from the repo # REQUIRES: Docker installed @@ -28,4 +28,4 @@ language: docker entry: pike pass_filenames: false - types: [terraform] + types: [ terraform ] diff --git a/.run/scan aws.run.xml b/.run/scan aws.run.xml index e9ce78e8..c56b6807 100644 --- a/.run/scan aws.run.xml +++ b/.run/scan aws.run.xml @@ -2,7 +2,7 @@ - +