Security review — 2026-11-08
Scope and tools
- cargo-deny 0.19.8 with the current RustSec database, all workspace features;
- Trivy 0.76.2: repository Cargo lockfiles, secret scanning, container configuration, and the actual built Spark/S3 images;
- GitHub workflow definitions for Rust CodeQL, dependency review, Trivy SARIF upload, and Dependabot updates. These definitions have not been run by GitHub.
SARIF and raw JSON results are local artifacts under target/security. The local script scripts/security/rust_advisories.py fails closed on scanner errors and on vulnerability/unsoundness advisories. Unmaintained/notice entries remain explicit warnings, not a blanket advisory-ID allowlist. Configuration recommendations are reported separately from known-vulnerability gates.
Rust result
After fixes: zero blocking RustSec findings with all features enabled. Trivy's repository dependency/secret scan also reports zero findings. Eight maintenance notices remain: astral-tokio-tar, bincode, fxhash, smartstring, unsafe-libyaml, zbus_names, zvariant, and zvariant_derive. An advisory database result is a point-in-time check, not proof of no unknown vulnerabilities.
Implemented changes:
- Upgrade the recipe library to nornir-build-thing 0.3 with provenance off. Removes the unused Git/SSH/RSA chain, including RUSTSEC-2023-0071.
- Upgrade lockfile selections for crypto-bigint, ctutils, rustls-webpki, Tokio, webpki roots/certificates, zstd/safe/sys, pulldown-cmark, and yanked dependencies where compatible updates exist.
- Update Cozo's fork to 0.7.7. Its transitive swapvec still pins vulnerable lz4_flex, so use the temporary, dependency-only swapvec patch documented in
vendor/swapvec-secure/SECURITY-PATCH.md(lz4_flex 0.14, miniz_oxide 0.8). - Gate the live FalkorDB integration test on its own feature, so the independent Cozo-only test configuration compiles and executes.
The root Cargo patch applies to repository builds only. A future published Cozo-enabled crate needs the upstream dependency fix before claiming the same result for downstream consumers.
Container baseline
The first stock SeaweedFS 4.52 image had four findings: zlib CVE-2026-4738, GO-2026-5932 in golang.org/x/crypto, and CVE-2026-78661 / CVE-2026-97045 in x/net. SeaweedFS.Containerfile rebuilds the pinned release commit with patched Go modules on a minimal runtime base.
The initial Spark 4.1.4 Ubuntu image plus Iceberg 1.12.0 had 2,886 finding occurrences (2,670 distinct advisory IDs), including its OS, JDK/libraries, and shaded copies. Updating only apt packages was not enough. patch-spark.py updates compatible direct JVM artifacts and records checksums; Containerfile moves the runtime to a current Java-only Alpine base and removes unused Python/R/examples and the separate Spark Connect client bundle. Shaded dependency findings require upstream rebuilds; replacing an external jar does not fix a vulnerable class shaded into another jar. Those findings must remain visible, and the image scan must still fail while they remain.
Final measured container result
| Image | Before | After | Remaining severity |
| SeaweedFS 4.52 | 4 | 0 | none |
| Spark 4.1.4 + Iceberg 1.12.0 | 2,886 | 50 | 25 high, 23 medium, 2 low |
Both final runtime OS scans have zero findings; Spark has no critical findings. The 50 Spark occurrences cover 33 distinct advisory IDs. This is a partial container remediation, not a CVE-free Spark image. No remaining advisory is suppressed, and the complete security script exits nonzero for this image. Exploitability/reachability has not been established by these scans.
Direct fixes also include JLine 3.30.15, LZ4 1.11.4, Parquet 1.18.1, and AWS SDK bundle 2.57.11. Hadoop AWS 3.4.3 additionally requires its declared analyticsaccelerator-s3 1.3.1 jar; a Spark SQL smoke test caught and verified this runtime dependency. /opt/spark/lab-dependency-patches.json records exact jar checksums. The remaining findings are in these upstream artifacts:
| Artifact | Finding occurrences |
hadoop-client-runtime-3.4.3.jar |
26 |
iceberg-spark-runtime.jar |
12 |
spark-core_2.13-4.1.4.jar |
5 |
parquet-jackson-1.18.1.jar |
4 |
spark-network-common_2.13-4.1.4.jar |
1 |
commons-lang-2.6.jar |
1 |
hive-exec-2.3.10-core.jar |
1 |
Most are dependencies embedded in shaded jars. These require patched upstream artifacts or separately maintained, rebuilt, and compatibility-tested shaded artifacts. The legacy Commons Lang and Hive findings also remain. Replacing classes or deleting package metadata solely to make the scanner green would not be a valid fix.
Scanned local image IDs:
localhost/knut-seaweedfs:4.52-patched:794104bd8ce96778d2e2e7a97ef97fd59d43bade6d9b3bfee4852be384141e47localhost/knut-iceberg-graphar:spark4.1.4-iceberg1.12-patched:ec3bc96de44d116a43fadd8d31609caec2ddd003221eb507b2cc0ebc0b585208
Reports: target/security/seaweedfs-patched.{json,sarif} and target/security/spark-patched.{json,sarif}. Running the combined script also produces reports named after the supplied image tags. The initial S3 build was converted to Docker metadata to retain the declared health check; lab.sh builds Docker-format images directly for subsequent runs.
Validation
- Generator and native reader tests pass, including deletes/upserts, dense GraphAr indices, empty graphs, and reading the real graph back from disk.
- The live Spark scenario reached 672 nodes / 552 edges after initial load, append, update, and delete. Stopped-reader insert/delete backlogs replay in order; an unchanged restart leaves
CURRENT.jsonunchanged. - The final patched Java-only Spark image reads and writes the retained S3 tables; the patched S3 image passes its health check and serves the reader.
- Cozo-only adapter tests, the vendored compression tests/doctests, and all recipe validation/parity tests pass. The existing Bifrost CLI with native S3 support compiles with the updated lockfile.
- The new Rust package passes formatting checks. A broader recipe-package format check reports pre-existing formatting differences in its library/tests; unrelated files were not reformatted.
- Container configuration scanning reports four pre-existing missing-healthcheck recommendations in older Containerfiles, separately from the vulnerability gate.
GitHub-like checks
.github/workflows/security.yml separates CodeQL source analysis, dependency review, vulnerability/secret scans, and builds/scans of both lab containers. Actions are pinned by SHA. Scheduled scans catch advisories disclosed after a code change. SARIF artifacts are preserved on failure and can populate GitHub's Security tab on a configured mirror. Fork pull requests do not receive an explicit privileged SARIF-upload step. No credentials are added to the repository.
The source is hosted on Gunnar. GitHub Code Scanning availability and any private-source access for Dependabot must be configured on the mirror; these files alone cannot activate that hosted service. Lockfile scans run without cloning the private GraphAr dependency. The standalone local scripts work without GitHub.
References: RustSec, CodeQL Rust support, GitHub SARIF support.