ci: consolidate security and performance workflows#7200
Draft
somethingwithproof wants to merge 10 commits into
Draft
ci: consolidate security and performance workflows#7200somethingwithproof wants to merge 10 commits into
somethingwithproof wants to merge 10 commits into
Conversation
Adds a GitHub Actions workflow that runs on every PR targeting develop. The job collects the PR diff, grep hits on changed PHP files (SQL sinks, superglobal access, command execution, dynamic includes, file writes, archive extraction), and 120-line excerpts from historically vulnerable hotspot files. It feeds all of this to claude-opus-4-6 using a structured security review prompt and posts the model's findings as a PR comment. The job fails (blocking merge) when the model returns "BLOCK PR". API or infrastructure errors are non-fatal so they do not block unrelated PRs. Requires the ANTHROPIC_API_KEY repository secret. Fork PRs skip gracefully when the secret is absent. Closes Cacti#6936-related CI gap — continuous variant-class hunting on every PR without manual triage overhead. Signed-off-by: Thomas Vincent <thomasvincent@somethingwithproof.com> Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@somethingwithproof.com> Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Add PHP-oriented parity guardrails similar to Spine modernization: - new security posture workflow (TruffleHog, Semgrep SARIF, Scorecard, Composer audit, workflow policy checks) - new performance regression workflow with hyperfine + RSS thresholds - workflow policy checker script for pinned-action/strict-shell validation - versioned CLI performance baseline file Fixes Cacti#6822 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
bc5af71 to
fbfa03a
Compare
|
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:
For more information about GitHub Code Scanning, check out the documentation. |
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…ct pins Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The --lock flag needs an existing composer.lock; Cacti ships none, so the audit step exited 3. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Clears the level 6 alreadyNarrowedType error on lib/data_query.php:2591 that develop currently emits, matching the sibling narrowing identifiers already ignored. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidates the unmerged CI-only workflow branches into one reviewable PR.
This adds the security-review workflow and supporting prompt/script, plus the security-posture and performance-regression workflows with their policy checker and benchmark baseline. The already-merged PHP quality/nightly workflow branch was not included because current
developalready contains edited versions of those workflows.Validation run locally from a clean worktree:
git diff --check upstream/develop..HEADpython3 -m py_compile .github/scripts/security_review.py .github/scripts/check-workflow-policy.pyruby -e 'require "yaml"; Dir[".github/workflows/*.yml"].each { |f| YAML.load_file(f) }'