diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..883f18a --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,46 @@ +name: CodeQL Security Scan + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: true + +env: + GO_VERSION: "1.25" + +jobs: + analyze: + name: Analyze Go Code + runs-on: ubuntu-latest + + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [go] + + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-go@v6 + with: + go-version: ${{ env.GO_VERSION }} + cache: true + + - uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + + - uses: github/codeql-action/autobuild@v3 + + - uses: github/codeql-action/analyze@v3 \ No newline at end of file diff --git a/.github/workflows/sbom.yml b/.github/workflows/sbom.yml new file mode 100644 index 0000000..a4f912d --- /dev/null +++ b/.github/workflows/sbom.yml @@ -0,0 +1,38 @@ +name: Generate Software Bill of Materials (SBOM) + +on: + push: + branches: + - main + + pull_request: + branches: + - main + + workflow_dispatch: + +permissions: + contents: read + +jobs: + sbom: + name: Generate SBOM + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v6 + + - name: Install Syft + uses: anchore/sbom-action/download-syft@v0 + + - name: Generate SPDX SBOM + run: | + syft . -o spdx-json=sbom.spdx.json + + - name: Upload SBOM Artifact + uses: actions/upload-artifact@v4 + with: + name: sbom-spdx + path: sbom.spdx.json + retention-days: 30 \ No newline at end of file