Skip to content

URL Checker CI is broken - using deprecated action that silently passes #3334

Closed

Description

@tghosth

Problem

The URL Checker workflow is broken in two ways:

  1. The gaurav-nelson/github-action-markdown-link-check action is deprecated — the repo is explicitly marked as deprecated and points to tcort/github-action-markdown-link-check as its successor.

  2. The successor action has a known bug (tcort/markdown-link-check#553, tcort/github-action-markdown-link-check#6) where markdown-link-check silently fails inside the Docker container, reporting all links as good without actually checking anything.

Additionally, the check-modified-files-only mode used for PRs has never worked correctly due to shallow clone (fetch-depth: 1) preventing git diff from finding changed files.

Impact

  • On push to master: the old action still works (using markdown-link-check@3.8.7), but this will stop receiving updates
  • On pull_request: the modified-files check silently checks zero files and always passes — broken links are not caught until they reach master

Fix

PR #3332 replaces the Docker-based action with a direct installation and invocation of markdown-link-check@3.14.2 on the runner, which works correctly. It also fixes PR-level detection by using fetch-depth: 0.

Activity

  1. tghosth commented on Feb 19, 2026

    @tghosth
    CollaboratorAuthor

    Security Review of tcort/markdown-link-check Dependency Chain

    Before adopting markdown-link-check@3.14.2 (and the associated GitHub Action), a security review was performed on the package and its tcort-maintained dependencies. The review covers the npm packages that would run in our CI environment.

    Summary

    Package Version Published Size Install Hooks process.env Access eval()/child_process Network Calls npm ↔ GitHub Match
    markdown-link-check 3.14.2 42.2 KB (5 files) None 1 (legitimate, documented) None Link checking only ✅ Verified
    link-check 5.5.1 19.1 KB (8 files) None None None Link checking only ✅ Verified
    markdown-link-extractor 4.0.3 ~2 KB (1 file) None None None None ✅ Verified
    html-link-extractor 1.0.5 ~2 KB (1 file) None None None None ✅ Verified

    Verdict: No signs of malicious code or supply chain compromise in any package.

    All packages are maintained by Thomas Cort (tcort), who has had a GitHub account since 2010, is the original author of markdown-link-check (created 2016, 685 stars), and is the sole npm publisher for all four packages.

    markdown-link-check@3.14.2 (top-level package)

    • Published files: index.js (8.7 KB), markdown-link-check CLI (19.5 KB), package.json, LICENSE.md, README.md
    • No install hooks — only pretest and test scripts, which do not run on npm install
    • process.env access: One instance in index.js (~line 34). This powers the documented {{env.VAR_NAME}} replacement feature for templating environment variables into HTTP headers/URL patterns (e.g., auth tokens). The variable name is restricted by regex /[a-zA-Z0-9\-_]+/ and values are only used locally in string replacements. Not exfiltrated anywhere.
    • No eval(), Function(), child_process, base64, obfuscated code, or unexpected network calls
    • Runtime dependencies: async, chalk, commander, link-check, markdown-link-extractor, needle, progress, proxy-agent, xmlbuilder2 — all well-known, widely-used packages
    • npm tarball SHA256 verified as byte-for-byte match with GitHub source at v3.14.2 tag

    link-check@5.5.1

    Every line of all 8 published JS files was read and analysed:

    • index.js (32 lines) — dispatches to protocol-specific handlers
    • lib/BlackHole.js (14 lines) — Writable stream that discards data
    • lib/LinkCheckResult.js (14 lines) — simple data class
    • lib/proto/hash.js (10 lines) — anchor link checker, pure logic
    • lib/proto/file.js (21 lines) — file:// URL checker using fs.access()
    • lib/proto/http.js (124 lines) — HTTP HEAD/GET requests via needle, with retry logic for 429s
    • lib/proto/https.js (3 lines) — re-exports ./http
    • lib/proto/mailto.js (35 lines) — email validation via MX lookup

    Comprehensive grep for dangerous patterns across all files:

    Pattern Matches
    process.env 0
    child_process / exec / spawn 0
    eval( / Function( 0
    base64 / Buffer.from / atob / btoa 0
    crypto (mining) / WebSocket / net.connect 0
    • Dependencies: needle, ms, proxy-agent, node-email-verifier, is-relative-url (declared but unused — minor hygiene issue). All well-known packages.
    • npm tarball verified as matching GitHub source at v5.5.1 tag

    markdown-link-extractor@4.0.3

    The entire package logic is 13 lines of code in index.js:

    const { marked } = require('marked');
    const htmlLinkExtractor = require('html-link-extractor');
    
    module.exports = function markdownLinkExtractor(markdown, extended = false) {
        marked.setOptions({ mangle: false });
        const html = marked(markdown);
        const links = htmlLinkExtractor(html);
        return links;
    };
    • No install hooks, no process.env, no eval(), no child_process, no network calls, no obfuscation
    • Dependencies: marked (36k stars, the standard Node.js markdown parser) and html-link-extractor (also by tcort, reviewed below)
    • npm tarball verified as byte-for-byte match with GitHub source at v4.0.3 tag

    html-link-extractor@1.0.5

    36 lines of code. Uses cheerio to extract href/src attributes from HTML tags (a, img, iframe, video, audio, source, embed, track, area, link, input).

    • No install hooks, no process.env, no eval(), no child_process, no network calls, no obfuscation
    • Sole dependency: cheerio (the de-facto standard Node.js HTML parser)
    • npm tarball verified as matching GitHub source

    Residual risks and recommendations

    1. Mutable v1 tag on the GitHub Action: If using tcort/github-action-markdown-link-check, pin to a commit SHA rather than @v1 to prevent silent changes. (PR Replace deprecated URL checker action with direct invocation #3332 installs the npm package directly, avoiding this.)

    2. Single maintainer: tcort is the sole npm publisher for all four packages. This is a bus factor / account compromise risk, but there is no indication of compromise and this is standard for most GitHub Actions and npm packages.

    3. npm install at runtime: The action runs npm i -g markdown-link-check@3.14.2 at runtime. While the version is pinned, npm does not provide the same immutability guarantees as container image digests. No npm provenance attestations are published yet (tracked in ci: use OIDC NPM publishing tcort/markdown-link-check#544).

    4. Transitive dependencies not deeply audited: Direct dependencies of the tcort packages are all well-known (marked, cheerio, needle, proxy-agent, async, chalk, commander, etc.), but their own transitive dependency trees were not individually reviewed.

    5. Node.js base image: The Docker-based action uses node:21.7.3-alpine3.18 which is EOL (tracked in Fix wrong Node version tcort/github-action-markdown-link-check#5). This is a maintenance concern for the action, not directly relevant if installing the npm package directly as in PR Replace deprecated URL checker action with direct invocation #3332.


    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions