|
| 1 | +name: CodeQL_AIO_Native_Larger_Runner_Example.yml |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: [ main ] |
| 5 | + |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + |
| 9 | +jobs: |
| 10 | + Example01_JavaScript: |
| 11 | + runs-on: GitHub_Jack_PowerRunner |
| 12 | + defaults: |
| 13 | + run: |
| 14 | + working-directory: /home/runner/work/CodeQL_containerizedApp/CodeQL_containerizedApp/Example01_JavaScript/ |
| 15 | + permissions: |
| 16 | + actions: read |
| 17 | + contents: read |
| 18 | + security-events: write |
| 19 | + |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + language: [javascript] |
| 24 | + |
| 25 | + steps: |
| 26 | + - name: Checkout repository |
| 27 | + uses: actions/checkout@v3 |
| 28 | + |
| 29 | + # Initializes the CodeQL tools for scanning. |
| 30 | + - name: Initialize CodeQL |
| 31 | + uses: github/codeql-action/init@v2 |
| 32 | + with: |
| 33 | + languages: |
| 34 | + ${{ matrix.language }} |
| 35 | + |
| 36 | + - name: Autobuild |
| 37 | + uses: github/codeql-action/autobuild@v2 |
| 38 | + |
| 39 | + - name: Perform CodeQL Analysis |
| 40 | + uses: github/codeql-action/analyze@v2 |
| 41 | + |
| 42 | + - name: Perform CodeQL Analysis |
| 43 | + uses: github/codeql-action/analyze@v2 |
| 44 | + |
| 45 | + Example02_Java: |
| 46 | + needs: Example01_JavaScript |
| 47 | + runs-on: GitHub_Jack_PowerRunner |
| 48 | + permissions: |
| 49 | + actions: read |
| 50 | + contents: read |
| 51 | + security-events: write |
| 52 | + |
| 53 | + strategy: |
| 54 | + fail-fast: false |
| 55 | + matrix: |
| 56 | + language: [Java] |
| 57 | + |
| 58 | + steps: |
| 59 | + - name: Checkout repository |
| 60 | + uses: actions/checkout@v3 |
| 61 | + |
| 62 | + - name: Install dependencies |
| 63 | + working-directory: /home/runner/work/CodeQL_containerizedApp/CodeQL_containerizedApp/Example02_Java/ |
| 64 | + run: | |
| 65 | + sudo apt-get install build-essential maven default-jdk cowsay netcat -y && \ |
| 66 | + sudo apt-get install -y openjdk-8-jdk && \ |
| 67 | + sudo update-alternatives --config javac |
| 68 | + |
| 69 | +
|
| 70 | + - name: Initialize CodeQL |
| 71 | + uses: github/codeql-action/init@v2 |
| 72 | + with: |
| 73 | + languages: ${{ matrix.language }} |
| 74 | + |
| 75 | + - name: Build with Maven |
| 76 | + working-directory: /home/runner/work/CodeQL_containerizedApp/CodeQL_containerizedApp/Example02_Java/ |
| 77 | + run: | |
| 78 | + mvn -B package --file pom.xml |
| 79 | +
|
| 80 | + - name: Perform CodeQL Analysis |
| 81 | + uses: github/codeql-action/analyze@v2 |
| 82 | + |
| 83 | + Example03_Csharp: |
| 84 | + needs: [Example01_JavaScript, Example02_Java] |
| 85 | + runs-on: windows-2022-16core |
| 86 | + permissions: |
| 87 | + actions: read |
| 88 | + contents: read |
| 89 | + security-events: write |
| 90 | + |
| 91 | + strategy: |
| 92 | + fail-fast: false |
| 93 | + matrix: |
| 94 | + language: [csharp] |
| 95 | + |
| 96 | + |
| 97 | + steps: |
| 98 | + - name: Checkout repository |
| 99 | + uses: actions/checkout@v3 |
| 100 | + |
| 101 | + - name: Initialize CodeQL |
| 102 | + uses: github/codeql-action/init@v2 |
| 103 | + with: |
| 104 | + languages: ${{ matrix.language }} |
| 105 | + |
| 106 | + - name: Setup .NET |
| 107 | + uses: actions/setup-dotnet@v3 |
| 108 | + with: |
| 109 | + dotnet-version: 7.0.x |
| 110 | + |
| 111 | + - name: Build with dotnet |
| 112 | + working-directory: D:\a\CodeQL_containerizedApp\CodeQL_containerizedApp\Example03_Csharp\WebGoatCore\ |
| 113 | + run: dotnet build WebGoatCore.csproj |
| 114 | + |
| 115 | + # - name: Autobuild |
| 116 | + # uses: github/codeql-action/autobuild@v2 |
| 117 | + |
| 118 | + - name: Perform CodeQL Analysis |
| 119 | + uses: github/codeql-action/analyze@v2 |
| 120 | + |
| 121 | + Example04_Python: |
| 122 | + needs: [Example01_JavaScript, Example02_Java, Example03_Csharp] |
| 123 | + runs-on: GitHub_Jack_PowerRunner |
| 124 | + permissions: |
| 125 | + actions: read |
| 126 | + contents: read |
| 127 | + security-events: write |
| 128 | + |
| 129 | + strategy: |
| 130 | + fail-fast: false |
| 131 | + matrix: |
| 132 | + language: [ 'python' ] |
| 133 | + |
| 134 | + steps: |
| 135 | + |
| 136 | + - name: Checkout repository |
| 137 | + uses: actions/checkout@v3 |
| 138 | + |
| 139 | + - name: Initialize CodeQL |
| 140 | + uses: github/codeql-action/init@v2 |
| 141 | + with: |
| 142 | + languages: ${{ matrix.language }} |
| 143 | + |
| 144 | + - name: Autobuild |
| 145 | + uses: github/codeql-action/autobuild@v2 |
| 146 | + |
| 147 | + - name: Perform CodeQL Analysis |
| 148 | + uses: github/codeql-action/analyze@v2 |
| 149 | + |
0 commit comments