ForgeGuardian is a supply chain security tool — it must hold itself to the same standards it enforces on others.
Every pull request and push to main/develop runs npm audit --audit-level=moderate inside the dashboard/ directory as part of the ts-ci GitHub Actions job. Any moderate, high, or critical vulnerability in a direct or transitive dependency blocks the build.
For Go dependencies, go vet ./... runs on every CI invocation.
To run dependency audits locally:
# Frontend
cd dashboard && npm audit --audit-level=moderate
# Go
go vet ./...Both package-lock.json (npm) and go.sum (Go modules) are committed and validated on every CI run.
npm ci(notnpm install) is used in CI — it fails ifpackage-lock.jsonis out of sync withpackage.json.- Go module checksums are verified by the Go toolchain against the sum database (
sum.golang.org).
Never use --legacy-peer-deps or --force when installing frontend dependencies without a documented reason.
The dashboard is compiled with Vite in production mode (vite build), which applies:
- Dead-code elimination and minification (esbuild)
- Source map generation is disabled by default in the release zip
- No
eval()ornew Function()constructs (lint-enforced)
The Go CLI binary is built with:
CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath ./cmd/fgctl/-s -w strips debug symbols and DWARF info. -trimpath removes local filesystem paths from the binary.
Container images use distroless/static-debian12 — no shell, no package manager, no debug utilities in production.
Development secrets (API keys, DB passwords) are stored in .env (git-ignored). The .gitignore explicitly excludes:
.env,.env.**.key,*.pem,*.p12node_modules/,dist/,coverage/
The docker-compose.yml dev stack uses fixed development-only credentials (devpassword, minioadmin) that are never reused in production.
Every PR runs:
- Semgrep (
autoconfig) — catches OWASP Top 10 patterns, injection vulnerabilities, hardcoded secrets, and insecure function calls - go vet — Go static analysis (type safety, unreachable code, suspicious constructs)
- TypeScript strict mode —
"strict": truein alltsconfig.jsonfiles;no-anylint rule enforced
- All containers run as
nonroot:nonroot(UID 65532) - Root filesystems are mounted read-only in Kubernetes manifests (
readOnlyRootFilesystem: true) - No
privileged: trueorCAP_NET_ADMINin any workload spec - SBOM and provenance attestations are generated for every Docker image via
docker/build-push-actionwithsbom: trueandprovenance: mode=max
If you discover a security vulnerability in ForgeGuardian:
- Do not open a public GitHub issue.
- Email mahendrapurbia19@gmail.com or use GitHub Security Advisories.
- Include: CVE ID if known, affected version, reproduction steps, and impact assessment.
We aim to acknowledge reports within 48 hours and release a patch within 14 days for confirmed critical issues.
ForgeGuardian release artifacts are signed with Sigstore keyless signing via the signer/ module. Every release includes:
- A
forgeguardian-vX.Y.Z.ziparchive - A Sigstore bundle (
forgeguardian-vX.Y.Z.zip.sigstore.json) for verification - A CycloneDX SBOM (
forgeguardian-vX.Y.Z.sbom.json)
Verify a release:
cosign verify-blob \
--bundle forgeguardian-vX.Y.Z.zip.sigstore.json \
forgeguardian-vX.Y.Z.zip