From a4308b19135bdadf339163f7e127c628d987a0fc Mon Sep 17 00:00:00 2001 From: PhiBo Date: Wed, 28 Apr 2021 15:11:23 +0200 Subject: Add CodeQL checks Add initial github actions to perform CodeQL securtiy checks --- .github/workflows/codeql-analysis.yml | 71 +++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml (limited to '.github/workflows') diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..9de367e5 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '15 18 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # 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 + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + - name: Install packages + run: | + sudo apt-get install -y --no-install-recommends m4 gettext automake autoconf make build-essential + sudo apt-get install -y --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev \ + libmysqlclient-dev libradcli-dev libkrb5-dev libdbi0-dev \ + libdbd-sqlite3 libssl-dev libcurl4-openssl-dev liburiparser-dev + + - name: Configure build + run: | + ./tools/setup + ./configure --enable-libtap + + - name: Build + run: | + make + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 -- cgit v1.2.3-74-g34f1 From 175e43133c9dbeb156e52b8e54cd04e44401f424 Mon Sep 17 00:00:00 2001 From: Lorenz <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 3 Jul 2022 15:57:55 +0200 Subject: Update CodeQL and update runner before installing (#1775) --- .github/workflows/codeql-analysis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9de367e5..afe6ab4f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -53,6 +53,7 @@ jobs: - name: Install packages run: | + sudo apt update sudo apt-get install -y --no-install-recommends m4 gettext automake autoconf make build-essential sudo apt-get install -y --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev \ libmysqlclient-dev libradcli-dev libkrb5-dev libdbi0-dev \ @@ -62,10 +63,10 @@ jobs: run: | ./tools/setup ./configure --enable-libtap - + - name: Build run: | make - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 -- cgit v1.2.3-74-g34f1 From f7f7309b99f9f0eb4176a4c7cb8e5991d23b5b74 Mon Sep 17 00:00:00 2001 From: Lorenz <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 6 Nov 2022 23:12:41 +0100 Subject: Update GitHub runner (#1810) * Update action/checkout to v3 * Format debian prepare script --- .github/prepare_debian.sh | 61 ++++++++++++++++++++++++++++++++++------------ .github/workflows/test.yml | 2 +- 2 files changed, 46 insertions(+), 17 deletions(-) (limited to '.github/workflows') diff --git a/.github/prepare_debian.sh b/.github/prepare_debian.sh index 4021c104..d8a76da6 100755 --- a/.github/prepare_debian.sh +++ b/.github/prepare_debian.sh @@ -11,21 +11,51 @@ if [ $(lsb_release -is) = "Debian" ]; then apt-add-repository non-free apt-get update fi -apt-get -y install perl autotools-dev libdbi-dev libldap2-dev libpq-dev libradcli-dev libnet-snmp-perl procps -apt-get -y install libdbi0-dev libdbd-sqlite3 libssl-dev dnsutils snmp-mibs-downloader libsnmp-perl snmpd -apt-get -y install fping snmp netcat-openbsd smbclient vsftpd apache2 ssl-cert postfix libhttp-daemon-ssl-perl -apt-get -y install libdbd-sybase-perl libnet-dns-perl -apt-get -y install slapd ldap-utils -apt-get -y install gcc make autoconf automake gettext -apt-get -y install faketime -apt-get -y install libmonitoring-plugin-perl -apt-get -y install libcurl4-openssl-dev -apt-get -y install liburiparser-dev -apt-get -y install squid -apt-get -y install openssh-server -apt-get -y install mariadb-server mariadb-client libmariadb-dev -apt-get -y install cron iputils-ping -apt-get -y install iproute2 +apt-get -y install perl \ + autotools-dev \ + libdbi-dev \ + libldap2-dev \ + libpq-dev \ + libradcli-dev \ + libnet-snmp-perl \ + procps \ + libdbi0-dev \ + libdbd-sqlite3 \ + libssl-dev \ + dnsutils \ + snmp-mibs-downloader \ + libsnmp-perl \ + snmpd \ + fping \ + snmp \ + netcat-openbsd \ + smbclient \ + vsftpd \ + apache2 \ + ssl-cert \ + postfix \ + libhttp-daemon-ssl-perl \ + libdbd-sybase-perl \ + libnet-dns-perl \ + slapd \ + ldap-utils \ + gcc \ + make \ + autoconf \ + automake \ + gettext \ + faketime \ + libmonitoring-plugin-perl \ + libcurl4-openssl-dev \ + liburiparser-dev \ + squid \ + openssh-server \ + mariadb-server \ + mariadb-client \ + libmariadb-dev \ + cron \ + iputils-ping \ + iproute2 # remove ipv6 interface from hosts if [ $(ip addr show | grep "inet6 ::1" | wc -l) -eq "0" ]; then @@ -37,7 +67,6 @@ ip addr show cat /etc/hosts - # apache a2enmod ssl a2ensite default-ssl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f93930a..d2785a41 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: #... steps: - name: Git clone repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 #- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate # uses: mxschmitt/action-tmate@v3 - name: Run the tests on ${{ matrix.distro }} -- cgit v1.2.3-74-g34f1 From 4a5ddd201119260028db6a4f27027d72aa9a160a Mon Sep 17 00:00:00 2001 From: Lorenz <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 7 Nov 2022 17:48:28 +0100 Subject: Check curl detect ipv6 (#1809) * If server_address is an IPv6 address surround it with brackets * If the message is too short, we should not have an underflow * Add simple conditional test case available if IPv6 is --- .github/workflows/test.yml | 2 +- plugins/check_curl.c | 22 ++++++++++++++++++---- plugins/t/check_curl.t | 39 ++++++++++++++++++++++++++++----------- 3 files changed, 47 insertions(+), 16 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2785a41..80d49f7e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: ${{ matrix.distro }} \ /bin/sh -c '${{ matrix.prepare }} && \ tools/setup && \ - ./configure --enable-libtap --with-ipv6=no && \ + ./configure --enable-libtap --with-ipv6=no && \ make && \ make test' docker container prune -f diff --git a/plugins/check_curl.c b/plugins/check_curl.c index a69854a8..2ad373c0 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c @@ -476,6 +476,18 @@ check_http (void) printf ("* curl CURLOPT_RESOLVE: %s\n", dnscache); } + // If server_address is an IPv6 address it must be surround by square brackets + struct in6_addr tmp_in_addr; + if (inet_pton(AF_INET6, server_address, &tmp_in_addr) == 1) { + char *new_server_address = malloc(strlen(server_address) + 3); + if (new_server_address == NULL) { + die(STATE_UNKNOWN, "HTTP UNKNOWN - Unable to allocate memory\n"); + } + snprintf(new_server_address, strlen(server_address)+3, "[%s]", server_address); + free(server_address); + server_address = new_server_address; + } + /* compose URL: use the address we want to connect to, set Host: header later */ snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s:%d%s", use_ssl ? "https" : "http", @@ -999,10 +1011,12 @@ GOT_FIRST_CERT: result = max_state_alt(get_status(total_time, thlds), result); /* Cut-off trailing characters */ - if(msg[strlen(msg)-2] == ',') - msg[strlen(msg)-2] = '\0'; - else - msg[strlen(msg)-3] = '\0'; + if (strlen(msg) >= 2) { + if(msg[strlen(msg)-2] == ',') + msg[strlen(msg)-2] = '\0'; + else + msg[strlen(msg)-3] = '\0'; + } /* TODO: separate _() msg and status code: die (result, "HTTP %s: %s\n", state_text(result), msg); */ die (result, "HTTP %s: %s %d %s%s%s - %d bytes in %.3f second response time %s|%s\n%s%s", diff --git a/plugins/t/check_curl.t b/plugins/t/check_curl.t index 693f4b25..eae98cc1 100644 --- a/plugins/t/check_curl.t +++ b/plugins/t/check_curl.t @@ -1,15 +1,22 @@ #! /usr/bin/perl -w -I .. # -# HyperText Transfer Protocol (HTTP) Test via check_http +# HyperText Transfer Protocol (HTTP) Test via check_curl # # use strict; use Test::More; use POSIX qw/mktime strftime/; -use NPTest; -plan tests => 57; +use vars qw($tests $has_ipv6); + +BEGIN { + use NPTest; + $has_ipv6 = NPTest::has_ipv6(); + $tests = $has_ipv6 ? 59 : 57; + plan tests => $tests; +} + my $successOutput = '/OK.*HTTP.*second/'; @@ -18,6 +25,7 @@ my $plugin = 'check_http'; $plugin = 'check_curl' if $0 =~ m/check_curl/mx; my $host_tcp_http = getTestParameter("NP_HOST_TCP_HTTP", "A host providing the HTTP Service (a web server)", "localhost"); +my $host_tcp_http_ipv6 = getTestParameter("NP_HOST_TCP_HTTP_IPV6", "An IPv6 address providing a HTTP Service (a web server)", "::1"); my $host_tls_http = getTestParameter("NP_HOST_TLS_HTTP", "A host providing the HTTPS Service (a tls web server)", "localhost"); my $host_tls_cert = getTestParameter("NP_HOST_TLS_CERT", "the common name of the certificate.", "localhost"); my $host_nonresponsive = getTestParameter("NP_HOST_NONRESPONSIVE", "The hostname of system not responsive to network requests", "10.0.0.1"); @@ -31,26 +39,35 @@ my $faketime = -x '/usr/bin/faketime' ? 1 : 0; $res = NPTest->testCmd( - "./$plugin $host_tcp_http -wt 300 -ct 600" - ); + "./$plugin $host_tcp_http -wt 300 -ct 600" + ); cmp_ok( $res->return_code, '==', 0, "Webserver $host_tcp_http responded" ); like( $res->output, $successOutput, "Output OK" ); +if ($has_ipv6) { + # Test for IPv6 formatting + $res = NPTest->testCmd( + "./$plugin -I $host_tcp_http_ipv6 -wt 300 -ct 600" + ); + cmp_ok( $res->return_code, '==', 0, "IPv6 URL formatting is working" ); + like( $res->output, $successOutput, "Output OK" ); +} + $res = NPTest->testCmd( - "./$plugin $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there' -k 'carl:frown'" - ); + "./$plugin $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there' -k 'carl:frown'" + ); like( $res->output, '/bob:there\r\ncarl:frown\r\n/', "Got headers with multiple -k options" ); $res = NPTest->testCmd( - "./$plugin $host_nonresponsive -wt 1 -ct 2 -t 3" - ); + "./$plugin $host_nonresponsive -wt 1 -ct 2 -t 3" + ); cmp_ok( $res->return_code, '==', 2, "Webserver $host_nonresponsive not responding" ); # was CRITICAL only, but both check_curl and check_http print HTTP CRITICAL (puzzle?!) like( $res->output, "/HTTP CRITICAL - Invalid HTTP response received from host on port 80: cURL returned 28 - Connection timed out after/", "Output OK"); $res = NPTest->testCmd( - "./$plugin $hostname_invalid -wt 1 -ct 2" - ); + "./$plugin $hostname_invalid -wt 1 -ct 2" + ); cmp_ok( $res->return_code, '==', 2, "Webserver $hostname_invalid not valid" ); # The first part of the message comes from the OS catalogue, so cannot check this. # On Debian, it is Name or service not known, on Darwin, it is No address associated with nodename -- cgit v1.2.3-74-g34f1 From de06e5832eb45ed0a23d4ad9f66d4faa51cb5371 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 17:49:31 +0100 Subject: Bump github/codeql-action from 1 to 2 (#1812) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index afe6ab4f..860c783c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -43,7 +43,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. -- cgit v1.2.3-74-g34f1 From 1bc6d81651c5b5fe865515d420fc2772f4997059 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 04:26:26 +0000 Subject: Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 860c783c..ab8bfaae 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL -- cgit v1.2.3-74-g34f1 From 41fb615f3de34c3b3a344e74fd9cc24936cd58a6 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 14 Apr 2023 15:01:48 +0000 Subject: CI: Adding Codespell (and Super Linter) --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80d49f7e..e825eb34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,9 +7,40 @@ on: pull_request: jobs: + codespell: + name: codespell + strategy: + fail-fast: false + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@master + with: + skip: "./.git,./.gitignore,./ABOUT-NLS,*.po,./gl,./po,./tools/squid.conf,./build-aux/ltmain.sh" + ignore_words_list: allright,gord,didi,hda,nd,alis,clen,scrit,ser,fot,te,parm,isnt,consol,oneliners + check_filenames: true + check_hidden: true +# super-linter: +# name: super-linter +# strategy: +# fail-fast: false +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Lint Code Base +# uses: github/super-linter@v5.0.0 +# env: +# DEFAULT_BRANCH: master +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # macos: # ... linux: + needs: + - codespell +# - super-linter runs-on: ubuntu-latest name: Running tests on ${{ matrix.distro }} strategy: -- cgit v1.2.3-74-g34f1 From 8cb3480b9bf24bf478c81745d49fbea779489872 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 15 May 2023 20:17:48 +0200 Subject: Run tests on PRs again --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e825eb34..5685003c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ on: branches: - '*' pull_request: + - '*' jobs: codespell: -- cgit v1.2.3-74-g34f1 From 22779b1b99fa1278a60e72a674846b12496754eb Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Jun 2023 15:51:56 +0200 Subject: Fix CI workflow syntax --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5685003c..88d5d661 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,8 +4,8 @@ on: push: branches: - '*' + # Run test for any PRs pull_request: - - '*' jobs: codespell: -- cgit v1.2.3-74-g34f1 From fbf0c9d208321cc2f9b9a1f166a8a582e41e53f8 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Jun 2023 15:37:20 +0200 Subject: Fix indentation --- .github/workflows/codeql-analysis.yml | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ab8bfaae..b56ac16d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,35 +38,35 @@ jobs: # 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 steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - - name: Install packages - run: | - sudo apt update - sudo apt-get install -y --no-install-recommends m4 gettext automake autoconf make build-essential - sudo apt-get install -y --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev \ - libmysqlclient-dev libradcli-dev libkrb5-dev libdbi0-dev \ - libdbd-sqlite3 libssl-dev libcurl4-openssl-dev liburiparser-dev + - name: Install packages + run: | + sudo apt update + sudo apt-get install -y --no-install-recommends m4 gettext automake autoconf make build-essential + sudo apt-get install -y --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev \ + libmysqlclient-dev libradcli-dev libkrb5-dev libdbi0-dev \ + libdbd-sqlite3 libssl-dev libcurl4-openssl-dev liburiparser-dev - - name: Configure build - run: | - ./tools/setup - ./configure --enable-libtap + - name: Configure build + run: | + ./tools/setup + ./configure --enable-libtap - - name: Build - run: | - make + - name: Build + run: | + make - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 -- cgit v1.2.3-74-g34f1 From 73d79c2982478d43e8c63dccc3e54421272e2cbd Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Jun 2023 15:38:14 +0200 Subject: Add missing document start --- .github/dependabot.yml | 1 + .github/workflows/codeql-analysis.yml | 1 + .github/workflows/test.yml | 1 + 3 files changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 282063c4..07073644 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,4 @@ +--- version: 2 updates: - package-ecosystem: github-actions diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b56ac16d..4fac7032 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,3 +1,4 @@ +--- # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88d5d661..306f21cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,3 +1,4 @@ +--- name: Test on: -- cgit v1.2.3-74-g34f1 From dee6b03307c599b0cf74bc7fa3714b1335156aed Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Jun 2023 15:40:02 +0200 Subject: Fix too many spaces inside brackets --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4fac7032..43b35d31 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,10 +14,10 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [master] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [master] schedule: - cron: '15 18 * * 0' @@ -33,7 +33,7 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'cpp' ] + language: ['cpp'] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # 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 -- cgit v1.2.3-74-g34f1 From 85c8210e58b1e9fd47d04f2d72145322cbd20353 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Jun 2023 18:08:38 +0200 Subject: Try to detect if there are translation updates via CI --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 306f21cf..9c84acc4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,6 +74,10 @@ jobs: /bin/sh -c '${{ matrix.prepare }} && \ tools/setup && \ ./configure --enable-libtap --with-ipv6=no && \ + set -x && \ + tmp_dir=$(mktemp -d -t test-XXXX) && cp -a po/ $tmp_dir/ && \ + cd po && make update-po && cd .. && \ + diff -Nur $tmp_dir/po/*.po po/*.po | tee -a /tmp/po.diff && diff -Nur $tmp_dir/po/*.pot po/*.pot | tee -a /tmp/po.diff && if [ $(wc -l /tmp/po.diff | cut -f 1 -d" ") -gt 0 ]; then echo "Error: Translations needs to be updated with make update-po!" && exit 1; fi && \ make && \ make test' docker container prune -f -- cgit v1.2.3-74-g34f1 From add465800bcc6651ade714e7c1c248f8246b7c64 Mon Sep 17 00:00:00 2001 From: Franz Schwartau Date: Mon, 4 Sep 2023 16:33:04 +0200 Subject: Use codespell-project/actions-codespell@v2 The current master version seems to introduce an issue, e. g. codespell Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_301f7ff6-2829-439a-bb1e-e3787b7d0b37/0567173d-ce48-4e72-bccb-2a410baeb2a3.tar.gz. return code: 2. https://github.com/monitoring-plugins/monitoring-plugins/actions/runs/6074675443 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c84acc4..5b9f1fcb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Codespell - uses: codespell-project/actions-codespell@master + uses: codespell-project/actions-codespell@v2 with: skip: "./.git,./.gitignore,./ABOUT-NLS,*.po,./gl,./po,./tools/squid.conf,./build-aux/ltmain.sh" ignore_words_list: allright,gord,didi,hda,nd,alis,clen,scrit,ser,fot,te,parm,isnt,consol,oneliners -- cgit v1.2.3-74-g34f1 From 743d41da0eb6452073b4a3f3f773704ae42356db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 04:33:25 +0000 Subject: Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/test.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 43b35d31..0317c8c0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -40,7 +40,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b9f1fcb..77b09f43 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Codespell uses: codespell-project/actions-codespell@v2 with: @@ -31,7 +31,7 @@ jobs: # runs-on: ubuntu-latest # steps: # - name: Checkout -# uses: actions/checkout@v3 +# uses: actions/checkout@v4 # - name: Lint Code Base # uses: github/super-linter@v5.0.0 # env: @@ -57,7 +57,7 @@ jobs: #... steps: - name: Git clone repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 #- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate # uses: mxschmitt/action-tmate@v3 - name: Run the tests on ${{ matrix.distro }} -- cgit v1.2.3-74-g34f1