Repository navigation
ci: add GitHub Actions workflows and Dependabot config #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| version: 2 | ||
|
|
||
| updates: | ||
| - package-ecosystem: gomod | ||
| directory: apps/backend | ||
| schedule: | ||
| interval: weekly | ||
| labels: | ||
| - dependencies | ||
|
|
||
| - package-ecosystem: bun | ||
| directory: apps/frontend | ||
| schedule: | ||
| interval: weekly | ||
| labels: | ||
| - dependencies | ||
|
|
||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| labels: | ||
| - dependencies |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [staging] | ||
| pull_request: | ||
| branches: [staging] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| frontend: | ||
| name: Frontend | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: apps/frontend | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
Comment on lines
+22
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧰 Tools🪛 zizmor (1.26.1)[warning] 22-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - name: Get Bun version | ||
| id: bun-version | ||
| run: echo "version=$(bun --version)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Cache Bun dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.bun/install/cache | ||
| key: bun-${{ runner.os }}-${{ steps.bun-version.outputs.version }}-${{ hashFiles('apps/frontend/bun.lock') }} | ||
| restore-keys: | | ||
| bun-${{ runner.os }}-${{ steps.bun-version.outputs.version }}- | ||
| bun-${{ runner.os }}- | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Lint | ||
| run: bun run check | ||
|
|
||
| - name: Type-check | ||
| run: bun run typecheck | ||
|
|
||
| - name: Build | ||
| run: bun run build | ||
| env: | ||
| NEXT_TELEMETRY_DISABLED: 1 | ||
|
|
||
| backend: | ||
| name: Backend | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: apps/backend | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: apps/backend/go.mod | ||
|
|
||
| - name: Run tests | ||
| run: go test ./... -count=1 | ||
|
|
||
| - name: Vet | ||
| run: go vet ./... | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Security | ||
|
|
||
| on: | ||
| push: | ||
| branches: [staging] | ||
| pull_request: | ||
| branches: [staging] | ||
| schedule: | ||
| - cron: "0 8 * * 1" | ||
|
|
||
| jobs: | ||
| frontend-audit: | ||
| name: Frontend dependency audit | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: apps/frontend | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Audit dependencies | ||
| run: bun audit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Missing
permissionsblock in both workflow files. Neither workflow declares a top-levelpermissionsblock, so theGITHUB_TOKENuses default repository permissions—potentially including write scopes unnecessary for read-only CI and audit jobs. Addpermissions: contents: readto both files..github/workflows/ci.yml#L11-L13: insertpermissions: contents: readbetween theconcurrencyblock andjobs..github/workflows/security.yml#L9-L11: insertpermissions: contents: readbetween theonblock andjobs.📍 Affects 2 files
.github/workflows/ci.yml#L11-L13(this comment).github/workflows/security.yml#L9-L11🤖 Prompt for AI Agents
Source: Linters/SAST tools