Skip to content

Conversation

@MikeMcC399
Copy link
Contributor

Description

In .github/workflows/markdown-link-check.yml

In markdown_link_check_config.json

Motivation and Context

The workflow .github/workflows/markdown-link-check.yml is sporadically failing with HTTP 403 Forbidden errors for:

See workflow logs

The httpHeaders config section is no longer needed. Link checking to https://docs.github.com works without it.

See also the community post https://github.com/orgs/community/discussions/174098 for background on https://www.npmjs.com/ heightened security.

Testing Details

On Ubuntu 24.04.3 LTS, with Node.js 22.20.0 LTS

npm install markdown-link-check@3.14.1 -g
find . -name "*.md"  ! -path "./.git/*" | xargs -n 1 markdown-link-check -c markdown_link_check_config.json

No dead links should be reported.

Also tested in GitHub Actions https://github.com/MikeMcC399/docker-node/actions/workflows/markdown-link-check.yml

Example Output(if appropriate)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Oct 17, 2025

This PR addresses markdown-link-check CI failures in currently open PRs that make modifications to Markdown files (*.md), or add new Markdown files:

Copilot

This comment was marked as spam.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@MikeMcC399
Copy link
Contributor Author

Responding in part to comments in PR #2297:

The justification for excluding the following domains is found by examining recent failing GitHub workflow logs for https://github.com/nodejs/docker-node/actions/workflows/markdown-link-check.yml:

nodejs.org
www.npmjs.com
news.ycombinator.com

Note that the failing results vary according to the response from the remote domains, so multiple workflow logs need to be checked:

https://github.com/nodejs/docker-node/actions/runs/18569189662 shows:

[✖] http://nodejs.org → Status: 403
[✖] https://www.npmjs.com/ → Status: 403
[✖] https://nodejs.org/en/security/ → Status: 403

https://github.com/nodejs/docker-node/actions/runs/18611871299 shows:

[✖] https://www.npmjs.com/ → Status: 403
[✖] https://news.ycombinator.com/item?id=10782897 → Status: 403

For consistency, http://nodejs.org in the README document is updated to use the https protocol instead.

Other use of http could also be migrated, however I suggest to implement this in a separate PR, since it is not related to resolving 403 errors.

Similarly, the suggestion in #2297 to migrate from the npm package markdown-link-check to the GitHub Action tcort/github-action-markdown-link-check is not necessary to solve 403 errors. The action appears to be hardly used and does not track the npm package versions closely. Any migration should be a separate more detailed discussion.


If one of the maintainers would like to enable the workflows awaiting approval, I would expect them to pass.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 9d83122 into nodejs:main Oct 18, 2025
3 checks passed
@MikeMcC399 MikeMcC399 deleted the fix/markdown-link-checks branch October 18, 2025 12:52
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.

2 participants