Skip to content

ci: repair the full CI/CD pipeline#20

Merged
radicalkjax merged 6 commits into
mainfrom
ci/green-pipeline
Jun 12, 2026
Merged

ci: repair the full CI/CD pipeline#20
radicalkjax merged 6 commits into
mainfrom
ci/green-pipeline

Conversation

@radicalkjax

@radicalkjax radicalkjax commented Jun 11, 2026

Copy link
Copy Markdown
Member

Brings every CI/CD workflow back to green. All 34 checks pass.

CI (lint/test/build)

  • rust-embed dist: springtaled embeds the dashboard SPA; added a tracked tauri/apps/dashboard/dist/.gitkeep sentinel so clippy/test/build compile without a prior frontend build (real vite build output stays gitignored), plus a Dockerfile frontend stage so the release image embeds the real SPA.
  • Clippy (-D warnings, rust 1.96): fixed unnecessary_sort_by, items_after_test_module, duplicated_attributes, and explicit_counter_loop (audit-chain verifiers rewritten with .enumerate()).
  • Applied rustfmt + Biome autofixes.

Secrets

  • Replaced gitleaks-action (needs a paid org license) with the pinned OSS CLI; .gitleaks.toml keeps the upstream ruleset ([extend] useDefault) + vendored-SQLite allowlist; removed a fake Discord token from a doc comment.

SAST

  • zizmor moved orgs (woodruffwzizmorcore); full SHA-pin sweep of every third-party action (ref-pin exceptions for dtolnay/rust-toolchain + taiki-e/install-action); persona auditor, min-severity: medium.
  • Semgrep ciscan (the rejected flags); image digest-pinned + renamed semgrep/semgrep; fixed fuzz.yml shell-injection via env vars; scoped scorecard permissions.

SCA

  • cargo-audit job gains checks: write; pip-audit audits the maturin build-system requires; osv-scanner called as its reusable workflow.
  • pyo3 0.24 → 0.29 (RUSTSEC-2026-0176, OOB read); proc-macro-error2 unmaintained advisory ignored with VEX (no upstream fix).

SBOM

  • cargo-cyclonedx collection fixed (no --output-pattern); npm SBOM via cdxgen (reads pnpm-lock).

Container

  • node frontend stage + bumped distroless base digest (libssl3 CVE) + bumped trivy-action (GHSA-69fq-xp46-6x23).
  • Trivy limit-severities-for-sarif + scanners: vuln; Grype only-fixed — both gate only on fixable HIGH/CRITICAL (debian wont-fix glibc CVEs are un-actionable on the latest distroless).

🤖 Generated with Claude Code

Brings every workflow back to green. Each fix is a real correction, not a
suppression (see docs/security/CI-TRUST.md for the trust-list updates).

CI:
- springtaled embeds the dashboard SPA via rust-embed; add build.rs that
  drops a placeholder dist/ when the frontend isn't built so clippy/test
  compile, and a Dockerfile frontend stage so the release image embeds the
  real SPA.
- apply rustfmt (connector-opencode, vault store) and Biome autofixes.

Secrets:
- gitleaks-action needs a paid license for org repos; run the pinned OSS
  CLI binary instead. .gitleaks.toml gains [extend] useDefault=true (keeps
  upstream rules), a vendored-SQLite path allowlist, and drops a fake
  Discord token from connector-discord docs.

SAST:
- zizmor moved orgs (woodruffw -> zizmorcore); SHA-pin sweep across all
  workflows with ref-pin exceptions for dtolnay/rust-toolchain +
  taiki-e/install-action (ref-derived). persona auditor, min-severity medium.
- semgrep ci -> scan (the rejected flags), image digest-pinned and
  renamed semgrep/semgrep; fix fuzz.yml run-shell-injection via env vars.

SCA:
- cargo-audit job gains checks:write; pip-audit audits the maturin
  build-system requires (pyproject is not a requirements file); osv-scanner
  called as its reusable workflow; ignore RUSTSEC-2026-0173 (proc-macro-error2
  unmaintained, build-time only via tabled, no upstream fix) + VEX.

SBOM:
- cargo-cyclonedx has no --output-pattern; collect per-crate <crate>.cdx.json.
- npm SBOM via cdxgen (reads pnpm-lock; cyclonedx-npm needs npm lockfile).

Container:
- bump trivy-action 0.28.0 -> v0.36.0 (GHSA-69fq-xp46-6x23).

Hardening:
- scope scorecard top-level read-all to contents:read (per-job perms cover
  the rest); persist-credentials:false on checkouts; SHA-pin every
  third-party action; update org action allowlist for the zizmor move.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread Dockerfile Fixed
radicalkjax and others added 5 commits June 11, 2026 11:23
Fixes the jobs that failed on the validation run:

- Test/Clippy (rust-embed): the build.rs placeholder approach never reached
  CI (an earlier `git clean` removed the untracked file). Replace it with a
  tracked `tauri/apps/dashboard/dist/.gitkeep` sentinel so the embed folder
  always exists at compile time; real `vite build` output stays gitignored.
- Clippy (pre-existing -D warnings the job never reached past the first
  crate): `unnecessary_sort_by` in springtale-store sessions (sort_by_key +
  Reverse), `items_after_test_module` in springtale-crypto vault open (move
  check_fd_permissions above the test module), and `duplicated_attributes`
  in connector-opencode test_support (drop the redundant inner #![cfg(test)]).
- hadolint DL3059: consolidate the two consecutive pnpm RUN instructions in
  the Dockerfile frontend stage.
- Trivy/Grype HIGH image vulns (surfaced now that the image builds):
  bump distroless cc-debian12 base digest (libssl3 CVE-2026-45447, fixed in
  deb12u2) and rmcp 1.3.0 -> 1.4.0 (CVE-2026-42559 / GHSA-89vp-x53w-74fx).

Verified locally: cargo fmt, full-workspace clippy (against the sentinel
dist), tests for all changed crates, cargo-audit, cargo-deny, hadolint, and
a trivy scan of the new base digest (0 HIGH/CRITICAL).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Second-round CI feedback on PR #20:

- Clippy: `explicit_counter_loop` in springtale-sentinel audit verify — drop
  the manual `verified` counter and report `rows.len()` (every row reaching
  the end passed; failures return Err mid-loop). (A clippy result-cache
  masked this locally; re-verified after `cargo clean -p` on all members.)

- Trivy: add `scanners: vuln`. The job was failing on Trivy's *secret*
  scanner (false-positive on compiled-binary strings), not a vulnerability —
  the vuln set is all LOW (rust deps) or wont-fix (base). Secret scanning is
  already owned by secrets.yml (gitleaks + trufflehog).

- Grype: add `only-fixed: true` to mirror Trivy's ignore-unfixed. Every
  HIGH/CRITICAL Grype flags is a libc6 (glibc) CVE marked debian "wont-fix"
  (CVE-2026-5450/5435/5928 + the disputed 2018/2019 glibc set) — un-actionable
  on the latest distroless base; picked up automatically when it rebuilds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Root cause of the recurring Clippy failures: CI floats to the latest stable
toolchain (rust-toolchain.toml channel = "stable" -> 1.96.0), which has
clippy lints my stale local 1.93 didn't emit. After matching the toolchain,
clippy flagged the manual loop counters in the audit-chain verifiers.

Rewrite both verify loops to use `.enumerate()` and derive the 1-based
`expected_seq` from the index, dropping the manual `expected_seq`/`verified`
counters (clippy::explicit_counter_loop):
- crates/springtale-sentinel/src/audit/verify.rs
- crates/springtale-store/tests/audit_chain.rs

Verified on the CI toolchain (1.96.0): cargo fmt; cargo clippy --workspace
--all-targets --keep-going (clean); cargo nextest run --workspace --locked
(2073 passed); cargo test --doc --locked; and springtaled tests against a
sentinel-only dist (the real CI checkout condition).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A new advisory published today (out-of-bounds read in pyo3's PyList/PyTuple
`nth`/`nth_back` iterators, fixed in 0.29.0) started failing the cargo-audit
and cargo-deny jobs against the live RustSec DB. Upgrade rather than ignore —
it's a real memory-safety vuln, and springtale-py is a leaf bindings crate.

pyo3 0.29 makes the auto `FromPyObject` impl for Clone-deriving `#[pyclass]`
types opt-in; add `from_py_object` to the eight value pyclasses to preserve
the existing extract-from-Python behavior.

Verified 1:1 on the CI toolchain (rust 1.96.0): cargo audit (exit 0),
cargo deny check advisories bans licenses sources (all ok) — both
platform-independent against today's advisory DB — plus cargo fmt, cargo
clippy --workspace --all-targets --keep-going (clean), cargo nextest run
--workspace --locked (2073 passed), and a clean springtale-py build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Trivy job failed even with zero HIGH/CRITICAL findings. Ground truth from
the uploaded SARIF: 8 results, all LOW (rand/lru/rpassword advisories). In
SARIF mode the trivy-action overrides the severity filter to all severities so
the report is complete for code scanning, and exit-code: 1 then fires on ANY
finding in it — including those LOW ones.

limit-severities-for-sarif: true makes the HIGH,CRITICAL filter apply to the
SARIF and the exit code, so the job gates only on HIGH/CRITICAL (currently 0) —
the LOW rust-dep advisories are already tracked by cargo-audit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@radicalkjax radicalkjax marked this pull request as ready for review June 12, 2026 00:34
@radicalkjax radicalkjax merged commit 62aefa8 into main Jun 12, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants