Is it possible to create custom codeQL workflow for branch other than default branch may be dev?

Đang mở
#3,008 1 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ó
3/5
Thời gian dự kiến
1-2 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, python
Lĩnh vực
ci-cd, security

Hướng nghiên cứu

Bắt đầu với workflow CodeQL tùy chỉnh được nêu trong issue và xem xét các trigger push và pull_request của nó cho branch dev, sau đó kiểm tra lần chạy phân tích CodeQL và các kết quả code scanning thu được. Hoàn tất khi một push lên dev tạo ra một lần phân tích mà các phát hiện của nó xuất hiện trong phần code scanning của repository.

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

Mô tả

awaiting-response

Hello,

I have a GitHub Advanced Security license for my GitHub org, and it's applied to all repos. By default CodeQL scans for the default, i.e., the main branch, but before actually merging code to main, it goes to dev, and I would like to configure a custom CodeQL workflow for my dev branch. I did disable the default CodeQL and committed a custom CodeQL workflow in dev for push and pull_request events. It succeeded, but I am not able to see any results in the code scanning section under advanced security?

How can I ensure upon something is pushed to dev branch? CodeQL should run and log results in code scanning section
I am using below custom codeql workflow


on:
  push:
    branches: [ dev ]
  pull_request:
    branches: [ dev ]

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'python' ] # Change to your language

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v3
      with:
        languages: ${{ matrix.language }}

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v3```
      
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.