Commit Graph

2781 Commits

Author SHA1 Message Date
Arthur Baars ca53360d04 Fix tests 2025-07-15 07:25:49 +00:00
github-actions[bot] b419190c59 Update supported GitHub Enterprise Server versions 2025-07-15 00:18:48 +00:00
Koen Vlaswinkel 6f936b5c2d Merge pull request #2969 from github/koesie10/fix-ghes-version-parsing
Fix parsing of GHES pre-release versions
2025-07-14 13:42:48 +02:00
Koen Vlaswinkel c6a6c1490f Move comment to JSDoc 2025-07-14 13:18:38 +02:00
Michael B. Gale 4e20239e7b Merge pull request #2951 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2025-07-14 10:39:53 +01:00
Koen Vlaswinkel 59d67fc4bf Fix parsing of GHES pre-release versions 2025-07-14 11:25:20 +02:00
Chuan-kai Lin b37e7e2c5d Move initializeFeatures() to testing-utils
This change eliminates the need for setup-codeql.test to import from
feature-flags.test, which makes the former run all tests defined in the
latter.
2025-07-11 09:54:40 -07:00
Chuan-kai Lin 90d7727554 Overlay: check code-scanning features 2025-07-10 14:16:19 -07:00
Chuan-kai Lin fb771764cb Extract generateCodeScanningConfig() 2025-07-10 14:14:46 -07:00
Chuan-kai Lin d799ff5e6a Overlay: check per-language features 2025-07-10 14:14:14 -07:00
Chuan-kai Lin 9f70a5fc86 Overlay: define language-specific features 2025-07-10 11:09:28 -07:00
Chuan-kai Lin 55cb6b8b94 Extract isOverlayAnalysisFeatureEnabled() 2025-07-10 10:48:43 -07:00
Chuan-kai Lin 4bdb7fe04f Overlay database mode tests: list features
Before we introduce additional features for controlling overlay analysis
enablement, change the unit tests to specify features directly instead
of through a isFeatureEnabled boolean field.
2025-07-10 10:46:32 -07:00
Chuan-kai Lin 64fce5856f Use exclude-from-incremental also for overlay analysis 2025-07-09 14:32:05 -07:00
Chuan-kai Lin fe7205c739 Move getOverlayDatabaseMode() call into initConfig()
In an upcoming change, getOverlayDatabaseMode() will depend on the
contents of Config. As a result, getOverlayDatabaseMode() needs to be
called after the rest of Config has already been populated.

This commit performs the refactoring to move the
getOverlayDatabaseMode() into initConfig(), after the rest of Config has
already been populated.
2025-07-09 14:32:05 -07:00
Chuan-kai Lin 4cd7a721f7 Remove loadConfig()
The loadConfig() function is mostly the same as getDefaultConfig(),
except that it calls loadUserConfig() and stores the results in
originalUserInput.

This refactoring commit replaces the loadConfig() call with
getDefaultConfig() and loadUserConfig(), which allows deleting a large
amount of duplicated code.
2025-07-09 14:32:05 -07:00
Chuan-kai Lin f4358b38d1 Extract loadUserConfig() 2025-07-09 14:32:05 -07:00
Koen Vlaswinkel f53ec7c550 Merge pull request #2961 from github/koesie10/disable-combine-sarif-files-ghes
Unconditionally disable combining SARIF files for GHES 3.18
2025-07-08 10:01:06 +02:00
Chuan-kai Lin 95a1b7e2bf Add getOverlayDatabaseMode() tests 2025-07-07 08:14:41 -07:00
Chuan-kai Lin 8c5122ea75 Add getPullRequestBranches() tests 2025-07-07 08:13:06 -07:00
Koen Vlaswinkel aafbeb29bc Unconditionally disable combining SARIF files for GHES 3.18 2025-07-04 15:24:36 +02:00
Chuan-kai Lin 6a51e635a5 Add "overlay" to SARIF incrementalMode run property 2025-07-03 12:35:25 -07:00
Chuan-kai Lin 42835b3971 Override cleanup-level for overlay-base database 2025-07-03 12:35:25 -07:00
Chuan-kai Lin 2fc04c80cc Download overlay-base database from actions cache 2025-07-03 12:35:25 -07:00
Chuan-kai Lin b95402dae1 Extract checkOverlayBaseDatabase() 2025-07-03 12:35:24 -07:00
Chuan-kai Lin 6ca06f41c4 Upload overlay-base database to actions cache 2025-07-03 12:35:24 -07:00
Chuan-kai Lin d42ce71087 Add AugmentationProperties.useOverlayDatabaseCaching
This commit adds useOverlayDatabaseCaching to AugmentationProperties to
indicate whether the action should upload overlay-base databases to the
actions cache and to download a cached overlay-base database when
creating an overlay database.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin b4425372ef Limit OverlayAnalysis to internal repos 2025-07-03 12:35:24 -07:00
Chuan-kai Lin 93e8729640 getOverlayDatabaseMode: use Feature.OverlayAnalysis
This commit changes getOverlayDatabaseMode so that, when
Feature.OverlayAnalysis is enabled, it calculates the overlay database
mode automatically based on analysis metadata. If we are analyzing the
default branch, use OverlayBase, and if we are analyzing a PR, use
Overlay.

If CODEQL_OVERLAY_DATABASE_MODE is set to a valid overlay database mode,
that environment variable still takes precedence.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin da758dc0cd Add Feature.OverlayAnalysis 2025-07-03 12:35:24 -07:00
Chuan-kai Lin 60a2a7d623 Add isAnalyzingPullRequest() 2025-07-03 12:35:24 -07:00
Chuan-kai Lin a336faa497 databaseInitCluster: use overlayDatabaseMode from config
This commit changes databaseInitCluster() to use overlayDatabaseMode
from AugmentationProperties instead of the overlayDatabaseMode
parameter. There is no behavior change because both overlayDatabaseMode
values are computed the same way.

The commit then cleans up the overlayDatabaseMode parameter and the code
paths that feed into it.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin ee8a8c4e0b config-utils: populate getOverlayDatabaseMode()
This commit populates getOverlayDatabaseMode() in config-utils with the
same code from getOverlayDatabaseMode() in init.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin 9022c7382c Add AugmentationProperties.overlayDatabaseMode
This commit adds overlayDatabaseMode to AugmentationProperties and
creates a placeholder getOverlayDatabaseMode() function, with the
necessary inputs, to populate it.
2025-07-03 12:35:24 -07:00
Paolo Tranquilli 34786468fa Rust: remove shipped feature flag 2025-07-03 15:43:01 +02:00
Michael B. Gale b69421388d Merge pull request #2956 from github/mbg/start-proxy/validation-improvements
Improve JSON validation in `start-proxy` action
2025-07-03 12:23:56 +01:00
Koen Vlaswinkel 612df8d91c Remove support for combining SARIF runs with non-unique categories 2025-07-01 15:20:28 +02:00
Michael B. Gale 9281048a40 Include goproxy_server in configuration filtering tests 2025-06-27 14:32:16 +01:00
Michael B. Gale 6b83dc33ed Check for null in addition to undefined; extend tests accordingly 2025-06-27 14:32:16 +01:00
Michael B. Gale ca0540d370 Check that individual proxy configurations are objects 2025-06-27 14:32:16 +01:00
Michael B. Gale e9938e34d5 Check that proxy configurations are an array 2025-06-27 14:32:15 +01:00
Michael B. Gale aa72ddaead Merge branch 'main' into mbg/interpret-cq-results 2025-06-27 13:45:51 +01:00
Michael B. Gale 65d1e45f0b Rename SARIF_UPLOAD_ENDPOINT members 2025-06-27 13:45:14 +01:00
Michael B. Gale 10a3e4b17d Fix formatting 2025-06-27 12:32:56 +01:00
Michael B. Gale 7b3d150883 Use findSarifFilesInDir in upload-sarif to avoid error when there are no quality.sarif files 2025-06-27 12:08:40 +01:00
Michael B. Gale ad6046ff97 Avoid default arguments with historical values 2025-06-26 13:51:08 +01:00
Michael B. Gale 9ec0bb9605 Fix incorrect getSarifFilePaths call in upload-sarif action 2025-06-26 12:22:08 +01:00
Michael B. Gale 08955dbc0d Move .sarif predicates into UploadTarget instances and rename 2025-06-26 11:43:36 +01:00
Michael B. Gale 71dd63398f Rename SARIF_UPLOAD_TARGET 2025-06-26 11:38:45 +01:00
Michael B. Gale 27db6cb5d6 Document queries parameter for databaseRunQueries 2025-06-26 11:37:10 +01:00