Skip to content

ci: pin the database image and install locked shared test dependencies - #306

Merged
TheWitness merged 4 commits into
developfrom
security/actions-hardening-20261013
Oct 19, 2026
Merged

TheWitness merged 4 commits into
developfrom
security/actions-hardening-20261013

Conversation

@somethingwithproof

@somethingwithproof somethingwithproof commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

CI currently changes Cacti's Composer manifest and resolves dependencies during each run. Check out the current Cacti branch head, pin the MariaDB image, install committed locks through the shared core action, and run Composer as the runner user. Set read-only permissions, disable persisted checkout credentials, cap integration jobs at 45 minutes, and cancel superseded PR runs. Add Actions updates where missing.

The existing events, matrix, job names, PHPUnit configuration, coverage thresholds, plugin schema/localization checks and polling steps are retained. No plugin-local test manifest is added. Stream retains its own runtime dependency contract.

Validation: full actionlint including shellcheck passes. The shared harness passes Thold's Linux tests and FlowView/Stream unit tests. Syslog's two unit failures reproduce with the existing core Pest toolchain. GitHub integration checks on this PR must complete before merge.

Depends on Cacti/cacti#8345. Merge the shared core tooling before this caller migration. The tooling is sparse-checked out at the published helper commit because Cacti source archives exclude CI files. No secrets are passed to the helper.

Changelog follow-up: place this PR's CI entry under an unreleased develop heading instead of released 2.0. The previously existing release sections are preserved. The changelog-only correction passes whitespace checks, released-section preservation checks and a three-way merge against develop. Hosted checks must finish on the updated head.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The changes pass current checks but depend on the still-unmerged Cacti PR #8345.

0 open findings

What changed in this PR

Hardens CI by pinning fixtures and using Cacti’s shared locked dependency harness.

Changes:

  • Pins Cacti, MariaDB, Composer, and GitHub Actions dependencies.
  • Restricts permissions, credentials, concurrency, and runtime.
  • Uses the shared Pest harness without adding plugin-local Composer files.
File Description
CHANGELOG.md Records the CI hardening.
.github/​workflows/​plugin-ci-workflow.yml Pins dependencies and adopts shared tooling.
.github/​workflows/​codeql.yml Disables persisted checkout credentials.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

bmfmancini
bmfmancini previously approved these changes Oct 14, 2026

@bmfmancini bmfmancini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the full diff. Replaces the ad-hoc sudo composer require/install path (flying without a lock) with the pinned Cacti/cacti shared action b1d8dd6a03a3c756a2b22dfe3a0c744b1f11116c and a locked plugin-harness composer install run as the non-root runner user; CACTI_PEST_BIN is exported by that action and consumed by the Pest step. Both the Cacti fixture (d6d230f712c0, 1.2.x) and helper revision are real immutable SHAs; mariadb service and all actions are digest/SHA-pinned; checkouts now persist-credentials: false; workflow gains contents: read, a pull_request-scoped concurrency group, and a 45m timeout. CodeQL checkout gets the same persisted-credentials fix. Verified the sparse-checkout paths (setup-plugin-dependencies, plugin-harness with composer.lock) exist at the helper revision and that CACTI_REF d6d230f is on origin/1.2.x lineage. All 5 checks pass. Approving.

@somethingwithproof
somethingwithproof force-pushed the security/actions-hardening-20261013 branch 2 times, most recently from b131a76 to 0d44840 Compare October 17, 2026 20:25
@somethingwithproof somethingwithproof added github-actions Dependabot github-actions updates dependencies Dependabot dependencies updates docker Dependabot docker updates documentation Improvements or additions to documentation labels Oct 17, 2026
@somethingwithproof
somethingwithproof marked this pull request as ready for review October 17, 2026 23:48
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof
somethingwithproof force-pushed the security/actions-hardening-20261013 branch from 987f193 to 936ff4e Compare October 17, 2026 23:53
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof changed the title ci: pin fixtures and install locked shared test dependencies ci: pin the database image and install locked shared test dependencies Oct 18, 2026
@sonarqubecloud

Copy link
Copy Markdown

@TheWitness TheWitness left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed: pins the MariaDB image by digest, pins the shared CI tooling to an immutable Cacti commit (verified it exists and contains the setup-plugin-dependencies action), installs locked test dependencies, and tightens workflow permissions/credentials. CI is green. LGTM.

@TheWitness
TheWitness merged commit 65c62d1 into develop Oct 19, 2026
7 checks passed
@TheWitness
TheWitness deleted the security/actions-hardening-20261013 branch October 19, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependabot dependencies updates docker Dependabot docker updates documentation Improvements or additions to documentation github-actions Dependabot github-actions updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants