From 3195f2cec26b95fc9faa4972c3fe8dfc2bf60af1 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 19 Jul 2023 14:19:59 -0300 Subject: [PATCH 1/7] codeql --- .github/workflows/codeql.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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 00000000..056e4c6d --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,33 @@ +name: "CodeQL Scanning" +# https://github.com/github/codeql-action + +on: + push: + paths: + - "Makefile" + - "mongoose.c" + - "mongoose.h" + - test/unit-test + - test/mip-test + +jobs: + CodeQL-Build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + permissions: + security-events: write + steps: + - uses: actions/checkout@v3 + with: { fetch-depth: 2 } + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: cpp + - run: | + make test + make mip_test + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 From cdaf523aa8a1d86490069f37f2c3df9696243be4 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 19 Jul 2023 14:25:32 -0300 Subject: [PATCH 2/7] codeql --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 056e4c6d..bcce3b04 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -23,8 +23,8 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v2 - with: - languages: cpp + with: + languages: cpp - run: | make test make mip_test From 2d33c545b81ae240e7410c92704a093e742b4116 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 19 Jul 2023 14:27:23 -0300 Subject: [PATCH 3/7] codeql --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bcce3b04..959129b2 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,8 +26,8 @@ jobs: with: languages: cpp - run: | - make test - make mip_test + make test + make mip_test - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From eb0b1580d1a13183d8a895ea609b47751361daa7 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 19 Jul 2023 14:35:18 -0300 Subject: [PATCH 4/7] nits --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8f12d5d9..29377494 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ musl: WARN += -Wno-sign-conversion musl: CC = $(DOCKER) mdashnet/cc1 gcc musl: RUN = $(DOCKER) mdashnet/cc1 -# Make sure we can build from an unamalgamated sources +# Make sure we can build from unamalgamated sources unamalgamated: $(HDRS) Makefile test/packed_fs.c $(CC) src/*.c test/packed_fs.c test/unit_test.c $(CFLAGS) $(LDFLAGS) -g -o unit_test From fdf82e5d6ce2e70962fd9671d7855ba7489baccd Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 19 Jul 2023 15:10:28 -0300 Subject: [PATCH 5/7] codeql --- .github/workflows/codeql.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 959129b2..e83cd42f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -10,6 +10,8 @@ on: - test/unit-test - test/mip-test +env: + IPV6: 0 jobs: CodeQL-Build: runs-on: ubuntu-latest @@ -26,8 +28,8 @@ jobs: with: languages: cpp - run: | - make test - make mip_test + make test CC=gcc + ./test/setup_ga_network.sh && make mip_test CC=gcc - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 86fd18324b95a6ee22cd76427f8164656000357a Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 19 Jul 2023 16:14:44 -0300 Subject: [PATCH 6/7] codeql --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e83cd42f..09dcf3d3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -28,8 +28,8 @@ jobs: with: languages: cpp - run: | - make test CC=gcc - ./test/setup_ga_network.sh && make mip_test CC=gcc + make test CC=gcc ASAN= ASAN_OPTIONS= + ./test/setup_ga_network.sh && make mip_test CC=gcc ASAN= ASAN_OPTIONS= - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 85e60ed85812a7812c329403d609148ace9ed51e Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 19 Jul 2023 16:21:14 -0300 Subject: [PATCH 7/7] force run --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 29377494..ef51d690 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ musl: WARN += -Wno-sign-conversion musl: CC = $(DOCKER) mdashnet/cc1 gcc musl: RUN = $(DOCKER) mdashnet/cc1 -# Make sure we can build from unamalgamated sources +# Make sure we can build from unamalgamated sources. unamalgamated: $(HDRS) Makefile test/packed_fs.c $(CC) src/*.c test/packed_fs.c test/unit_test.c $(CFLAGS) $(LDFLAGS) -g -o unit_test