Skip to content

Implement M1 scaffolding and OSV ingestion - #39

Open
bjcorder wants to merge 18 commits into
mainfrom
m1-scaffolding-osv-ingestion
Open

Implement M1 scaffolding and OSV ingestion#39
bjcorder wants to merge 18 commits into
mainfrom
m1-scaffolding-osv-ingestion

Conversation

@bjcorder

Copy link
Copy Markdown
Contributor

Summary

Implements milestone 1: Scaffolding & OSV Ingestion.

  • Implements M1.1: Initialize Go module and project structure #1 through M1.11: Wire up forkguard init and forkguard ingest #11.
  • Adds Go module scaffolding, project layout, Apache headers, and CLI entry point.
  • Adds lint/vet/test CI, CodeQL, Dependabot gomod coverage, security smoke checks, and repository templates/security policy updates.
  • Adds cobra CLI stubs, viper configuration, slog logging, SQLite migrations/store, sqlc queries/generated code, OSV client, OSV normalization, and idempotent forkguard init / forkguard ingest.
  • Includes review-driven hardening for OSV response/ZIP bounds, sanitized remote error bodies, CVSS severity fallback, transactional ingest, and security workflow self-match prevention.

Implementation commits

Validation

  • make generate — passed
  • go build ./... — passed
  • go vet ./... — passed
  • go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 run ./... — passed
  • go test ./... -race -coverprofile=coverage.out — passed
  • pattern='(ghp_|github_pat_|sk-[A-Za-z0-9])'; ! git grep -nE "$pattern" -- ':!docs/**' ':!.github/workflows/security.yml' — passed
  • ./forkguard --help — passed
  • FORKGUARD_DB_PATH=<temp>/state.db ./forkguard init --forks <temp>/forks.yaml — passed
  • FORKGUARD_DB_PATH=<temp>/state.db ./forkguard ingest --upstream github.com/openssl/openssl — passed
  • Repeated ingest idempotency check — passed; counts remained 107 advisories and 259 fix commits
  • Apache header grep for Go files — passed

Review

Fresh-context completion, code correctness, and source-code-only security reviews were run. Review findings were fixed and re-reviewed; no blockers or fixes worth doing now remained.

Risks / follow-ups

  • GitHub CI has not completed until this PR runs.
  • M2+ scan/report behavior remains intentionally stubbed and out of scope for M1.

bjcorder added 18 commits May 23, 2026 09:48
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
Signed-off-by: Brian Corder <bjcorder@protonmail.com>
run: |
echo "CodeQL analysis will be enabled when implementation source lands."
test -f README.md
- uses: github/codeql-action/init@fee9466b8957867761f2d78f922ab084e3e2dd17
languages: go
- name: Build
run: go build ./...
- uses: github/codeql-action/analyze@fee9466b8957867761f2d78f922ab084e3e2dd17
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants