diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 09f4568..3239b02 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,3 +8,15 @@ updates: bundler: patterns: - "*" + cooldown: + default-days: 7 + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + groups: + github-actions: + patterns: + - "*" + cooldown: + default-days: 7 diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8cb675f..57a2a16 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,6 +1,6 @@ name: CD -on: +on: # zizmor: ignore[dangerous-triggers] deploy-after-CI-passes is the standard rubyatscale release pattern; the called workflow only tags/publishes on main workflow_run: workflows: [CI] types: [completed] @@ -8,5 +8,7 @@ on: jobs: call-workflow-from-shared-config: - uses: rubyatscale/shared-config/.github/workflows/cd.yml@main + permissions: + contents: write + uses: rubyatscale/shared-config/.github/workflows/cd.yml@main # zizmor: ignore[unpinned-uses,secrets-inherit] internal reusable workflow tracked at @main by convention so shared-config updates propagate automatically; environments are managed by callers secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfd0670..0ac7dd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,9 @@ on: - main pull_request: +permissions: + contents: read + jobs: rspec: runs-on: ubuntu-latest @@ -19,9 +22,11 @@ jobs: BUNDLE_GEMFILE: Gemfile name: "RSpec tests: Ruby ${{ matrix.ruby }}" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Set up Ruby ${{ matrix.ruby }} - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0 with: bundler-cache: true ruby-version: ${{ matrix.ruby }} @@ -39,9 +44,11 @@ jobs: BUNDLE_GEMFILE: Gemfile name: "Visual Regression Suite: Ruby ${{ matrix.ruby }}" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Set up Ruby ${{ matrix.ruby }} - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0 with: bundler-cache: true ruby-version: ${{ matrix.ruby }} @@ -51,9 +58,11 @@ jobs: name: "Type Check" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0 with: bundler-cache: true ruby-version: '4.0' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2872630..bbe15b4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -33,14 +33,16 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Initialize CodeQL - uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v3.37.3 + uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v3.37.3 + uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 with: category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0287d52..4d49144 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -5,4 +5,7 @@ on: - cron: '0 0 * * *' jobs: call-workflow-from-shared-config: - uses: rubyatscale/shared-config/.github/workflows/stale.yml@main + permissions: + issues: write + pull-requests: write + uses: rubyatscale/shared-config/.github/workflows/stale.yml@main # zizmor: ignore[unpinned-uses] internal reusable workflow tracked at @main by convention so shared-config updates propagate automatically diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 74bb1d9..7613548 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -6,4 +6,6 @@ on: - opened jobs: call-workflow-from-shared-config: - uses: rubyatscale/shared-config/.github/workflows/triage.yml@main + permissions: + issues: write + uses: rubyatscale/shared-config/.github/workflows/triage.yml@main # zizmor: ignore[unpinned-uses] internal reusable workflow tracked at @main by convention so shared-config updates propagate automatically diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..461b902 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,23 @@ +name: GitHub Actions Security Analysis + +on: + push: + branches: [main] + pull_request: + branches: ["**"] + +permissions: {} + +jobs: + zizmor: + runs-on: ubuntu-latest + permissions: + security-events: write + contents: read + actions: read + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + - name: Run zizmor + uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7