Merge remote-tracking branch 'origin/main' into mbg/use-registry-proxy-for-repo-auth

This commit is contained in:
Michael B. Gale
2026-07-16 12:48:24 +01:00
32 changed files with 247 additions and 224 deletions

View File

@@ -47,7 +47,7 @@ jobs:
- name: Check out repository - name: Check out repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm

View File

@@ -80,7 +80,7 @@ jobs:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm

View File

@@ -80,7 +80,7 @@ jobs:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm

View File

@@ -80,7 +80,7 @@ jobs:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm

View File

@@ -80,7 +80,7 @@ jobs:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm

View File

@@ -54,7 +54,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0 uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with: with:
ruby-version: 2.6 ruby-version: 2.6
- name: Install Code Scanning integration - name: Install Code Scanning integration

View File

@@ -57,7 +57,7 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 24 node-version: 24
cache: 'npm' cache: 'npm'

View File

@@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with: with:
fetch-depth: 0 # ensure we have all tags and can push commits fetch-depth: 0 # ensure we have all tags and can push commits
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 24 node-version: 24
cache: 'npm' cache: 'npm'

View File

@@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm' cache: 'npm'
@@ -91,7 +91,7 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 24 node-version: 24
cache: 'npm' cache: 'npm'

View File

@@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 24 node-version: 24
cache: npm cache: npm

View File

@@ -30,7 +30,7 @@ jobs:
ref: ${{ env.HEAD_REF }} ref: ${{ env.HEAD_REF }}
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 24 node-version: 24
cache: 'npm' cache: 'npm'

View File

@@ -46,7 +46,7 @@ jobs:
python-version: '3.12' python-version: '3.12'
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 24 node-version: 24
cache: 'npm' cache: 'npm'

View File

@@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with: with:
node-version: 24 node-version: 24
cache: 'npm' cache: 'npm'

View File

@@ -5,6 +5,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
## [UNRELEASED] ## [UNRELEASED]
- _Upcoming breaking change_: Add a deprecation warning for customers using CodeQL version 2.20.6 and earlier. These versions of CodeQL were discontinued on 1 July 2026 alongside GitHub Enterprise Server 3.16, and will be unsupported by the next minor release of the CodeQL Action. [#3956](https://github.com/github/codeql-action/pull/3956) - _Upcoming breaking change_: Add a deprecation warning for customers using CodeQL version 2.20.6 and earlier. These versions of CodeQL were discontinued on 1 July 2026 alongside GitHub Enterprise Server 3.16, and will be unsupported by the next minor release of the CodeQL Action. [#3956](https://github.com/github/codeql-action/pull/3956)
- Update default CodeQL bundle version to [2.26.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.1). [#4019](https://github.com/github/codeql-action/pull/4019)
## 4.37.0 - 08 Jul 2026 ## 4.37.0 - 08 Jul 2026

View File

@@ -1,6 +1,6 @@
{ {
"bundleVersion": "codeql-bundle-v2.26.0", "bundleVersion": "codeql-bundle-v2.26.1",
"cliVersion": "2.26.0", "cliVersion": "2.26.1",
"priorBundleVersion": "codeql-bundle-v2.25.6", "priorBundleVersion": "codeql-bundle-v2.26.0",
"priorCliVersion": "2.25.6" "priorCliVersion": "2.26.0"
} }

65
lib/entry-points.js generated
View File

@@ -142053,17 +142053,37 @@ var seqTag = defineSequenceTag("tag:yaml.org,2002:seq", {
}, },
identify: Array.isArray identify: Array.isArray
}); });
function isPlainObject3(data) {
if (data === null || typeof data !== "object" || Array.isArray(data)) return false;
const prototype = Object.getPrototypeOf(data);
return prototype === null || prototype === Object.prototype;
}
function pick(object2, keys) {
const result = {};
for (const key of keys) if (object2[key] !== void 0) result[key] = object2[key];
return result;
}
var omapTag = defineSequenceTag("tag:yaml.org,2002:omap", { var omapTag = defineSequenceTag("tag:yaml.org,2002:omap", {
create: () => [], create: () => ({
addItem: (container, item) => { list: [],
if (Object.prototype.toString.call(item) !== "[object Object]") return "cannot resolve an ordered map item"; seen: /* @__PURE__ */ new Set()
const object2 = item; }),
const itemKeys = Object.keys(object2); addItem: (carrier, item) => {
if (itemKeys.length !== 1) return "cannot resolve an ordered map item"; let key;
for (const existing of container) if (Object.prototype.hasOwnProperty.call(existing, itemKeys[0])) return "cannot resolve an ordered map item"; if (item instanceof Map) {
container.push(object2); if (item.size !== 1) return "cannot resolve an ordered map item";
key = item.keys().next().value;
} else if (isPlainObject3(item)) {
const itemKeys = Object.keys(item);
if (itemKeys.length !== 1) return "cannot resolve an ordered map item";
key = itemKeys[0];
} else return "cannot resolve an ordered map item";
if (carrier.seen.has(key)) return "duplicate key in ordered map";
carrier.seen.add(key);
carrier.list.push(item);
return ""; return "";
} },
finalize: (carrier) => carrier.list
}); });
var pairsTag = defineSequenceTag("tag:yaml.org,2002:pairs", { var pairsTag = defineSequenceTag("tag:yaml.org,2002:pairs", {
create: () => [], create: () => [],
@@ -142081,16 +142101,6 @@ var pairsTag = defineSequenceTag("tag:yaml.org,2002:pairs", {
return ""; return "";
} }
}); });
function isPlainObject3(data) {
if (data === null || typeof data !== "object" || Array.isArray(data)) return false;
const prototype = Object.getPrototypeOf(data);
return prototype === null || prototype === Object.prototype;
}
function pick(object2, keys) {
const result = {};
for (const key of keys) if (object2[key] !== void 0) result[key] = object2[key];
return result;
}
var mapTag = defineMappingTag("tag:yaml.org,2002:map", { var mapTag = defineMappingTag("tag:yaml.org,2002:map", {
create: () => ({}), create: () => ({}),
identify: isPlainObject3, identify: isPlainObject3,
@@ -146556,8 +146566,8 @@ var path5 = __toESM(require("path"));
var semver4 = __toESM(require_semver2()); var semver4 = __toESM(require_semver2());
// src/defaults.json // src/defaults.json
var bundleVersion = "codeql-bundle-v2.26.0"; var bundleVersion = "codeql-bundle-v2.26.1";
var cliVersion = "2.26.0"; var cliVersion = "2.26.1";
// src/overlay/index.ts // src/overlay/index.ts
var fs4 = __toESM(require("fs")); var fs4 = __toESM(require("fs"));
@@ -147818,13 +147828,16 @@ function flushDiagnostics(config) {
unwrittenDiagnostics = []; unwrittenDiagnostics = [];
unwrittenDefaultLanguageDiagnostics = []; unwrittenDefaultLanguageDiagnostics = [];
} }
function makeTelemetryDiagnostic(id, name, attributes) { function makeTelemetryDiagnostic(id, name, attributes, tags) {
return makeDiagnostic(id, name, { return makeDiagnostic(id, name, {
attributes, attributes,
visibility: { visibility: {
cliSummaryTable: false, cliSummaryTable: false,
statusPage: false, statusPage: false,
telemetry: true telemetry: true
},
source: {
tags
} }
}); });
} }
@@ -148026,7 +148039,8 @@ function mergeDefaultSetupAndUserConfigs(logger, fromConfigInput, fromConfigFile
"Invalid Default Setup configuration keys", "Invalid Default Setup configuration keys",
{ {
invalidKeys: schemaCheckResult.invalidKeys invalidKeys: schemaCheckResult.invalidKeys
} },
["internal-error"]
) )
); );
} }
@@ -148041,7 +148055,8 @@ function mergeDefaultSetupAndUserConfigs(logger, fromConfigInput, fromConfigFile
"Unrecognised Default Setup configuration keys", "Unrecognised Default Setup configuration keys",
{ {
unrecognisedKeys: schemaCheckResult.unknownKeys unrecognisedKeys: schemaCheckResult.unknownKeys
} },
["internal-error"]
) )
); );
} }
@@ -163003,7 +163018,7 @@ tmp/lib/tmp.js:
*) *)
js-yaml/dist/js-yaml.mjs: js-yaml/dist/js-yaml.mjs:
(*! js-yaml 5.2.0 https://github.com/nodeca/js-yaml @license MIT *) (*! js-yaml 5.2.1 https://github.com/nodeca/js-yaml @license MIT *)
long/index.js: long/index.js:
(** (**

220
package-lock.json generated
View File

@@ -22,13 +22,16 @@
"@actions/http-client": "^3.0.0", "@actions/http-client": "^3.0.0",
"@actions/io": "^2.0.0", "@actions/io": "^2.0.0",
"@actions/tool-cache": "^3.0.1", "@actions/tool-cache": "^3.0.1",
"@octokit/core": "^7.0.6",
"@octokit/plugin-paginate-rest": "^14.0.0",
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
"@octokit/plugin-retry": "^8.1.0", "@octokit/plugin-retry": "^8.1.0",
"archiver": "^8.0.0", "archiver": "^8.0.0",
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"follow-redirects": "^1.16.0", "follow-redirects": "^1.16.0",
"get-folder-size": "^5.0.0", "get-folder-size": "^5.0.0",
"https-proxy-agent": "^7.0.6", "https-proxy-agent": "^7.0.6",
"js-yaml": "^5.2.0", "js-yaml": "^5.2.1",
"jsonschema": "1.5.0", "jsonschema": "1.5.0",
"long": "^5.3.2", "long": "^5.3.2",
"node-forge": "^1.4.0", "node-forge": "^1.4.0",
@@ -53,7 +56,7 @@
"esbuild": "^0.28.1", "esbuild": "^0.28.1",
"eslint": "^9.39.4", "eslint": "^9.39.4",
"eslint-import-resolver-typescript": "^4.4.5", "eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-github": "^6.0.0", "eslint-plugin-github": "^6.1.0",
"eslint-plugin-import-x": "^4.17.1", "eslint-plugin-import-x": "^4.17.1",
"eslint-plugin-jsdoc": "^62.9.0", "eslint-plugin-jsdoc": "^62.9.0",
"eslint-plugin-no-async-foreach": "^0.1.1", "eslint-plugin-no-async-foreach": "^0.1.1",
@@ -62,7 +65,7 @@
"nock": "^14.0.16", "nock": "^14.0.16",
"sinon": "^22.0.0", "sinon": "^22.0.0",
"typescript": "^6.0.3", "typescript": "^6.0.3",
"typescript-eslint": "^8.62.1" "typescript-eslint": "^8.63.0"
} }
}, },
"node_modules/@aashutoshrathi/word-wrap": { "node_modules/@aashutoshrathi/word-wrap": {
@@ -2588,17 +2591,17 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.63.0.tgz",
"integrity": "sha512-4EQM77WgVNxj7OkL/5b/D/xZsw00G577+UriYTC7JF5opcF3T2AuoeY7ueLaZgSVjSgCS6yOAJB5bRGLPSJUzA==", "integrity": "sha512-rvwSgqT+DHpWdzfSzPatRLm02a0GlESt++9iy3hLCDY4BgkaLcl8LBi9Yh7XGFBpwcBE/K3024QuXWTpbz4FfQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.12.2", "@eslint-community/regexpp": "^4.12.2",
"@typescript-eslint/scope-manager": "8.62.1", "@typescript-eslint/scope-manager": "8.63.0",
"@typescript-eslint/type-utils": "8.62.1", "@typescript-eslint/type-utils": "8.63.0",
"@typescript-eslint/utils": "8.62.1", "@typescript-eslint/utils": "8.63.0",
"@typescript-eslint/visitor-keys": "8.62.1", "@typescript-eslint/visitor-keys": "8.63.0",
"ignore": "^7.0.5", "ignore": "^7.0.5",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
"ts-api-utils": "^2.5.0" "ts-api-utils": "^2.5.0"
@@ -2611,7 +2614,7 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"@typescript-eslint/parser": "^8.62.1", "@typescript-eslint/parser": "^8.63.0",
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.1.0" "typescript": ">=4.8.4 <6.1.0"
} }
@@ -2627,16 +2630,16 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.63.0.tgz",
"integrity": "sha512-sPhE4iHuJDSvoAiec+Ro8JyXw8f0ql13HFR82P99nCm9GwTEKG0KYLvDe6REk8BCXuit6vJAv/Yxg5ABaNS2rA==", "integrity": "sha512-gwh4gvvlaVDKKxyfxMG+Gnu1u9X0OQBwyGLkbwB65dIzBKnxeRiJlNFqlI3zwVhNXJIs6qV7mlFCn/BIajlVig==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "8.62.1", "@typescript-eslint/scope-manager": "8.63.0",
"@typescript-eslint/types": "8.62.1", "@typescript-eslint/types": "8.63.0",
"@typescript-eslint/typescript-estree": "8.62.1", "@typescript-eslint/typescript-estree": "8.63.0",
"@typescript-eslint/visitor-keys": "8.62.1", "@typescript-eslint/visitor-keys": "8.63.0",
"debug": "^4.4.3" "debug": "^4.4.3"
}, },
"engines": { "engines": {
@@ -2670,14 +2673,14 @@
} }
}, },
"node_modules/@typescript-eslint/project-service": { "node_modules/@typescript-eslint/project-service": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.63.0.tgz",
"integrity": "sha512-yQ3RgY5RkSBpsNS1Bx/JQEcA24FOSdfGktoyprAr5u18390UQdtVcfnEv4nIrIshNnavlVyZBKxQwT1fIAE6cg==", "integrity": "sha512-e5dh0/UI0ok53AlZ5wRkXCB32z/f2jUZqPR/ygAw5WYaSw8j9EoJWlS7wQjr/dmOaqWjnPIn2m+HhVPCMWGZVQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.62.1", "@typescript-eslint/tsconfig-utils": "^8.63.0",
"@typescript-eslint/types": "^8.62.1", "@typescript-eslint/types": "^8.63.0",
"debug": "^4.4.3" "debug": "^4.4.3"
}, },
"engines": { "engines": {
@@ -2710,14 +2713,14 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.63.0.tgz",
"integrity": "sha512-r4d249KbQ1SFdpeStvob8Ih6aPPIzfqllPVOtvhve6ZcpuVcYo5/7zUWckKpHE7StASX4kTKZTLf0WQm/wPkcg==", "integrity": "sha512-uUyfMWCnDSN8bCpcrY8nGP2BLkQ9Xn0GsipcONcpIDWhwhO4ZSyHvyS14U3X75mzxWxL3I2UZIrenTzdzcJO8A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.62.1", "@typescript-eslint/types": "8.63.0",
"@typescript-eslint/visitor-keys": "8.62.1" "@typescript-eslint/visitor-keys": "8.63.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2728,9 +2731,9 @@
} }
}, },
"node_modules/@typescript-eslint/tsconfig-utils": { "node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.63.0.tgz",
"integrity": "sha512-xadytJqX9vJVQ2fdQjkcIVigwaOJNWkpjdLt6cEQ+xPnrI1fkp+/jZE/I97k9KUjqtpd25i0HeyZf3T6dutv2g==", "integrity": "sha512-sUAbkulqBAsncKnbRP3+7CtQFRKicexnj7ZwNC6ddCR7EmrXvjvdCYMJbUIqMd6lwoEriZjwLo08aS5tSjVMHg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -2745,15 +2748,15 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.63.0.tgz",
"integrity": "sha512-aXM5xlqXiTxPibXB93cLAURfT3rlizf7uMXISCXy66Isr/9hISJx3yDsKl0L7lKa51b8JpFuNKby0/O0pEm9jg==", "integrity": "sha512-Nzzh/OGxVCOjObjaj1CQF2RUasyYy2Jfuh+zZ3PjLzG2fYRriAiZLib9UKtO+CpQAS3YHiAS+ckZDclwqI1TPA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.62.1", "@typescript-eslint/types": "8.63.0",
"@typescript-eslint/typescript-estree": "8.62.1", "@typescript-eslint/typescript-estree": "8.63.0",
"@typescript-eslint/utils": "8.62.1", "@typescript-eslint/utils": "8.63.0",
"debug": "^4.4.3", "debug": "^4.4.3",
"ts-api-utils": "^2.5.0" "ts-api-utils": "^2.5.0"
}, },
@@ -2788,9 +2791,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.63.0.tgz",
"integrity": "sha512-ooCzJFaf+Hg+uG6fA3NRFGuFjlfNlDhBthbv4ZPU/0elCAFUfnyXUvf/WOpHz/jYwSmvU2GkR2LtyUfy1AxZ1Q==", "integrity": "sha512-xyLtl9DUBBFrcJS4x2pIqGLH68/tC2uOa4Z7pUteW09D3bXnnXUom4dyPikzWgB7llmIc1zoeI3aoUdC4rPK/Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -2802,16 +2805,16 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.63.0.tgz",
"integrity": "sha512-xMcW9oP9u7fAMXYs9A65CVmtLQe2r//oXINHfi8HV+oiqhih17sbLdhXr4540YWlgpDKQdY854OL5ZrdCiQsAA==", "integrity": "sha512-ygBkU+B7ex5UI/gKhaqexWev79uISfIv7XQCRNYO/jmD8rGLPyWLAb3KMRT6nd8Gt9bmUBi9+iX6tBdYfOY81Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/project-service": "8.62.1", "@typescript-eslint/project-service": "8.63.0",
"@typescript-eslint/tsconfig-utils": "8.62.1", "@typescript-eslint/tsconfig-utils": "8.63.0",
"@typescript-eslint/types": "8.62.1", "@typescript-eslint/types": "8.63.0",
"@typescript-eslint/visitor-keys": "8.62.1", "@typescript-eslint/visitor-keys": "8.63.0",
"debug": "^4.4.3", "debug": "^4.4.3",
"minimatch": "^10.2.2", "minimatch": "^10.2.2",
"semver": "^7.7.3", "semver": "^7.7.3",
@@ -2887,16 +2890,16 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.63.0.tgz",
"integrity": "sha512-sHtbPfuKNZCG+ih8SyjjucqRntSVmp8XgL5u6o9mAhiSn8ds5o/M/XdM0abweme2Tln3szOstOrZ9OXitvPh0g==", "integrity": "sha512-fUKaeAvrTuQg/Tgt3nliAUSZHJM6DlCcfyEmxCvlX8kieWSStBX+5O5Fnidtc3i2JrH+9c/GL4RY2iasd/GPTA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.9.1", "@eslint-community/eslint-utils": "^4.9.1",
"@typescript-eslint/scope-manager": "8.62.1", "@typescript-eslint/scope-manager": "8.63.0",
"@typescript-eslint/types": "8.62.1", "@typescript-eslint/types": "8.63.0",
"@typescript-eslint/typescript-estree": "8.62.1" "@typescript-eslint/typescript-estree": "8.63.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2911,13 +2914,13 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.62.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.63.0.tgz",
"integrity": "sha512-4g3BLxfdTMy8iZG0MaBkadnlRrCJ74cQiFbyEVMrkwIoqdyaXXQM22cotDvrl4x28wgIZ9rEJRoM+mmhSJpJ1g==", "integrity": "sha512-UexrHGnGTpbuQHct2ExOc2ZcFbGUS9FOesCxxqdBGcpI1BxYu/LZ6U8Aq6/72XtF/qRBk9nhuGHFJIXXMhPMdw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.62.1", "@typescript-eslint/types": "8.63.0",
"eslint-visitor-keys": "^5.0.0" "eslint-visitor-keys": "^5.0.0"
}, },
"engines": { "engines": {
@@ -4985,13 +4988,13 @@
} }
}, },
"node_modules/eslint-plugin-github": { "node_modules/eslint-plugin-github": {
"version": "6.0.0", "version": "6.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-6.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-6.1.0.tgz",
"integrity": "sha512-J8MvUoiR/TU/Y9NnEmg1AnbvMUj9R6IO260z47zymMLLvso7B4c80IKjd8diqmqtSmeXXlbIus4i0SvK84flag==", "integrity": "sha512-+mA0K1/I1JSE9AOiJ4ifMDGu7NplRZX0e3Uy0SjbwyXb2rsDfo5yfT0UCUO+TiOJ/99R1YxFRltizP/PZuB4PQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint/compat": "^1.2.3", "@eslint/compat": "^2.0.0",
"@eslint/eslintrc": "^3.1.0", "@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0", "@eslint/js": "^9.14.0",
"@github/browserslist-config": "^1.0.0", "@github/browserslist-config": "^1.0.0",
@@ -5008,79 +5011,18 @@
"eslint-plugin-no-only-tests": "^3.0.0", "eslint-plugin-no-only-tests": "^3.0.0",
"eslint-plugin-prettier": "^5.2.1", "eslint-plugin-prettier": "^5.2.1",
"eslint-rule-documentation": ">=1.0.0", "eslint-rule-documentation": ">=1.0.0",
"globals": "^16.0.0", "globals": "^17.7.0",
"jsx-ast-utils": "^3.3.2", "jsx-ast-utils": "^3.3.2",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"svg-element-attributes": "^1.3.1", "svg-element-attributes": "^1.3.1",
"typescript": "^5.7.3", "typescript": "^6.0.3",
"typescript-eslint": "^8.14.0" "typescript-eslint": "^8.14.0"
}, },
"bin": { "bin": {
"eslint-ignore-errors": "bin/eslint-ignore-errors.js" "eslint-ignore-errors": "bin/eslint-ignore-errors.js"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8 || ^9" "eslint": "^8 || ^9 || ^10"
}
},
"node_modules/eslint-plugin-github/node_modules/@eslint/compat": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.4.1.tgz",
"integrity": "sha512-cfO82V9zxxGBxcQDr1lfaYB7wykTa0b00mGa36FrJl7iTFd0Z2cHfEYuxcBRP/iNijCsWsEkA+jzT8hGYmv33w==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@eslint/core": "^0.17.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"peerDependencies": {
"eslint": "^8.40 || 9"
},
"peerDependenciesMeta": {
"eslint": {
"optional": true
}
}
},
"node_modules/eslint-plugin-github/node_modules/@eslint/core": {
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
"integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@types/json-schema": "^7.0.15"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/eslint-plugin-github/node_modules/globals": {
"version": "16.5.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz",
"integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint-plugin-github/node_modules/typescript": {
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
} }
}, },
"node_modules/eslint-plugin-i18n-text": { "node_modules/eslint-plugin-i18n-text": {
@@ -6979,9 +6921,9 @@
} }
}, },
"node_modules/js-yaml": { "node_modules/js-yaml": {
"version": "5.2.0", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.1.tgz",
"integrity": "sha512-YeLUMlvR4Ou1B119LIaM0r65JvbOBooJDc9yEu0dClb/uSC5P4FrLU8OCCz/HXWvtPoIrR0dRzABTjo1sTN9Bw==", "integrity": "sha512-zfLtNfQqxVqq3uaTqSkh4x4hZw3KHobGUA0fJUj4wawW8bsQLTVqpHdXSIzidh7o+4lEW36tANuAGdaFx6Zgnw==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@@ -9166,9 +9108,9 @@
"license": "0BSD" "license": "0BSD"
}, },
"node_modules/tsx": { "node_modules/tsx": {
"version": "4.22.4", "version": "4.23.0",
"resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.4.tgz", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.0.tgz",
"integrity": "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==", "integrity": "sha512-eUdUIaCr963q2h5u3+QwvYp0+eqPvn+egeqZUm0hwERCqqx1E3kK5ehbGCvqSE5MQAULr67ww0cA3jKc3YkM1w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -9318,16 +9260,16 @@
} }
}, },
"node_modules/typescript-eslint": { "node_modules/typescript-eslint": {
"version": "8.62.1", "version": "8.63.0",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.62.1.tgz", "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.63.0.tgz",
"integrity": "sha512-vymnnM5g0AKQDSAyfP12nMIBvgwgA42syg74kkuZ4x1VuTzwQKwc5h9rGxeShCjny5o+zWAb6OEoz7XLgrIkIw==", "integrity": "sha512-xgwXyzG4sK9ALkBxbyGkTMMOS+imnW65iPhxCQMK83KhxyoDNW7l+IDqEf9vMdoUidHpOoS967RCq4eMiTexwQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/eslint-plugin": "8.62.1", "@typescript-eslint/eslint-plugin": "8.63.0",
"@typescript-eslint/parser": "8.62.1", "@typescript-eslint/parser": "8.63.0",
"@typescript-eslint/typescript-estree": "8.62.1", "@typescript-eslint/typescript-estree": "8.63.0",
"@typescript-eslint/utils": "8.62.1" "@typescript-eslint/utils": "8.63.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -9815,7 +9757,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.19.43", "@types/node": "^20.19.43",
"tsx": "^4.22.4" "tsx": "^4.23.0"
} }
} }
} }

View File

@@ -30,13 +30,16 @@
"@actions/http-client": "^3.0.0", "@actions/http-client": "^3.0.0",
"@actions/io": "^2.0.0", "@actions/io": "^2.0.0",
"@actions/tool-cache": "^3.0.1", "@actions/tool-cache": "^3.0.1",
"@octokit/core": "^7.0.6",
"@octokit/plugin-paginate-rest": "^14.0.0",
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
"@octokit/plugin-retry": "^8.1.0", "@octokit/plugin-retry": "^8.1.0",
"archiver": "^8.0.0", "archiver": "^8.0.0",
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"follow-redirects": "^1.16.0", "follow-redirects": "^1.16.0",
"get-folder-size": "^5.0.0", "get-folder-size": "^5.0.0",
"https-proxy-agent": "^7.0.6", "https-proxy-agent": "^7.0.6",
"js-yaml": "^5.2.0", "js-yaml": "^5.2.1",
"jsonschema": "1.5.0", "jsonschema": "1.5.0",
"long": "^5.3.2", "long": "^5.3.2",
"node-forge": "^1.4.0", "node-forge": "^1.4.0",
@@ -61,7 +64,7 @@
"esbuild": "^0.28.1", "esbuild": "^0.28.1",
"eslint": "^9.39.4", "eslint": "^9.39.4",
"eslint-import-resolver-typescript": "^4.4.5", "eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-github": "^6.0.0", "eslint-plugin-github": "^6.1.0",
"eslint-plugin-import-x": "^4.17.1", "eslint-plugin-import-x": "^4.17.1",
"eslint-plugin-jsdoc": "^62.9.0", "eslint-plugin-jsdoc": "^62.9.0",
"eslint-plugin-no-async-foreach": "^0.1.1", "eslint-plugin-no-async-foreach": "^0.1.1",
@@ -70,7 +73,7 @@
"nock": "^14.0.16", "nock": "^14.0.16",
"sinon": "^22.0.0", "sinon": "^22.0.0",
"typescript": "^6.0.3", "typescript": "^6.0.3",
"typescript-eslint": "^8.62.1" "typescript-eslint": "^8.63.0"
}, },
"overrides": { "overrides": {
"@actions/tool-cache": { "@actions/tool-cache": {

View File

@@ -5,7 +5,7 @@ versions:
- default - default
steps: steps:
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0 uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with: with:
ruby-version: 2.6 ruby-version: 2.6
- name: Install Code Scanning integration - name: Install Code Scanning integration

View File

@@ -12,6 +12,6 @@
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.19.43", "@types/node": "^20.19.43",
"tsx": "^4.22.4" "tsx": "^4.23.0"
} }
} }

View File

@@ -211,8 +211,8 @@ const languageSetups: LanguageSetups = {
name: "Install Node.js", name: "Install Node.js",
uses: pinnedUses( uses: pinnedUses(
"actions/setup-node", "actions/setup-node",
"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e", "820762786026740c76f36085b0efc47a31fe5020",
"v6.4.0", "v7.0.0",
), ),
with: { with: {
"node-version": defaultLanguageVersions.javascript, "node-version": defaultLanguageVersions.javascript,

View File

@@ -1,8 +1,9 @@
import * as core from "@actions/core"; import * as core from "@actions/core";
import { ActionsEnv, getActionsEnv } from "./actions-util"; import { ActionsEnv, getActionsEnv } from "./actions-util";
import { Env } from "./environment"; import type { ApiClient } from "./api-client";
import { FeatureEnablement } from "./feature-flags"; import { Env, ReadOnlyEnv } from "./environment";
import type { FeatureEnablement } from "./feature-flags";
import { getActionsLogger, Logger } from "./logging"; import { getActionsLogger, Logger } from "./logging";
import { import {
ActionName, ActionName,
@@ -11,7 +12,7 @@ import {
} from "./status-report"; } from "./status-report";
import { getEnv, getErrorMessage } from "./util"; import { getEnv, getErrorMessage } from "./util";
/** Common state that is always available in `ActionState`. */ /** Base state that is available to an Action on startup. */
export interface BaseState { export interface BaseState {
/** The name of the Action. */ /** The name of the Action. */
name: ActionName; name: ActionName;
@@ -21,6 +22,7 @@ export interface BaseState {
/** Describes different state features that an Action may have. */ /** Describes different state features that an Action may have. */
export interface FeatureState { export interface FeatureState {
Base: BaseState;
Logger: { Logger: {
/** The logger that is in use. */ /** The logger that is in use. */
logger: Logger; logger: Logger;
@@ -29,10 +31,17 @@ export interface FeatureState {
/** Information about environment variables. */ /** Information about environment variables. */
env: Env; env: Env;
}; };
ReadOnlyEnv: {
env: ReadOnlyEnv;
};
Actions: { Actions: {
/** Access to Actions-related functionality. */ /** Access to Actions-related functionality. */
actions: ActionsEnv; actions: ActionsEnv;
}; };
Api: {
/** A GitHub API client. */
apiClient: ApiClient;
};
FeatureFlags: { FeatureFlags: {
/** Information about enabled feature flags. */ /** Information about enabled feature flags. */
features: FeatureEnablement; features: FeatureEnablement;
@@ -44,7 +53,7 @@ export type StateFeature = keyof FeatureState;
/** Constructs the intersection of all state types identifies by `Fs`. */ /** Constructs the intersection of all state types identifies by `Fs`. */
export type FieldsOf<Fs extends readonly StateFeature[]> = Fs extends [] export type FieldsOf<Fs extends readonly StateFeature[]> = Fs extends []
? BaseState ? Record<never, never>
: Fs extends [ : Fs extends [
infer Head extends StateFeature, infer Head extends StateFeature,
...infer Tail extends readonly StateFeature[], ...infer Tail extends readonly StateFeature[],
@@ -60,7 +69,7 @@ export type ActionState<Fs extends readonly StateFeature[]> = FieldsOf<Fs>;
* Each Action can then augment the `state` further if additional features are required. * Each Action can then augment the `state` further if additional features are required.
*/ */
export type ActionMain = ( export type ActionMain = (
state: ActionState<["Logger", "Env", "Actions"]>, state: ActionState<["Base", "Logger", "Env", "Actions"]>,
) => Promise<void>; ) => Promise<void>;
/** A specification for a CodeQL Action step. */ /** A specification for a CodeQL Action step. */

View File

@@ -212,7 +212,7 @@ async function runAutobuildIfLegacyGoWorkflow(config: Config, logger: Logger) {
await runAutobuild(config, BuiltInLanguage.go, logger); await runAutobuild(config, BuiltInLanguage.go, logger);
} }
async function run({ startedAt, logger }: ActionState<["Logger"]>) { async function run({ startedAt, logger }: ActionState<["Base", "Logger"]>) {
// To capture errors appropriately, keep as much code within the try-catch as // To capture errors appropriately, keep as much code within the try-catch as
// possible, and only use safe functions outside. // possible, and only use safe functions outside.

View File

@@ -1,5 +1,8 @@
import * as core from "@actions/core"; import * as core from "@actions/core";
import * as githubUtils from "@actions/github/lib/utils"; import * as githubUtils from "@actions/github/lib/utils";
import { type Octokit } from "@octokit/core";
import { type PaginateInterface } from "@octokit/plugin-paginate-rest";
import { type Api } from "@octokit/plugin-rest-endpoint-methods";
import * as retry from "@octokit/plugin-retry"; import * as retry from "@octokit/plugin-retry";
import { RequestRequestOptions } from "@octokit/types"; import { RequestRequestOptions } from "@octokit/types";
import { import {
@@ -122,6 +125,10 @@ export function getApiFetch(
return proxiedFetch; return proxiedFetch;
} }
/** The type of GitHub API client we use. */
export type ApiClient = Octokit & Api & { paginate: PaginateInterface };
/** Options for `createApiClientWithDetails`. */
interface CreateApiClientOptions { interface CreateApiClientOptions {
allowExternal?: boolean; allowExternal?: boolean;
proxy?: ProxyAgent; proxy?: ProxyAgent;
@@ -130,7 +137,7 @@ interface CreateApiClientOptions {
function createApiClientWithDetails( function createApiClientWithDetails(
apiDetails: GitHubApiCombinedDetails, apiDetails: GitHubApiCombinedDetails,
{ allowExternal = false, proxy = undefined }: CreateApiClientOptions = {}, { allowExternal = false, proxy = undefined }: CreateApiClientOptions = {},
) { ): ApiClient {
const auth = const auth =
(allowExternal && apiDetails.externalRepoAuth) || apiDetails.auth; (allowExternal && apiDetails.externalRepoAuth) || apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry); const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);

View File

@@ -68,7 +68,7 @@ async function sendCompletedStatusReport(
} }
} }
async function run({ startedAt, logger }: ActionState<["Logger"]>) { async function run({ startedAt, logger }: ActionState<["Base", "Logger"]>) {
// To capture errors appropriately, keep as much code within the try-catch as // To capture errors appropriately, keep as much code within the try-catch as
// possible, and only use safe functions outside. // possible, and only use safe functions outside.

View File

@@ -125,6 +125,7 @@ export function mergeDefaultSetupAndUserConfigs(
{ {
invalidKeys: schemaCheckResult.invalidKeys, invalidKeys: schemaCheckResult.invalidKeys,
}, },
["internal-error"],
), ),
); );
} }
@@ -140,6 +141,7 @@ export function mergeDefaultSetupAndUserConfigs(
{ {
unrecognisedKeys: schemaCheckResult.unknownKeys, unrecognisedKeys: schemaCheckResult.unknownKeys,
}, },
["internal-error"],
), ),
); );
} }

View File

@@ -1,6 +1,6 @@
{ {
"bundleVersion": "codeql-bundle-v2.26.0", "bundleVersion": "codeql-bundle-v2.26.1",
"cliVersion": "2.26.0", "cliVersion": "2.26.1",
"priorBundleVersion": "codeql-bundle-v2.25.6", "priorBundleVersion": "codeql-bundle-v2.26.0",
"priorCliVersion": "2.25.6" "priorCliVersion": "2.26.0"
} }

View File

@@ -6,24 +6,45 @@ import { Language } from "./languages";
import { getActionsLogger } from "./logging"; import { getActionsLogger } from "./logging";
import { getCodeQLDatabasePath } from "./util"; import { getCodeQLDatabasePath } from "./util";
/** Represents a diagnostic message for the tool status page, etc. */ /**
export interface DiagnosticMessage { * Known tags for diagnostics. There is currently only "internal-error",
* but others may be added in the future.
*/
export type DiagnosticTag = "internal-error";
/** Optional information about the origin of a diagnostic. */
export type DiagnosticSourceOptions = {
/**
* Name of the CodeQL extractor. This is used to identify which tool component the reporting
* descriptor object should be nested under in SARIF.
*/
extractorName?: string;
/** An array of tags for the diagnostic. */
tags?: DiagnosticTag[];
};
/** Represents information about the origin of a diagnostic. */
export type DiagnosticSource = {
/**
* An identifier under which it makes sense to group this diagnostic message.
* This is used to build the SARIF reporting descriptor object.
*/
id: string;
/** Display name for the ID. This is used to build the SARIF reporting descriptor object. */
name: string;
} & DiagnosticSourceOptions;
/**
* Represents a diagnostic message for the tool status page, etc.
*
* Unlike {@link DiagnosticMessage}, properties which can automatically
* be populated are optional in this type.
*/
export type DiagnosticMessageOptions = {
/** ISO 8601 timestamp */ /** ISO 8601 timestamp */
timestamp: string; timestamp?: string;
source: { /** Information about the origin of the diagnostic. */
/** source?: DiagnosticSourceOptions;
* An identifier under which it makes sense to group this diagnostic message.
* This is used to build the SARIF reporting descriptor object.
*/
id: string;
/** Display name for the ID. This is used to build the SARIF reporting descriptor object. */
name: string;
/**
* Name of the CodeQL extractor. This is used to identify which tool component the reporting
* descriptor object should be nested under in SARIF.
*/
extractorName?: string;
};
/** GitHub flavored Markdown formatted message. Should include inline links to any help pages. */ /** GitHub flavored Markdown formatted message. Should include inline links to any help pages. */
markdownMessage?: string; markdownMessage?: string;
/** Plain text message. Used by components where the string processing needed to support Markdown is cumbersome. */ /** Plain text message. Used by components where the string processing needed to support Markdown is cumbersome. */
@@ -53,7 +74,15 @@ export interface DiagnosticMessage {
}; };
/** Structured metadata about the diagnostic message */ /** Structured metadata about the diagnostic message */
attributes?: { [key: string]: any }; attributes?: { [key: string]: any };
} };
/** Represents a diagnostic message for the tool status page, etc. */
export type DiagnosticMessage = DiagnosticMessageOptions & {
/** ISO 8601 timestamp */
timestamp: string;
/** Information about the origin of the diagnostic. */
source: DiagnosticSource;
};
/** Represents a diagnostic message that has not yet been written to the database. */ /** Represents a diagnostic message that has not yet been written to the database. */
interface UnwrittenDiagnostic { interface UnwrittenDiagnostic {
@@ -90,7 +119,7 @@ let diagnosticCounter = 0;
export function makeDiagnostic( export function makeDiagnostic(
id: string, id: string,
name: string, name: string,
data: Partial<DiagnosticMessage> | undefined = undefined, data: DiagnosticMessageOptions | undefined = undefined,
): DiagnosticMessage { ): DiagnosticMessage {
return { return {
...data, ...data,
@@ -243,6 +272,7 @@ export function makeTelemetryDiagnostic(
id: string, id: string,
name: string, name: string,
attributes: { [key: string]: any }, attributes: { [key: string]: any },
tags?: DiagnosticTag[],
): DiagnosticMessage { ): DiagnosticMessage {
return makeDiagnostic(id, name, { return makeDiagnostic(id, name, {
attributes, attributes,
@@ -251,5 +281,8 @@ export function makeTelemetryDiagnostic(
statusPage: false, statusPage: false,
telemetry: true, telemetry: true,
}, },
source: {
tags,
},
}); });
} }

View File

@@ -203,7 +203,9 @@ async function sendCompletedStatusReport(
} }
} }
async function run(actionState: ActionState<["Logger", "Env", "Actions"]>) { async function run(
actionState: ActionState<["Base", "Logger", "Env", "Actions"]>,
) {
// To capture errors appropriately, keep as much code within the try-catch as // To capture errors appropriately, keep as much code within the try-catch as
// possible, and only use safe functions outside. // possible, and only use safe functions outside.

View File

@@ -90,7 +90,7 @@ async function sendCompletedStatusReport(
async function run({ async function run({
startedAt, startedAt,
logger, logger,
}: ActionState<["Logger"]>): Promise<void> { }: ActionState<["Base", "Logger"]>): Promise<void> {
// To capture errors appropriately, keep as much code within the try-catch as // To capture errors appropriately, keep as much code within the try-catch as
// possible, and only use safe functions outside. // possible, and only use safe functions outside.

View File

@@ -192,7 +192,15 @@ export function getTestActionsEnv(): ActionsEnv {
} }
/** For testing purposes, we make all available state features accessible in `TestEnv`. */ /** For testing purposes, we make all available state features accessible in `TestEnv`. */
type AllState = ["Logger", "Env", "Actions", "FeatureFlags"]; type AllState = [
"Base",
"Logger",
"Env",
"ReadOnlyEnv",
"Actions",
"Api",
"FeatureFlags",
];
/** Initialise a fresh `ActionState<AllState>` value. */ /** Initialise a fresh `ActionState<AllState>` value. */
export function initAllState( export function initAllState(
@@ -204,6 +212,7 @@ export function initAllState(
logger: new RecordingLogger(), logger: new RecordingLogger(),
env: getTestEnv(), env: getTestEnv(),
actions: getTestActionsEnv(), actions: getTestActionsEnv(),
apiClient: github.getOctokit("123"),
features: createFeatures([]), features: createFeatures([]),
...overrides, ...overrides,
}; };

View File

@@ -54,7 +54,7 @@ async function sendSuccessStatusReport(
} }
} }
async function run({ startedAt, logger }: ActionState<["Logger"]>) { async function run({ startedAt, logger }: ActionState<["Base", "Logger"]>) {
// To capture errors appropriately, keep as much code within the try-catch as // To capture errors appropriately, keep as much code within the try-catch as
// possible, and only use safe functions outside. // possible, and only use safe functions outside.
try { try {