Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/dependabot.yml
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
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
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:
Comment on lines +11 to +13

Copy link
Copy Markdown

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 permissions block in both workflow files. Neither workflow declares a top-level permissions block, so the GITHUB_TOKEN uses default repository permissions—potentially including write scopes unnecessary for read-only CI and audit jobs. Add permissions: contents: read to both files.

  • .github/workflows/ci.yml#L11-L13: insert permissions: contents: read between the concurrency block and jobs.
  • .github/workflows/security.yml#L9-L11: insert permissions: contents: read between the on block and jobs.
📍 Affects 2 files
  • .github/workflows/ci.yml#L11-L13 (this comment)
  • .github/workflows/security.yml#L9-L11
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 11 - 13, Add a top-level permissions
block granting only contents: read in .github/workflows/ci.yml between the
concurrency block and jobs, and in .github/workflows/security.yml between the on
block and jobs. Ensure both workflows use the restricted read-only GITHUB_TOKEN
permissions.

Source: Linters/SAST tools

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

Copy link
Copy Markdown

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

persist-credentials: false missing on all three checkout steps. actions/checkout@v4 persists the GITHUB_TOKEN in .git/config by default. All three checkout steps across both workflow files omit persist-credentials: false, leaving the token accessible to untrusted code in subsequent steps (bun install postinstall scripts, go test code). Add with: persist-credentials: false to each checkout step.

  • .github/workflows/ci.yml#L22-L23: add persist-credentials: false to the frontend job's checkout.
  • .github/workflows/ci.yml#L68-L69: add persist-credentials: false to the backend job's checkout.
  • .github/workflows/security.yml#L20-L21: add persist-credentials: false to the audit job's checkout.
🧰 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
  • .github/workflows/ci.yml#L22-L23 (this comment)
  • .github/workflows/ci.yml#L68-L69
  • .github/workflows/security.yml#L20-L21
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 22 - 23, Add with.persist-credentials:
false to the checkout steps at .github/workflows/ci.yml lines 22-23 and 68-69,
and .github/workflows/security.yml lines 20-21; update all three
actions/checkout@v4 usages without changing other workflow behavior.

Source: 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 ./...
35 changes: 35 additions & 0 deletions .github/workflows/security.yml
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
Empty file added .opencode/commands/pr.md
Empty file.
Loading