HttpError: Not Found when attempting to reference private pack

Aperta
#2,397 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, typescript
Ambito
ci-cd, security

Direzione di ricerca

Inizia riproducendo il workflow GitHub Actions con il riferimento al pack privato e confronta il suo comportamento di autenticazione con codeql package download companyname/python-queries --github-auth-stdin. Verifica come l’azione init utilizza il token fornito; il lavoro è completato quando il workflow riesce a risolvere il pack privato senza l’errore HttpError: Not Found.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

We're trying to reference a private CodeQL pack when running init. When this runs in Github actions, we get HttpError: Not Found.

name: "SAST Scans"

on:
  push:
    branches: ["master", "main"]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: ["master", "main"]
  schedule:
    - cron: "0 */12 * * *"

jobs:
  codeql-analysis:
    name: code-scanning
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      packages: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: ["python", "javascript"]
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v3
        with:
          languages: ${{ matrix.language }}
          packs: companyname/python-queries
          token: ${{ secrets.CUSTOM_CODEQL_SCAN_GITHUB_TOKEN }}
          debug: true

      - name: Autobuild
        uses: github/codeql-action/autobuild@v3

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v3
        with:
          category: "/language:${{matrix.language}}"
  • I've verified that we can download the pack by using codeql package download companyname/python-queries --github-auth-stdin and supply the value of secrets.CUSTOM_CODEQL_SCAN_GITHUB_TOKEN.
  • I've verified that CUSTOM_CODEQL_SCAN_GITHUB_TOKEN exists as an organization secret.
  • I've verified that this repo has access to the published package in the organization settings.
  • I've verified that the codeql scan runs fine when I remove the custom package reference.

Is there anything I'm missing or is there a bug with the init script? I'm having trouble finding any documentation around referencing private packs for CodeQL Github actions.

Thank you.

Lingua principale
TypeScript
Stelle
1.6k
Fork
493
Merge medio
1g 13h
PR unite (30g)
44

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/codeql-action

Tutte le issue di github/codeql-action

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.