github.com/0chain/gosdk@v1.17.11/.github/workflows/codeql-analysis.yml (about)

     1  # For most projects, this workflow file will not need changing; you simply need
     2  # to commit it to your repository.
     3  #
     4  # You may wish to alter this file to override the set of languages analyzed,
     5  # or to provide custom queries or build logic.
     6  #
     7  # ******** NOTE ********
     8  # We have attempted to detect the languages in your repository. Please check
     9  # the `language` matrix defined below to confirm you have the correct set of
    10  # supported CodeQL languages.
    11  #
    12  name: "CodeQL"
    13  
    14  on:
    15    schedule:
    16      - cron: '0 8 * * 5'
    17  
    18  jobs:
    19    analyze:
    20      name: Analyze
    21      runs-on: [self-hosted, build]
    22      permissions:
    23        actions: read
    24        contents: read
    25        security-events: write
    26  
    27      strategy:
    28        fail-fast: false
    29        matrix:
    30          language: [ 'go' ]
    31  
    32  
    33      steps:
    34      - name: Set up Go 1.x
    35        uses: actions/setup-go@v3
    36        with:
    37          go-version: ^1.20
    38          
    39      - name: Checkout repository
    40        uses: actions/checkout@v3
    41  
    42      # Initializes the CodeQL tools for scanning.
    43      - name: Initialize CodeQL
    44        uses: github/codeql-action/init@v2
    45        with:
    46          languages: ${{ matrix.language }}
    47          # If you wish to specify custom queries, you can do so here or in a config file.
    48          # By default, queries listed here will override any specified in a config file.
    49          # Prefix the list here with "+" to use these queries and those in the config file.
    50          
    51          # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
    52          # queries: security-extended,security-and-quality
    53  
    54          
    55      # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    56      # If this step fails, then you should remove it and run the build manually (see below)
    57      - name: Autobuild
    58        uses: github/codeql-action/autobuild@v2
    59  
    60      # â„šī¸ Command-line programs to run using the OS shell.
    61      # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
    62  
    63      #   If the Autobuild fails above, remove it and uncomment the following three lines. 
    64      #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
    65  
    66      # - run: |
    67      #   echo "Run, Build Application using script"
    68      #   ./location_of_script_within_repo/buildscript.sh
    69  
    70      - name: Perform CodeQL Analysis
    71        uses: github/codeql-action/analyze@v2
    72        with:
    73          category: "/language:${{matrix.language}}"