From 1648bbed3eefc3a8970100aaef8719f2d3355bbf Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Wed, 19 Jul 2023 13:33:08 -0700 Subject: [PATCH 1/2] Add CodeQL workflow --- .github/workflows/codeql.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..8b86494788 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,29 @@ +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + run-codeql: + name: Run CodeQL + runs-on: ubuntu-latest + permissions: + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: swift + + - name: Build + run: swift build + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file From 3b86d54724533b8a2fc11cd52f953d63d451a5a0 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Wed, 19 Jul 2023 17:13:51 -0700 Subject: [PATCH 2/2] Add CodeQL on macOS as well --- .github/workflows/codeql.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8b86494788..0609d19b3b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,8 +7,8 @@ on: branches: [ "main" ] jobs: - run-codeql: - name: Run CodeQL + run-codeql-linux: + name: Run CodeQL on Linux runs-on: ubuntu-latest permissions: security-events: write @@ -25,5 +25,26 @@ jobs: - name: Build run: swift build + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + + run-codeql-macos: + name: Run CodeQL on MacOS + runs-on: macos-latest + permissions: + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: swift + + - name: Build + run: swift build + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 \ No newline at end of file