fix(nightly): no chat model, and GitHub Actions by major version (#573) (#821)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 5m23s

This commit was merged in pull request #821.
This commit is contained in:
sharang committed 2026-11-04 08:29:03 +00:00
1 parent ac95126af2
commit e01d2146e9
13 files changed
+48 -33

No files matched your search

+6 -6
View File
@@ -63,14 +63,14 @@ jobs:
MONGODB_URI: mongodb://root:example@mongo:27017/?authSource=admin
MONGODB_DATABASE: nightly
PW_FEATURES: source_only
# Optional. Without an LLM the control judge stamps no control refs,
# which the report lists as advisory; it never fails the run.
# No chat model: LLM triage, code review and the control judge are
# off (LlmClient sends nothing without LITELLM_MODEL, #575). Their
# output never gates the run, and with the model on, ~600 calls of
# 11 s on average (p99 147 s) on the gateway prod also uses kept
# every scan past NIGHTLY_TIMEOUT_SECS from 2026-10-30 on (#573).
# Embeddings stay on: the gateway's embedding model.
LITELLM_URL: ${{ secrets.NIGHTLY_LITELLM_URL }}
LITELLM_API_KEY: ${{ secrets.NIGHTLY_LITELLM_API_KEY }}
# The models stage and prod run. Without them the agent asked for
# gpt-4o / text-embedding-3-small, which the gateway refuses (425
# failed requests a night until 2026-10-28).
LITELLM_MODEL: Qwen3.8-27B
LITELLM_EMBED_MODEL: bge-multilingual-gemma2
# Optional. The CODESYS CVE match queries NVD, which rate-limits
# unauthenticated clients; a key keeps those CVEs from going missing.
+24 -1
View File
@@ -514,7 +514,7 @@ async fn collect(agent: &Agent, target_id: &str, run: &Value) -> Collected {
"{}:{}@{}{in_image}",
text(e, "package_manager"),
text(e, "name"),
text(e, "version")
blessed_version(&text(e, "package_manager"), &text(e, "version"))
));
for v in e["known_vulnerabilities"].as_array().into_iter().flatten() {
snapshot.cves.insert(text(v, "id"));
@@ -590,6 +590,20 @@ async fn wait_for_runs(
done
}
/// The version a snapshot keeps of a component. A GitHub Action is named by
/// a moving tag (`actions/deploy-pages@v5`), which the scan resolves to the
/// release it points to today (`v5.0.1`): the snapshot keeps the major
/// version, so an upstream patch release does not break the baseline (#573).
/// A commit SHA has no dot and stays whole.
fn blessed_version(package_manager: &str, version: &str) -> String {
if package_manager == "github" {
if let Some((major, _)) = version.split_once('.') {
return major.to_string();
}
}
version.to_string()
}
fn baseline_path(root: &Path, key: &str) -> PathBuf {
root.join("fixtures/nightly/baselines")
.join(format!("{key}.json"))
@@ -770,6 +784,15 @@ mod unit {
items.iter().map(|s| s.to_string()).collect()
}
#[test]
fn a_github_action_keeps_its_major_version_only() {
assert_eq!(blessed_version("github", "v5.0.1"), "v5");
assert_eq!(blessed_version("github", "v1"), "v1");
let sha = "38a6d9b276ed434454900130cacc87d058d3ac62";
assert_eq!(blessed_version("github", sha), sha);
assert_eq!(blessed_version("cargo", "1.0.15"), "1.0.15");
}
#[test]
fn exact_sets_report_both_directions_and_at_least_sets_only_losses() {
let blessed = Snapshot {
@@ -20,7 +20,6 @@
"cves": [
"GHSA-29mw-wpgm-hmr9",
"GHSA-35jh-r3h4-6jhm",
"GHSA-f23m-r3pf-42rh",
"GHSA-p6mc-m468-83gw",
"GHSA-r5fr-rjxr-66jc",
"GHSA-vh95-rmgr-6w4m",
@@ -20,7 +20,6 @@
"cves": [
"GHSA-29mw-wpgm-hmr9",
"GHSA-35jh-r3h4-6jhm",
"GHSA-f23m-r3pf-42rh",
"GHSA-p6mc-m468-83gw",
"GHSA-r5fr-rjxr-66jc",
"GHSA-vh95-rmgr-6w4m",
@@ -4,14 +4,14 @@
"malware"
],
"sbom": [
"github:actions/checkout@v7.0.1",
"github:actions/configure-pages@v6.0.0",
"github:actions/deploy-pages@v5.0.0",
"github:actions/setup-python@v7.0.0",
"github:actions/upload-artifact@v7.0.1",
"github:actions/upload-pages-artifact@v5.0.0",
"github:zephyrproject-rtos/action-dco@v1.0.0",
"github:zephyrproject-rtos/action-zephyr-setup@v1.0.15",
"github:actions/checkout@v7",
"github:actions/configure-pages@v6",
"github:actions/deploy-pages@v5",
"github:actions/setup-python@v7",
"github:actions/upload-artifact@v7",
"github:actions/upload-pages-artifact@v5",
"github:zephyrproject-rtos/action-dco@v1",
"github:zephyrproject-rtos/action-zephyr-setup@v1",
"library:cmsis_6@",
"library:hal_nordic@",
"library:hal_stm32@",
@@ -4,14 +4,14 @@
"malware"
],
"sbom": [
"github:actions/checkout@v7.0.1",
"github:actions/configure-pages@v6.0.0",
"github:actions/deploy-pages@v5.0.0",
"github:actions/setup-python@v7.0.0",
"github:actions/upload-artifact@v7.0.1",
"github:actions/upload-pages-artifact@v5.0.0",
"github:zephyrproject-rtos/action-dco@v1.0.0",
"github:zephyrproject-rtos/action-zephyr-setup@v1.0.15",
"github:actions/checkout@v7",
"github:actions/configure-pages@v6",
"github:actions/deploy-pages@v5",
"github:actions/setup-python@v7",
"github:actions/upload-artifact@v7",
"github:actions/upload-pages-artifact@v5",
"github:zephyrproject-rtos/action-dco@v1",
"github:zephyrproject-rtos/action-zephyr-setup@v1",
"library:cmsis_6@",
"library:hal_nordic@",
"library:hal_stm32@",
-1
View File
@@ -26,7 +26,6 @@
"GHSA-7q8q-rj6j-mhjq",
"GHSA-898c-q2cr-xwhg",
"GHSA-cph5-m8f7-6c5x",
"GHSA-f23m-r3pf-42rh",
"GHSA-fvcv-3m26-pcqx",
"GHSA-hfxv-24rg-xrqf",
"GHSA-j5f8-grm9-p9fc",
@@ -27,7 +27,6 @@
"GHSA-7q8q-rj6j-mhjq",
"GHSA-898c-q2cr-xwhg",
"GHSA-cph5-m8f7-6c5x",
"GHSA-f23m-r3pf-42rh",
"GHSA-fvcv-3m26-pcqx",
"GHSA-hfxv-24rg-xrqf",
"GHSA-j5f8-grm9-p9fc",
-1
View File
@@ -26,7 +26,6 @@
"GHSA-7q8q-rj6j-mhjq",
"GHSA-898c-q2cr-xwhg",
"GHSA-cph5-m8f7-6c5x",
"GHSA-f23m-r3pf-42rh",
"GHSA-fvcv-3m26-pcqx",
"GHSA-hfxv-24rg-xrqf",
"GHSA-j5f8-grm9-p9fc",
@@ -26,7 +26,6 @@
"GHSA-7q8q-rj6j-mhjq",
"GHSA-898c-q2cr-xwhg",
"GHSA-cph5-m8f7-6c5x",
"GHSA-f23m-r3pf-42rh",
"GHSA-fvcv-3m26-pcqx",
"GHSA-hfxv-24rg-xrqf",
"GHSA-j5f8-grm9-p9fc",
@@ -26,7 +26,6 @@
"GHSA-7q8q-rj6j-mhjq",
"GHSA-898c-q2cr-xwhg",
"GHSA-cph5-m8f7-6c5x",
"GHSA-f23m-r3pf-42rh",
"GHSA-fvcv-3m26-pcqx",
"GHSA-hfxv-24rg-xrqf",
"GHSA-j5f8-grm9-p9fc",
@@ -13,8 +13,8 @@
"github:android-actions/setup-android@v3",
"github:github/codeql-action/upload-sarif@v3",
"github:gradle/actions/setup-gradle@v4",
"github:jlumbroso/free-disk-space@v1.3.1",
"github:madrapps/jacoco-report@v1.7.1",
"github:jlumbroso/free-disk-space@v1",
"github:madrapps/jacoco-report@v1",
"github:reactivecircus/android-emulator-runner@v2",
"github:stefanzweifel/git-auto-commit-action@v5",
"maven:accompanist-permissions@0.37.0",
@@ -26,7 +26,6 @@
"GHSA-7q8q-rj6j-mhjq",
"GHSA-898c-q2cr-xwhg",
"GHSA-cph5-m8f7-6c5x",
"GHSA-f23m-r3pf-42rh",
"GHSA-fvcv-3m26-pcqx",
"GHSA-hfxv-24rg-xrqf",
"GHSA-j5f8-grm9-p9fc",