From 54d03b973a36f97fe66e9788beebbf228e6d7293 Mon Sep 17 00:00:00 2001 From: Jason Norch Date: Wed, 11 Nov 2026 14:53:03 -0500 Subject: [PATCH 1/3] Use dark text on the accent gradient in dark mode In the dark theme the accent gradient runs from #8d9cff to #bcc7ff, and --on-accent was near-white, so the "Get a Pro key" button, the method badges and the checkout copy button measured between 1.5:1 and 2.4:1. It went unnoticed because the docs are usually read in the light theme; it showed up as soon as the home page put a primary button in the hero. The token is only ever used for text on that gradient, so the fix is the token rather than each component. Assisted-by: Claude Fable 5.2 --- internal/handler/docs_styles.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/handler/docs_styles.css b/internal/handler/docs_styles.css index 48cca51..db96434 100644 --- a/internal/handler/docs_styles.css +++ b/internal/handler/docs_styles.css @@ -191,7 +191,9 @@ html[data-theme="dark"] { --lang-tab-hover-border: rgba(141, 156, 255, 0.2); --lang-tab-hover-bg: rgba(141, 156, 255, 0.16); --divider: rgba(169, 187, 207, 0.14); - --on-accent: #f4f7ff; + /* Dark, not light: in this theme the accent gradient runs from #8d9cff to + #bcc7ff, and near-white text on it measured between 1.5:1 and 2.4:1. */ + --on-accent: #0b1220; --theme-toggle-bg: rgba(15, 24, 37, 0.82); --theme-toggle-border: rgba(169, 187, 207, 0.12); --theme-toggle-shadow: 0 18px 36px rgba(0, 0, 0, 0.28); From 24de0342b90c58003e665f1fee63b3c3431084f4 Mon Sep 17 00:00:00 2001 From: Jason Norch Date: Wed, 11 Nov 2026 14:53:03 -0500 Subject: [PATCH 2/3] Serve a Security Accelerated home page at the site root The root was a 301 to /docs, so the company had no page of its own: the first thing anyone saw was API reference. The root now says what the company makes, what the plans are and how to reach it, with the docs one link away. It is served by the API binary rather than as a separate static site so there is no second host or toolchain, and so the price and payment link come from the same config keys as the Plans table on /docs. It uses the docs' design language with a layout of its own, and stays out of docsPages. That split was reached by getting it wrong both ways: a version that reused the docs page shell looked like a copy of the docs overview, and a version with its own typeface and palette no longer looked like the same company. The rule file and decisions.md record this so the page is not folded back into the shared shell. The fan-out diagram is a sample that ends in "and more", so adding a lookup does not mean redrawing it; the Product list is the full set and is now a step in the adding-features checklist. The brand link on every docs page goes to / instead of /docs, since the home page is otherwise unreachable from the docs. Assisted-by: Claude Fable 5.2 --- .claude/rules/docs-pages.md | 24 + .claude/skills/adding-features/SKILL.md | 2 +- AGENTS.md | 5 +- README.md | 2 +- docs/api-reference.md | 2 +- docs/decisions.md | 18 + integration_test.go | 15 +- internal/handler/changelog.yaml | 10 + internal/handler/docs.html | 2 +- internal/handler/docs_404.html | 2 +- internal/handler/docs_account.html | 2 +- internal/handler/docs_changelog.html | 2 +- internal/handler/docs_controls_test.go | 2 +- internal/handler/docs_domain.html | 2 +- internal/handler/docs_ip.html | 2 +- internal/handler/docs_test.go | 15 - internal/handler/handler.go | 5 +- internal/handler/home.go | 29 + internal/handler/home.html | 711 ++++++++++++++++++++++++ internal/handler/home_test.go | 110 ++++ internal/handler/notfound_test.go | 2 +- scripts/smoke-test.sh | 2 +- 22 files changed, 929 insertions(+), 37 deletions(-) create mode 100644 internal/handler/home.go create mode 100644 internal/handler/home.html create mode 100644 internal/handler/home_test.go diff --git a/.claude/rules/docs-pages.md b/.claude/rules/docs-pages.md index 1fce303..9b4af3f 100644 --- a/.claude/rules/docs-pages.md +++ b/.claude/rules/docs-pages.md @@ -1,6 +1,7 @@ --- paths: - "internal/handler/docs*" + - "internal/handler/home*" - "internal/handler/render.go" - "internal/handler/openapi.go" - "internal/handler/changelog.go" @@ -20,6 +21,29 @@ from it. **Adding a page is one table row.** Tests that apply to only some pages (`docsPagesWithLanguageTabs()`) rather than re-list. Do not spell the page set out anywhere else — not in the router, not in a test, not in a template's nav. +## The home page is not a docs page + +`home.html` is the company page at `/`, served by `Handler.Home`. **It is not a row in +`docsPages`.** It is the front door: same design language as the docs, different page. + +- **Shared:** `docs_styles.css` for the tokens, typefaces, page background, code blocks, + tags and theme toggle; `docs.js` for the toggle and the copy buttons; `htmlPageCSP`; and + the template data, so its price and payment link come from the same config keys. +- **Its own:** the header, the hero and its fan-out diagram, the plan panels, the contact + panel — all in the page's inline ` + + + +
+
+ Security Accelerated + +
+ +
+
+

Domain and IP intelligence for security teams.

+

Security Accelerated builds the Intelligence API. Send it a domain or an IP address, and one request returns registration, DNS, certificates, email security, reputation and more as a single JSON document.

+ + +
+ + +

The lookups you name run side by side, and one that fails does not fail the rest. Add risk and the document carries an aggregate score as well.

+
+
+ +
+
+

Intelligence API

+

One REST API for domains and IP addresses. You name the lookups you want, and the answer to “what is this thing?” comes back as a single document your tooling can read.

+ +
+

For a domain

+
    +
  • WHOIS registration
  • +
  • DNS records
  • +
  • TLS certificate
  • +
  • HTTP headers
  • +
  • Email security SPF, DKIM, DMARC, MTA-STS, TLS-RPT, BIMI
  • +
  • DNSSEC and CAA
  • +
  • Subdomains
  • +
  • Certificate transparency
  • +
  • BGP and ASN
  • +
  • Technology fingerprinting
  • +
  • Reputation Pro
  • +
  • Threat intelligence Pro
  • +
  • Aggregate risk score
  • +
+

Domain reference

+
+ +
+

For an IP address

+
    +
  • GeoIP
  • +
  • ASN
  • +
  • Reverse DNS
  • +
  • Abuse contact
  • +
  • Threat intelligence Pro
  • +
+

IP reference

+
+
+ +
+

Request

+
curl -s https://api.securityaccelerated.com/v1/domain/lookup \
+  -H 'X-API-Key: YOUR_KEY' \
+  -H 'Content-Type: application/json' \
+  -d '{"domains": ["example.com"],
+       "lookups": ["dns", "ssl", "email_security", "risk"]}'
+

Response, trimmed

+
{
+  "results": [
+    {
+      "domain": "example.com",
+      "dns": {
+        "cache_hit": false,
+        "a": ["23.192.228.80"],
+        "ns": ["a.iana-servers.net", "b.iana-servers.net"]
+      },
+      "ssl": {
+        "cache_hit": true,
+        "issuer": "DigiCert Global G3 TLS ECC SHA384 2020 CA1",
+        "not_after": "2027-01-15T23:59:59Z",
+        "days_until_expiry": 91
+      },
+      "email_security": {
+        "cache_hit": false,
+        "spf": { "raw": "v=spf1 -all", "all": "-all" },
+        "dmarc": { "raw": "v=DMARC1; p=reject", "policy": "reject" }
+      },
+      "risk": { "cache_hit": false, "score": 12, "risk_level": "low" }
+    }
+  ]
+}
+
+
+ +
+

Plans

+

Two plans. They differ in request volume, batch size, and access to reputation and threat intelligence.

+
+
+

Free

+

$0

+
    +
  • 5 requests a minute
  • +
  • 1 domain or IP per request
  • +
  • Every lookup except reputation and threat intelligence
  • +
  • Aggregate risk score
  • +
  • Usage statistics and self-service key rotation
  • +
+
+
+

Pro

+ {{if .ProPrice}}

{{.ProPrice}}

{{end}} +
    +
  • 120 requests a minute
  • +
  • 20 domains or IPs per request
  • +
  • Every lookup, including reputation and threat intelligence
  • +
  • Aggregate risk score
  • +
  • Usage statistics and self-service key rotation
  • +
+ {{if .ProPaymentLink}}Get a Pro key{{else}}

Contact us for a Pro key.

{{end}} +
+
+

A Pro key is self-service: subscribe, copy the key from the confirmation page, and rotate it yourself whenever you need to. The docs have the full comparison.

+
+ +
+

Read the code before you send it anything

+

The source is published so you can evaluate the service before you trust it with a query. It is source-available with all rights reserved, not open source.

+
+
+
You get what worked
+
A lookup that fails says why in a per-result errors array. The rest of the response still arrives.
+
+
+
Failures are never cached
+
Only successful lookups are stored, so an upstream outage is not replayed to you later as an answer.
+
+
+
One outbound path
+
Every outbound connection goes through a single SSRF-prevention layer that checks the address at dial time, after DNS resolution.
+
+
+
The release process is in the repo
+
How a version reaches production, and the approval it waits for, is written down next to the code.
+
+
+ +
+ +
+

Contact

+
+
+
Questions and support
+
support@securityaccelerated.com
+
+
+
Security reports
+
How to report a vulnerability
+
+
+
+
+ + +
+ + + + diff --git a/internal/handler/home_test.go b/internal/handler/home_test.go new file mode 100644 index 0000000..a8b08ce --- /dev/null +++ b/internal/handler/home_test.go @@ -0,0 +1,110 @@ +package handler + +import ( + "net/http" + "net/http/httptest" + "regexp" + "strings" + "testing" + + "github.com/spf13/viper" +) + +// allSitePages adds the company page to the docs pages for the one docs rule +// that applies to it: docs.js runs there too, so the controls it injects must +// not be written into the markup. The docs nav and table rules do not apply; +// the home page has its own nav and no tables. +func allSitePages() []docsPage { + return append(allDocsHTML(), docsPage{Path: "/", HTML: homeHTML, Tmpl: homeTmpl}) +} + +func getHome(t *testing.T, cfg *viper.Viper) string { + t.Helper() + r := docsRouterWithData(nil, cfg, nil) + w := httptest.NewRecorder() + r.ServeHTTP(w, httptest.NewRequest(http.MethodGet, "/", http.NoBody)) + + if w.Code != http.StatusOK { + t.Fatalf("status = %d, want %d", w.Code, http.StatusOK) + } + if ct := w.Header().Get("Content-Type"); !strings.Contains(ct, "text/html") { + t.Errorf("Content-Type = %q, want text/html", ct) + } + // The API-wide CSP is default-src 'none'; without the page override the + // stylesheets, the fonts and the scripts are blocked and the page renders + // unstyled. + if got := w.Header().Get("Content-Security-Policy"); got != htmlPageCSP { + t.Errorf("Content-Security-Policy = %q, want %q", got, htmlPageCSP) + } + return w.Body.String() +} + +// The root used to be a 301 to /docs. It now answers for the company, and the +// docs have to stay one link away from it. +func TestHome_ServesCompanyPage(t *testing.T) { + body := getHome(t, nil) + + for _, want := range []string{ + "Security Accelerated", + `href="/docs"`, + `href="/docs/domain"`, + `href="/docs/ip"`, + "mailto:support@securityaccelerated.com", + ``, + ``, + ``, + } { + if !strings.Contains(body, want) { + t.Errorf("home page does not contain %q", want) + } + } + + // Blocked silently by the CSP, so nothing but this test would notice. + if strings.Contains(body, "