Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

HttpError: Not Found when attempting to reference private pack

Đang mở
#2,397 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, typescript
Lĩnh vực
ci-cd, security

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện workflow GitHub Actions với tham chiếu đến pack riêng tư và so sánh hành vi xác thực của nó với codeql package download companyname/python-queries --github-auth-stdin. Kiểm tra cách action init sử dụng token được cung cấp; hoàn tất khi workflow có thể phân giải pack riêng tư mà không gặp lỗi HttpError: Not Found.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
493
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/codeql-action

Tất cả issue của github/codeql-action

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.