github / github/codeql

Unable to validate code scanning workflow: error: getWorkflow() failed

Ouverte
#18,279 8 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
CodeQL
Étoiles
10.1k
Forks
2.1k
Merge moyen
2 j 15 h
PR mergées (30 j)
141

Description

When I run my build it includes this step:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: source/my-app
queries: security-extended

I'm getting this warning:

> Initialize CodeQL
> Unable to validate code scanning workflow: error: getWorkflow() failed: Error: Expected to find a code scanning workflow file at /home/runner/work/My-Repo-Name/My-Repo-Name/.github/workflows/ci-build.yml, but no such file existed. This can happen if the currently running workflow checks out a branch that doesn't contain the corresponding workflow file.

But the repo isn't being checked out to the root of the directory, as explained in `source-root`. Is there any way of telling CodeQL to look in the subdirectory to find the workflow?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Inspect .github/workflows/ci-build.yml and the workflow invocation around github/codeql-action/init@v3; first reproduce the warning with source-root: source/my-app and the checked-out repository layout. Trace how the action locates and validates the workflow, then verify whether subdirectory lookup is supported and what behavior should be documented or tested.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github-actions
Domaine
ci-cd, security
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
32/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.