github.com/bytedance/gopkg@v0.0.0-20240514070511-01b2cbcf35e1/.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 push: 16 branches: [ develop, main ] 17 paths-ignore: 18 - '**.md' 19 pull_request: 20 # The branches below must be a subset of the branches above 21 branches: [ develop ] 22 paths-ignore: 23 - '**.md' 24 schedule: 25 - cron: '35 21 * * 4' 26 27 jobs: 28 analyze: 29 name: Analyze 30 runs-on: self-hosted 31 permissions: 32 actions: read 33 contents: read 34 security-events: write 35 36 strategy: 37 fail-fast: false 38 matrix: 39 language: [ 'go' ] 40 # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 41 # Learn more: 42 # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 43 44 steps: 45 - name: Checkout repository 46 uses: actions/checkout@v2 47 48 - name: Set up Go 49 uses: actions/setup-go@v2 50 with: 51 go-version: 1.15 52 53 - uses: actions/cache@v2 54 with: 55 path: ~/go/pkg/mod 56 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 57 restore-keys: | 58 ${{ runner.os }}-go- 59 60 # Initializes the CodeQL tools for scanning. 61 - name: Initialize CodeQL 62 uses: github/codeql-action/init@v1 63 with: 64 languages: ${{ matrix.language }} 65 # If you wish to specify custom queries, you can do so here or in a config file. 66 # By default, queries listed here will override any specified in a config file. 67 # Prefix the list here with "+" to use these queries and those in the config file. 68 # queries: ./path/to/local/query, your-org/your-repo/queries@main 69 70 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 71 # If this step fails, then you should remove it and run the build manually (see below) 72 - name: Autobuild 73 uses: github/codeql-action/autobuild@v1 74 75 # âšī¸ Command-line programs to run using the OS shell. 76 # đ https://git.io/JvXDl 77 78 # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines 79 # and modify them (or add more) to build your code if your project 80 # uses a compiled language 81 82 #- run: | 83 # make bootstrap 84 # make release 85 86 - name: Perform CodeQL Analysis 87 uses: github/codeql-action/analyze@v1