onnx

Форк
0
/
codeql.yml 
92 строки · 3.5 Кб
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
  push:
16
    branches: [ "main", rel-* ]
17
  pull_request:
18
    # The branches below must be a subset of the branches above
19
    branches: [ "main", rel-* ]
20
  schedule:
21
    - cron: '33 6 * * 5'
22

23
permissions:  # set top-level default permissions as security best practice
24
  contents: read
25

26
concurrency:
27
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
28
  cancel-in-progress: true
29

30
jobs:
31
  analyze:
32
    name: Analyze
33
    runs-on: ubuntu-latest
34
    permissions:
35
      actions: read
36
      contents: read
37
      security-events: write
38

39
    strategy:
40
      fail-fast: false
41
      matrix:
42
        language: [ 'cpp', 'python' ]
43
        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
44
        # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
45

46
    steps:
47
    - name: Checkout repository
48
      uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
49
    - name: Set up Python
50
      uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
51
      with:
52
        python-version: '3.11'
53
    - name: Install dependencies
54
      run: |
55
        python -m pip install --upgrade pip
56

57
    # Initializes the CodeQL tools for scanning.
58
    - name: Initialize CodeQL
59
      uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
60
      with:
61
        languages: ${{ matrix.language }}
62
        queries: security-extended,security-and-quality
63
        # If you wish to specify custom queries, you can do so here or in a config file.
64
        # By default, queries listed here will override any specified in a config file.
65
        # Prefix the list here with "+" to use these queries and those in the config file.
66

67
        # 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
68
        config-file: ./.github/codeql/codeql-config.yml
69

70
    # Install onnx so that it is found by the linters
71
    - name: Install ONNX
72
      run: |
73
        source workflow_scripts/protobuf/build_protobuf_unix.sh $(nproc)
74
        python -m pip install --quiet -r requirements-release.txt
75
        git submodule update --init --recursive
76
        export ONNX_ML=1
77
        pip install .
78

79
    # ℹ️ Command-line programs to run using the OS shell.
80
    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
81

82
    #   If the Autobuild fails above, remove it and uncomment the following three lines.
83
    #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
84

85
    # - run: |
86
    #   echo "Run, Build Application using script"
87
    #   ./location_of_script_within_repo/buildscript.sh
88

89
    - name: Perform CodeQL Analysis
90
      uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
91
      with:
92
        category: "/language:${{matrix.language}}"
93

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.