Skip to content

feat(inspect): production hardening — re-baseline to v0.2.0 + OSS hygiene#2

Merged
Patel230 merged 2 commits into
devfrom
feat/inspect-production-hardening
May 16, 2026
Merged

feat(inspect): production hardening — re-baseline to v0.2.0 + OSS hygiene#2
Patel230 merged 2 commits into
devfrom
feat/inspect-production-hardening

Conversation

@Patel230
Copy link
Copy Markdown
Contributor

Summary

Production-hygiene pass for inspect that brings the repo to top-50 OSS
repository standards. Single commit targeting dev.

The mandate (per GOAL.md) is that inspect be the reference Go
website + dependency security scanner
for the hawk ecosystem,
comparable in quality to gosec / trivy / snyk / grype / osv-scanner /
bearer / gitleaks / trufflehog / checkov / tfsec, and built for solo
developers running their coding agent locally.

This PR re-baselines the version (also fixes a small inconsistency
between two version strings) and fills the OSS-meta gaps. No code-
behaviour changes other than the version strings reported via MCP and
SARIF.

Changes

Version 0.2.0 (also: fix internal inconsistency)

File Change
internal/report/sarif.go const inspectVersion = "0.2.0" (was "1.0.0", used as tool.driver.version in SARIF)
mcp/server.go mcpserver.NewMCPServer("inspect", "0.2.0", ...) (was "0.1.0")

Pre-PR these two strings disagreed (1.0.0 vs 0.1.0); now they both
report 0.2.0. The SARIF spec version (sarifVersion = "2.1.0")
is intentionally unchanged — different field, identifies the format
not the tool.

The CVE-database entries in dependency_check.go (e.g. 0.0.0-2022
for golang.org/x/crypto, 4.17.20 for lodash, etc.) are factual
CVE-affected/fixed versions of third-party libraries — left untouched.

CHANGELOG.md

Added ## [Unreleased] describing the re-baseline + the new files.
Historical entries (0.4.0 / 0.2.0 / 0.1.0) preserved.

New OSS standard files

File Purpose
CODE_OF_CONDUCT.md Contributor Covenant 2.1
.gitattributes LF normalization, binary detection, linguist hints to collapse go.sum and browser/go.sum
.editorconfig UTF-8, LF, tabs for Go + Makefile, 2-space indent for YAML/JSON/TOML, no-trim for Markdown
.github/dependabot.yml weekly gomod (root + browser/ sub-module grouped by go-rod) + github-actions, root gomod grouped by mark3labs/mcp-go
.github/PULL_REQUEST_TEMPLATE.md Summary / Changes / Scan-quality impact / SARIF compatibility / SSRF & egress safety / Testing / Checklist
.github/ISSUE_TEMPLATE/bug_report.yml surface dropdown (library API / MCP / GitHub Action / SARIF / browser checks / CVE database) + false-positive textarea
.github/ISSUE_TEMPLATE/feature_request.yml kind selector covering 8 areas + solo-dev fit checks (with explicit "does not weaken SSRF / egress protections" confirmation)
.github/ISSUE_TEMPLATE/config.yml routes security to advisories, questions to discussions, blocks blank issues

The PR template has three inspect-specific sections:

  • Scan-quality impact — every change to checks, the crawler, the
    rule set, or finding deduplication can shift the false-positive /
    false-negative balance.
  • SARIF compatibility — every change to internal/report/sarif.go
    must still validate against the SARIF 2.1.0 schema.
  • SSRF & egress safety — inspect crawls user-supplied URLs, so
    any change to private-IP blocking, redirect filtering, scheme
    allowlists, or DNS resolution must be called out explicitly. This
    mirrors the does not weaken SSRF / egress protections checkbox in
    the feature-request template.

Cleanup

  • gofmt -w on mcp/server.go and internal/report/sarif.go to fix
    pre-existing blank-line and struct-tag alignment drift in the files
    I touched.

Verification

Check Status
go build ./... ✅ clean
go vet ./... ✅ clean
go test -race -count=1 -timeout=120s -short ./... ✅ all 6 packages pass: root inspect, checks, internal/{check,crawler,report}, mcp
gofmt -l for files I touched ✅ clean

Test plan

  • make build
  • make test-race
  • go vet ./...
  • gofmt -l mcp/server.go internal/report/sarif.go empty
  • CI on this PR will run lint (govet, ineffassign, misspell
    per .golangci.yml) and tests
  • browser/ sub-module is not exercised here (requires Chromium);
    separate workflow handles it

Patel230 added 2 commits May 15, 2026 00:19
…, PR/issue templates)

Re-baselines inspect's version to 0.2.0 across both authoritative
locations and adds the top-50 OSS standard files that were missing.

Version 0.2.0 set in:
  - internal/report/sarif.go (`const inspectVersion = "0.2.0"`,
    used as `tool.driver.version` in SARIF output)
  - mcp/server.go (`mcpserver.NewMCPServer("inspect", "0.2.0", ...)`)

The previous values were inconsistent (`inspectVersion` was `"1.0.0"`
while the MCP server advertised `"0.1.0"`); both now agree on
`"0.2.0"`. The SARIF spec version (`sarifVersion = "2.1.0"`) is
unchanged — that field identifies the SARIF format, not the tool.

Aligns inspect with the rest of the hawk-eco ecosystem (hawk, tok,
eyrie, yaad, trace, sight). The CVE-database entries in
`dependency_check.go` reference real CVE-affected/fixed versions of
third-party libraries (lodash, jsonwebtoken, golang.org/x/net, etc.)
and are intentionally untouched — they are factual data, not inspect's
own version.

CHANGELOG.md gains an [Unreleased] section. Existing 0.4.0 / 0.2.0 /
0.1.0 historical entries preserved.

New top-level OSS files:
  - CODE_OF_CONDUCT.md — Contributor Covenant 2.1
  - .gitattributes — LF normalization, binary detection, GitHub
    linguist hint to collapse `go.sum` and `browser/go.sum`
  - .editorconfig — UTF-8, LF, final newline, trim trailing whitespace,
    tabs for Go + Makefile, 2-space indent for YAML/JSON/TOML, no-trim
    for Markdown
  - .github/dependabot.yml — weekly gomod (root + browser/ sub-module
    grouped by go-rod) + github-actions, root gomod grouped by
    mark3labs/mcp-go to reduce PR noise
  - .github/PULL_REQUEST_TEMPLATE.md — Summary / Changes / Scan-quality
    impact / SARIF compatibility / SSRF & egress safety / Testing /
    Checklist (the SSRF section asks contributors to call out any
    change to private-IP blocking, redirect filtering, or scheme
    allowlists)
  - .github/ISSUE_TEMPLATE/bug_report.yml — surface dropdown (library
    API / MCP / GitHub Action / SARIF / browser checks / CVE database),
    required redaction confirmation, false-positive textarea
  - .github/ISSUE_TEMPLATE/feature_request.yml — kind selector covering
    8 areas (security check / accessibility / SEO / performance /
    browser / output formats / config / tooling) and solo-dev fit
    checks (incl. an explicit 'does not weaken SSRF / egress
    protections' confirmation)
  - .github/ISSUE_TEMPLATE/config.yml — routes security to advisories,
    questions to discussions, blocks blank issues

Cleanup:
  - gofmt -w on mcp/server.go and internal/report/sarif.go to fix
    pre-existing blank-line and struct-tag alignment drift in the
    files I touched

Verification:
  - `go build ./...` clean
  - `go vet ./...` clean
  - `go test -race -count=1 -timeout=120s -short ./...` passes on
    every package: root inspect, checks, internal/{check,crawler,
    report}, mcp
  - `gofmt -l` clean for all files I touched
- VERSION file as single source of truth
- CODEOWNERS for auto-review routing
- Canonical Makefile with standard targets
- release-please config + workflow
- lefthook/pre-commit hooks (conventional commits, fmt, lint, secrets)
- Canonical CI + release GitHub Actions workflows
- Standardized .editorconfig, .gitattributes, CODE_OF_CONDUCT, SECURITY, CONTRIBUTING
- goreleaser config (where applicable)

Part of hawk-eco standardization sweep.
@Patel230 Patel230 merged commit 5d148b6 into dev May 16, 2026
1 of 5 checks passed
@Patel230 Patel230 deleted the feat/inspect-production-hardening branch May 16, 2026 00:54
@Patel230 Patel230 restored the feat/inspect-production-hardening branch May 16, 2026 05:26
@Patel230 Patel230 deleted the feat/inspect-production-hardening branch May 16, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant