Skip to content

feat: home page, rule reference, OWASP page and example reports from the latest cfgaudit release (#1) - #2

Merged
predictor2718 merged 2 commits into
mainfrom
feat/site
Oct 25, 2026
Merged

predictor2718 merged 2 commits into
mainfrom
feat/site

Conversation

@predictor2718

Copy link
Copy Markdown
Member

Closes #1

Summary

A static site generator in Go (goldmark, raw HTML off), built from the latest cfgaudit release:

  • scripts/build.sh: clones the latest release tag, builds its binary with the release version, runs it on sample/ in every format (text, table, sarif, codeclimate, json; exit code 1 expected), writes cfgaudit list --format json, and runs the generator.
  • main.go: home page, rule overview, one page per docs/rules/CFGxxx.md (title from # CFGxxx — Title or # CFGxxx: Title), 404, sitemap, robots.txt. Relative links to another rule doc become its page, other repository files link to GitHub at the release tag, a link leaving the repository fails the build, and so does an internal link without a page. The home page terminal shows each finding up to its first " — " (at most 120 characters); the reports page has the full output.
  • owasp.go: the rules sorted into the OWASP Top 10 for LLM Applications 2026 (primary mapping) and the OWASP MCP Top 10, with the categories a configuration file can't show explained. The build fails when a listed rule has no doc, a documented rule is not listed, or a rule names an unknown category. A rule the list prints without a description gets its doc title (the v1.18.1 list has none for CFG110 to CFG116).
  • reports.go: the sample's files and the output in each format, with where it shows up and the CI setup that publishes SARIF and Code Climate.
  • templates/, static/: layout in the colours of the cfgaudit logo (near-black, blue to green gradient), the logo's hexagon as header mark and favicon, animated terminal on the home page.
  • sample/: a small repository with a bypass mode, Bash(*), an auto-approved MCP config, an unpinned and a cleartext MCP server, a hook with an interpolated variable and a "never ask for confirmation" line (10 findings with v1.18.1).
  • .github/workflows/ci.yml (gofmt, vet, tests, golangci-lint, zizmor, full build) and deploy.yml (Pages on push to main, daily, workflow_dispatch, cfgaudit-release dispatch), Dependabot, README.

Adapted from the generator behind glsec.github.io.

Test plan

  • go test ./...: pages, sitemap, rule page links and title forms, raw HTML dropped, home sample cut, OWASP counts and anchors, description fallback, reports, and five build failures (bad title, link leaving the repository, undocumented rule listed, documented rule missing, unknown category).
  • ./scripts/build.sh against v1.18.1: 116 rule pages, no broken internal links; home, rules, a rule page, OWASP and reports checked in a browser at 808 and 1280 px wide.
  • golangci-lint run (0 issues).

AI assistance

Claude Code made the change; reviewed by the maintainer.

@predictor2718
predictor2718 merged commit 4454076 into main Oct 25, 2026
3 checks passed
@predictor2718
predictor2718 deleted the feat/site branch October 25, 2026 15:53
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.

Home page, rule reference, OWASP page and example reports from the latest cfgaudit release

1 participant