Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#3,008 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, python
Domain
ci-cd, security

Research direction

Start with the custom CodeQL workflow shown in the issue and review its push and pull_request triggers for the dev branch, then inspect the resulting CodeQL analysis run and code scanning results. Done means a push to dev produces an analysis whose findings appear in the repository's code scanning section.

Written by the indexing model from the issue text.

Description

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```
      
Dominant language
TypeScript
Stars
1.6k
Forks
493
Avg merge
1d 13h
Merged PRs (30d)
44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/codeql-action

All issues in github/codeql-action

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.