diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4e80b8873..ef1432591 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,8 @@ updates: directory: / schedule: interval: daily + cooldown: + default-days: 7 groups: codeql-action: patterns: @@ -13,23 +15,33 @@ updates: directory: /docs/mkdocs schedule: interval: daily + cooldown: + default-days: 7 - package-ecosystem: pip directory: /tools/astyle schedule: interval: daily + cooldown: + default-days: 7 - package-ecosystem: pip directory: /tools/generate_natvis schedule: interval: daily + cooldown: + default-days: 7 - package-ecosystem: pip directory: /tools/serve_header schedule: interval: daily + cooldown: + default-days: 7 - package-ecosystem: pip directory: /cmake/requirements schedule: interval: daily + cooldown: + default-days: 7 diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 223645664..35ea5f694 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -49,7 +49,7 @@ jobs: # SEMGREP_APP_TOKEN is still passed through so registry auth works if a # token is ever added. - name: Install Semgrep - run: python3 -m pip install --user semgrep + run: python3 -m pip install --user semgrep==1.168.0 # `semgrep scan --sarif` always exits 0 even with findings; continue-on-error # is a safety net so the SARIF upload still runs if the scan itself errors. diff --git a/tests/src/unit-algorithms.cpp b/tests/src/unit-algorithms.cpp index a5d99eea0..90d6a08c7 100644 --- a/tests/src/unit-algorithms.cpp +++ b/tests/src/unit-algorithms.cpp @@ -232,6 +232,9 @@ TEST_CASE("algorithms") // only the first four elements are expected to be sorted, the rest are // unspecified by the standard const json expected({nullptr, false, true, 3}); + // std::equal below only bounds-checks the first range; assert the + // second range is at least as long to rule out an over-read (CWE-126) + CHECK(std::distance(begin(expected), end(expected)) >= 4); CHECK(std::equal(j.begin(), j.begin() + 4, begin(expected))); } }