Skip to content

Fix 44 dead links to a personal fork in published spec prose - #65

Merged
rocklambros merged 2 commits into
integrationfrom
fix/dead-fork-links
Sep 10, 2026
Merged

Fix 44 dead links to a personal fork in published spec prose#65
rocklambros merged 2 commits into
integrationfrom
fix/dead-fork-links

Conversation

@rocklambros

Copy link
Copy Markdown
Contributor

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

No check in the repository verifies a doc link. mkdocs build --strict
validates internal references only, and tests/conftest.py deliberately
exempts anchor hrefs because that guard covers resources a browser
fetches, not links a human clicks. Together those left room for 44
links across 9 files under docs/spec/ to point at a maintainer's
personal fork that has no dev branch, all 404, 25 of them live on the
published Hooks page.

This guard fails closed with a positive allowlist of GitHub
repositories a doc may link to, so a new foreign repository fails
until someone adds it on purpose, and it checks that a link into the
published schema namespace still matches the schema's own $id. It
currently fails with the 44 real violations; the next commit fixes
the links.

Signed-off-by: rocklambros <rock@rockcyber.com>
The donation import (f46d260) carried in links that still pointed at
a maintainer's personal fork, github.com/afogel/ACS_official, on a
dev branch the fork does not have. Every one of the 44 links returned
HTTP 404, 25 of them on the published Hooks page.

43 file links now point at the schema's own published $id under
schema.genai-security-project.github.io, one path at a time, matching
the file the link names. The one directory link, to
specification/v0.1.0/hooks/ as a browse target, has no $id to carry,
so it now points at that directory in the canonical repository tree
instead. Visible link text is unchanged throughout.

Signed-off-by: rocklambros <rock@rockcyber.com>
@rocklambros
rocklambros merged commit 40412d8 into integration Sep 10, 2026
3 checks passed
@rocklambros
rocklambros deleted the fix/dead-fork-links branch September 10, 2026 01:41
bar-capsule added a commit to bar-capsule/ACS that referenced this pull request Sep 10, 2026
The dead-link sweep (GenAI-Security-Project#65) missed this one because the branch's edit to
the conformance bullet carried the old URL back in; the link guard
added by GenAI-Security-Project#68 caught it on the merge.

Signed-off-by: Bar Kaduri <bar@capsule.security>
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