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
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
# Go modules (go.mod lives in backend/)
- package-ecosystem: "gomod"
directory: "/backend"
schedule:
interval: "weekly"
commit-message:
prefix: "build(deps)"

# Actions used in .github/workflows
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "ci(deps)"

# Base images in backend/Dockerfile (golang and distroless)
- package-ecosystem: "docker"
directory: "/backend"
schedule:
interval: "weekly"
commit-message:
prefix: "build(deps)"
19 changes: 19 additions & 0 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,22 @@ jobs:
# "go run pkg@version" runs the tool without adding it to go.mod
- name: govulncheck
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...

image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Build the same image the deploy will use. This alone proves the
# Dockerfile still works.
- name: Build the API image
run: docker build -t aktenlens-api:ci backend

# Fail only on CRITICAL vulnerabilities that already have a fix.
- name: Scan the image with Trivy
uses: aquasecurity/trivy-action@v0.36.0
with:
image-ref: aktenlens-api:ci
severity: CRITICAL
ignore-unfixed: true
exit-code: "1"
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BACKEND_DIR := backend
BUILD_DIR := bin
MAIN_PATH := ./cmd/api

.PHONY: all build run dev test test-race fmt vet clean help db db-stop db-logs db-psql db-reset migrate migrate-down migrate-status
.PHONY: all build run dev test test-race fmt vet lint clean help db db-stop db-logs db-psql db-reset migrate migrate-down migrate-status

# Default target when running only 'make'
all: help
Expand Down Expand Up @@ -50,6 +50,10 @@ vet: ## Look for suspicious code (go vet)
@echo "==> Running vet..."
cd $(BACKEND_DIR) && go vet ./...

lint: ## Run golangci-lint (includes gosec)
@echo "==> Running golangci-lint..."
cd $(BACKEND_DIR) && golangci-lint run

clean: ## Remove build artifacts
@echo "==> Cleaning artifacts..."
rm -rf $(BACKEND_DIR)/$(BUILD_DIR)
Expand Down
Loading