Skip to content

Fix nightly CI runner and scanner setup - #71

Merged
kiwidream merged 1 commit into
mainfrom
repair-nightly-ci
Jul 8, 2026
Merged

kiwidream merged 1 commit into
mainfrom
repair-nightly-ci

Conversation

@kiwidream

@kiwidream kiwidream commented Jul 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes the nightly CI failures seen in the scheduled run by tightening runner identity and scanner setup:

  • include RUNNER_NAME in CI container/env-file names so ARM matrix shards sharing a Docker daemon do not collide
  • refresh managed scanner tools instead of accepting stale global binaries
  • install cargo-audit from RustSec release assets so the scanner is not blocked by the runner Rust toolchain
  • skip build-backed scanners by default for scheduled nightly runs
  • add a narrow Gitleaks allowlist for deterministic P2MR data-hash test-vector key material while preserving default rules

Testing

  • Built locally.
  • Ran focused unit or functional tests for the changed area.
  • Ran lint or formatting checks relevant to this change.
  • Not run. Reason: full build was not run; this is a CI harness/scanner change validated with focused script, scanner, and workflow checks.

Focused checks run:

  • bash -n ci/scanners/install-scanner-tools.sh ci/test/02_run_container.sh
  • python3 -m py_compile ci/test/02_run_container.py ci/scanners/run-scanners.py
  • python3 ci/scanners/test_run_scanners.py
  • docker run --rm -v "$PWD":/repo -w /repo rhysd/actionlint:latest .github/workflows/ci-nightly-heavy.yml
  • python3 ci/scanners/run-scanners.py --mode nightly --scanner gitleaks --scanner cargo_audit --scanner clang_static_analyzer --source . --source-commit "$(git rev-parse HEAD)" --freeze-commit "$(git rev-parse HEAD)" --history-diff-base-ref origin/main --output-root .context/scanner-local-main-pr-after --skip-build-scanners --fail-policy infra-and-secrets
  • git diff --check

Target Branch

  • This PR targets main or a maintainer-requested release branch such as 0.1.x.

Risk / Review Notes

  • Consensus, script, crypto, wallet, P2P, release, CI, or security-sensitive behavior changed.
  • No consensus, script, crypto, wallet, P2P, release, CI, or security-sensitive behavior changed.

Notes: CI-only change. Scheduled workflows that checkout a release branch will use the workflow changes from main; script/config changes must also be present on the checked-out branch for those steps to consume them directly.

Docs / Process Impact

Choose exactly one:

  • I updated public docs because this PR changes user-visible behavior, integration guidance, release/process guidance, or expected validation.
  • No public docs update needed. Reason: CI harness maintenance only.

libbitcoinpqc Subtree Checklist (if src/libbitcoinpqc changed)

  • Source commit is reachable from an immutable release tag in Qbit-Org/qbit-libbitcoinpqc.
  • qbit imports the tagged upstream tree directly without pruning or a curated subtree branch.
  • Subtree import/update was performed with contrib/devtools/update-libbitcoinpqc-subtree.sh.
  • test/lint/libbitcoinpqc-subtree-check.sh passes locally.
  • Any default tag change in contrib/devtools/update-libbitcoinpqc-subtree.sh is intentional and matches doc/subtrees/libbitcoinpqc.md.

Note

Low Risk
CI harness and scanner installer only; Gitleaks allowlist is path- and regex-scoped to one test-vector file.

Overview
Fixes scheduled nightly CI failures by making container names unique per self-hosted runner (hash of RUNNER_NAME, with truncation so ci-ip6net- + name stays within Docker’s 63-character limit) instead of relying only on run/job, which collide when matrix jobs share GITHUB_JOB on one Docker daemon.

Scanner setup is tightened: managed tools are taken from the scanner cache (not stale global binaries), cargo-audit is bumped to 0.22.2 and installed from RustSec release assets (avoiding runner Rust toolchain issues), Python scanner tools are upgraded on install, and zizmor < 1.24.0 is skipped with a clear gap message. Scheduled nightly runs now default SKIP_BUILD_SCANNERS=true; manual dispatch still respects the workflow input.

Adds a narrow gitleaks-allowlist.toml for deterministic hex keygen_entropy / secret_key fields in p2mr_datapqchash_vectors.json while keeping default Gitleaks rules elsewhere.

Reviewed by Cursor Bugbot for commit c5b3f60. Bugbot is set up for automated code reviews on this repo. Configure here.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

@kiwidream
kiwidream force-pushed the repair-nightly-ci branch from 75bb6d6 to b9554e1 Compare July 8, 2026 14:40
Comment thread ci/scanners/install-scanner-tools.sh Resolved
@kiwidream
kiwidream force-pushed the repair-nightly-ci branch from b9554e1 to b1d8252 Compare July 8, 2026 15:41

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b1d8252. Configure here.

Comment thread ci/test/02_run_container.py Resolved
@kiwidream
kiwidream force-pushed the repair-nightly-ci branch 3 times, most recently from 28320a0 to a4c08e5 Compare July 8, 2026 17:00
@kiwidream
kiwidream force-pushed the repair-nightly-ci branch from a4c08e5 to c5b3f60 Compare July 8, 2026 17:13
@kiwidream
kiwidream merged commit 7e48b45 into main Jul 8, 2026
34 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.

1 participant