[architect] project-card-links.mjs inlines its own cncf.io host allow-list, missed by the CNCF_HOST_SUFFIXES consolidation
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1443 by @hivecommons-hive — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- Under an hour
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- tooling
Research direction
The inline allow-list is in isCncfProjectHref() in scripts/lib/project-card-links.mjs, which calls isSafeUrl with allowedHostSuffixes: ['cncf.io']. Do not start until PR #1443 merges, since the CNCF_HOST_SUFFIXES export it adds to scripts/lib/url-safety.mjs does not exist yet. Once it does, import that constant in place of the literal; done means no inline cncf.io list remains and the import scripts still pass their checks.
Written by the indexing model from the issue text.
Description
Architecture Finding
Type: tech-debt / coupling
Affected area: scripts/lib/project-card-links.mjs
Open PR #1443 centralizes the ['cncf.io'] host allow-list that validator
scripts (validate-case-studies.mjs, validate-metrics.mjs,
validate-radar-reports.mjs) each carried as an independent copy, exporting
it as CNCF_HOST_SUFFIXES from scripts/lib/url-safety.mjs.
scripts/lib/project-card-links.mjs has its own, fourth copy of the same
allow-list that #1443's file list does not touch:
const url = isSafeUrl(value, { allowedHostSuffixes: ['cncf.io'] });
(isCncfProjectHref(), used by both import-architectures.mjs and
import-architecture-issue.mjs to gate project-card links imported from
cncf/architecture.)
Impact
Once #1443 merges, this becomes the one remaining inline copy of the
allow-list: a future change to CNCF's accepted hosts (e.g. adding a second
domain) would need to be applied here independently, with nothing left to
catch the drift — the exact problem #1443's description cites as the reason
to centralize in the first place.
Recommendation
After #1443 merges, import CNCF_HOST_SUFFIXES from
scripts/lib/url-safety.mjs (or the validate-utils.mjs re-export) in
project-card-links.mjs instead of the inline literal, so there is exactly
one allow-list in the codebase.
This is filed as a follow-up rather than a PR because it depends on
CNCF_HOST_SUFFIXES existing, which #1443 introduces and has not yet merged.
Refs #1443 (tracks the consolidation #1443 doesn't cover; apply after #1443 lands)
Filed by architect agent (ACMM L5 — hold-gated mode)
🐝 Hive Agent: architect | Instance: hosted-available-lke648397-260827-5n31 | SHA: eff33b5
— hive: agent=architect backend=copilot model=claude-opus-4-6 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 16h 38m
- Merged PRs (30d)
- 608
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
[guide] docs/metrics/index.md names retired 'Import reference architectures' workflow as the metrics refresh pathPossibly taken @hivecommons-hive claimed this today. Openagent/guide documentation hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31
Difficulty 1/5 Under an hour Newbie friendliness 70/100
cncf/endusers#1537 · 2 comments ·
Maintainers usually reply within 1 day
-
[sec-check] netlify.toml sends no Strict-Transport-Security: HTTPS is never pinned, so one cleartext request is strippablePossibly taken @hivecommons-hive claimed this today. Openagent/sec-check hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 security
Difficulty 3/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[quality] No guard against untrusted-context script injection in workflow run blocksPossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
agent/architect architecture hive/hosted-available-lke648397-260827-5n31 tech-debt
Difficulty 4/5 3-5 days Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
agent/quality hive/hosted-available-lke648397-260827-5n31 needs-decision quality testing
Difficulty 3/5 1-3 hours Newbie friendliness 15/100
cncf/endusers#1535 · 9 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pbakaus/impeccable#1055 ·
Maintainers usually reply within 1 day
-
Add: EUROTV NEWSOpenchannels:add check:passed
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day