chore: pre-public hardening (LICENSE, SECURITY.md, docs rebuild, expanded spectral rule)#5
Conversation
- Add Apache-2.0 LICENSE so consumers can legally generate clients from the specs. - Add SECURITY.md with private disclosure path (security@smileidentity.com). - Drop the stale package.json. The validate workflow uses `npx --yes` directly; nothing else referenced it. Its `bundle` script produced invalid output for multi-spec input anyway. - Expand the .spectral.yaml `no-internal-references` regex to block more internal infra/tooling names (Convox, Sentry, Datadog, Grafana, Prometheus, Snowflake, OpenSearch, LaunchDarkly, IaC tools, AWS-specific resource types, internal index names). - Rebuild docs/index.html for multi-spec rendering: sidebar lists every public spec, click reloads with ?spec=<name>. Replaces the page that was pointing at the now-deleted bundled artifact. Markers (`<!-- SPEC_LIST_START -->` / `<!-- SPEC_LIST_END -->`) let the upstream sync workflow regenerate the spec list. - Add deploy-docs.yml GitHub Actions Pages deployment. Stages docs/ + specs/ into a flat _site/, rewrites the spec paths, and publishes via actions/deploy-pages. Pages source has been switched from "branch /docs" to "GitHub Actions" out of band so this workflow can deploy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Pull request overview
Pre-public-launch hardening for smileidentity/api-reference, aimed at clarifying repo licensing/security posture and restoring a working, multi-spec docs experience on GitHub Pages while tightening spec linting against internal-reference leakage.
Changes:
- Add Apache-2.0
LICENSEand a vulnerability disclosure policy inSECURITY.md. - Replace the single bundled-spec docs page with a sidebar-driven multi-spec selector in
docs/index.html, and add a GitHub Pages deployment workflow. - Update
.spectral.yamlto expand theno-internal-referencesdenylist and remove the unusedpackage.json.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| SECURITY.md | Adds a security policy and private disclosure contact information. |
| package.json | Removes unused Node scripts/devDependencies that are not referenced by CI. |
| LICENSE | Adds Apache-2.0 licensing for public distribution/consumption. |
| docs/index.html | Rebuilds docs UI to select among multiple public specs and load via query param. |
| .spectral.yaml | Expands internal-reference blocking rule and adjusts ruleset configuration. |
| .github/workflows/deploy-docs.yml | Adds Pages deployment workflow to publish docs/ + specs/ as a static site. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix .spectral.yaml `no-internal-references` regex: switch from a YAML folded scalar (`>-`) to a single-line quoted string. The folded scalar inserts a space at every line break, which silently broke the alternation — most listed terms would never match. The rule appeared to "pass" only because no current spec contained the terms; a real leak would have slipped through. - Restore the three Spectral rules that were dropped in the rewrite: `operation-operationId: error`, `operation-description: warn`, `info-description: error`. These were intentional gates inherited from the original config and shouldn't have been removed. - Pin redoc.standalone.js to v2.4.0 instead of `latest`, so a breaking upstream release can't silently break the docs page. Skipping SRI for now — the standard CDN URL doesn't publish hashes per release and adding one adds upgrade friction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
User description
Summary
Pre-public-launch cleanup of
smileidentity/api-reference. One PR with five threads of work:license: null. Public repos without a license are "all rights reserved" and consumers can't legally generate clients/SDKs from the specs.security@smileidentity.comfor private disclosure. Adjust if you use a different address.package.json— itsbundlescript produced invalid output for multi-spec input (treats-oas a directory when there are multiple inputs), and itsvalidatescript calledspectralwithoutnpx. CI usesnpx --yesdirectly anyway. Nothing else referenced it.no-internal-referencesrule — adds Convox, Sentry, Datadog, Grafana, Prometheus, Snowflake, OpenSearch, LaunchDarkly, AWS resource types (Kinesis, EventBridge, ECR/ECS/EKS/Fargate, Cognito, KMS, VPC, NACL), IaC tools (Pulumi, Terraform, CloudFormation), and our internal index/log names. All current specs still pass (0 errors).docs/index.html+ Pages deployment workflow — old page pointed at abundled/openapi-v3.yamlartifact that no longer exists. New page has a sidebar listing every public spec; clicking one loads it via?spec=<name>. A newdeploy-docs.ymlworkflow stagesdocs/+specs/into a flat_site/and deploys viaactions/deploy-pages. Pages source has already been switched to "GitHub Actions" via API.The spec-list block in
docs/index.htmlis wrapped in<!-- SPEC_LIST_START -->/<!-- SPEC_LIST_END -->markers so the upstream sync workflow can regenerate it on every release (workflow change is in lambda PR #4465; no-op until that PR lands).Spec data sweep
I ran a regex sweep across every public v3 spec for AWS account numbers, internal hostnames, JWT-shaped tokens, and real-looking PII in
examplefields. Only "real-looking" hit was a 64-char hex string used as anexamplefor thesmileid-request-signatureHMAC parameter — that's a synthetic example value, not a credential. No redactions needed.Test plan
deploy-docs.ymlfires and deploys the new docs site to PagesLICENSEandSECURITY.mdshow up correctly on the GitHub repo landing pagePR Type
Enhancement, Documentation
Description
Add Apache-2.0 LICENSE for public repo compliance
Add SECURITY.md with vulnerability disclosure policy
Rebuild docs/index.html with multi-spec sidebar navigation
Expand spectral linting rule with more internal terms
Add GitHub Pages deployment workflow
Remove stale package.json
Diagram Walkthrough
File Walkthrough
deploy-docs.yml
Add GitHub Pages deployment workflow.github/workflows/deploy-docs.yml
mainfordocs/**andspecs/**pathsdocs/index.htmlandspecs/v3/*.yamlinto_site/directorysedfor flat site layoutactions/deploy-pages@v4.spectral.yaml
Expand spectral rule to block more internal terms.spectral.yaml
no-internal-referencesregex with AWS services(Kinesis, EventBridge, ECR, ECS, EKS, Fargate, Cognito, KMS), IaC
tools (Pulumi, Terraform, CloudFormation), databases (Snowflake,
OpenSearch, Elasticsearch, MongoDB, DocumentDB, Aurora), and
observability/internal tools (Convox, Sentry, Datadog, Grafana,
Prometheus, LaunchDarkly, Sidekiq, etc.)
enrollee_index,fraud_index)operation-operationId,operation-description, andinfo-descriptionrule overridesindex.html
Rebuild docs page with multi-spec sidebar navigationdocs/index.html
sidebar
SPECSarray listing 14 API specs withmarkers for automation?spec=query parameter
#2B3990)LICENSE
Add Apache-2.0 license fileLICENSE
SECURITY.md
Add security vulnerability disclosure policySECURITY.md
security@smileidentity.comSLA
supply-chain) and out-of-scope items
package.json
Remove stale package.jsonpackage.json
validateandbundlescripts@stoplight/spectral-cliand@redocly/clidev dependencies