|
29 | 29 |
|
30 | 30 | permissions: |
31 | 31 | contents: read |
| 32 | + security-events: write |
32 | 33 |
|
33 | 34 | # Cancel running jobs when a new push happens to the same branch as otherwise it will |
34 | 35 | # tie up too many resources without providing much value. |
@@ -38,10 +39,6 @@ concurrency: |
38 | 39 |
|
39 | 40 | jobs: |
40 | 41 | analyze: |
41 | | - permissions: |
42 | | - actions: read # for github/codeql-action/init to get workflow details |
43 | | - contents: read # for actions/checkout to fetch code |
44 | | - security-events: write # for github/codeql-action/analyze to upload SARIF results |
45 | 42 | name: Analyze |
46 | 43 | runs-on: ubuntu-latest |
47 | 44 |
|
@@ -50,59 +47,40 @@ jobs: |
50 | 47 | matrix: |
51 | 48 | # Override automatic language detection by changing the below list |
52 | 49 | # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] |
53 | | - language: ['java', 'cpp' ] |
54 | | - # Learn more... |
55 | | - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
| 50 | + language: [ 'java', 'cpp' ] |
56 | 51 |
|
57 | 52 | steps: |
58 | | - - name: Checkout repository |
59 | | - uses: actions/checkout@v4 |
| 53 | + - name: Checkout repository |
| 54 | + uses: actions/checkout@v5 |
60 | 55 |
|
61 | | - # Cache .m2/repository |
62 | | - - name: Cache local Maven repository |
63 | | - uses: actions/cache@v4 |
64 | | - continue-on-error: true |
65 | | - with: |
66 | | - path: ~/.m2/repository |
67 | | - key: cache-maven-${{ hashFiles('**/pom.xml') }} |
68 | | - restore-keys: | |
69 | | - cache-maven-${{ hashFiles('**/pom.xml') }} |
70 | | - cache-maven- |
| 56 | + - name: Cache local Maven repository |
| 57 | + uses: actions/cache@v4 |
| 58 | + continue-on-error: true |
| 59 | + with: |
| 60 | + path: ~/.m2/repository |
| 61 | + key: cache-maven-${{ hashFiles('**/pom.xml') }} |
| 62 | + restore-keys: | |
| 63 | + cache-maven-${{ hashFiles('**/pom.xml') }} |
| 64 | + cache-maven- |
71 | 65 |
|
72 | | - # Initializes the CodeQL tools for scanning. |
73 | | - - name: Initialize CodeQL |
74 | | - uses: github/codeql-action/init@v2 |
75 | | - with: |
76 | | - languages: ${{ matrix.language }} |
77 | | - # If you wish to specify custom queries, you can do so here or in a config file. |
78 | | - # By default, queries listed here will override any specified in a config file. |
79 | | - # Prefix the list here with "+" to use these queries and those in the config file. |
80 | | - # queries: ./path/to/local/query, your-org/your-repo/queries@main |
| 66 | + - name: Setup Java |
| 67 | + uses: actions/setup-java@v5 |
| 68 | + with: |
| 69 | + distribution: 'zulu' |
| 70 | + java-version: '11' |
81 | 71 |
|
82 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
83 | | - # If this step fails, then you should remove it and run the build manually (see below) |
84 | | - # - name: Autobuild |
85 | | - # uses: github/codeql-action/autobuild@v2 |
| 72 | + - name: Initialize CodeQL |
| 73 | + uses: github/codeql-action/init@v3 |
| 74 | + with: |
| 75 | + tools: linked |
| 76 | + build-mode: manual |
| 77 | + languages: ${{ matrix.language }} |
86 | 78 |
|
87 | | - # ℹ️ Command-line programs to run using the OS shell. |
88 | | - # 📚 https://git.io/JvXDl |
| 79 | + - name: Install tools / libraries |
| 80 | + run: sudo apt-get update && sudo apt-get -y install autoconf automake libtool make tar cmake perl ninja-build git cargo |
89 | 81 |
|
90 | | - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
91 | | - # and modify them (or add more) to build your code if your project |
92 | | - # uses a compiled language |
93 | | - - uses: actions/setup-java@v4 |
94 | | - with: |
95 | | - distribution: 'zulu' |
96 | | - java-version: '11' # The JDK version to make available on the path. |
| 82 | + - name: Compile project |
| 83 | + run: ./mvnw -B -ntp clean package -DskipTests=true -DskipH3Spec=true |
97 | 84 |
|
98 | | - #- run: | |
99 | | - # make bootstrap |
100 | | - # make release |
101 | | - - name: Install tools / libraries |
102 | | - run: sudo apt-get update && sudo apt-get -y install autoconf automake libtool make tar cmake perl ninja-build git cargo |
103 | | - |
104 | | - - name: Compile project |
105 | | - run: ./mvnw -B -ntp clean package -DskipTests=true -DskipH3Spec=true |
106 | | - |
107 | | - - name: Perform CodeQL Analysis |
108 | | - uses: github/codeql-action/analyze@v2 |
| 85 | + - name: Perform CodeQL Analysis |
| 86 | + uses: github/codeql-action/analyze@v3 |