|
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 | 1 | name: "CodeQL" |
13 | 2 |
|
14 | 3 | on: |
15 | 4 | push: |
16 | 5 | branches: [ terraform ] |
17 | 6 | pull_request: |
18 | | - # The branches below must be a subset of the branches above |
19 | 7 | branches: [ terraform ] |
20 | 8 | schedule: |
21 | 9 | - cron: '18 17 * * 6' |
22 | 10 |
|
23 | 11 | jobs: |
24 | | - fomrat: |
| 12 | + format: |
25 | 13 | name: Format |
26 | 14 | runs-on: ubuntu-latest |
27 | 15 | steps: |
28 | | - - name: Checkout |
29 | | - uses: actions/checkout@v4 |
30 | | - - name: Setup Terraform |
31 | | - uses: hashicorp/setup-terraform@v2 |
32 | | - with: |
33 | | - terraform_version: '1.10.3' |
34 | | - - name: Format Terraform |
35 | | - run: cd terraform && make check-fmt |
| 16 | + - name: Checkout |
| 17 | + uses: actions/checkout@v4 |
| 18 | + - name: Setup Terraform |
| 19 | + uses: hashicorp/setup-terraform@v2 |
| 20 | + with: |
| 21 | + terraform_version: '1.10.3' |
| 22 | + - name: Format Terraform |
| 23 | + run: cd terraform && make check-fmt |
36 | 24 |
|
37 | 25 | analyze: |
38 | 26 | name: Analyze |
39 | 27 | runs-on: ubuntu-latest |
| 28 | + permissions: |
| 29 | + security-events: write |
| 30 | + actions: read |
| 31 | + contents: read |
40 | 32 |
|
41 | 33 | strategy: |
42 | 34 | fail-fast: false |
43 | 35 | matrix: |
44 | | - language: [ 'go', 'java', 'python' ] |
45 | | - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] |
46 | | - # Learn more: |
47 | | - # 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 |
| 36 | + language: [ 'java' ] |
48 | 37 |
|
49 | 38 | steps: |
50 | | - - name: Checkout repository |
51 | | - uses: actions/checkout@v4 |
52 | | - |
53 | | - # Initializes the CodeQL tools for scanning. |
54 | | - - name: Initialize CodeQL |
55 | | - uses: github/codeql-action/init@v3 |
56 | | - with: |
57 | | - languages: ${{ matrix.language }} |
58 | | - # If you wish to specify custom queries, you can do so here or in a config file. |
59 | | - # By default, queries listed here will override any specified in a config file. |
60 | | - # Prefix the list here with "+" to use these queries and those in the config file. |
61 | | - # queries: ./path/to/local/query, your-org/your-repo/queries@main |
62 | | - |
63 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
64 | | - # If this step fails, then you should remove it and run the build manually (see below) |
65 | | - - name: Autobuild |
66 | | - if: matrix.language != 'java' |
67 | | - uses: github/codeql-action/autobuild@v3 |
68 | | - |
69 | | - # ℹ️ Command-line programs to run using the OS shell. |
70 | | - # 📚 https://git.io/JvXDl |
71 | | - |
72 | | - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
73 | | - # and modify them (or add more) to build your code if your project |
74 | | - # uses a compiled language |
75 | | - |
76 | | - - run: | |
77 | | - ./gradlew build |
78 | | - if: matrix.language == 'java' |
79 | | - |
80 | | - - name: Perform CodeQL Analysis |
81 | | - uses: github/codeql-action/analyze@v3 |
| 39 | + - name: Checkout repository |
| 40 | + uses: actions/checkout@v4 |
| 41 | + |
| 42 | + - name: Setup Java |
| 43 | + uses: actions/setup-java@v3 |
| 44 | + with: |
| 45 | + distribution: 'temurin' |
| 46 | + java-version: '11' |
| 47 | + |
| 48 | + - name: Initialize CodeQL |
| 49 | + uses: github/codeql-action/init@v3 |
| 50 | + with: |
| 51 | + languages: ${{ matrix.language }} |
| 52 | + |
| 53 | + - name: Build Java |
| 54 | + run: | |
| 55 | + ./gradlew build |
| 56 | +
|
| 57 | + - name: Perform CodeQL Analysis |
| 58 | + uses: github/codeql-action/analyze@v3 |
0 commit comments