|
1 | | -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
| 1 | +# SCF API |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +The [Secure Controls Framework](https://securecontrolsframework.com) is the best cross-framework control mapping out there. It's also trapped in spreadsheets. I use SCF as the backend for most of my control tooling, and I got tired of parsing `.xlsx` files every time I needed a lookup. |
4 | 4 |
|
5 | | -First, run the development server: |
| 5 | +So I built this: the entire SCF v2025.4 served as static JSON files on GitHub Pages. 1,451 controls across 33 families, with bidirectional crosswalk mappings to 15 frameworks (NIST 800-53, CMMC, FedRAMP, ISO 27001, HIPAA, GDPR, PCI DSS, CCPA, NIS2, and the rest). |
| 6 | + |
| 7 | +No server. No API keys. No rate limits. Just fetch the JSON files directly. |
| 8 | + |
| 9 | +## For AI Agents |
| 10 | + |
| 11 | +Hit `llms.txt` at the root of the site. It's a machine-readable index of every file path and what it contains. Your agent reads it once and knows how to navigate the entire dataset. That's the [llms.txt standard](https://llmstxt.org): agents self-discover what's available instead of you hand-wiring each call. |
| 12 | + |
| 13 | +## Files |
| 14 | + |
| 15 | +| Path | What it contains | |
| 16 | +|------|-----------------| |
| 17 | +| `api/summary.json` | Control counts, family breakdown, framework coverage, weight distribution | |
| 18 | +| `api/controls.json` | All 1,451 controls with crosswalk mappings to all 15 frameworks | |
| 19 | +| `api/controls/{ID}.json` | Single control (e.g., `GOV-01`, `CRY-05.3`) | |
| 20 | +| `api/families.json` | All 33 control families with counts | |
| 21 | +| `api/families/{CODE}.json` | Family detail with all its controls (e.g., `GOV`, `NET`) | |
| 22 | +| `api/crosswalks.json` | All 15 mapped frameworks with coverage stats | |
| 23 | +| `api/crosswalks/{FRAMEWORK}.json` | Full bidirectional crosswalk (e.g., `nist-800-53-r5`, `hipaa`) | |
| 24 | +| `llms.txt` | Machine-readable file index for agents | |
| 25 | + |
| 26 | +## Examples |
6 | 27 |
|
7 | 28 | ```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
14 | | -bun dev |
| 29 | +# Fetch the full controls dataset |
| 30 | +curl https://ethanolivertroy.github.io/scf-api/api/controls.json |
| 31 | + |
| 32 | +# Get a single control with all its crosswalk mappings |
| 33 | +curl https://ethanolivertroy.github.io/scf-api/api/controls/GOV-01.json |
| 34 | + |
| 35 | +# Get the NIST 800-53 crosswalk (both directions) |
| 36 | +curl https://ethanolivertroy.github.io/scf-api/api/crosswalks/nist-800-53-r5.json |
| 37 | + |
| 38 | +# Get all controls in the Network Security family |
| 39 | +curl https://ethanolivertroy.github.io/scf-api/api/families/NET.json |
15 | 40 | ``` |
16 | 41 |
|
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 42 | +## How it works |
18 | 43 |
|
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 44 | +No server, no database. A build script reads the source SCF JSON files, enriches each control with crosswalk mappings from all 15 frameworks, and generates static JSON files into `docs/`. GitHub Pages serves them directly. |
20 | 45 |
|
21 | | -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
| 46 | +Total output is ~8.7MB across 1,500+ files. An agent grabs `api/controls.json` (the full dataset), loads it into context, and works with it locally. Sub-second fetches, zero infrastructure. |
22 | 47 |
|
23 | | -## Learn More |
| 48 | +## Rebuilding |
24 | 49 |
|
25 | | -To learn more about Next.js, take a look at the following resources: |
| 50 | +```bash |
| 51 | +node scripts/build.mjs |
| 52 | +``` |
26 | 53 |
|
27 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 54 | +Regenerates everything in `docs/`. Commit and push to update the live site. |
29 | 55 |
|
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 56 | +## Note on CORS |
31 | 57 |
|
32 | | -## Deploy on Vercel |
| 58 | +GitHub Pages doesn't set CORS headers. CLI tools, MCP servers, and server-side code can fetch these files without issues. Browser-based JavaScript running on a different domain will get blocked. If you need browser access, deploy behind a proxy or use a CORS-friendly host. |
33 | 59 |
|
34 | | -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 60 | +## Data license |
35 | 61 |
|
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 62 | +SCF data is from [securecontrolsframework.com](https://securecontrolsframework.com), licensed under CC BY-ND. |
0 commit comments