Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
f005029
feat(tauri): add embedded WebDriver provider support
goosewobbler Feb 17, 2026
d6ad8b8
test(tauri): add Tauri E2E tests with embedded WebDriver provider
goosewobbler Feb 17, 2026
57d9ca1
chore: add `tauri-plugin-webdriver`
goosewobbler Feb 17, 2026
fd992c7
chore: install local plugin
goosewobbler Feb 17, 2026
d8fca1e
refactor(webdriver): improve JSON serialization handling in Linux pla…
goosewobbler Feb 17, 2026
42f5a34
chore: add webdriver perm
goosewobbler Feb 17, 2026
84cda72
refactor(tauri-plugin): update event emission to use window.emit
goosewobbler Feb 17, 2026
e0b4e04
chore: use correct env var
goosewobbler Feb 17, 2026
fa6b45a
chore: update webdriver plugin
goosewobbler Feb 17, 2026
19e03fd
refactor(tauri-plugin): enhance JSON schema formatting and permission…
goosewobbler Feb 17, 2026
9a10762
chore: update E2E log display script and CI workflows
goosewobbler Feb 20, 2026
d0e8103
chore: add debug information for CI workflows
goosewobbler Feb 20, 2026
38b7ab3
chore: update CodeQL configuration to address false positives
goosewobbler Feb 20, 2026
aeb03af
docs: add security note for non-secure cookie handling in WebDriver
goosewobbler Feb 20, 2026
fd5e0bc
refactor(tauri-plugin): update event handling to use getCurrentWindow…
goosewobbler Feb 20, 2026
77cd7bc
fix(tauri-plugin): revert to app-level events for tauri-driver compat…
goosewobbler Feb 20, 2026
a29ab3a
chore: enhance binary detection in CI workflows
goosewobbler Feb 20, 2026
8323ad8
chore: update tpw again
goosewobbler Feb 20, 2026
6e5d3a2
debug: enhance directory listing in CI workflows for macOS
goosewobbler Feb 20, 2026
c50f179
chore: improve macOS binary detection in CI workflows
goosewobbler Feb 20, 2026
fcb8efd
chore: refine macOS binary detection in CI workflows
goosewobbler Feb 21, 2026
c20882b
chore: update macOS binary detection logic in build manager
goosewobbler Feb 21, 2026
b9d1106
chore: enhance Tauri session capabilities and logging tests
goosewobbler Feb 21, 2026
7c3cfbf
chore: update dependency versions and enhance JSON schema validation
goosewobbler Feb 21, 2026
e874ebb
chore: refine JSON schema definitions and enhance command execution
goosewobbler Feb 21, 2026
3135a6c
chore: wrap script execution in IIFE for WebDriver compatibility
goosewobbler Feb 21, 2026
5a1fc08
chore: enable NPM OIDC trusted publishing
goosewobbler Feb 21, 2026
c4589b9
chore: update permissions for release workflows
goosewobbler Feb 21, 2026
46d4f8a
chore: update script execution wrapping for WebDriver compatibility
goosewobbler Feb 21, 2026
dc73fc0
chore: add driver provider option to TauriWorkerService
goosewobbler Feb 21, 2026
c899227
chore: enhance log directory naming for driver provider support
goosewobbler Feb 21, 2026
ecb9abd
chore: refine script wrapping for embedded WebDriver compatibility
goosewobbler Feb 21, 2026
418ef65
docs: fix repo title
goosewobbler Feb 21, 2026
419d68b
chore: simplify script handling for embedded WebDriver
goosewobbler Feb 21, 2026
505d64f
chore: add `autoInstallTauriDriver` back to standalone opts
goosewobbler Feb 21, 2026
5f77e69
chore: refine script handling for embedded WebDriver
goosewobbler Feb 21, 2026
9000f9c
chore: enhance script execution for embedded WebDriver
goosewobbler Feb 21, 2026
d2aff6a
chore: streamline script execution for embedded WebDriver
goosewobbler Feb 21, 2026
2dd2803
chore: fix plugin to evaluate scripts as expressions rather than stat…
goosewobbler Feb 21, 2026
ba437a9
feat: implement WebView2 runtime detection from Windows registry
goosewobbler Feb 21, 2026
a3c782b
refactor: streamline Edge driver version detection in ensureMsEdgeDriver
goosewobbler Feb 21, 2026
39a4443
feat: enhance embedded WebDriver logging and process management
goosewobbler Feb 21, 2026
43dd43c
feat: add script timeout functionality to platform executors
goosewobbler Feb 21, 2026
a5f393e
fix: update unit test mock for browser.execute
goosewobbler Feb 21, 2026
93dc94d
chore: remove deprecated executeAsync from test mocks
goosewobbler Feb 21, 2026
51706f9
fix: restore polling for plugin availability and fix __name test issue
goosewobbler Feb 21, 2026
ef56209
refactor: consolidate log handling and improve log capture functionality
goosewobbler Feb 22, 2026
c493dbd
refactor: update JSON schemas for permissions and capabilities
goosewobbler Feb 22, 2026
661bc4d
refactor: update JSON schemas for improved consistency and clarity
goosewobbler Feb 22, 2026
ad32b2d
refactor: update artifact naming in CI workflows to include architecture
goosewobbler Feb 22, 2026
28ab18b
refactor: improve log directory naming and initialization logic
goosewobbler Feb 22, 2026
cd8022d
refactor: enhance logging test structure and exclusions
goosewobbler Feb 22, 2026
b1d78c0
refactor: increase script execution timeout for improved reliability
goosewobbler Feb 22, 2026
c83cba9
refactor: update dependencies and improve JSON schema consistency
goosewobbler Feb 22, 2026
62b46a6
test: enhance log directory structure based on driver provider
goosewobbler Feb 22, 2026
bf95b98
refactor: enhance error handling and status reporting in WebDriver
goosewobbler Feb 23, 2026
86ef8c2
chore: simplify error logging for CoreWebView2 retrieval
goosewobbler Feb 23, 2026
b5b05cc
refactor: improve error handling in script execution for WindowsExecutor
goosewobbler Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions .github/codeql/FALSE_POSITIVE_ANALYSIS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# CodeQL Actions Artifact Poisoning - False Positive Analysis

## Summary

CodeQL raised `actions/artifact-poisoning` alerts against debug log steps in three workflow files. After analysis, these were determined to be **false positives** and the alerts should be dismissed in the GitHub Security UI.

## Affected Files

| File | Step Name |
|------|-----------|
| `.github/workflows/_ci-e2e.reusable.yml` | 🐛 Show Logs on Failure |
| `.github/workflows/_ci-e2e-tauri.reusable.yml` | 🐛 Debug Information |
| `.github/workflows/_ci-e2e-tauri-embedded.reusable.yml` | 🐛 Debug Information |

## The Alert

CodeQL flagged the pattern:
```yaml
run: pnpm exec tsx e2e/scripts/show-logs.ts
```

The concern: if a malicious artifact were downloaded and extracted to the workspace, it could potentially overwrite `e2e/scripts/show-logs.ts`, causing arbitrary code execution.

## Why This Is A False Positive

The artifact extraction logic in `.github/workflows/actions/download-archive/action.yml` has strict safeguards:

### 1. Extraction to Temporary Directory

Artifacts are first extracted to `${RUNNER_TEMP}/artifact-extract-{run_id}-{attempt}` - a per-job temp directory outside the workspace.

### 2. Whitelisted Directory Copy

Check warning on line 32 in .github/codeql/FALSE_POSITIVE_ANALYSIS.md

View check run for this annotation

In Solidarity / Inclusive Language

Match Found

Please consider an alternative to `Whitelist`. Possibilities include: `include list`, `allow list`
Raw output
/white[_-]*list/gi

The "Extract and Copy Archive" step only copies specific directories to the workspace:

```bash
# Lines 259-268: Only search for these specific directory names
for search_dir in "packages" "fixtures" "e2e"; do
DIST_DIRS=$((DIST_DIRS + $(find "$SOURCE_DIR/$search_dir" -type d -path "*/dist" ...)))
DIST_JS_DIRS=$((DIST_JS_DIRS + $(find "$SOURCE_DIR/$search_dir" -type d -name "dist-js" ...)))
TARGET_DIRS=$((TARGET_DIRS + $(find "$SOURCE_DIR/$search_dir" -type d -name "target" ...)))
done
```

### 3. Copy Function Only Handles These Directories

The `copy_directory` function is only called for:
- `**/dist` directories
- `**/dist-js` directories
- `**/target` directories

**It never copies `scripts/` directories.**

### Conclusion

Even if a malicious artifact contained a poisoned `e2e/scripts/show-logs.ts` file:
1. The artifact extracts to a temp directory
2. The copy logic only looks for `dist/`, `dist-js/`, and `target/`
3. The `scripts/` directory is never touched

The script at `e2e/scripts/show-logs.ts` can only come from the git checkout, never from an artifact.

## CodeQL's Limitation

CodeQL's `actions/artifact-poisoning` rule applies a blanket "defense in depth" analysis:
- It sees: "artifacts are downloaded" + "code is executed from workspace"
- It doesn't understand: the custom extraction logic that whitelists specific directories

Check warning on line 67 in .github/codeql/FALSE_POSITIVE_ANALYSIS.md

View check run for this annotation

In Solidarity / Inclusive Language

Match Found

Please consider an alternative to `whitelist`. Possibilities include: `include list`, `allow list`
Raw output
/white[_-]*list/gi

This is a reasonable default for CodeQL to apply, but in this specific codebase with our custom `download-archive` action, the risk is mitigated by design.

## Decision

1. **Dismiss alerts** in GitHub Security UI as "False positive"
2. **Document rationale** in `.github/codeql/codeql-config.yml` for future reference
3. **Add comments** in workflow files explaining the false positive

## Alternative Approaches Considered

### 1. Inline Shell Script
Replace the TypeScript script with inline bash:
```yaml
run: |
find e2e/logs -name '*.log' -type f | while read -r f; do
echo "=== $f ==="
cat "$f"
done
```

**Pros:** No file execution, satisfies CodeQL
**Cons:** Duplicates logic across 3 files, loses shared script benefit, harder to maintain

### 2. Copy Script to Temp Directory
```yaml
run: |
mkdir -p "${RUNNER_TEMP}/scripts"
cp e2e/scripts/show-logs.ts "${RUNNER_TEMP}/scripts/"
pnpm exec tsx "${RUNNER_TEMP}/scripts/show-logs.ts"
```

**Pros:** Satisfies CodeQL
**Cons:** Over-engineering for a non-existent threat, adds complexity

### 3. Hash Verification
Compute script hash at checkout, verify before execution.

**Cons:** Massive overkill for a false positive

## Final Implementation

Chose to keep the original script approach with documentation:

```yaml
# CodeQL false positive: This script cannot be poisoned by artifacts because
# download-archive/action.yml only extracts dist/, dist-js/, and target/ directories
# to the workspace - it never touches scripts/ directories.
- name: 🐛 Debug Information
run: pnpm exec tsx e2e/scripts/show-logs.ts
```

This maintains the benefit of a shared, version-controlled script while documenting why the CodeQL alert is a false positive for future maintainers and security auditors.
27 changes: 25 additions & 2 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# CodeQL configuration file
# This file specifies which directories to exclude from CodeQL analysis
name: "WDIO Desktop Mobile CodeQL Config"

# Exclude test files and directories from analysis
paths-ignore:
Expand All @@ -18,3 +17,27 @@ paths-ignore:

# Coverage and debug output
- '**/coverage/**'

# Disable queries that produce false positives for this codebase
#
# actions/artifact-poisoning: This query alerts when code is executed from a directory
# that could be overwritten by downloaded artifacts. In this codebase, this is a false
# positive because our artifact download logic has strict safeguards:
#
# 1. Artifacts are extracted to ${RUNNER_TEMP}/artifact-extract-{run_id}-{attempt}
# (a per-job temp directory, not the workspace)
#
# 2. The download-archive action (.github/workflows/actions/download-archive/action.yml)
# only copies specific directories to the workspace:
# - dist/ directories (build output)
# - dist-js/ directories (build output)
# - target/ directories (Rust/Tauri build output)
#
# 3. The copy_directory function is never called on scripts/ directories, so
# e2e/scripts/show-logs.ts (and any other scripts) cannot be overwritten by artifacts
#
# See .github/codeql/FALSE_POSITIVE_ANALYSIS.md for detailed rationale.
#
query-filters:
- exclude:
id: actions/artifact-poisoning
4 changes: 2 additions & 2 deletions .github/workflows/_ci-build-tauri-e2e-app.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ jobs:
id: upload-archive
uses: ./.github/workflows/actions/upload-archive
with:
name: tauri-e2e-app-${{ runner.os }}
output: tauri-e2e-app-${{ runner.os }}/artifact.zip
name: tauri-e2e-app-${{ runner.os }}-${{ runner.arch }}
output: tauri-e2e-app-${{ runner.os }}-${{ runner.arch }}/artifact.zip
paths: fixtures/e2e-apps/tauri/src-tauri/target
cache_key_prefix: tauri-e2e-app
retention_days: '90'
Expand Down
Loading
Loading