diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..73992aa --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,31 @@ +version: 2 +updates: + - package-ecosystem: gomod + directory: "/" + schedule: + interval: weekly + day: monday + time: "06:00" + timezone: Etc/UTC + open-pull-requests-limit: 5 + groups: + gomod-security: + applies-to: security-updates + patterns: + - "*" + gomod-minor-patch: + applies-to: version-updates + update-types: + - minor + - patch + + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 3 + groups: + actions: + patterns: + - "*" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..e26ddc9 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,43 @@ +name: CodeQL + +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + schedule: + - cron: '17 6 * * 1' + +permissions: + actions: read + contents: read + security-events: write + +jobs: + analyze: + name: Analyze (Go) + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout this repo + uses: actions/checkout@v4 + with: + path: common + - name: Checkout sibling InstaNode-dev/proto + uses: actions/checkout@v4 + with: + repository: InstaNode-dev/proto + path: proto + - uses: actions/setup-go@v5 + with: + go-version-file: common/go.mod + - uses: github/codeql-action/init@v3 + with: + languages: go + queries: security-extended + - name: Build + working-directory: common + run: go build ./... + - uses: github/codeql-action/analyze@v3 + with: + category: "/language:go" diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml new file mode 100644 index 0000000..fd90e7a --- /dev/null +++ b/.github/workflows/govulncheck.yml @@ -0,0 +1,34 @@ +name: govulncheck + +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + schedule: + - cron: '0 6 * * *' + +permissions: + contents: read + +jobs: + govulncheck: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout this repo + uses: actions/checkout@v4 + with: + path: common + - name: Checkout sibling InstaNode-dev/proto + uses: actions/checkout@v4 + with: + repository: InstaNode-dev/proto + path: proto + - uses: actions/setup-go@v5 + with: + go-version-file: common/go.mod + check-latest: true + - run: go install golang.org/x/vuln/cmd/govulncheck@latest + - working-directory: common + run: govulncheck ./... diff --git a/.github/workflows/osv-scanner.yml b/.github/workflows/osv-scanner.yml new file mode 100644 index 0000000..89d7540 --- /dev/null +++ b/.github/workflows/osv-scanner.yml @@ -0,0 +1,22 @@ +name: OSV-Scanner + +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + schedule: + - cron: '0 6 * * *' + +permissions: + actions: read + contents: read + security-events: write + +jobs: + scan: + uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v2.0.1 + permissions: + actions: read + contents: read + security-events: write diff --git a/go.mod b/go.mod index eb7c0a0..d4af6a4 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module instant.dev/common go 1.25.0 +toolchain go1.25.10 + require ( github.com/golang-jwt/jwt/v4 v4.5.0 github.com/google/uuid v1.6.0