From f691c938293ad70d2242e3378ca3f7ed8559cb2d Mon Sep 17 00:00:00 2001 From: LD-RW Date: Tue, 14 Jul 2026 12:14:10 +0300 Subject: [PATCH] chore(security): add Dependabot config and pin Actions to commit SHAs - Enable Dependabot for gomod and github-actions ecosystems (weekly) - Pin all GitHub Actions to full commit SHAs with version comments so Dependabot can keep the pins updated - Scope workflow GITHUB_TOKEN to contents: read Mitigates mutable-ref build-process attacks (cf. tj-actions/changed-files, 2024). --- .github/dependabot.yml | 17 +++++++++++++++++ .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e427c99 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 +updates: + - package-ecosystem: gomod + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 10 + commit-message: + prefix: chore(deps) + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 10 + commit-message: + prefix: chore(ci) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fa35c05 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + + - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 + with: + go-version-file: go.mod + + - name: Build + run: go build ./... + + - name: Vet + run: go vet ./... + + - name: Test + run: go test ./...