Commit Graph

2895 Commits

Author SHA1 Message Date
Fotis Koutoulakis (@NlightNFotis) 55ee663d5f review-comments: refactor getActionsStatus to accept an extra parameter designating if the analysis is third-party 2025-04-01 14:58:59 +01:00
github-actions[bot] a69f5113b7 Update default bundle to codeql-bundle-v2.21.0 2025-04-01 13:51:03 +00:00
Fotis Koutoulakis (@NlightNFotis) 01f1a1f2c9 Merge branch 'main' into NlightNFotis/reclassify_upload_sarif_issues 2025-03-31 16:29:02 +01:00
Chuan-kai Lin efffb483ec Merge pull request #2831 from github/cklin/diff-informed-query-filtering
Respect `exclude-from-incremental` query tag for diff-informed analysis
2025-03-31 08:00:50 -07:00
Fotis Koutoulakis (@NlightNFotis) f21cf0bbd7 feat: reclassify InvalidSarifUploadError as a user-error when final status report is produced 2025-03-31 12:22:18 +01:00
Fotis Koutoulakis (@NlightNFotis) 72a2b1295e feat: classify some observed SARIF errors as InvalidSarifUploadError 2025-03-31 12:17:23 +01:00
Fotis Koutoulakis (@NlightNFotis) a022653e2d feat: classify more HTTP errors as configuration errors in api-client 2025-03-31 11:54:16 +01:00
Fotis Koutoulakis (@NlightNFotis) 3c42562190 fix: update comment for test to state correct expected outcome 2025-03-31 11:51:11 +01:00
Chuan-kai Lin e7f67e2e61 Redefine shouldPerformDiffInformedAnalysis()
This commit renames the original shouldPerformDiffInformedAnalysis(),
which returns `PullRequestBranches | undefined`, to
getDiffInformedAnalysisBranches(). It also adds a new
shouldPerformDiffInformedAnalysis() function that returns boolean.

Separating these two functions makes it clear what the intended uses and
return values should be for each.
2025-03-28 12:29:28 -07:00
Fotis Koutoulakis (@NlightNFotis) 73c938dbc0 fix: fix issue where wrapApiConfigurationError would fail to regex match a string due to boundary constraints on the regex 2025-03-28 14:38:06 +00:00
Fotis Koutoulakis (@NlightNFotis) 2be6da694a test: add tests for the wrapApiConfigurationError function 2025-03-28 14:37:10 +00:00
Fotis Koutoulakis (@NlightNFotis) 76f9ed9cd9 test: add tests to validate getActionsStatus' behaviour 2025-03-28 14:37:10 +00:00
Chuan-kai Lin 71ab101d38 Set default query filter for diff-informed analysis 2025-03-27 14:06:40 -07:00
Chuan-kai Lin da967b1ade AugmentationProperties: add defaultQueryFilters
This commit adds a defaultQueryFilters field to AugmentationProperties
and incorporates its value into the augmented Code Scanning config.
However, in this commit defaultQueryFilters is always empty, so there is
not yet any actual behavior change.
2025-03-27 13:44:47 -07:00
Chuan-kai Lin 3c4533916b Call shouldPerformDiffInformedAnalysis() outside setupDiffInformedQueryRun() 2025-03-27 10:27:24 -07:00
Chuan-kai Lin 1994ea768e Move shouldPerformDiffInformedAnalysis() 2025-03-27 10:27:24 -07:00
Chuan-kai Lin 534bc63d5e Rename diff-filtering-utils.ts to diff-informed-analysis-utils.ts 2025-03-27 10:27:23 -07:00
Chuan-kai Lin 3fbee52426 Extract shouldPerformDiffInformedAnalysis() 2025-03-27 10:27:23 -07:00
Chuan-kai Lin c1fc897eb2 getFileDiffsWithBasehead(): use CODE_SCANNING_REPOSITORY if present 2025-03-27 08:50:31 -07:00
Chuan-kai Lin f88459c0a3 Use getRepositoryNwo() 2025-03-26 10:18:40 -07:00
Chuan-kai Lin b22f3341fe Add getRepositoryNwo() helper functions 2025-03-26 08:11:16 -07:00
Chuan-kai Lin b361a91508 Diff-informed analysis: fix empty PR handling 2025-03-21 14:18:25 -07:00
Chuan-kai Lin bd1d9ab4ed Merge pull request #2816 from github/cklin/overlay-file-list
Overlay databases: use --overlay-changes
2025-03-21 12:30:26 -07:00
Chuan-kai Lin b98ae6ca52 Add overlay-database-utils tests 2025-03-21 11:31:28 -07:00
Chuan-kai Lin 9825184a0a Add getFileOidsUnderPath() tests 2025-03-21 10:53:21 -07:00
Chuan-kai Lin d109dd5d33 Detect PR branches for Default Setup 2025-03-21 09:25:08 -07:00
Chuan-kai Lin 3e5446c3d2 Introduce PullRequestBranches 2025-03-21 09:24:16 -07:00
Chuan-kai Lin 6adda79888 Move PR branch detection into setupDiffInformedQueryRun() 2025-03-20 09:51:17 -07:00
Chuan-kai Lin 6be6984cc1 Overlay databases: use --overlay-changes
This commit changes overlay database creation to use the
--overlay-changes flag. It also implements Git-based file change
detection to generate the list of files to extract for the overlay
database.
2025-03-19 11:38:45 -07:00
github-actions[bot] 4e3a5342c5 Update default bundle to codeql-bundle-v2.20.7 2025-03-18 12:21:54 +00:00
Michael B. Gale 55f023701c Merge pull request #2802 from github/mbg/dependency-caching/java-buildless
Set and cache dependency directory for Java `build-mode: none`
2025-03-18 10:28:36 +00:00
Michael B. Gale 4c409a5b66 Remove temporary dependency directory in analyze post action 2025-03-17 11:34:09 +00:00
Chuan-kai Lin c31f6c89e8 git-utils: deleted unused functions 2025-03-13 10:45:14 -07:00
Michael B. Gale afa3ed33bb Add more documentation 2025-03-13 11:45:27 +00:00
Michael B. Gale f8367fb063 Set and cache dependency directory for Java build-mode: none 2025-03-13 11:39:39 +00:00
Chuan-kai Lin ff5f0b9efd Support overlay database creation
This commit adds support for creating overlay-base and overlay
databases, controlled via the CODEQL_OVERLAY_DATABASE_MODE environment
variable.
2025-03-10 13:25:46 -07:00
Chuan-kai Lin 270886f805 Pass overlay mode into databaseInitCluster()
This commit adds a OverlayDatabaseMode parameter to
databaseInitCluster(). The parameter controls the "codeql database init"
flags concerning overlay database creation.

There is no behavior change in this commit because we always pass
OverlayDatabaseMode.None to databaseInitCluster(). That will change in
the next commit.
2025-03-10 13:22:24 -07:00
Chuan-kai Lin d76f393713 Do not set --expect-discarded-cache on "cleanup-level: overlay"
When a user specifies "cleanup-level: overlay", it suggests that the
user wishes to preserve the evaluation cache for future use. So in this
case we should not set --expect-discarded-cache when running queries.
2025-03-10 10:32:13 -07:00
Chuan-kai Lin 256aa16582 Merge branch 'main' into update-bundle/codeql-bundle-v2.20.6 2025-03-06 06:59:38 -08:00
nickfyson 7b7ed63503 adjust string for handling rate limit error 2025-03-06 10:33:25 +00:00
github-actions[bot] 35d04d3627 Update supported GitHub Enterprise Server versions 2025-03-05 00:15:30 +00:00
Chuan-kai Lin ec3b22164b Update supported GitHub Enterprise Server versions 2025-03-03 13:06:35 -08:00
github-actions[bot] b378daf0bc Update default bundle to codeql-bundle-v2.20.6 2025-03-03 20:54:03 +00:00
Dave Bartolomeo d37931ae65 Merge remote-tracking branch 'origin/main' into dbartol/use-real-actions-extractor 2025-03-03 13:01:21 -05:00
Henry Mercer 2db5b5a35f Merge pull request #2786 from github/henrymercer/more-config-errors
Add some more configuration errors
2025-03-03 12:21:31 +00:00
Dave Bartolomeo 85e30fe57a Use embedded actions extractor only for old CLI versions 2025-02-27 15:42:11 -05:00
Dave Bartolomeo c29cab9aac Remove bundled copy of actions extractor 2025-02-27 12:46:11 -05:00
Henry Mercer d59d0eb99a Add CLI error for failure to create temp directory 2025-02-26 16:52:50 +00:00
Henry Mercer 0ae74e1ae0 Check for running out of disk space 2025-02-26 16:52:50 +00:00
Ian Lynagh 32505c6f2d Warn about small amounts of MB, not GB
The number of GB is at most 2, and can be tiny. MB gives a more
comprehensible range of values.
2025-02-26 15:11:14 +00:00