Skip to content

Promote integration to main: fix the 44 dead fork links - #66

Merged
rocklambros merged 1 commit into
mainfrom
integration
Sep 10, 2026
Merged

Promote integration to main: fix the 44 dead fork links#66
rocklambros merged 1 commit into
mainfrom
integration

Conversation

@rocklambros

Copy link
Copy Markdown
Contributor

Carries #65 to the publishing branch. 44 links in published spec prose currently return HTTP 404, and 25 of them are live on the hooks page right now. Merging this republishes the site with them pointing at each schema's own $id.

Merge with a merge commit, not a squash.

Fixes 44 dead links in published specification prose, and adds the guard
that would have caught them.

## The defect

Every link of the form
`https://github.com/afogel/ACS_official/blob/dev/specification/v0.1.0/...`
returns **HTTP 404**. The fork is public, but it has no `dev` branch. 25
of the 44 are live on the published hooks page right now.

They all arrived in one commit, `f46d260 "Integrate canonical v0.1.0
(#2)"`, the donation import. The links were self-referential when the
spec lived in that repo, the content moved to `GenAI-Security-Project`,
and the links did not. The `dev` branch was later removed, turning stale
links into broken ones.

Affected: `hooks.md` (25), `specification.md` (8), `inspect/README.md`
(3), `trace/events.md` (2), and one each in `extend_cyclonedx.md`,
`extend_spdx.md`, `extend_swid.md`, `extend_ocsf.md`,
`extend_opentelemetry.md`.

## The fix

Each file link now points at that schema's own `$id`. The mapping was
verified programmatically against `specification/v0.1.0/**/*.json`
before anything was rewritten: every linked path exists, and its `$id`
equals the replacement URL exactly. Those URLs return 200 and are
already re-checked every six hours by `monitor-pages.yml`.

That location is also durable in a way the old one was not. A
`blob/<branch>` URL rots when a branch is renamed. A schema `$id` is the
identity the specification already commits to.

One of the 44 is a directory browse link with no `$id`. It points at the
canonical repository tree instead.

## Why this was invisible

Three things, each individually reasonable:

- No link checker exists anywhere in CI.
- `mkdocs build --strict` validates internal references only, never
external URLs.
- `tests/conftest.py` deliberately exempts `("a", "href")` as
non-fetching, which is correct, because that guard protects against
resources a browser fetches rather than links a human clicks.

So the repository had strong guards against third-party asset injection
and none against dead links in its own normative prose.

## The guard

`tests/test_doc_links.py`, committed before the fix so the failure is in
the history.

- **Foreign repositories.** No file under `docs/` may link to a
`github.com` repository outside a three-entry allowlist: this
repository, plus `prowler-cloud/py-ocsf-models` and `ocsf/examples`,
which are legitimate OCSF references already present. Positive
allowlist, so a new foreign repository fails until someone adds it
deliberately.
- **Schema links stay canonical.** Every docs link into the published
schema namespace must resolve to a schema that exists under
`specification/` and whose `$id` equals that exact URL. This catches
drift in both directions, including a schema that gets moved or renamed.

## Verification

- Guard finds 44 violations before the fix, 0 after
- `uv run pytest`: 204 passed, 1 skipped
- `uv run mkdocs build --strict`: clean
- Five rewritten URLs fetched live: all 200
- No `afogel` reference remains anywhere in the repository

---------

Signed-off-by: rocklambros <rock@rockcyber.com>
@rocklambros
rocklambros merged commit 5fa8b96 into main Sep 10, 2026
3 checks passed
@rocklambros
rocklambros deleted the integration branch September 10, 2026 01:43
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