diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml new file mode 100644 index 0000000..27d2f10 --- /dev/null +++ b/.github/workflows/codeql-analysis.yaml @@ -0,0 +1,35 @@ +--- +name: 🚨 CodeQL Analysis +on: + push: + pull_request: + +jobs: + codeql: + name: Evaluate code for vulnerabilities + runs-on: ubuntu-latest + + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["go"] + + steps: + - name: Set up git repository + uses: actions/checkout@v2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml new file mode 100644 index 0000000..5a2bd3f --- /dev/null +++ b/.github/workflows/go.yaml @@ -0,0 +1,25 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.17 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... diff --git a/.github/workflows/semgrep.yaml b/.github/workflows/semgrep.yaml new file mode 100644 index 0000000..c9b2c4f --- /dev/null +++ b/.github/workflows/semgrep.yaml @@ -0,0 +1,24 @@ + +--- +name: 🚨 Semgrep Analysis +on: + push: + pull_request: + +jobs: + semgrep: + name: Evaluate code for vulnerabilities + runs-on: ubuntu-latest + # Skip any PR created by dependabot to avoid permission issues + if: (github.actor != 'dependabot[bot]') + + steps: + - name: Set up git repository + uses: actions/checkout@v2 + + - uses: returntocorp/semgrep-action@v1 + with: + config: >- # more at semgrep.dev/explore + p/security-audit + p/secrets + p/golang