diff --git a/.github/dependabot.yml b/.github/dependabot.yml index dbea522..0a5cbbe 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,8 @@ updates: directory: "/" schedule: interval: "weekly" + cooldown: + default-days: 7 groups: kubernetes: patterns: @@ -17,6 +19,8 @@ updates: directory: "/" schedule: interval: "weekly" + cooldown: + default-days: 7 groups: actions: patterns: @@ -26,3 +30,5 @@ updates: directory: "/" schedule: interval: "weekly" + cooldown: + default-days: 7 diff --git a/.github/workflows/lint-helm.yml b/.github/workflows/lint-helm.yml index 7faae5b..914481b 100644 --- a/.github/workflows/lint-helm.yml +++ b/.github/workflows/lint-helm.yml @@ -11,15 +11,21 @@ on: - 'Makefile' - '.github/workflows/lint-helm.yml' +permissions: {} + env: HELM_CHART_PATH: charts/lifecycle-controller jobs: lint: + permissions: + contents: read name: Helm lint runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Read Helm version from .Version id: get-helm-version diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ba4a85a..fd3e702 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,12 +13,18 @@ on: - '.golangci.yml' - '.github/workflows/lint.yml' +permissions: {} + jobs: lint: + permissions: + contents: read name: Go lint runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: diff --git a/.github/workflows/release-helm.yml b/.github/workflows/release-helm.yml index 18a4a30..48b8865 100644 --- a/.github/workflows/release-helm.yml +++ b/.github/workflows/release-helm.yml @@ -13,6 +13,8 @@ on: - '.github/workflows/release-helm.yml' workflow_dispatch: +permissions: {} + env: HELM_CHART_PATH: charts/lifecycle-controller @@ -27,6 +29,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 + persist-credentials: false - name: Configure Git run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7316a5..a959cea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,21 +9,24 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+' +permissions: {} + jobs: goreleaser: runs-on: ubuntu-latest permissions: contents: write packages: write - id-token: write steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 + persist-credentials: false - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: + cache: false go-version-file: go.mod - run: go version @@ -32,6 +35,11 @@ jobs: - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4 + - name: Verify Docker builder + run: | + docker buildx version + docker buildx inspect --bootstrap + - name: Log in to GitHub Container Registry uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4 with: diff --git a/.github/workflows/test-e2e-helm.yml b/.github/workflows/test-e2e-helm.yml index 15c0ca5..a6afd1c 100644 --- a/.github/workflows/test-e2e-helm.yml +++ b/.github/workflows/test-e2e-helm.yml @@ -14,15 +14,21 @@ on: - 'go.sum' - '.github/workflows/test-e2e-helm.yml' +permissions: {} + env: HELM_CHART_PATH: charts/lifecycle-controller jobs: test-e2e-helm: + permissions: + contents: read name: Helm E2E tests runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 0e5fc56..0e55dab 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -20,12 +20,18 @@ on: - 'test/utils/**' - '.github/workflows/test-e2e.yml' +permissions: {} + jobs: test-e2e: + permissions: + contents: read name: E2E tests runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: diff --git a/.github/workflows/test-helm-unittest.yml b/.github/workflows/test-helm-unittest.yml index 389bda1..7e17c57 100644 --- a/.github/workflows/test-helm-unittest.yml +++ b/.github/workflows/test-helm-unittest.yml @@ -11,15 +11,21 @@ on: - 'Makefile' - '.github/workflows/test-helm-unittest.yml' +permissions: {} + env: HELM_CHART_PATH: charts/lifecycle-controller jobs: helm-unittest: + permissions: + contents: read name: Helm unit tests runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Read Helm version from .Version id: get-helm-version diff --git a/.github/workflows/test-helm.yml b/.github/workflows/test-helm.yml index 39a99b4..a64a855 100644 --- a/.github/workflows/test-helm.yml +++ b/.github/workflows/test-helm.yml @@ -11,15 +11,21 @@ on: - 'Makefile' - '.github/workflows/test-helm.yml' +permissions: {} + env: HELM_CHART_PATH: charts/lifecycle-controller jobs: template-test: + permissions: + contents: read name: Helm template runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Read Helm version from .Version id: get-helm-version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69f0ca4..c6f8654 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,12 +12,18 @@ on: - 'go.sum' - '.github/workflows/test.yml' +permissions: {} + jobs: test: + permissions: + contents: read name: Unit tests runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..ff92a68 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,41 @@ +name: GitHub Configuration Security + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + paths: + - '.github/**' + push: + branches: + - main + paths: + - '.github/**' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: {} + +jobs: + zizmor: + name: Audit GitHub Configuration + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + + - name: Audit workflows + uses: zizmorcore/zizmor-action@6599ee8b7a49aef6a770f63d261d214911a7ce02 # v0.6.0 + with: + advanced-security: false + inputs: .github + version: v1.27.0