Skip to content

Dependency Review fails every PR when the Dependency graph is disabled: a repository setting no commit can fix #112

Closed

Description

@konard

Problem

In a repository generated from the template whose Dependency graph is switched off, Security / Dependency Review fails on every pull request. The graph is off by default for private repositories, and it is off in the public konard/medical-neural-network-ml. The error is Dependency review is not supported on this repository, and no commit can fix it. That is a false positive for the PR author: their change is fine, a repository setting is not.

Root cause

.github/workflows/security.yml L70-L88 calls actions/dependency-review-action@v5 unconditionally. The action needs the Dependency graph (docs).

Suggested fix

This is what konard/medical-neural-network-ml already does (scripts/check-dependency-graph.sh):

  1. Check the setting first. GET /repos/{owner}/{repo}/dependency-graph/sbom: only a definite 404 means "disabled".
  2. On pull requests, a disabled graph is a ::warning:: that names the setting, and the review step is skipped.
  3. On push to main and on the schedule, it fails with the exact setting to change:
Dependency graph is disabled for <owner>/<repo>, so dependency review cannot run. A repository admin must enable it: https://github.com/<owner>/<repo>/settings/security_analysis -> Dependency graph -> Enable.

So the PR stays green while main fails loudly with the human action, which is the pattern hive-mind best practice #17 asks for.

Found while comparing the files in konard/medical-neural-network-ml#5.

Activity

  1. konard commented on Oct 22, 2026

    @konard
    MemberAuthor

    A note for whoever fixes this with a probe in front of dependency-review-action: link-foundation/lfs did exactly that, and its first version treated every non-zero exit of gh api repos/$REPO/dependency-graph/compare/... as "disabled". A secondary rate limit (also HTTP 403), a 5xx or a network error was therefore reported as a disabled graph, and failed main with the wrong instructions (link-foundation/lfs#3). Only a plain (HTTP 403) that does not mention a rate limit means disabled. Retry everything else, and if it still fails report it as unknown (best-practices principle 17). The implementation and its tests, which drive a fake gh, are in link-foundation/lfs#4: scripts/check-dependency-graph.sh. The same issue is now also filed for the Rust and JS templates (link-foundation/rust-ai-driven-development-pipeline-template#207, link-foundation/js-ai-driven-development-pipeline-template#249).

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