mirror of
https://github.com/nlohmann/json.git
synced 2026-07-09 03:55:09 +00:00
👪 fix security findings (#5245)
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -4,6 +4,8 @@ updates:
|
|||||||
directory: /
|
directory: /
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
groups:
|
groups:
|
||||||
codeql-action:
|
codeql-action:
|
||||||
patterns:
|
patterns:
|
||||||
@@ -13,23 +15,33 @@ updates:
|
|||||||
directory: /docs/mkdocs
|
directory: /docs/mkdocs
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /tools/astyle
|
directory: /tools/astyle
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /tools/generate_natvis
|
directory: /tools/generate_natvis
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /tools/serve_header
|
directory: /tools/serve_header
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /cmake/requirements
|
directory: /cmake/requirements
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ jobs:
|
|||||||
# SEMGREP_APP_TOKEN is still passed through so registry auth works if a
|
# SEMGREP_APP_TOKEN is still passed through so registry auth works if a
|
||||||
# token is ever added.
|
# token is ever added.
|
||||||
- name: Install Semgrep
|
- 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
|
# `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.
|
# is a safety net so the SARIF upload still runs if the scan itself errors.
|
||||||
|
|||||||
@@ -232,6 +232,9 @@ TEST_CASE("algorithms")
|
|||||||
// only the first four elements are expected to be sorted, the rest are
|
// only the first four elements are expected to be sorted, the rest are
|
||||||
// unspecified by the standard
|
// unspecified by the standard
|
||||||
const json expected({nullptr, false, true, 3});
|
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)));
|
CHECK(std::equal(j.begin(), j.begin() + 4, begin(expected)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user