Skip to content

Ci Security Policy

Chris Sutton edited this page Nov 25, 2026 · 1 revision

Published documentation mirror. Edit the source through a repository PR. See Project status.

KnetSentry — GitHub Actions and CI Security Policy

State: Original policy from M0.7, now with an implemented Ubuntu 26.04 GitHub Actions workflow (M1.8). The maintainer reports nine passing hosted M1.8 PR checks. This is not release security qualification; M13–M15 own the deeper gates. M1.9 introduces more selective CI dependency provisioning.

CI trust levels and event separation

  1. Pull requests from forks and unknown contributors: treat checked-out code, changed YAML, PR titles/labels and artifact contents as attacker controlled. Use a read-only token (contents: read), no repository secrets, no privileged network interfaces, and no access to live monitoring systems.
  2. Trusted branch CI: allow the same checks with approved dependency download and caching, but never automatically grant publish or signing authority to ordinary build jobs.
  3. Release publication: use a separate approval-gated workflow and minimal elevated permissions, bound to reviewed tags/commits and qualified artifacts. Never publish unverified PR artifacts.
  4. Scheduled deep checks: fuzzing, longer performance, dependency audits, and privileged network-isolation tests should use reviewed, appropriately isolated environments with accountable owners.

Mandatory workflow safeguards

  • Pin third-party uses: actions to reviewed full-length commit SHAs; track the corresponding upstream release and security updates.
  • Set explicit minimal workflow/job permissions. Permit id-token: write, contents: write, or packages: write only in jobs that need them.
  • Avoid pull_request_target checking out and executing untrusted PR code; never interpolate user-controlled GitHub event fields into shell scripts.
  • Prefer ephemeral hosted runners with pinned tool/package identities where possible. Do not presume a hosted runner can safely grant raw packet capture, mount capabilities, or modification of the host network firewall.
  • Require changed workflows to be reviewed as security-sensitive. Do not use continue-on-error for required checks, a final || true, ignored failure exit codes or unconditional success on zero discovered tests.
  • Treat actions caches and uploaded test artifacts as untrusted; avoid privilege-crossing caches, secret-bearing outputs and oversized logs.
  • Never upload unredacted device traffic, user credentials, AI private prompts, incident evidence or real LAN telemetry to public CI.
  • For checks requiring external dependency fetches, document sources and resolved versions. Untrusted PR code must not contact the user's LAN.
  • Use appropriate timeouts, quotas, concurrency/cancellation, rate limits, and retention policies; unexpected timeouts remain failed/incomplete.
  • Audit workflows and release keys after suspected compromise; rotate credentials, invalidate artifacts where necessary, and open security issues.

Required-check activation strategy

Stage CI gate to introduce Block PR?
M0.7 Offline Python document verification locally Yes for M0.7 acceptance; no GitHub workflow yet
M1.1–M1.2 Linux build + toolchain checks Yes when working and reproducible
M1.7 CTest, Qt Test, QML startup tests Yes when targets exist; zero tests is failure
M1.8 clang-tidy, Clazy, qmllint, formatting, official reuse lint, workflow-security checks Yes after each relevant check is implemented and baselined
M3–M7 Isolated network, auth, capture, protocol and event regression checks Yes when affected surfaces are implemented and deterministic
M13 Security regression qualification + regular deep fuzzing Required in release sign-off; fast security checks on PRs
M14 Sustained reliability/performance qualification Release gate, not noisy unconditional PR gate
M15 Artifact verification, clean-system install, release approval Must pass before any v1.0.0 publish

Branch protection must not require a check name until that workflow exists and has demonstrated repeatable completion. Once enabled, missing results or infrastructure failures are not automatically treated as security passes.

Repository governance dependency

M0.8 adds the PR template, CODEOWNERS, and manual settings checklist. These files do not activate GitHub branch rules, private vulnerability reporting, or workflow checks. Enable branch protection and appropriate security controls through GitHub settings only after the affected workflows are functioning.

References

M1.8 implementation status

A read-only Ubuntu 26.04 workflow exists at .github/workflows/ubuntu-26-04.yml; see M1.8 CI implementation. The maintainer reports all nine checks passing on the merged M1.8 PR. Required ruleset enforcement remains unconfirmed, full style enforcement is incomplete, and release distribution clearance is not claimed. M1.9's targeted dependency provisioning requires its own hosted acceptance.

Clone this wiki locally