Skip to content

Commit 71e6077

Browse files
authored
Merge branch 'main' into nickfyson/speculative-script-fix
2 parents f2c09fb + b8e2556 commit 71e6077

File tree

10 files changed

+24
-12
lines changed

10 files changed

+24
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the
66

77
## [UNRELEASED]
88

9+
No user facing changes.
10+
11+
## 3.25.0 - 15 Apr 2024
12+
913
- The deprecated feature for extracting dependencies for a Python analysis has been removed. [#2224](https://github.com/github/codeql-action/pull/2224)
1014

1115
As a result, the following inputs and environment variables are now ignored:

lib/api-client.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api-client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeql",
3-
"version": "3.25.0",
3+
"version": "3.25.1",
44
"private": true,
55
"description": "CodeQL action",
66
"scripts": {

src/api-client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ export function wrapApiConfigurationError(e: unknown) {
199199
if (isHTTPError(e)) {
200200
if (
201201
e.message.includes("API rate limit exceeded for site ID installation") ||
202+
e.message.includes("commit not found") ||
202203
/^ref .* not found in this repository$/.test(e.message)
203204
) {
204205
return new ConfigurationError(e.message);

src/upload-lib.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,16 @@ export async function uploadFromActions(
320320

321321
function getSarifFilePaths(sarifPath: string) {
322322
if (!fs.existsSync(sarifPath)) {
323-
throw new InvalidSarifUploadError(`Path does not exist: ${sarifPath}`);
323+
// This is always a configuration error, even for first-party runs.
324+
throw new ConfigurationError(`Path does not exist: ${sarifPath}`);
324325
}
325326

326327
let sarifFiles: string[];
327328
if (fs.lstatSync(sarifPath).isDirectory()) {
328329
sarifFiles = findSarifFilesInDir(sarifPath);
329330
if (sarifFiles.length === 0) {
330-
throw new InvalidSarifUploadError(
331+
// This is always a configuration error, even for first-party runs.
332+
throw new ConfigurationError(
331333
`No SARIF files found to upload in "${sarifPath}".`,
332334
);
333335
}
@@ -733,7 +735,8 @@ export function validateUniqueCategory(sarif: SarifFile): void {
733735
for (const [category, { id, tool }] of Object.entries(categories)) {
734736
const sentinelEnvVar = `CODEQL_UPLOAD_SARIF_${category}`;
735737
if (process.env[sentinelEnvVar]) {
736-
throw new InvalidSarifUploadError(
738+
// This is always a configuration error, even for first-party runs.
739+
throw new ConfigurationError(
737740
"Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. " +
738741
"The easiest fix is to specify a unique value for the `category` input. If .runs[].automationDetails.id is specified " +
739742
"in the sarif file, that will take precedence over your configured `category`. " +

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy