-
Notifications
You must be signed in to change notification settings - Fork 41
hardening: run the test suite, and add CodeQL #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
somethingwithproof
wants to merge
16
commits into
Cacti:develop
Choose a base branch
from
somethingwithproof:hardening/testing-and-workflows
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4c32528
ci: modernize Monitor workflow
somethingwithproof a06ae88
ci: pin integration tests to Cacti 1.2.31
somethingwithproof 0547614
ci(security): pin GitHub Actions to commit SHAs
3f5e186
Allow Cacti dependency validation warnings
somethingwithproof ce0698b
Align Monitor matrix with Cacti dependencies
somethingwithproof a9ef8b0
Fix Monitor PHPStan working directory
somethingwithproof 8f5769b
Fix duplicate Monitor workflow key
somethingwithproof cca8396
Guard optional PHPStan configuration
somethingwithproof eea95f6
Guard optional Composer vendor binaries
somethingwithproof 219571c
Skip unavailable Composer quality scripts
somethingwithproof 8e38688
ci: restore full PHP 8.1-8.4 integration matrix
somethingwithproof d5c293d
hardening: run the test suite, and add CodeQL
somethingwithproof a4ba172
ci: refuse package-supplied code in the root composer install
somethingwithproof 88173d7
ci: run the unit suite on a PHP the test tooling supports
somethingwithproof 6cb7b41
ci: stop claiming PHP is analysed, and lint every workflow
somethingwithproof ce3e3f9
test: run the suite from Cacti's Composer instead of the plugin's
somethingwithproof File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # +-------------------------------------------------------------------------+ | ||
| # | Copyright (C) 2004-2026 The Cacti Group | | ||
| # +-------------------------------------------------------------------------+ | ||
| # | Cacti: The Complete RRDtool-based Graphing Solution | | ||
| # +-------------------------------------------------------------------------+ | ||
| # | http://www.cacti.net/ | | ||
| # +-------------------------------------------------------------------------+ | ||
| # | ||
| # CodeQL has no PHP analysis, so this covers the plugin JavaScript only. Nothing in | ||
| # CI performs taint analysis on the PHP: plugin-ci-workflow.yml runs a parser check | ||
| # and an install smoke test, neither of which tracks a value from request to sink. | ||
|
|
||
| name: "CodeQL" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, develop] | ||
| paths-ignore: | ||
| - "**/*.md" | ||
| pull_request: | ||
| branches: [main, develop] | ||
| paths-ignore: | ||
| - "**/*.md" | ||
| schedule: | ||
| - cron: "30 1 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: codeql-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: ["javascript-typescript"] | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| - name: Autobuild | ||
| uses: github/codeql-action/autobuild@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3 | ||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3 | ||
| with: | ||
| category: "/language:${{ matrix.language }}" |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <phpunit bootstrap="tests/bootstrap.php" colors="true" beStrictAboutOutputDuringTests="false"> | ||
| <testsuites> | ||
| <testsuite name="Unit"> | ||
| <directory>./tests/unit</directory> | ||
| </testsuite> | ||
| <testsuite name="Integration"> | ||
| <directory>./tests/Integration</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
| </phpunit> |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.