Skip to content

Commit 46bed20

Browse files
committed
ci: use runner temp for VS Code profile
1 parent 913169d commit 46bed20

5 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626

2727
env:
2828
VSCODE_TEST_VERSION: stable
29-
VSCODE_TEST_USER_DATA_DIR: ${{ runner.temp }}/kimi-vscode-test
3029

3130
steps:
3231
- name: Checkout repository
@@ -64,7 +63,6 @@ jobs:
6463

6564
env:
6665
VSCODE_TEST_VERSION: ${{ matrix.vscode }}
67-
VSCODE_TEST_USER_DATA_DIR: ${{ runner.temp }}/kimi-vscode-test
6866

6967
steps:
7068
- name: Checkout repository

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
name: Package GitHub release
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 15
16-
env:
17-
VSCODE_TEST_USER_DATA_DIR: ${{ runner.temp }}/kimi-vscode-test
1816
permissions:
1917
contents: write
2018

‎docs/SECURITY_REVIEW.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Resolution:
2626
- `brace-expansion` is locked to 5.0.9 (`package-lock.json:1510`).
2727
- `fast-uri` is locked to 3.1.5 (`package-lock.json:2167`).
2828
- `npm run check:security` now audits the lockfile at high severity (`package.json:127`).
29-
- CI and release jobs run the audit before accepting or publishing artifacts (`.github/workflows/ci.yml:106`, `.github/workflows/release.yml:44`).
29+
- CI and release jobs run the audit before accepting or publishing artifacts (`.github/workflows/ci.yml:104`, `.github/workflows/release.yml:42`).
3030

3131
## Medium-Severity Findings
3232

@@ -36,8 +36,8 @@ The CI workflow referenced `actions/checkout@v7` and `actions/setup-node@v6`. Ma
3636

3737
Resolution:
3838

39-
- All checkout and Node setup steps are pinned to verified full commit SHAs, with their major release retained in same-line comments for maintainability (`.github/workflows/ci.yml:33`, `.github/workflows/ci.yml:36`, `.github/workflows/release.yml:23`, `.github/workflows/release.yml:26`).
40-
- Default workflow permissions remain read-only; only the release job receives scoped `contents: write` permission (`.github/workflows/release.yml:8`, `.github/workflows/release.yml:18`).
39+
- All checkout and Node setup steps are pinned to verified full commit SHAs, with their major release retained in same-line comments for maintainability (`.github/workflows/ci.yml:32`, `.github/workflows/ci.yml:35`, `.github/workflows/release.yml:21`, `.github/workflows/release.yml:24`).
40+
- Default workflow permissions remain read-only; only the release job receives scoped `contents: write` permission (`.github/workflows/release.yml:8`, `.github/workflows/release.yml:16`).
4141

4242
## Low-Severity Findings
4343

‎test/integration/runTest.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ async function main() {
55
const extensionDevelopmentPath = path.resolve(__dirname, '..', '..');
66
const extensionTestsPath = path.resolve(__dirname, 'suite');
77
const launchArgs = ['--disable-extensions'];
8-
const userDataDir = process.env.VSCODE_TEST_USER_DATA_DIR;
8+
const userDataDir =
9+
process.env.VSCODE_TEST_USER_DATA_DIR ||
10+
(process.env.RUNNER_TEMP ? path.join(process.env.RUNNER_TEMP, 'kimi-vscode-test') : undefined);
911

1012
if (userDataDir) {
1113
launchArgs.push(`--user-data-dir=${userDataDir}`);

‎test/metadata.test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ test('CI validates securely across supported platforms and editor versions', ()
156156
assert.match(workflow, /ubuntu-latest/);
157157
assert.match(workflow, /macos-latest/);
158158
assert.match(workflow, /vscode: '1\.103\.0'/);
159-
assert.match(workflow, /VSCODE_TEST_USER_DATA_DIR: \$\{\{ runner\.temp \}\}\/kimi-vscode-test/);
160159
assert.match(workflow, /cache: npm/);
161160
assert.match(workflow, /npm ci --ignore-scripts/);
162161
assert.match(workflow, /npm run check/);
@@ -171,6 +170,7 @@ test('integration runner supports a short isolated VS Code profile path', () =>
171170
const runner = readText('test/integration/runTest.js');
172171

173172
assert.match(runner, /process\.env\.VSCODE_TEST_USER_DATA_DIR/);
173+
assert.match(runner, /process\.env\.RUNNER_TEMP/);
174174
assert.match(runner, /--user-data-dir=\$\{userDataDir\}/);
175175
});
176176

0 commit comments

Comments
 (0)